ECC-1667: GRIB: Add new key 'validityDateTime'

This commit is contained in:
Shahram Najm 2023-08-11 13:02:58 +01:00
parent 13ab0480f4
commit 80caa47eb3
5 changed files with 17 additions and 0 deletions

View File

@ -246,6 +246,7 @@ if (centre == 34 && subCentre == 241)
meta time.validityDate validity_date(dataDate,dataTime,step,stepUnits); meta time.validityDate validity_date(dataDate,dataTime,step,stepUnits);
meta time.validityTime validity_time(dataDate,dataTime,step,stepUnits); meta time.validityTime validity_time(dataDate,dataTime,step,stepUnits);
meta validityDateTime julian_date(validityDate, validityTime) : no_copy;
transient deleteLocalDefinition=0; transient deleteLocalDefinition=0;

View File

@ -28,4 +28,5 @@ alias time.endStep=endStep;
meta time.validityDate validity_date(dataDate,dataTime,step,stepUnits) : no_copy; meta time.validityDate validity_date(dataDate,dataTime,step,stepUnits) : no_copy;
meta time.validityTime validity_time(dataDate,dataTime,step,stepUnits) : no_copy; meta time.validityTime validity_time(dataDate,dataTime,step,stepUnits) : no_copy;
meta validityDateTime julian_date(validityDate, validityTime) : no_copy;

View File

@ -125,3 +125,4 @@ meta time.validityDate validity_date(date,dataTime,step,stepUnits,yearOfEndOfOve
monthOfEndOfOverallTimeInterval,dayOfEndOfOverallTimeInterval) : no_copy; monthOfEndOfOverallTimeInterval,dayOfEndOfOverallTimeInterval) : no_copy;
meta time.validityTime validity_time(date,dataTime,step,stepUnits,hourOfEndOfOverallTimeInterval, meta time.validityTime validity_time(date,dataTime,step,stepUnits,hourOfEndOfOverallTimeInterval,
minuteOfEndOfOverallTimeInterval) : no_copy; minuteOfEndOfOverallTimeInterval) : no_copy;
meta validityDateTime julian_date(validityDate, validityTime) : no_copy;

View File

@ -124,4 +124,11 @@ stats=`${tools_dir}/grib_get -M -F%.2f -p min,max $tempGrib`
[ "$stats" = "-0.01 98.99" ] [ "$stats" = "-0.01 98.99" ]
# Constant field
${tools_dir}/grib_set -d1 ${data_dir}/jpeg.grib2 $tempGrib
grib_check_key_equals $tempGrib isConstant 1
${tools_dir}/grib_ls -n statistics $tempGrib
# Clean up
rm -f $tempFilt $tempGrib rm -f $tempFilt $tempGrib

View File

@ -140,6 +140,13 @@ grib_check_key_equals $temp "stepRange,startStep,endStep" "24 24 24"
${tools_dir}/grib_set -s stepRange:d=14.56 $grib2_sample $temp ${tools_dir}/grib_set -s stepRange:d=14.56 $grib2_sample $temp
grib_check_key_equals $temp "stepRange,startStep,endStep" "14 14 14" grib_check_key_equals $temp "stepRange,startStep,endStep" "14 14 14"
# Key validityDateTime
# -----------------------------------------------
input=${data_dir}/constant_field.grib2
grib_check_key_equals $input "dataDate,dataTime,step" "20061205 1200 6"
grib_check_key_equals $input "validityDate,validityTime" "20061205 1800"
grib_check_key_equals $input "validityDateTime:s" "20061205 001800"
# Clean up # Clean up
rm -f $temp rm -f $temp