Scripts: Add description

This commit is contained in:
Shahram Najm 2022-01-13 11:02:45 +00:00
parent cc3e9758cf
commit 1e67b90c5b
1 changed files with 22 additions and 1 deletions

View File

@ -1,6 +1,27 @@
: :
set -eu set -eu
# Usage:
# create_legacy_def.sh $paramId
#
# This script will insert the local ECMWF GRIB2 representation
# for that paramId into the files:
# definitions/grib2/localConcepts/ecmf/paramId.legacy.def
# definitions/grib2/localConcepts/ecmf/shortName.legacy.def
# etc
# This is normally run for those GRIB2 parameters which had
# a local ECMWF representation which later acquired a standard
# WMO one. We want to be able to match the old encoding to the
# paramId but when we write out a field, we want to use the new
# standard WMO encoding.
#
# Assumptions:
# The ecCodes tools grib_set and grib_get are available
# The legacy encoding has discipline = 192
# The parameterCategory = $paramId / 1000
# The parameterNumber = $paramId - parameterCategory*1000
#
pid=$1 pid=$1
sample2=samples/GRIB2.tmpl sample2=samples/GRIB2.tmpl
@ -46,5 +67,5 @@ output_def "$name" "$units" $dis $cat $num >> $defs/units.legacy.def
output_def "$name" "$cfVarName" $dis $cat $num >> $defs/cfVarName.legacy.def output_def "$name" "$cfVarName" $dis $cat $num >> $defs/cfVarName.legacy.def
output_def "$name" "$cfName" $dis $cat $num >> $defs/cfName.legacy.def output_def "$name" "$cfName" $dis $cat $num >> $defs/cfName.legacy.def
echo "Files updated" echo "Files updated. Check directory $defs"
rm -f $temp rm -f $temp