|
|
GRIB headers
The GRIB files are created using the GRIBEX
software. To archive the GRIB files in MARS,
the GRIB headers should be compatible with a set of rules to ensure
that the files are consistent with the way the archiving system is
defined. Therefore, every modelling partner is expected to take into
account the following rules to write the GRIB headers.
The GRIB headers have several sections:
Section 1 provides general information about the field. These
are the general rules to encode this section for ENSEMBLES fields:
- KSEC1(1): Version number of code table 2 that allows to identify
the variables.
Different versions are required because specific definitions are used for some variables in ENSEMBLES. The following values are expected to be used: 128,
the reference table, will be used for all variables that are not specifically defined for ENSEMBLES (i.e., all but maximum and minimum 2-metre temperature, fluxes, total precipitation or total soil moisture); 190,
the table for projects on seasonal to interannual ensemble forecasts, will be used for maximum and minimum 2-metre temperature, fluxes, total precipitation and total soil moisture; 172 for the monthly means of the fluxes (rate of accumulation), as they change units from Ws/m**2 to W/m**2 (see common list of variables for more information); 174,
the non-ECMWF seasonal forecast data, which is used for EUROSIP, contains the codes for some special variables such as the Met Office near-surface temperature.
- KSEC1(2): Originating centre as given by WMO
code table 0. This number will identify the centre that developed
and runs the model. A given centre may have different models or different
versions of the same model that can be distinguished with the "method"
and "system" attributes. The GRIB codes in Table 0 correspond to the values of the "origin" attribute in MARS described in the table below:
| Institution |
Origin |
GRIB code |
| ECMWF |
ecmf |
98 |
| Met Office |
egrr |
74 |
| Météo-France |
lfpw |
85 |
| CERFACS |
crfc |
239 |
| IfM-Kiel |
ifmk |
246 |
| INGV |
ingv |
235 |
| INM |
lemm |
214 |
The codes for a large set of centres can be obtained from the CCCC WMO documentation.
- KSEC1(3): Generating process identification number. It can be any
number, with a meaning for you, between 1 and 254. ECMWF uses 1.
- KSEC1(4) = 255, unless your grid is catalogued, in which case there
is no need to describe it in Section 2.
- KSEC1(5): Flag showing whether sections 2 and 3 are present, as specified in WMO code table 1. It usually takes the value 128, meaning that section 2 is included, while section 3 is omitted.
- KSEC1(6): Parameter indicator as taken from the ECMWF local table
version 2 specified in KSEC1(1).
- KSEC1(7-9): Follow the recommendations given in WMO code table 3. Use KSEC1(7)=112 for surface temperature and soil moisture, 100 for pressure levels and 0 otherwise.
- KSEC1(10-14): The MARS variable "date" is built up with
the values of the variables KSEC1(10-14). It always corresponds to
the starting date of the experiment, even in the case of an experiment
initialized using the lagged average method (in this case the start
date will be the date of the last ensemble member).
- KSEC1(15): The time units indicator is specified in WMO Code Table 4. KSEC1(15) will preferably
be 2 (days) or 12 (12 hours) to cope with the long runs. This will
be valid provided that there are no 6-hourly values to be archived.
- KSEC1(16-18): The time evolution of the experiment is described
in KSEC1(16-17). For instantaneous values, KSEC1(16) has the time
step (in the units defined in KSEC1(15)) and KSEC1(17) = 0. For maximum
and minimum temperature and for accumulated variables, KSEC1(16) will
contain the time of the last time step used in the computation, while
KSEC1(17) = 0. It implies that these variables will be daily values
valid for period between the time step indicated and the previous 24 hours, as specified in Table 190.
This is the only way to accomodate the high values for the time step
that are expected in the multi-annual integrations. In all cases KSEC1(18)
= 10, to be able to cope with long integrations.
- KSEC1(19): Use the number of values employed in the computation
of an average, a maximum or a minimum, when the time range indicates
an average, accumulation or other sort of operation. Note that, to cope with the length of the integrations, the time range value used for all the variables is 10, which does not allow to describe the number of values used in the case of maximum or minimum temperature (four 6-hourly values of 2-metre temperature are used to compute the variable). Instead, this is thoroughly described in the table version 2. Therefore set
to zero.
- KSEC1(22) = 98, sub-centre identifier. This corresponds to the centre
where the data are archived.
- KSEC1(23) = 0, no scaling factor is used.
- KSEC1(24) = 1, ECMWF local use in Section 1.
- KSEC1(25-36): Set to zero.
- KSEC1(37) = 15, the ECMWF local use definition for ensemble seasonal
forecast atmosphere data. This local use definition is decribed here.
- KSEC1(38) = 11, the class number for ENSEMBLES.
- KSEC1(39) = 9, the type for forecast products.
- KSEC1(40) = 1220, the multi-model seasonal forecast stream. Multi-annual
integrations will require a different stream to optimise the use of
MARS.
- KSEC1(41): The experiment number (4 digits) may be used in any suitable
way to identify your experiment among those that you can carry out
with a given version of a prediction system. Please, do not use number
1 as this will be employed in a future rearchiving of the data once
the experiments are finished, just in case you want/need to rerun
something. We suggest to start from a number larger than 1000 for stream 1 and 2000 for stream 2 simulations.
- KSEC1(42): The ensemble member number starts from number 0 and takes
values up to the number of ensembles members minus one.
- KSEC1(43): The total number of ensemble members, which may depend
of the experiment, although most of the time it will be 9. If you are not sure about the final ensemble size, set it to zero.
- KSEC1(44): The system number should be used to distinguish between
different prediction systems used by the same institution. For instance,
the Met Office will have to choose a system number for GloSea and
another one for DePreSys. We suggest to start from the number 1.
- KSEC1(45): The method number distinguishes between different methods to produce forecasts. For instance, the Met Office will have
to assign specific method numbers to the different model versions obtained
with the perturbed parameter approach or ECMWF to distinguish between runs with and without stochastic physics.
Some changes are required to code the monthly mean fields:
- KSEC1(16): Number of time steps in the units indicated in KSEC1(15),
for the end of the month counted from the beginning of the integration. For instance, for a 31-, 30- and 28-day
long integration, the value will be 744, 720 and 672 if KSEC1(15)=1 (hours), and
31, 30 and 28 if KSEC1(15)=2 (days). KSEC1(17) will still be 0.
- KSEC1(19): Use the number of values used to compute the monthly mean. For instance, for the monthly mean of January, it should take the value 31 except for the monthly means computed using 6-hourly data (e.g., 2-metre temperature), for which it should be 124.
- KSEC1(37) = 16, the ECMWF local use definition for ensemble seasonal
forecast monthly mean atmosphere data. This local use definition is
decribed here.
- KSEC(39) = 80, the type for the forecast seasonal mean. You may
also want to archive the forecast seasonal maximum (81), the forecast
seasonal minimum (82) or the forecast seasonal standard deviation
(83).
- KSEC1(40) = 1221, the multi-model seasonal forecasts monthly mean
stream.
- KSEC1(43): Set to zero.
- KSEC1(46): Verifying month or the month the forecast tries to reproduce,
following the format YYYYMM. This is the value that identifies which period the monthly mean refers to.
- KSEC1(47): Averaging period (e.g., 6-hour, 24-hours) or time
interval of data (in hours) used to compute the monthly mean. Check the agreement with the values in KSEC1(19).
- KSEC1(48): Forecast month, starting from 1.
Section
2 describes the grid. It is important to distinguish between grid
point and spherical harmonic fields. Grid-point fields are usually written
from North to South and from West to East. You will have to code your
vertical coordinates too.
Section
4 describes the type of encoding. It is important that you check
the following:
- KSEC4(1): It is the number of values encoded. Any disagreement in
this value will force a GRIBEX error.
- KSEC4(2)=16, the number of bits used per value. Larger values can
also be used.
- KSEC4(3-11): Set to zero.
|