Definitions clean up

This commit is contained in:
Shahram Najm 2021-07-01 15:13:32 +01:00
parent 4ec43befcb
commit a4f04e7e60
7 changed files with 52 additions and 129 deletions

View File

@ -1,20 +1,9 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
constant domain = "g"; constant domain = "g";
constant levtype = "sfc"; constant levtype = "sfc";
constant param = "128.128"; constant param = "128.128";
alias mars.param = param; alias mars.param = param;
alias mars.levtype = levtype; alias mars.levtype = levtype;
#alias mars.domain = domain; #alias mars.domain = domain;

View File

@ -1,11 +1,4 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
section_length[3] section1Length ; section_length[3] section1Length ;
@ -31,19 +24,11 @@ alias ls.levelType=indicatorOfTypeOfLevel;
# NOTE 6 NOT FOUND # NOTE 6 NOT FOUND
unsigned[1] yearOfCentury ; unsigned[1] yearOfCentury ;
# Month
unsigned[1] month ; unsigned[1] month ;
# Day
unsigned[1] day; unsigned[1] day;
# Hour
unsigned[1] hour ; unsigned[1] hour ;
# Minute
unsigned[1] minute ; unsigned[1] minute ;
transient second = 0; transient second = 0;
meta dataDate budgdate(yearOfCentury,month,day); meta dataDate budgdate(yearOfCentury,month,day);
alias ls.date=dataDate; alias ls.date=dataDate;
@ -51,7 +36,6 @@ meta dataTime time(hour,minute,second);
meta julianDay julian_day(dataDate,hour,minute,second) : edition_specific; meta julianDay julian_day(dataDate,hour,minute,second) : edition_specific;
# Indicator of unit of time range # Indicator of unit of time range
codetable[1] indicatorOfUnitOfTimeRange 'grib1/4.table'; codetable[1] indicatorOfUnitOfTimeRange 'grib1/4.table';

View File

@ -1,11 +1,4 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
section_length[3] section4Length ; section_length[3] section4Length ;
@ -37,13 +30,12 @@ unsigned[1] reserved=0 : hidden;
ibmfloat floatValues[numberOfFloats]; ibmfloat floatValues[numberOfFloats];
alias floatVal=floatValues; alias floatVal=floatValues;
if(numberOfBytesPerInteger == 1) { signed[1] integerValues[numberOfIntegers]; } if (numberOfBytesPerInteger == 1) { signed[1] integerValues[numberOfIntegers]; }
if(numberOfBytesPerInteger == 2) { signed[2] integerValues[numberOfIntegers]; } if (numberOfBytesPerInteger == 2) { signed[2] integerValues[numberOfIntegers]; }
if(numberOfBytesPerInteger == 3) { signed[3] integerValues[numberOfIntegers]; } if (numberOfBytesPerInteger == 3) { signed[3] integerValues[numberOfIntegers]; }
if(numberOfBytesPerInteger == 4) { signed[4] integerValues[numberOfIntegers]; } if (numberOfBytesPerInteger == 4) { signed[4] integerValues[numberOfIntegers]; }
if(numberOfChars >= 12) if (numberOfChars >= 12) {
{
ascii[2] marsClass; ascii[2] marsClass;
ascii[2] dummy1; ascii[2] dummy1;
ascii[2] marsType; ascii[2] marsType;
@ -59,7 +51,6 @@ if(numberOfChars >= 12)
ascii[1] char; ascii[1] char;
} }
constant zero = 0; constant zero = 0;
concept isEps(zero) { 1 = { marsType = "pf"; } } concept isEps(zero) { 1 = { marsType = "pf"; } }
concept isSens(zero) { 1 = { marsType = "sf"; } } concept isSens(zero) { 1 = { marsType = "sf"; } }
@ -72,14 +63,12 @@ if(numberOfChars >= 12)
"sens" = { marsType = "sf"; } "sens" = { marsType = "sf"; }
} }
if(isEps) if (isEps) {
{
constant perturbationNumber = 0; constant perturbationNumber = 0;
alias mars.number = perturbationNumber; alias mars.number = perturbationNumber;
} }
if(isSens) if (isSens) {
{
constant iterationNumber = 0; constant iterationNumber = 0;
constant diagnosticNumber = 0; constant diagnosticNumber = 0;
alias mars.iteration = iterationNumber; alias mars.iteration = iterationNumber;
@ -91,19 +80,14 @@ if(numberOfChars >= 12)
alias mars.class = marsClass; alias mars.class = marsClass;
alias mars.type = marsType; alias mars.type = marsType;
alias mars.expver = marsExpver; alias mars.expver = marsExpver;
} }
else else
{ {
charValues list(numberOfChars) { charValues list(numberOfChars) {
ascii[1] char; ascii[1] char;
} }
} }
} else { } else {
#TODO: decode properly these old data #TODO: decode properly these old data
section_padding padding; section_padding padding;
} }

View File

@ -1,11 +1,4 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
meta dirty_statistics dirty(computeStatistics) ; meta dirty_statistics dirty(computeStatistics) ;
when (changed(values)) { set dirty_statistics=1;} when (changed(values)) { set dirty_statistics=1;}

View File

@ -1,11 +1,4 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
meta dirty_statistics dirty(computeStatistics) ; meta dirty_statistics dirty(computeStatistics) ;
when (changed(values)) { set dirty_statistics=1;} when (changed(values)) { set dirty_statistics=1;}
@ -21,4 +14,3 @@ alias statistics.avg = average;
alias statistics.enorm = energyNorm; alias statistics.enorm = energyNorm;
alias statistics.sd = standardDeviation; alias statistics.sd = standardDeviation;
alias statistics.const = isConstant; alias statistics.const = isConstant;

View File

@ -1,31 +1,19 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
constant grib2divider = 1000000; constant grib2divider = 1000000;
transient missingValue = 9999; transient missingValue = 9999;
constant ieeeFloats = 1 : edition_specific; constant ieeeFloats = 1 : edition_specific;
ascii[4] identifier; ascii[4] identifier;
ascii[2] reserved : hidden; ascii[2] reserved : hidden;
codetable[1] discipline 'grib2/0.0.table'; codetable[1] discipline 'grib2/0.0.table';
unsigned[1] editionNumber : edition_specific; unsigned[1] editionNumber : edition_specific;
section_length[8] totalLength; section_length[8] totalLength;
template core "grib2/sections.def"; template core "grib2/sections.def";
lookup[4] endOfProduct(0); lookup[4] endOfProduct(0);
if(endOfProduct != `7777`){
if(endOfProduct != `7777`){
template core "grib2/sections.def"; template core "grib2/sections.def";
} }
template section8 "grib2/section.8.def";
template section8 "grib2/section.8.def";

View File

@ -1,11 +1,4 @@
# (C) Copyright 2005- ECMWF. # (C) Copyright 2005- ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
#
constant normal="NORMAL"; constant normal="NORMAL";
constant correction="CORRECTION"; constant correction="CORRECTION";