Project

General

Profile

converting WRF output to GRIB2

Added by Andrew Fisk 10 months ago

Hello,

I'm trying to convert a WRF output netcdf file to Grib 2 using the following command:

cdo -f grb2 copy wrfout_d01_2023-07-07_06:00:00_post2.nc wrfout_d01_2023-07-07_06:00:00_post2.grb2

I have used a NCL script called netcdf_to_cf to destagger the grid of any variables requiring it.

I'm getting some variable name errors from ecCodes as below and I was wondering if anyone can help me fix it?

Many thanks in advance.

Andrew

cdo copy: 0%ECCODES ERROR : concept: no match for shortName=DateTime
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "DateTime") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=DateTime
ECCODES ERROR : concept: no match for shortName=year
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "year") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=year
ECCODES ERROR : concept: no match for shortName=month
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "month") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=month
1%ECCODES ERROR : concept: no match for shortName=day
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "day") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=day
ECCODES ERROR : concept: no match for shortName=hour
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "hour") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=hour
ECCODES ERROR : concept: no match for shortName=minute
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "minute") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=minute
2%ECCODES ERROR : concept: no match for cfName=height
ECCODES ERROR : concept: input handle edition=2, centre=0
!!! grib_set_string( grib_handle* h, "cfName", "height") !!!
cdi warning (gribapiDefParam): grib_api: No match for cfName=height
ECCODES ERROR : concept: no match for shortName=Z_sfc
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "Z_sfc") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=Z_sfc
cdi warning (grbGetGridtype): Curvilinear grid is unsupported in GRIB format! Created wrong Grid Description Section!
ECCODES ERROR : concept: no match for cfName=air_pressure_at_sea_level
ECCODES ERROR : concept: input handle edition=2, centre=0
!!! grib_set_string( grib_handle* h, "cfName", "air_pressure_at_sea_level") !!!
cdi warning (gribapiDefParam): grib_api: No match for cfName=air_pressure_at_sea_level
ECCODES ERROR : concept: no match for shortName=slp
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "slp") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=slp
cdi warning (gribapiEncode): * GRIB2 shortName does not correspond to chosen variable name: "t" ("t_2m").
cdi warning (gribapiEncode):
GRIB2 shortName does not correspond to chosen variable name: "u" ("u_10m_tr").
3%cdi warning (gribapiEncode): *
* GRIB2 shortName does not correspond to chosen variable name: "v" ("v_10m_tr").
ECCODES ERROR : concept: no match for cfName=large_scale_precipitation_amount
ECCODES ERROR : concept: input handle edition=2, centre=0
!!! grib_set_string( grib_handle* h, "cfName", "large_scale_precipitation_amount") !!!
cdi warning (gribapiDefParam): grib_api: No match for cfName=large_scale_precipitation_amount
ECCODES ERROR : concept: no match for shortName=precip_g
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "precip_g") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=precip_g
ECCODES ERROR : concept: no match for cfName=convective_precipitation_amount
ECCODES ERROR : concept: input handle edition=2, centre=0
!!! grib_set_string( grib_handle* h, "cfName", "convective_precipitation_amount") !!!
cdi warning (gribapiDefParam): grib_api: No match for cfName=convective_precipitation_amount
ECCODES ERROR : concept: no match for shortName=precip_c
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "precip_c") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=precip_c
4%ECCODES ERROR : concept: no match for cfName=convective_precipitation_amount
ECCODES ERROR : concept: input handle edition=2, centre=0
!!! grib_set_string( grib_handle* h, "cfName", "convective_precipitation_amount") !!!
cdi warning (gribapiDefParam): grib_api: No match for cfName=convective_precipitation_amount
ECCODES ERROR : concept: no match for shortName=precip_sh
ECCODES ERROR : concept: input handle edition=2, centre=0
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/'
!!! grib_set_string( grib_handle* h, "shortName", "precip_sh") !!!
cdi warning (gribapiDefParam): grib_api: No match for shortName=precip_sh
cdo copy: Processed 63686 values from 14 variables over 25 timesteps [0.09s 26MB]


Replies (1)

RE: converting WRF output to GRIB2 - Added by Estanislao Gavilan 9 months ago

Hi Andrew,

it seems your file is using a non standard name for variables and/or attributes. Look this post

https://code.mpimet.mpg.de/boards/1/topics/9700

Can you output the name of your variables and attributes? You might need to use nco to correct those small things.

Kind regards,

Estanislao

    (1-1/1)