Why receive error message "Could not find variable or group 'Bandl' in file."

9 Ansichten (letzte 30 Tage)
When I dispaly information abut my netcdf file (1982 January average sst) it dispalys the variable "Bandl" which must be the sst data. But when I want to access that variable to through "ncinfo" as shown below I receive an error message "Could not find variable or group 'Bandl' in file." Why is that?
>> ncdisp('198201.sst.avg.nc')
Format:
classic
Global Attributes:
Conventions = 'CF-1.5'
GDAL = 'GDAL 2.4.0, released 2018/12/14'
history = 'Fri Oct 21 14:28:38 2022: GDAL Create( /export/home/dres/SST/monthlyNCEI/sst/198201.sst.avg.nc, ... )'
Dimensions:
lon = 360
lat = 180
Variables:
Band1
Size: 360x180
Dimensions: lon,lat
Datatype: single
Attributes:
long_name = 'GDAL Band Number 1'
_FillValue = -999
units = 'Celsius'
lat
Size: 180x1
Dimensions: lat
Datatype: double
Attributes:
standard_name = 'latitude'
long_name = 'latitude'
units = 'degrees_north'
lon
Size: 360x1
Dimensions: lon
Datatype: double
Attributes:
standard_name = 'longitude'
long_name = 'longitude'
units ='degrees east'
>> ncinfo('198201.sst.avg.nc',"Bandl")
Error using internal.matlab.imagesci.nc/getGroupAndVarid
Could not find variable or group 'Bandl' in file.
Error in internal.matlab.imagesci.nc/info (line 979)
[gid, varid] = getGroupAndVarid(this, location);
Error in ncinfo (line 98)
info = ncObj.info(location);

Akzeptierte Antwort

Simbarashe Chidzambwa
Simbarashe Chidzambwa am 29 Mär. 2023
Figured it out thanks.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 29 Mär. 2023
You are asking to access Bandl with the final character being lower-case L . The variable in the file is Band1 with the final character being the number 1.

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by