Help converting netcdf to grib
Added by Sam Hawkins over 13 years ago
My overall aim is to convert WRF wind speeds from eta levels and a lambert (curvilinear) projection, to wind speeds at heights above ground level on a rectilinear grid in GRIB format for use with the MET verification tool.
So far I have interpolated wind speeds to heights above ground level and on a rectilinear grid using NCL. The netcdf output of that has the structure:
netcdf wrfout_simple { dimensions: time = UNLIMITED ; // (145 currently) height = 10 ; lat = 52 ; lon = 99 ; variables: float U(time, height, lat, lon) ; U:units = "m/s" ; U:long_name = "X component of wind speed" ; U:_FillValue = 9.96921e+36f ; double time(time) ; time:description = "Time" ; time:long_name = "Time" ; time:calendar = "standard" ; time:units = "hours since 2009-01-17 00:00:00" ; float height(height) ; float lat(lat) ; lat:units = "degrees_north" ; lat:standard_name = "latitude" ; lat:long_name = "Latitude" ; float lon(lon) ; lon:units = "degrees_east" ; lon:standard_name = "longitude" ; lon:long_name = "Longitude" ; }
I would like to convert this into something resembling the the following GRIB structure:
Variable: f Type: file filename: wrfout path: wrfout.grb file global attributes: dimensions: forecast_time0 = 145 g3_x_1 = 59 g3_y_2 = 79 lv_HTGL1 = 10 variables: float U_HTGL1 ( forecast_time0, lv_HTGL1, g3_x_1, g3_y_2 ) center : US National Weather Service - NCEP (WMC) long_name : wind speed units : ms-1 initial_time : 01/01/2009 (00:00)
Replies (2)
RE: Help converting netcdf to grib - Added by Sam Hawkins over 13 years ago
I accidentally posted that before I finished the question! I can't work out:
1) how to convert to grib and specify sensible codes for the variables
2) how to ensure the time dimension becomes forecast_time in the grib files.
Any help is much appreciated.
RE: Help converting netcdf to grib - Added by Mouhamad AL SAYED ALI about 13 years ago
Hello
I've the same problem. Have you managed to solve it.
If yes, could you please tell me how I do ?
Thanks in advance
Mouhamad