From 2a92252deeb78b7a824267f1375e08998948ad67 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 5 Aug 2021 18:30:42 +0100 Subject: [PATCH] ECC-1271: Simplify template --- .../grib2/local/local.7.template.3.32769.def | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/definitions/grib2/local/local.7.template.3.32769.def b/definitions/grib2/local/local.7.template.3.32769.def index a7c818ab9..f6ed7da90 100644 --- a/definitions/grib2/local/local.7.template.3.32769.def +++ b/definitions/grib2/local/local.7.template.3.32769.def @@ -4,36 +4,27 @@ # 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"; -unsigned[4] Ni : dump; -unsigned[4] Nj : dump; +include "grib2/template.3.grid.def"; -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 longitudeOfFirstGridPointInDegrees scale(Lo1,one,grib2divider,truncateDegrees) : dump; alias La1InDegrees = latitudeOfFirstGridPointInDegrees; 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 -signed[4] centreLatitude: edition_specific; -unsigned[4] centreLongitude: edition_specific; -alias La2 = centreLatitude; -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; +alias centreLatitude = latitudeOfLastGridPoint; +alias centreLongitude = longitudeOfLastGridPoint; +alias centreLatitudeInDegrees = latitudeOfLastGridPointInDegrees; +alias centreLongitudeInDegrees = longitudeOfLastGridPointInDegrees; unsigned[4] Di : can_be_missing; # Longitudinal 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; unsigned[4] longitudeOfGridPoints: dump;