eccodes/definitions/grib2/template.3.grid.def

59 lines
1.8 KiB
Modula-2
Raw Normal View History

2020-01-28 14:32:34 +00:00
# (C) Copyright 2005- ECMWF.
2013-03-25 12:04:10 +00:00
constant isGridded = true;
2013-03-25 12:04:10 +00:00
unsigned[4] Ni : can_be_missing,dump;
alias numberOfPointsAlongAParallel=Ni;
alias numberOfPointsAlongXAxis=Ni;
2013-03-25 12:04:10 +00:00
alias Nx = Ni;
unsigned[4] Nj : dump;
alias numberOfPointsAlongAMeridian=Nj;
alias numberOfPointsAlongYAxis= Nj;
2013-03-25 12:04:10 +00:00
alias Ny = Nj;
alias geography.Ni=Ni;
alias geography.Nj=Nj;
# Basic angle of the initial production domain
2013-03-25 12:04:10 +00:00
unsigned[4] basicAngleOfTheInitialProductionDomain = 0;
transient mBasicAngle=basicAngleOfTheInitialProductionDomain*oneMillionConstant;
transient angleMultiplier = 1;
transient mAngleMultiplier = 1000000;
when (basicAngleOfTheInitialProductionDomain == 0) {
set angleMultiplier = 1;
set mAngleMultiplier = 1000000;
} else {
set angleMultiplier = basicAngleOfTheInitialProductionDomain;
set mAngleMultiplier = mBasicAngle;
}
# Subdivisions of basic angle used to define extreme longitudes and latitudes, and direction increments
2013-03-25 12:04:10 +00:00
unsigned[4] subdivisionsOfBasicAngle = missing() : can_be_missing;
transient angleDivisor = 1000000;
when (missing(subdivisionsOfBasicAngle) || subdivisionsOfBasicAngle == 0) {
set angleDivisor = 1000000;
2013-03-25 12:04:10 +00:00
} else {
set angleDivisor = subdivisionsOfBasicAngle;
2013-03-25 12:04:10 +00:00
}
# La1 - latitude of first grid point
signed[4] latitudeOfFirstGridPoint : edition_specific ;
alias La1 = latitudeOfFirstGridPoint;
2013-03-25 12:04:10 +00:00
#meta latitudeOfFirstGridPointInMicrodegrees times(latitudeOfFirstGridPoint,mAngleMultiplier,angleDivisor) : no_copy;
# Lo1 - longitude of first grid point
2013-03-25 12:04:10 +00:00
signed[4] longitudeOfFirstGridPoint ;
alias Lo1 = longitudeOfFirstGridPoint;
2013-03-25 12:04:10 +00:00
include "grib2/template.3.resolution_flags.def"
2013-03-25 12:04:10 +00:00
# La2 - latitude of last grid point
signed[4] latitudeOfLastGridPoint : edition_specific;
alias La2 = latitudeOfLastGridPoint;
2013-03-25 12:04:10 +00:00
# Lo2 - longitude of last grid point
signed[4] longitudeOfLastGridPoint : edition_specific ;
alias Lo2 = longitudeOfLastGridPoint;