Project

General

Profile

DRS template errors with grib2 output?

Added by B. Parazin about 2 years ago

Hi all, I'm currently trying to use WRF to simulate some weather events from 1844 for research. To that that end, I have a series of grib2 files I've created using CDO from NOAA reanalysis data NetCDFs that I am trying to use as the boundary conditions, but they seem to be failing in the import; when I try and ungrib them to use them in the model, it completely fails to import them. Looking at it with debug turned on, it is constantly throwing the errors "getdrstemplate: DRS Template 4 not defined." and "ERROR extracting field gf_getfld = 12" and an abridged command line output for one file is in below since it is pretty long.

I imagine it's something to do with the formatting or metadata of the file produced by CDO setting drstemplate=4, which is why I'm posting here, but I cannot figure out where in the file data/metadata that is and how to fix it.

I've uploaded one file that I ran it for as compressed_grib.tar.gz so people can look at the data if needed and would greatly appreciate any advice you all have; I'm still new to CDO and have been bashing my head into this wall for the last 3 days.

  • Starting program ungrib.exe ***
    Start_date = 1993-05-22_21:00:00 , End_date = 1993-05-23_21:00:00
    output format is WPS
    Path to intermediate files is ./wpsprd/
    getdrstemplate: DRS Template 4 not defined.
    getdrstemplate: DRS Template 4 not defined.
    ERROR extracting field gf_getfld = 12
    getdrstemplate: DRS Template 4 not defined.
    ...
    and then the 2 above lines repeat like 100 times before ###############################################################################

Inventory for date = 1993-05-22 21:00:00

PRES TT UU VV RH HGT PSFC PMSL SM000010 SM010040 SM040100 SM100200 ST000010 ST010040 ST040100 ST100200 LANDSEA SKINTEMP SNOW SNOWH CANWAT SOILCAT VEGCAT UTROP VTROP PTROP TTROP HGTTROP
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
getdrstemplate: DRS Template 4 not defined.
getdrstemplate: DRS Template 4 not defined.
ERROR extracting field gf_getfld = 12
getdrstemplate: DRS Template 4 not defined.
and then it repeats again


Replies (1)

RE: DRS template errors with grib2 output? - Added by Uwe Schulzweida about 2 years ago

drstemplate=4 means 32-bit ieee data, that is the CDO default when converting netCDF floating point data to GRIB2.
Use the CDO option -b 16 (possibly a different number) in order to generate a GRIB2 file with simple packed 16 bit data section (destemplate=0):

cdo -f grb2 -b 16 copy data.nc data.grb2

    (1-1/1)