How to access a variable stored in group
33 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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') ;
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 NetCDF 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!