ECC-1271: Simplify template

This commit is contained in:
Shahram Najm 2021-08-05 18:30:42 +01:00
parent 22f7e8691e
commit 2a92252dee
1 changed files with 11 additions and 20 deletions

View File

@ -4,36 +4,27 @@
# See https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-32769.shtml # See https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-32769.shtml
include "grib2/template.3.shape_of_the_earth.def"; include "grib2/template.3.shape_of_the_earth.def";
unsigned[4] Ni : dump; include "grib2/template.3.grid.def";
unsigned[4] Nj : dump;
unsigned[4] basicAngleOfTheInitialProductionDomain = 0;
unsigned[4] subdivisionsOfBasicAngle = missing() : can_be_missing;;
signed[4] latitudeOfFirstGridPoint : edition_specific;
unsigned[4] longitudeOfFirstGridPoint : edition_specific;
alias La1 = latitudeOfFirstGridPoint;
alias Lo1 = longitudeOfFirstGridPoint;
meta latitudeOfFirstGridPointInDegrees scale(La1,one,grib2divider,truncateDegrees) : dump; meta latitudeOfFirstGridPointInDegrees scale(La1,one,grib2divider,truncateDegrees) : dump;
meta longitudeOfFirstGridPointInDegrees scale(Lo1,one,grib2divider,truncateDegrees) : dump; meta longitudeOfFirstGridPointInDegrees scale(Lo1,one,grib2divider,truncateDegrees) : dump;
alias La1InDegrees = latitudeOfFirstGridPointInDegrees; alias La1InDegrees = latitudeOfFirstGridPointInDegrees;
alias Lo1InDegrees = longitudeOfFirstGridPointInDegrees; alias Lo1InDegrees = longitudeOfFirstGridPointInDegrees;
include "grib2/template.3.resolution_flags.def"; meta latitudeOfLastGridPointInDegrees scale(La2,one,grib2divider,truncateDegrees) : dump;
meta longitudeOfLastGridPointInDegrees scale(Lo2,one,grib2divider,truncateDegrees) : dump;
alias La2InDegrees = latitudeOfLastGridPointInDegrees;
alias Lo2InDegrees = longitudeOfLastGridPointInDegrees;
# La2 - centre latitude of grid point alias centreLatitude = latitudeOfLastGridPoint;
signed[4] centreLatitude: edition_specific; alias centreLongitude = longitudeOfLastGridPoint;
unsigned[4] centreLongitude: edition_specific; alias centreLatitudeInDegrees = latitudeOfLastGridPointInDegrees;
alias La2 = centreLatitude; alias centreLongitudeInDegrees = longitudeOfLastGridPointInDegrees;
alias Lo2 = centreLongitude;
meta centreLatitudeInDegrees scale(centreLatitude,one,grib2divider,truncateDegrees) : dump;
meta centreLongitudeInDegrees scale(centreLongitude,one,grib2divider,truncateDegrees) : dump;
alias La2InDegrees = centreLatitudeInDegrees;
alias Lo2InDegrees = centreLongitudeInDegrees;
unsigned[4] Di : can_be_missing; # Longitudinal direction increment unsigned[4] Di : can_be_missing; # Longitudinal direction increment
unsigned[4] Dj : can_be_missing; # Latitudinal direction increment unsigned[4] Dj : can_be_missing; # Latitudinal direction increment
flags[1] scanningMode 'grib2/tables/[tablesVersion]/3.4.table' : edition_specific,no_copy ;
flags[1] scanningMode 'grib2/tables/[tablesVersion]/3.4.table' : edition_specific,no_copy;
signed[4] latitudeOfGridPoints : dump; signed[4] latitudeOfGridPoints : dump;
unsigned[4] longitudeOfGridPoints: dump; unsigned[4] longitudeOfGridPoints: dump;