Overview


Imports grid time series data from grib2 format used by meteorological institutes.Import type grib2 supports :


  • importing ensembles,
  • importing grid data from separate layers (z-dimension)
  • importing grid data that are distributed over the several files, e.g. all forecasts in one file, one file per forecast, et cetera.


For the users of 2016.02 or higher 


Since Fews version 2016.02  the new NetCdf version 4.6 is used to read grib2 files. There are two important points the users should be aware of :

  • Grib2 parameter names in 2016.02 (or higher) are different from those provided by 2016.01 (or lower)
  • Grib2 ensemble members in 2016.02 (or higher) might be different from those provided by 2016.01 (or lower)

Grib2 parameter names

When you install 2016.02 (or higher), then the grib2 IdMap files are no more valid, since the existing parameter names cannot be matched anymore with the parameter names provided by NetCdf 4.6

You must amend grib2 parameter names in your IdMap files. To find out new parameter names, use Fews 2016.02 or Panoply viewer

How to use Fews 2016.02 to find out new grib2 parameter names:

  • In ManualForecast display select your workflow that imports grib2 files
  • Select “4 Select modules to include in next run…” from F12 menu and tick the check box of the grib2 import module
  • Select “5 Select modules to log debug messages in next run…” from F12 menu and and tick the check box of the grib2 import module
  • Run the workflow
  • Search in the Logs panel or in log.txt the message:

    Import.Debug:External parameter {parameter name} can not be mapped to FEWS parameter with id map IdMapFiles/{IdMa}

    For example:

    Import.Debug:External parameter Total_precipitation_surface_36_Hour_Accumulation_ens can not be mapped to FEWS parameter with id map IdMapFiles/IdMapGrid.xml

    The message contains parameter name available in the grib2 file. Enter parameter name from the message in the IdMap file, for example :

    <parameter external="Total_precipitation_surface_36_Hour_Accumulation_ens" internal="FMAP"/>.

How to use Panoply to find out new grib2 parameter names:

  • Download the current version of Panoply from http://www.giss.nasa.gov/tools/panoply/
  • Open grib2 file in Panoply
  • In the column Name you can find the parameters available in the grib2 file
  • These parameter names should be configured in IdMap.xml


Property "Use_Grib2_Parameter_Name" to read parameter names from attribute Grib2_Parameter_Name

By default Grib2 import uses variable full name as parameter name. Variable full names are generated by Netcdf library.
Sometimes, in case of accumulated series, NetCdf generates different variable full names per time stamp, for example “Total_precipitation_surface_17_Hour_Accumulation”, “Total_precipitation_surface_23_Hour_Accumulation”, “Total_precipitation_surface_39_Hour_Accumulation” and so on. However, all these variables are associated with the same series.
In this case use property "Use_Grib2_Parameter_Name" to read parameter name from the attribute Grib2_Parameter_Name which contains simple(base) parameter name, for example “Total precipitation” (see the picture below)

Configuration example from TimeSeriesImport.xml file:

<properties>
     <bool key="Use_Grib2_Parameter_Name" value="true"/>
</properties> 

Grib2 ensemble members

In Fews  2016.02 or higher the imported ensemble members correspond  with ensemble members coded in grib2.

In Fews 2016.01 or lower the imported ensemble members are always 0, 1, 2, 3,... since the ensemble members are assigned on a first-come, first-served basis .

It means for example,  that Fews 2016.01 imports ensemble members 0,1,2  when, in actual fact, the ensemble members coded in the grib2 are 4,5,6 

Fews 2016.02  assigns  4,5,6 to the ensemble members, so the same numbers as coded in the grib2.

Grib2 and  HyFs GFS accumulated series

In Hyfs GFS grib2 files there are 2  types of accumulated precipitation series :   series accumulated from the start of the forecast and series accumulated  from the nearest 6 hr interval 

However, NetCdf library , used to decode the grib2 format,  does not provide  a separate variable for each  series.  Netcdf library combines both accumulated series in one series (mixed intervals  series)


In picture below there are two values for  event time  2021-10-11 12:00  :   the first one  is accumulated value from the start of the forecast ,  the second one  is  accumulated value for the  last 6 hours


Using property   “Read_Grib2_Accumulation_Message_Number”  we can specify which one is required: 
<int key="Read_Grib2_Accumulation_Message_Number" value="1"/>    or
<int key="Read_Grib2_Accumulation_Message_Number" value="2"/>

This property applies  to all accumulated series in the Hyfs GFS grib2 file.  

Note:  presently it is assumed that there is  one single  grib2 file for every  single observation time.



  • No labels