ECC-1796: GRIB2: Implement stepRange indexing for DestinE ExtremesDT and On-Demand ExtremesDT data

This commit is contained in:
shahramn 2024-04-05 14:16:23 +01:00
parent 6e7db00d49
commit 7c16af2f35
2 changed files with 11 additions and 4 deletions

View File

@ -5,5 +5,10 @@
concept gridSpecification(unknown, "gridSpecificationConcept.def", conceptsDir2, conceptsDir1): no_copy, read_only, dump;
concept destineOrigin(unknown, "destineOriginConcept.def", conceptsDir2, conceptsDir1): no_copy, dump;
# DestinE data does not have the domain key
# ECC-1794: DestinE data does not have the domain key
unalias mars.domain;
# ECC-1796: stepRange indexing for DestinE ExtremesDT and On-Demand ExtremesDT data
if (!(dataset is "climate-dt")) {
alias mars.step=stepRange;
}

View File

@ -64,11 +64,12 @@ ${tools_dir}/grib_set -s numberOfDataPoints=12582912,gridDefinitionTemplateNumbe
grib_check_key_equals $temp_grib_a "gridSpecification" "H1024"
# Now check streams.
# Now check streams for use in climate-dt.
# Setting stream clte and type fc should set mars.date and mars.time to dataDate and dataTime,
# and mars.step should be unaliased
# We must also set dataset=climate-dt, since in other datasets mars.step is set to stepRange
${tools_dir}/grib_set -s stream=clte,type=fc $destine_sample $temp_grib_a
${tools_dir}/grib_set -s dataset=climate-dt,stream=clte,type=fc $destine_sample $temp_grib_a
result1=$( ${tools_dir}/grib_get -p mars.date,mars.time $temp_grib_a )
result2=$( ${tools_dir}/grib_get -p dataDate,dataTime $temp_grib_a )
@ -79,8 +80,9 @@ ${tools_dir}/grib_ls -jm $temp_grib_a
# Setting stream clmn and type fc should set mars.year and mars.month to year and month,
# and mars.date, mars.time, mars.step should be unaliased
# We must also set dataset=climate-dt, since in other datasets mars.step is set to stepRange
${tools_dir}/grib_set -s stream=clmn,type=fc $destine_sample $temp_grib_a
${tools_dir}/grib_set -s dataset=climate-dt,stream=clmn,type=fc $destine_sample $temp_grib_a
result1=$( ${tools_dir}/grib_get -p mars.year,mars.month $temp_grib_a )
result2=$( ${tools_dir}/grib_get -p year,month $temp_grib_a )