2020-01-28 14:32:34 +00:00
|
|
|
# (C) Copyright 2005- ECMWF.
|
2013-03-25 12:04:10 +00:00
|
|
|
|
|
|
|
# TEMPLATE 3.10, Mercator
|
2015-07-28 09:50:26 +00:00
|
|
|
include "grib2/template.3.shape_of_the_earth.def";
|
2013-03-25 12:04:10 +00:00
|
|
|
|
|
|
|
unsigned[4] Ni : dump;
|
|
|
|
alias numberOfPointsAlongAParallel=Ni;
|
|
|
|
alias Nx = Ni;
|
|
|
|
alias geography.Ni=Ni;
|
|
|
|
|
|
|
|
unsigned[4] Nj : dump;
|
|
|
|
alias numberOfPointsAlongAMeridian=Nj;
|
2013-07-30 16:14:49 +00:00
|
|
|
alias Ny = Nj ;
|
2013-03-25 12:04:10 +00:00
|
|
|
alias geography.Nj=Nj;
|
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# La1 - latitude of first grid point
|
2013-03-25 12:04:10 +00:00
|
|
|
signed[4] latitudeOfFirstGridPoint: edition_specific,no_copy ;
|
|
|
|
alias La1 = latitudeOfFirstGridPoint;
|
|
|
|
meta geography.latitudeOfFirstGridPointInDegrees scale(latitudeOfFirstGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
|
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# Lo1 - longitude of first grid point
|
2013-03-25 12:04:10 +00:00
|
|
|
signed[4] longitudeOfFirstGridPoint : edition_specific,no_copy;
|
|
|
|
alias Lo1 = longitudeOfFirstGridPoint;
|
|
|
|
meta geography.longitudeOfFirstGridPointInDegrees scale(longitudeOfFirstGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
|
|
|
|
|
2015-07-28 09:50:26 +00:00
|
|
|
include "grib2/template.3.resolution_flags.def";
|
2013-03-25 12:04:10 +00:00
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# LaD - Latitude(s) at which the Mercator projection intersects the Earth
|
2013-03-25 12:04:10 +00:00
|
|
|
# (Latitude(s) where Di and Dj are specified)
|
|
|
|
signed[4] LaD : edition_specific,no_copy;
|
|
|
|
meta geography.LaDInDegrees scale(LaD,oneConstant,grib2divider,truncateDegrees) : dump;
|
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# La2 - latitude of last grid point
|
2013-03-25 12:04:10 +00:00
|
|
|
signed[4] latitudeOfLastGridPoint : edition_specific,no_copy;
|
|
|
|
alias La2 = latitudeOfLastGridPoint;
|
|
|
|
meta geography.latitudeOfLastGridPointInDegrees scale(latitudeOfLastGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
|
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# Lo2 - longitude of last grid point
|
2013-03-25 12:04:10 +00:00
|
|
|
signed[4] longitudeOfLastGridPoint: edition_specific,no_copy ;
|
|
|
|
alias Lo2 = longitudeOfLastGridPoint;
|
|
|
|
meta geography.longitudeOfLastGridPointInDegrees scale(longitudeOfLastGridPoint,oneConstant,grib2divider,truncateDegrees) : dump;
|
|
|
|
|
2015-07-28 09:50:26 +00:00
|
|
|
include "grib2/template.3.scanning_mode.def";
|
2013-03-25 12:04:10 +00:00
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# 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
|
2013-03-25 12:04:10 +00:00
|
|
|
unsigned[4] orientationOfTheGrid : dump ;
|
|
|
|
meta geography.orientationOfTheGridInDegrees
|
|
|
|
scale(orientationOfTheGrid,oneConstant,grib2divider,truncateDegrees) : dump;
|
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# Di - longitudinal direction grid length
|
|
|
|
# NOTE 2: Grid lengths are in units of 10**-3 m, at the latitude specified by LaD
|
2013-03-25 12:04:10 +00:00
|
|
|
unsigned[4] Di : edition_specific,no_copy ;
|
|
|
|
alias longitudinalDirectionGridLength = Di ;
|
|
|
|
meta geography.DiInMetres
|
|
|
|
scale(Di,oneConstant,thousand,truncateDegrees) : dump;
|
|
|
|
|
2013-07-30 16:14:49 +00:00
|
|
|
# Dj - latitudinal direction grid length
|
|
|
|
# NOTE 2: Grid lengths are in units of 10**-3 m, at the latitude specified by LaD
|
2013-03-25 12:04:10 +00:00
|
|
|
unsigned[4] Dj : edition_specific,no_copy ;
|
|
|
|
alias latitudinalDirectionGridLength = Dj;
|
|
|
|
meta geography.DjInMetres
|
|
|
|
scale(Dj,oneConstant,thousand,truncateDegrees) : dump;
|
2020-05-08 22:36:55 +00:00
|
|
|
|
|
|
|
iterator mercator(numberOfPoints,missingValue,values,
|
|
|
|
radius,Ni,Nj,
|
|
|
|
latitudeOfFirstGridPointInDegrees, longitudeOfFirstGridPointInDegrees,
|
|
|
|
LaDInDegrees,
|
|
|
|
latitudeOfLastGridPointInDegrees, longitudeOfLastGridPointInDegrees,
|
|
|
|
orientationOfTheGridInDegrees,
|
|
|
|
DiInMetres,DjInMetres,
|
|
|
|
iScansNegatively,
|
|
|
|
jScansPositively,
|
|
|
|
jPointsAreConsecutive,
|
|
|
|
alternativeRowScanning);
|