Project

General

Profile

How to fix 'cdo sellonlatbox (Abort): Unsupported grid type! ' error?

Added by Navajyoth MP almost 6 years ago

I've tried using the command sellonlatbox on a an nc file that gives me the errror:

Warning (cdf_scan_var_attr) : NetCDF: Variable not found - >nav_lon<
Warning (cdf_scan_var_attr) : NetCDF: Variable not found - >nav_lat<
cdo sellonlatbox: Unsupported grid type: generic

cdo sellonlatbox (Abort): Unsupported grid type!

I've been referring to the thread [[https://code.mpimet.mpg.de/boards/1/topics/5961?r=5966]] for possible solutions, but I can't get around it. ncdump -h gives me:

netcdf input {

dimensions:
lon = 144 ;
lat = 73 ;
time = UNLIMITED ; // (15586 currently)
nmiss = 7 ;
variables:

float lon(lon) ;
lon:units = "degrees_east" ;
lon:long_name = "longitude" ;
lon:actual_range = 0.f, 360.f ;
lon:standard_name = "longitude" ;
lon:axis = "X" ;
float lat(lat) ;
lat:units = "degrees_north" ;
lat:actual_range = 90.f, -90.f ;
lat:long_name = "latitude" ;
lat:standard_name = "latitude" ;
lat:axis = "Y" ;
double time(time) ;
time:units = "hours since 1800-01-01 00:00:0.0" ;
time:long_name = "Time" ;
time:actual_range = 1528872., 1902912. ;
time:delta_t = "0000-00-01 00:00:00" ;
time:standard_name = "time" ;
time:axis = "T" ;
short olr(time, lat, lon) ;
olr:long_name = "Daily OLR" ;
olr:unpacked_valid_range = 0.f, 500.f ;
olr:actual_range = 64.75f, 344.5f ;
olr:units = "W/m^2" ;
olr:add_offset = 327.65f ;
olr:scale_factor = 0.01f ;
olr:missing_value = 32766s ;
olr:var_desc = "Outgoing Longwave Radiation" ;
olr:precision = 2s ;
olr:dataset = "NOAA Interpolated OLR" ;
olr:level_desc = "Other" ;
olr:statistic = "Mean" ;
olr:parent_stat = "Individual Obs" ;
olr:valid_range = -32765s, 17235s ;
olr:coordinates = "nav_lon nav_lat" ;
short info(time, nmiss) ;
info:valid_range = 0s, 10512s ;
info:long_name = "Missing" ;
info:missing_value = 32766s ;

Kindly help me out.


Replies (4)

RE: How to fix 'cdo sellonlatbox (Abort): Unsupported grid type! ' error? - Added by Ralf Mueller almost 6 years ago

the line

olr:coordinates = "nav_lon nav_lat" ;
is the key here: orl uses coordinates variables nav_lon and nav_lat, but both or not present in your file. Without coordinated, CDO cannot determine the grid - hence the error.

hth
ralf

RE: How to fix 'cdo sellonlatbox (Abort): Unsupported grid type! ' error? - Added by Navajyoth MP almost 6 years ago

I get that. What I don't know is, how to change it. Is there a way to do it using nco?

RE: How to fix 'cdo sellonlatbox (Abort): Unsupported grid type! ' error? - Added by Ralf Mueller almost 6 years ago

The coordinates cannot be generated, you have to have them somewhere in another file. you can use nco to write these variables to another file, cdo setgrid should do it, too.

RE: How to fix 'cdo sellonlatbox (Abort): Unsupported grid type! ' error? - Added by Uwe Schulzweida almost 6 years ago

You example file contains the two data variables olr and info. olr is on a regular lon/lat grid and the coordinate lon and lat are available in the file. The coordinates attribute

olr:coordinates = "nav_lon nav_lat" ;
seems to be a relict from the original data. It doesn't make sense here and the warning message can be ignored.
The problematic variable is info, it has no coordinates. In this case you have to select the variable olr before calling sellonlatbox:
cdo sellonlatbox,...  -selname,olr  infile  outfile

    (1-4/4)