NCEPLIBS-g2tmpl
1.12.0
|
This document briefly describes the NCEPLIBS-g2tmpl library.
NCO Provides documentation on WMO GRIB2 at https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/
WMO's GRIB2 specification "FM 92-XII GRIB - General Regularly-distributed Information in Binary Form" contains descriptions of each template and code table information. This document can be found at https://codes.wmo.int/grib2/_codeflag (PDF and MSWord formats are available).
GRIB2 parameter table for all disciplines and categories and parameter. These fields are in order as below:
grib2_disc# grib2_cat# grib2_param# local_flg# Mnemonic
Where:
An entry of paramter TEMPERATURE in grib2 table 4.2
grib2_disc# grib2_cat# grib2_param# local_flg# Mnemonic 0 0 0 0 TMP
Where:
After you added parameters, You need to run executable program sort_params_grib2_tbl to write out a "params_grib2_tbl_new" SORTED file in a format suitable for subsequent reading via the open_and_read_4dot2() function.
The procedures are following:
cp params_grib2_tbl_new params_grib2_tbl_new.save
0 19 37 0 ICESEV
The following variables are often requested by developers: parameters, model id or new grid id to add to NCEPGRIB2 tables. Example:
Developer will provide the following information for new variable: definition (i.e.,meaning of parameter) unit, GRIB2 discipline and category which this variable should be belongs to in GRIB2 tables.
Then, We will check for new variable in NCEP GRIB2 tables before we define new variable in NCEP GRIB2 tables to avoid a duplication. If the new variables will be used for exchange between UKMet or ECMWF. In this case, we need to request approval from WMO. We will ask Jeff Ator (Who is our WMO representative at EMC) to submit this request to WMO. This request usually takes weeks. Otherwise, We can define it as in NCEP local use.
For example, parameter “TMP” has defined in discipline 0, category 0 (Meteorological products,Temperature category) and parameter number is 0 (see Table 4.2-0-0) as an WMO official and parameter number is above 192 to 254 are NCEP local define.
After we have added a new variable in WMO NCEP GRIB2 tables, we need to update the G2TMP library. We need to check out code of the g2tmpl at NOAA-EMC github.com
export dir=` pwd ` mkdir -p g2tmpl cd g2tmpl git clone git@g:NOAA-EMC/NCEPLIBS-g2tmpl.git cd NCEPLIBS-g2tmpl git checkout -b g2tmpl_v1.6.0 cd g2tmpl_v1.6.0 cd src ithu b.com
#
Example: Temperature ⇒ it is in discipline 0 category 0 and parameter 0 * WMO parameters have values ranging from 0 to 191 - set to 0 * NCEP local table parameters have values from 192 to 254 - set to 1 * parameter value 255 is a missing or undefined ! GRIB2 - TABLE 4.2-0-0 PARAMETERS FOR DISCIPLINE 0 CATEGORY 0 column 1 || Column 2 || Parameter || WMO or local || Abbreviation 0 0 0 0 TMP ! NCEP Local use 0 0 192 1 SNOHF Remember to add a comment line when we add new variable Example: ! Added more parameters on 02/25/2021 0 0 205 1 ELMELT
(see PDT at https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-0.shtml) We need to modify the following files in g2tmpl library:
After you have received a confirm from developer, You can submit a PR and nceplibs team will implement g2tmpl v?.?.? in hpc-stack and delivery code to NCO to implement on WCOSS2. NCO requires to have release notes with delivery code form An example of release note (g2tmpl v1.6.0) for delivery code form https://docs.google.com/document/d/1VK3j0K0CXRxaP7ZW-uJuyGKosVVAuIOkBBIafY2tzW0/edit -Guidance for Adding a new variable to the UPP code (Please contact Wen Meng) https://docs.google.com/document/d/1r2BQtAI33S_zCDh6Ko-aFW0kO79MYILspW31Bw4zE60/edit
The NCEP WMO grib2 document is on NCO RZDM web site: https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/ WMO updates documentation grib2 tables every 6 months (May and November). The WMO documents are in the machine-readable format (e.g. XML, CVS). Because WMO does not have resources to keep the WMO document in PDF format since WMO version 25.0 (Released date - May 06, 2020). The WMO latest version is at this link: https://community.wmo.int/activity-areas/wis/latest-version
I have updated (8/15/2022) the NCEP WMO GRIB2 documentation and ON-388 to the latest version 29.0 - WMO released date May 20, 2022.
This is an operational NCO Web-site. Please be careful of using this web-site (e.g., remove files,...). NCO is creating a group account for EMC to access on NCORZDM. The location of files (shtml) are following: