Project

General

Profile

Change ID grid number

Added by guillaume dueymes over 13 years ago

Hi,

i'm working on NARCCAP project. I want to convert nc files to rpn standard files. The best way to do it is to convert netcdf files to grib files. Then i'm using the "cdo -f grb copy file.nc file.grb", that's ok. But when i'm using grib_decode to convert grib file to rpn file, i need a gridtable with all the informations about my map projection.
I created my own gridtable but this one need to be connected to my grib file by the grid_ID.

By default, the grib conversion put the grid_ID number = 255.

wgrib -V -d 1 tas_MM5I_ncep_1979010103.grb
rec 1:0:date 1979010100 PRES kpds5=1 kpds6=1 kpds7=0 levels=(0,0) grid=255 sfc anl:

Is it possible to change my grid ID number ?

Thanks a lot

Guillaume


Replies (2)

RE: Change ID grid number - Added by Ralf Mueller over 13 years ago

Hi Guillaume!
in CDO the gridIDs are set automatically. There is no way to set them manually with CDO. Sorry

regards
ralf

RE: Change ID grid number - Added by guillaume dueymes over 13 years ago

Hi Ralf

thanks for your message .
I think now i'm able to work with grib_decode but i'm facing a new problem.
When i convert my netcdf file to grib with the command "cdo -f grb copy file.nc file.grb", it seems the conversion is not correct.
My Netcdf data is a Lambert Conformal projection .

File format: netCDF
-1 : Institut Source Table Code Time Typ Grid Size Num Levels Num
1 : unknown unknown 0 -1 variable F32 12177 1 1 1
Horizontal grids :
1 : curvilinear > size : dim = 12177 nx = 123 ny = 99
longitude : first = 203.71814 last = 322.935986
latitude : first = 20.7094975 last = 69.9061966
available : xvals yvals
Vertical grids :
1 : surface : 0
Time axis : 5848 steps

And when i used the conversion to grib , my result is a Lat-Lon projection:

_ File format: GRIB
-1 : Institut Source Table Code Time Typ Grid Size Num Levels Num
1 : unknown unknown 0 1 variable P16 12177 1 1 1
Horizontal grids :
1 : lonlat > size : dim = 12177 nlon = 123 nlat = 99
longitude : first = 234.735 last = 291.693 inc = 0.466868852
latitude : first = 20.858 last = 23.69 inc = 0.0288979592
Vertical grids :
1 : surface : 0
Time axis : unlimited steps_

Am i wrong ?

thanks

Guillaume

    (1-2/2)