eccodes/definitions/grib2/template.3.shape_of_the_ear...

54 lines
2.1 KiB
Modula-2
Raw Normal View History

2014-01-03 16:22:21 +00:00
# Copyright 2005-2014 ECMWF.
2013-03-25 12:04:10 +00:00
#
# 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.
#
codetable[1] shapeOfTheEarth ('3.2.table',masterDir,localDir) : dump;
# Scale factor of radius of spherical earth
unsigned[1] scaleFactorOfRadiusOfSphericalEarth = missing() : can_be_missing, edition_specific;
# Scaled value of radius of spherical earth
unsigned[4] scaledValueOfRadiusOfSphericalEarth = missing(): can_be_missing, edition_specific;
# Scale factor of major axis of oblate spheroid earth
unsigned[1] scaleFactorOfEarthMajorAxis = missing(): can_be_missing, edition_specific;
alias scaleFactorOfMajorAxisOfOblateSpheroidEarth=scaleFactorOfEarthMajorAxis;
# Scaled value of major axis of oblate spheroid earth
unsigned[4] scaledValueOfEarthMajorAxis = missing(): can_be_missing, edition_specific;
alias scaledValueOfMajorAxisOfOblateSpheroidEarth=scaledValueOfEarthMajorAxis;
# Scale factor of minor axis of oblate spheroid earth
unsigned[1] scaleFactorOfEarthMinorAxis = missing(): can_be_missing, edition_specific;
alias scaleFactorOfMinorAxisOfOblateSpheroidEarth=scaleFactorOfEarthMinorAxis ;
# Scaled value of minor axis of oblate spheroid earth
unsigned[4] scaledValueOfEarthMinorAxis = missing(): can_be_missing, edition_specific;
alias scaledValueOfMinorAxisOfOblateSpheroidEarth=scaledValueOfEarthMinorAxis;
_if (shapeOfTheEarth==0) {
transient radius=6367470;
alias radiusOfTheEarth=radius;
alias radiusInMetres=radius;
}
_if (shapeOfTheEarth==1){
meta radius from_scale_factor_scaled_value(
scaleFactorOfRadiusOfSphericalEarth,
scaledValueOfRadiusOfSphericalEarth);
alias radiusOfTheEarth=radius;
alias radiusInMetres=radius;
}
_if (shapeOfTheEarth==6){
transient radius=6371229;
alias radiusOfTheEarth=radius;
alias radiusInMetres=radius;
}