Norwegian Service Centre for Climate Modelling -> Format Conversion Tools -> felt2grib / grib2felt User Guide
 
 

 

     

Felt to GRIB

The program felt2grib was written by Ole Vignes (DNMI), the version used by NoSerC is dated Jan. 16, 2001. The program is designed for unattended batch use, but requires an interface file to be defined for each specific conversion, where each Felt-parameter to be converted is explicitly typed and the corresponding GRIB-parameter is named with a scaling factor. This interface file is however possible to share between both felt2grib and grib2felt. A sample interface file will be provided to aid users in the conversion process.

Usage:

felt2grib felt_file grib_file wmo2dnmi_table [options]

Where

felt_file
is the name of the FELT-file to be converted
grib_file
is then name of the GRIB-file to be created
wmo2dnmi_table
is the name of the interface file
options:
-o
overwrite grib_file (default = append)
-m
input file is sequential (model) felt file
-g <grid_no>
grid no.
-d <data_type>
data type
-T <YYYY,MM,DD,HH>
set time (clim. data)
-t <forecast_hour>
forecast time (set if -T)
-v <v.coord._no>
vertical coordinate
-p <parameter_no>
parameter no.
-l <level>
level (no.)
-n <producer_no>
producer (1-99)
-V <version_no>
code table 2 version number
-f
write full level a,b coeff. for eta-data. (default is half level coeff.)
-c
write coeff. a1,b1...an,bn (default is a1..an,b1..bn)
-D
destagger u,v fields
-S
stagger u,v fields
-U <undef>
use <undef> as undefined value in grib_file (e.g. -t24 -v 1 -p2,3 -l 925,1000)

GRIB to Felt

The program grib2felt also comes from DNMI. The program is a virtual mirror of felt2grib, using the same interface file to name each parameter that shall be converted. In addition to this a special grid description file must also be given in order to translate grid information.
However, a catch with this conversion is that the Felt-file must exist with predefined data before conversion starts. Parameters are thus only added/updated to existing Felt-files by this tool (see conversion between GRIB and netCDF for a similar problem issue). To create a new clean Felt-file the program nyfelt is required.

Usage:

grib2felt gribin feltut wmo2dnmi_table grids_table [options]

Where

feltut
is the name of the FELT-file to be updated
gribin
is then name of the GRIB-file to be converted
wmo2dnmi_table
is the name of the interface file
grids_table
is the name of the grid description file
options:
-p <parameter_no>
parameter no. (grib)
-v <v.coord._no>
vertical coord. type (grib)
-l <level>
level (grib)
-n <producer_no>
set producer (1-99)
-T <YYYY,MM,DD,HH>
set time on output
-t <forecast_hour>
forecast time (set if -T)
-a
t=0 => an fields (def in)
-D
destagger u,v fields
-H
adjust grid d[xy]/2 for u,v
-m
output to sequential (unformatted) felt file
-P <print_level>
set amount of output: 0,1,2
-u
check for undefined values

Interface file examples

Below is shown two sample interface files, wmo2dnmi_table and grids_table for use in the felt2grib and grib2felt programs. Both files are also available on gridur.ntnu.no as /noserc/felles/bin/felt2grib.table and /noserc/felles/bin/grids.table

wmo2dnmi_table

wmo typ  lev dnmi par    scal field    (dnmi-unit)
--------------------------------------------------
  1 103    0.  58   0    100. 'mslp  ' (hPa)
  1 105    0.   8   0    100. 'ps    ' (hPa)
  6  -1   -1.   1   0 9.80665 'fi    ' (m)
  7  -1   -1.   1   0      1. 'z     ' (m)
  6 105    0. 101   1 9.80665 'fis   ' (m)
  7 105    0. 101   1      1. 'zs    ' (m)
 11  -1   -1.   4   0      1. 't     ' (K)
 11 102    0. 103   1      1. 'tss   ' (K)
 11 105    0.  30   0      1. 'ts    ' (K)
 11 105    2.  31   0      1. 't2    ' (K)
 11 105  999.  29   0      1. 'tsd   ' (K)
 11 105  998. 183   1      1. 'tsc   ' (K)
 13  -1   -1.  18   0      1. 'th    ' (K)
 33  -1   -1.   2   0      1. 'u     ' (m/s)
 33 105   10.  33   0      1. 'u10   ' (m/s)
 34  -1   -1.   3   0      1. 'v     ' (m/s)
 34 105   10.  34   0      1. 'v10   ' (m/s)
 39  -1   -1.  13   0    100. 'om    ' (hPa/s)
 40  -1   -1.  11   0      1. 'etadot' (1/s)
 51  -1   -1.   9   0      1. 'q     ' (kg/kg)
 51 105    2.  82   0      1. 'q2    ' (kg/kg)
 52  -1   -1.  10   0    0.01 'rh    ' ([0,100])
 52 105    2.  32   0    0.01 'rh2   ' ([0,100])
 61 105    0.  17   0      1. 'prt   ' (mm)
 62 105    0.  19   0      1. 'prl   ' (mm)
 63 105    0.  20   0      1. 'prc   ' (mm)
 66 105    0.  66   0      1. 'sn    ' (mm)
 71  -1   -1.  39   0    0.01 'totcov' ([0,100])
 71 105    0.  25   0    0.01 'cov2d ' ([0,100])
 71 105  300.  39   0    0.01 'chigh ' ([0,100])
 71 105  500.  39   0    0.01 'cmean ' ([0,100])
 71 105  850.  39   0    0.01 'clow  ' ([0,100])
 71 105 1000.  39   0    0.01 'cfog  ' ([0,100])
 76  -1   -1.  22   0      1. 'cw    ' (kg/kg)
 76 105    0.  22   0      1. 'cwpath' (kg/(m*m))
 79 105    0. 179   1    0.01 'urb   ' ([0,100])
 81 105    0. 181   1    0.01 'frl   ' ([0,100])
 83 102    0.  83   0      1. 'rou   ' (m)
 83 105    0. 182   1      1. 'roc   ' (m)
 84 105    0. 184   1    0.01 'alb   ' ([0,100])
 86 105    0.  86   0      1. 'sw    ' (m)
 86 105  999.  85   0      1. 'swd   ' (m)
 86 105  998. 186   1      1. 'swc   ' (m)
 91 102    0. 191   1    0.01 'fri   ' ([0,100])
 -1  -1   -1.  -1  -1     -1. 'eof   ' eof
--------------------------------------------------
felt2grib.table - parameter conversion table
wmo = wmo table number
typ = felt level type
lev = felt level
par = 1 if felt is a parameter (costant) field
dnmi = dnmi table number
scal = scaling factor 
field = field name (character*6)
dnmi-unit = unit in dnmi format
----------------------------------------------

grids_table

grid   nx   ny   g(1)  g(2)  g(3)  g(4) g(5) g(6) description
----------------------------------------------------------------------
 101, 144,  37,-177.5,  90.,  2.5, -2.5,  0.,  0. 2.5deg sph (ec)
 102, 240, 121,-178.5,  90.,  1.5, -1.5,  0.,  0. 1.5deg sph (ec)
1111, 144,  37,-180.0,   0.,  2.5,  2.5,  0.,  0. sph 256+257+258 (uk)
 503,  61,  49,   25.,  43.,  79., -32.,  0.,  0. 150km pol (ec)
 504,  93,  68,   54.,  52.,  79.,   0.,  0.,  0. 150km pol (ec)
1006, 180, 176,   90., 142., 237.,   0.,  0.,  0.  50km pol (EMEP testing)
1814, 121,  97,   59., 109., 237.,  -5.,  0.,  0.  50km pol (lam50s)
1840, 151, 133,   43., 121., 237., -32.,  0.,  0.  50km pol (lam50e)
1841, 170, 133,   43., 121., 237., -32.,  0.,  0.  50km pol (eurolam)
1905, 229, 196,  115., 148., 237.,   0.,  0.,  0.  50km pol (hirlam)
1914,  98,  80, -23.5,-23.5,  0.5,  0.5, -5., 65. 0.50deg rot (hirlam)
2006, 188, 152, -46.5,-36.5,  0.5,  0.5,  0., 65. 0.50deg rot (hirlam)
2106,  96,  77, -47.0,-37.0,  1.0,  1.0,  0., 65. 1.00deg rot (test)
2010,  88, 202, 10.00,-6.50, 0.10, 0.10,-22.,66.0 0.10deg rot (hirlam10)
2021,  57,  50,-34.875,-30.375,1.125,1.125,0.,65. ERA boundary data
2023, 120, 105, -33.5,-28.5,  0.5,  0.5,  0., 65. ERA (hirlam RegClim)
2024, 120,  98, -33.5,-26.5,  0.5,  0.5,  0., 65. ERA (hirlam RegClim)
2065,  65,  26, -90.,18.139,2.8125,2.789, 0.,  0. MPI test A
1997, 224, 324,  6.00,-13.0, 0.10, 0.10,-40.,68.0 0.10deg rot (hirlam10_big)
  -1,  -1,  -1,   -1.,  -1.,  -1.,  -1., -1., -1. EOF
----------------------------------------------------------------------
grids.table - grid definition table
definition of polarstereographic and spherical (rotated) grids.
grid = grid number
nx,ny = horisontal dimension
g = grid definition parameters
polarster grids: gr(i)=xp,yp,an,fi,0.,0.
spherical grids: gr(i)=lon1,lat1,dlon,dlat,xcen,ycen
----------------------------------------------------------------------

 

Send comments to webmaster