ECC-1216: GRIB2: Add 'time' to the 'ls' namespace for local time templates

This commit is contained in:
Shahram Najm 2021-03-10 16:10:33 +00:00
parent 9ec28c7271
commit 2e45994e84
2 changed files with 11 additions and 7 deletions

View File

@ -44,6 +44,12 @@ localTimeForecastList list(numberOfForecastsUsedInLocalTime)
unsigned[4] timeIncrement=0 : dump;
}
alias ls.time=dataTime;
# See ECC-707
transient lsdate_bug = 1: hidden;
transient lstime_bug = 1: hidden;
if (numberOfForecastsUsedInLocalTime == 1) {
meta dateOfForecastUsedInLocalTime g2date(yearOfForecastUsedInLocalTime, monthOfForecastUsedInLocalTime, dayOfForecastUsedInLocalTime) : dump;
meta timeOfForecastUsedInLocalTime time(hourOfForecastUsedInLocalTime, minuteOfForecastUsedInLocalTime, secondOfForecastUsedInLocalTime) : dump;
@ -73,6 +79,3 @@ if (numberOfForecastsUsedInLocalTime == 1) {
alias mars.step = endStep;
}
# See ECC-707
transient lsdate_bug = 1: hidden;

View File

@ -73,12 +73,13 @@ grib_check_key_equals $tempGrib dateOfForecastUsedInLocalTime '20200804'
grib_check_key_equals $tempGrib timeOfForecastUsedInLocalTime '0'
# Check grib_ls output
# Check "ls" namespace
${tools_dir}/grib_get -n ls $tempGrib > $tempOut
echo "2 ecmf 20200805 an regular_ll surface 0 t grid_simple" > $tempRef
# edition centre date time dataType gridType typeOfLevel level shortName packingType
echo "2 ecmf 20200805 1200 an regular_ll surface 0 t grid_simple" > $tempRef
cat $tempOut
diff $tempRef $tempOut
diff -w $tempRef $tempOut
# Clean up
rm -f $tempGrib $tempFilt $tempOut $tempRef
#rm -f $tempGrib $tempFilt $tempOut $tempRef