Rename and clean up comments

This commit is contained in:
Shahram Najm 2019-05-16 15:35:29 +01:00
parent 1c8a0f06b8
commit 7b57134d7b
11 changed files with 27 additions and 110 deletions

View File

@ -1,13 +1,5 @@
# Copyright 2005-2018 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.
#
# TEMPLATE 3.33002, Mercator for limited area models
# Copyright 2005-2019 ECMWF.
# TEMPLATE 3.13 Mercator with modelling subdomains definition
include "grib2/template.3.10.def"
include "grib2/template.3.lam.def"

View File

@ -1,12 +1,5 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 3.33003, Polar stereographic projection for limited area models
# TEMPLATE 3.23 Polar stereographic with modelling subdomains definition
include "grib2/template.3.20.def"
include "grib2/template.3.lam.def"

View File

@ -1,12 +1,5 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 3.33001, Lambert conformal for limited area models
# TEMPLATE 3.33, Lambert conformal with modelling subdomains definition
include "grib2/template.3.30.def"
include "grib2/template.3.lam.def"

View File

@ -1,13 +1,7 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 3.61, Bi-Fourier coefficients on Mercator projection
# Spectral Mercator with modelling subdomains definition
transient biFourierMakeTemplate = 0;
@ -15,7 +9,6 @@ include "grib2/template.3.bf.def"
include "grib2/template.3.shape_of_the_earth.def";
#include "grib2/template.3.10.part1.def"
# La1 - latitude of first grid point
signed[4] latitudeOfFirstGridPoint: edition_specific,no_copy ;
alias La1 = latitudeOfFirstGridPoint;
@ -26,8 +19,6 @@ signed[4] longitudeOfFirstGridPoint : edition_specific,no_copy;
alias Lo1 = longitudeOfFirstGridPoint;
meta geography.longitudeOfFirstGridPointInDegrees scale(longitudeOfFirstGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
#include "grib2/template.3.10.part2.def"
# LaD - Latitude(s) at which the Mercator projection intersects the Earth
# (Latitude(s) where Di and Dj are specified)
signed[4] LaD : edition_specific,no_copy;
@ -43,7 +34,6 @@ signed[4] longitudeOfLastGridPoint: edition_specific,no_copy ;
alias Lo2 = longitudeOfLastGridPoint;
meta geography.longitudeOfLastGridPointInDegrees scale(longitudeOfLastGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
#include "grib2/template.3.10.part3.def"
# Orientation of the grid, angle between i direction on the map and the equator
# NOTE 1: Limited to the range of 0 to 90 degrees; if the angle of orientation of the grid is neither 0 nor 90 degrees,
# Di and Dj must be equal to each other
@ -51,4 +41,3 @@ unsigned[4] orientationOfTheGrid : dump ;
meta geography.orientationOfTheGridInDegrees
scale(orientationOfTheGrid,oneConstant,grib2divider,truncateDegrees) : dump;
# END 2/template.3.61 ----------------------------------------------------------------------

View File

@ -1,14 +1,7 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 3.62, Bi-Fourier coefficients on polar stereographic projection
# Spectral polar stereographic with modelling subdomains definition
transient biFourierMakeTemplate = 0;
@ -18,7 +11,6 @@ include "grib2/template.3.shape_of_the_earth.def";
transient oneThousand=1000;
#include "grib2/template.3.20.part1.def"
# La1 - latitude of first grid point
signed[4] latitudeOfFirstGridPoint : edition_specific ;
meta geography.latitudeOfFirstGridPointInDegrees scale(latitudeOfFirstGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
@ -45,14 +37,9 @@ signed[4] orientationOfTheGrid : edition_specific;
alias LoV = orientationOfTheGrid ;
meta geography.orientationOfTheGridInDegrees scale(orientationOfTheGrid,oneConstant,grib2divider,truncateDegrees) : dump;
#include "grib2/template.3.20.part2.def"
# Projection centre flag
flags[1] projectionCentreFlag 'grib2/tables/[tablesVersion]/3.5.table' : dump;
# Note our flagbit numbers go from 7 to 0, while WMO convention is from 1 to 8
# If bit 1 is 0, then the North Pole is on the projection plane
# If bit 1 is 1, then the South Pole is on the projection plane
flagbit southPoleOnProjectionPlane(projectionCentreFlag,7) : dump; # WMO bit 1
# END 2/template.3.62 ----------------------------------------------------------------------

View File

@ -1,11 +1,4 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 3.63, BiFourier coefficients on lambert projection
@ -15,7 +8,6 @@ include "grib2/template.3.bf.def"
include "grib2/template.3.shape_of_the_earth.def";
#include "grib2/template.3.30.part1.def"
# La1 - latitude of first grid point
signed[4] latitudeOfFirstGridPoint : edition_specific;
alias La1 = latitudeOfFirstGridPoint;
@ -32,9 +24,6 @@ meta geography.longitudeOfFirstGridPointInDegrees
alias Lo1InDegrees = longitudeOfFirstGridPointInDegrees;
#meta longitudeOfFirstGridPointInMicrodegrees times(longitudeOfFirstGridPoint,oneConstant) : no_copy;
#include "grib2/template.3.30.part2.def"
# LaD - Latitude where Dx and Dy are specified
signed[4] LaD : edition_specific ;
alias latitudeWhereDxAndDyAreSpecified=LaD;
@ -44,14 +33,9 @@ meta geography.LaDInDegrees scale(LaD,one,grib2divider,truncateDegrees) : dump;
unsigned[4] LoV : edition_specific;
meta geography.LoVInDegrees scale(LoV,one,grib2divider,truncateDegrees) : dump;
#include "grib2/template.3.30.part3.def"
# Projection centre flag
flags[1] projectionCentreFlag 'grib2/tables/[tablesVersion]/3.5.table' : dump;
#include "grib2/template.3.30.part4.def"
# Latin 1 - first latitude from the pole at which the secant cone cuts the sphere
signed[4] Latin1 : edition_specific;
alias FirstLatitude=Latin1;
@ -71,8 +55,3 @@ meta geography.latitudeOfSouthernPoleInDegrees scale(latitudeOfSouthernPole
unsigned[4] longitudeOfSouthernPole : edition_specific;
alias longitudeOfTheSouthernPoleOfProjection=longitudeOfSouthernPole;
meta geography.longitudeOfSouthernPoleInDegrees scale(longitudeOfSouthernPole,oneConstant,grib2divider,truncateDegrees) : dump;

View File

@ -1,13 +1,7 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 5.53, BiFourier coefficients data - complex packing
# Spectral data for limited area models \u2013 complex packing
include "grib2/template.5.packing.def";
@ -15,16 +9,15 @@ transient computeLaplacianOperator=1 : hidden;
codetable[1] biFourierSubTruncationType ('5.25.table',masterDir,localDir) : dump;
codetable[1] biFourierPackingModeForAxes ('5.26.table',masterDir,localDir) = 0 : dump;
# biFourierDoNotPackAxes
constant laplacianScalingFactorUnset = -2147483647;
signed[4] laplacianScalingFactor : edition_specific ; # units of 10^-6
meta data.laplacianOperator scale(laplacianScalingFactor,one,million,truncateLaplacian) ;
meta laplacianOperatorIsSet evaluate(laplacianScalingFactor != laplacianScalingFactorUnset && !computeLaplacianOperator);
meta data.laplacianOperator scale(laplacianScalingFactor,one,million,truncateLaplacian) ;
meta laplacianOperatorIsSet evaluate(laplacianScalingFactor != laplacianScalingFactorUnset && !computeLaplacianOperator);
unsigned[2] biFourierResolutionSubSetParameterN : dump ; # NS
unsigned[2] biFourierResolutionSubSetParameterM : dump ; # MS
unsigned[2] biFourierResolutionSubSetParameterN : dump ; # NS
unsigned[2] biFourierResolutionSubSetParameterM : dump ; # MS
unsigned[4] totalNumberOfValuesInUnpackedSubset = 0 : dump; # TS
# This is read_only until we support other values

View File

@ -1,18 +1,11 @@
# Copyright 2005-2018 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.
#
# Copyright 2005-2019 ECMWF.
# TEMPLATE 7.53, BiFourier coefficients - complex packing
# Spectral data for limited area models \u2013 complex packing
constant biFourierCoefficients = 1;
constant complexPacking = 1;
meta codedValues data_g2bifourier_packing(
section7Length,
offsetBeforeData,
@ -47,9 +40,8 @@ meta codedValues data_g2bifourier_packing(
): read_only;
meta values data_apply_bitmap(codedValues,
bitmap,
missingValue,
binaryScaleFactor,
numberOfDataPoints,
numberOfValues) : dump;
bitmap,
missingValue,
binaryScaleFactor,
numberOfDataPoints,
numberOfValues) : dump;

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005-2018 ECMWF.
* Copyright 2005-2019 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.
@ -16,7 +16,6 @@
#include "grib_accessor_class.h"
#include "grib_optimize_decimal_factor.h"
#include <math.h>
#include <stdlib.h>
/*
This is used by make_class.pl

View File

@ -135,7 +135,7 @@ list( APPEND tests_data_reqd
decimalPrecision
grib_bitsPerValue
get_fail
missing
grib_missing
grib_local
grib_step
grib_set

View File

@ -13,7 +13,7 @@
REDIRECT=/dev/null
infile="${data_dir}/missing.grib2"
outfile="${data_dir}/missing_new.grib2"
outfile="${data_dir}/temp.missing_new.grib2"
scaleFactorOfSecondFixedSurface=`${tools_dir}/grib_get -w count=1 -p scaleFactorOfSecondFixedSurface $infile`
[ "$scaleFactorOfSecondFixedSurface" = "0" ]