cdo sellonlatbox: Unsupported grid type: generic
Added by Ahmed Shaaban about 13 years ago
Hello
i am trying to select portion from a file netcdf using the command sellonlatbox , cdo sellonlatbox,11.83,44.17,18.265,37.735 geo_nmm.d01.nc geo_cutted.nc
i found the following message
cdo sellonlatbox: Unsupported grid type: generic cdo sellonlatbox (Abort): Unsupported grid type!
i have attached the output of the ncdump -h of the file.
the file is the WRF-NMM preprocessing file
thanks in advance
Replies (3)
RE: cdo sellonlatbox: Unsupported grid type: generic - Added by Uwe Schulzweida about 13 years ago
sellonlatbox needs datavariables on a regular lonlat grid in order to select a lonlat box.
Your netCDF may contain data on a regular lonlat grid but the attributes describing the grid do not follow the CF convention. That makes it impossible to automatically find the coordinates of the lonlat grid. Datavariables without or wrong grid description a called generic grids in CDO.
RE: cdo sellonlatbox: Unsupported grid type: generic - Added by Ahmed Shaaban about 13 years ago
thanks for your replay
i used the following command to change the attributes
ncatted -a units,XLAT_M,m,c,"degreeN" -a units,XLONG_M,m,c,"degreeE" -a units,XLAT_V,m,c,"degreeN" -a units,XLONG_V,m,c,"degreeE" ahmedgeo_nmm.d01.nc
but i still have the problem
any suggestion
thanks for your help
RE: cdo sellonlatbox: Unsupported grid type: generic - Added by Armelle Reca Remedio about 13 years ago
hello, did you try to use setgrid first?
in my case, i had a global observation dataset at 0.5 degree resolution.
so i used the following command:
cdo setgrid,r360x720 file_with_generic_grid newfile
but in your case, you need to create a grid description file and pipe next your sellonlatbox e.g.
cdo -sellonlatbox,11.83,44.17,18.265,37.735 -setgrid,your_grid_file.txt geo_nmm.d01.nc geo_cutted.nc
i hope it helps!