NetCDF conversion to GRIB2 -- generic grid
Added by Eric Reichwaldt about 10 years ago
Hello,
I know there have been several cases of this issue on the forums, but unfortunately I have not been able to get any of the solutions to work for me. I have a NetCDF satellite file that I need to convert to GRIB2. The Latitude and Longitude data is listed in the variables section from ncdump
dimensions:
samples = 650 ;
lines = 372 ;
variables:
short LATITUDE(lines, samples) ;
LATITUDE:units = "degrees" ;
LATITUDE:valid_min = 36.99998f ;
LATITUDE:valid_max = 40.93936f ;
LATITUDE:missing_value = 42.f ;
LATITUDE:scale = 0.001f ;
LATITUDE:offset = 36.999f ;
int LONGITUDE(lines, samples) ;
LONGITUDE:units = "degrees" ;
LONGITUDE:valid_min = -109.f ;
LONGITUDE:valid_max = -102.1106f ;
LONGITUDE:missing_value = -101.f ;
LONGITUDE:scale = 1.e-08f ;
LONGITUDE:offset = -109.f ;
but if I try to run cdo -f grb copy G15.20141225.1411.nc test.grb
I get Error (cgribexDefGrid) : Unsupported grid type: generic
I have tried creating a sample grid file and running remapbil and setgrid, but I get the same unsupported grid type every time.
I have been searching for more details on the LONGITUDE:scale values to setup a my_grid test file that matches the size, but I am confused. If I take -109 - -102.1106 I get 6.8894. Divide that by the scale of 1E-8 and the result is nearly 700 million gridpoints, so clearly I'm interpreting the meaning of this value improperly. The samples/lines value does mean that the grid is 650x372, correct? This makes it difficult for me to know what to set the xinc, yinc values in the my_grid file.
Any and all help is greatly appreciated, as I am new to CDO. Thanks!
G15.20141225.1411.nc (12.9 MB) G15.20141225.1411.nc |