How to access a variable stored in group

7 ビュー (過去 30 日間)
Sreeraj R
Sreeraj R 2021 年 10 月 8 日
回答済み: KSSV 2021 年 10 月 12 日
hi, i am currently working on tropomi data and the i am trying to read the nitrogendioxide tropospheric column data from the NetCDF file. however the column data is not saved under variables but is saved under variables in the Group folder. the variable path is like this Groups:/PRODUCTS/Variables: nitrogendioxide_tropospheric_column. what code can i use to read this variable. i already tried ncread(tropomi,'nitrogendioxide_tropospheric_column') but it gave an error saying the variable doesnt exist in the file. kindly help me to read this data

回答 (1 件)

KSSV
KSSV 2021 年 10 月 12 日
file1 = 'tropomi1.nc' ;
file2 = 'tropomi2.nc' ;
x1 = ncread(file1,'/PRODUCT/longitude');
y1 = ncread(file1,'/PRODUCT/latitude');
z1 = ncread(file1,'/PRODUCT/nitrogendioxide_tropospheric_column') ;
x2 = ncread(file2,'/PRODUCT/longitude');
y2 = ncread(file2,'/PRODUCT/latitude');
z2 = ncread(file2,'/PRODUCT/nitrogendioxide_tropospheric_column') ;

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by