Project

General

Profile

cdo showvar doesn't show the variable in the file

Added by Pierre-Antoine Bretonnière about 9 years ago

Hello,

I'm trying to regrid a file and get the following error:

@cdo remapcons,t106grid -selname,g500 g500_19810501.nc tmp.nc
cdo remapcons: Started child process "selname,g500 g500_19810501.nc (pipe1.1)".

cdo(2) selname (Warning): Variable name g500 not found!

cdo(2) selname (Abort): No variables selected!@

Indeed, when I do a cdo showvar g500_19810501.nc, the only variable that appears is realization, whereas ncdump -h g500_19810501.nc shows that g500 is present in my file:

netcdf g500_19810501 {
dimensions:
time = UNLIMITED ; // (4 currently)
time_bnd = 2 ;
longitude = 320 ;
latitude = 160 ;
lev = 1 ;
ensemble = 10 ;
string80 = 80 ;
variables:
int level ;
level:standard_name = "air_pressure" ;
level:long_name = "air pressure" ;
level:data_type = "float" ;
level:units = "Pa" ;
level:axis = "Z" ;
level:positive = "up" ;
int leadtime(time) ;
leadtime:bounds = "time_bnd" ;
leadtime:calendar = "proleptic_gregorian" ;
leadtime:long_name = "time elapsed since the start of the forecast" ;
leadtime:standard_name = "forecast_period" ;
leadtime:units = "hours" ;
int reftime(time) ;
reftime:calendar = "proleptic_gregorian" ;
reftime:long_name = "forecast reference time" ;
reftime:standard_name = "time" ;
reftime:units = "days since 1950-01-01 00:00:00" ;
int time_bnd(time, time_bnd) ;
time_bnd:units = "hours" ;
double longitude(longitude) ;
longitude:standard_name = "longitude" ;
longitude:long_name = "longitude" ;
longitude:units = "degrees_east" ;
longitude:axis = "X" ;
double latitude(latitude) ;
latitude:standard_name = "latitude" ;
latitude:long_name = "latitude" ;
latitude:units = "degrees_north" ;
latitude:axis = "Y" ;
double lev(lev) ;
lev:standard_name = "air_pressure" ;
lev:long_name = "pressure" ;
lev:units = "Pa" ;
lev:positive = "down" ;
lev:axis = "Z" ;
float g500(time, ensemble, lev, latitude, longitude) ;
g500:grid_type = "gaussian" ;
g500:standard_name = "geopotential" ;
g500:long_name = "geopotential" ;
g500:data_type = "float" ;
g500:units = "m2 s-2" ;
g500:unit_long = "square_meter_per_square_second" ;
g500:cell_methods = "leadtime: mean (interval 12h)" ;
g500:coordinates = "longitude latitude reftime leadtime time_bnd experiment_id source realization institution level" ;
g500:_FillValue = 1.e+12f ;

It seems to be the case for all my 3D files.
Do you know what could be the reason for that and what can be done?

I'm using cdo v1.6.3.

Thank you very much for your help,
Best regards,

Pierre-Antoine Bretonnière


Replies (4)

RE: cdo showvar doesn't show the variable in the file - Added by Pierre-Antoine Bretonnière about 9 years ago

I found that removing the degenerate dimension lev (ncwa -O -a lev g500_19810501.nc new.nc) solves the problem but I would still be interested in understanding why with lev as dimension, cdo showvar and cdo remapcons fail.
That would be great if I could make things work without touching my files, just with a cdo command.

Thank you,
Bets regards,

Pierre-Antoine Bretonnière

RE: cdo showvar doesn't show the variable in the file - Added by Uwe Schulzweida about 9 years ago

The variable g500 has 5 dimensions:

float g500(time, ensemble, lev, latitude, longitude) ;
CDO does not support netCDF arrays with more than 4 dimensions.

RE: cdo showvar doesn't show the variable in the file - Added by Pierre-Antoine Bretonnière about 9 years ago

OK, thank you for your answer. In the particular case, lev is a degenerate dimension so it's not really a problem, but if we have a real 3D variable with several ensemble members in a same file, it means they won't be usable with cdo, right?

Thanks

    (1-4/4)