eccodes/definitions/grib2/template.4.forecast_time_44...

32 lines
1.3 KiB
Modula-2
Raw Permalink Normal View History

2020-01-28 14:32:34 +00:00
# (C) Copyright 2005- ECMWF.
2014-06-18 16:33:00 +00:00
# GRIB-530: This template is to be used by template.4.44.def ONLY
2021-02-06 13:07:35 +00:00
# Hours of observational data cut-off after reference time
2014-06-18 16:33:00 +00:00
unsigned[2] hoursAfterDataCutoff = missing() : edition_specific,can_be_missing;
alias hoursAfterReferenceTimeOfDataCutoff=hoursAfterDataCutoff;
2021-02-06 13:07:35 +00:00
# Minutes of observational data cut-off after reference time
2014-06-18 16:33:00 +00:00
unsigned[1] minutesAfterDataCutoff = missing() : edition_specific,can_be_missing;
alias minutesAfterReferenceTimeOfDataCutoff=minutesAfterDataCutoff;
# Indicator of unit for forecastTime (ECC-1709)
2014-06-18 16:33:00 +00:00
codetable[1] indicatorOfUnitOfTimeRange ('4.4.table',masterDir,localDir) : dump;
alias indicatorOfUnitForForecastTime = indicatorOfUnitOfTimeRange;
2024-01-16 13:54:32 +00:00
include "grib2/stepUnits.def"
2014-06-18 16:33:00 +00:00
# Forecast time in units defined by previous octet
2021-02-06 13:07:35 +00:00
# See GRIB-530: We have to make a special case for the error in WMO spec
if ( new() || (section4Length - 4*NV == 45) ) {
2014-06-18 16:33:00 +00:00
# Use the WMO standard 2 octets for the following cases:
# Newly created messages
2021-02-06 13:07:35 +00:00
# Existing GRIBs which have 45 bytes before the pv array
2014-06-18 16:33:00 +00:00
# The 45 bytes = length of product def template 4.44
2024-01-16 13:54:32 +00:00
unsigned[2] forecastTime : dump;
2014-06-18 16:33:00 +00:00
}
2021-02-06 13:07:35 +00:00
else {
# This is for existing gribs which were written with 4 octets (GRIB-29: supports negative forecast time)
2024-01-16 13:54:32 +00:00
signed[4] forecastTime : dump;
2014-06-18 16:33:00 +00:00
}