ECC-1271: Arakawa Non-E Staggered grid (Try 1)

This commit is contained in:
Shahram Najm 2021-08-05 16:39:55 +01:00
parent 0a6aa92f54
commit 22f7e8691e
3 changed files with 46 additions and 2 deletions

View File

@ -0,0 +1,39 @@
# (C) Copyright 2005- ECMWF.
# TEMPLATE 3.32769 - Rotate Latitude/Longitude (Arakawa Non-E Staggered grid)
# 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;
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";
# 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;
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 ;
signed[4] latitudeOfGridPoints : dump;
unsigned[4] longitudeOfGridPoints: dump;

View File

@ -34,8 +34,11 @@ codetable[2] gridDefinitionTemplateNumber ('3.1.table',masterDir,localDir) =0 :
meta gridDefinitionDescription codetable_title(gridDefinitionTemplateNumber);
alias isRotatedGrid=zero;
template gridDefinitionSection "grib2/template.3.[gridDefinitionTemplateNumber:l].def";
if (gridDefinitionTemplateNumber >= 32768) {
template gridDefinitionSection "grib2/local/local.[centreForLocal:l].template.3.[gridDefinitionTemplateNumber:l].def";
} else {
template gridDefinitionSection "grib2/template.3.[gridDefinitionTemplateNumber:l].def";
}
if(PLPresent){
if(numberOfOctectsForNumberOfPoints == 1){

View File

@ -0,0 +1,2 @@
# Code table 3.1 - Grid definition template number (NCEP local)
32769 32769 Rotate Latitude/Longitude (Arakawa Non-E Staggered grid)