Definitions: Ensure all supported grid types define Ni,Nx,Nj,Ny

This commit is contained in:
Shahram Najm 2023-08-16 11:34:37 +01:00
parent ccf772d582
commit 6422cf12e0
8 changed files with 43 additions and 34 deletions

View File

@ -12,7 +12,7 @@ alias numberOfPointsAlongXAxis=Ni;
signed[2] Nj : dump;
alias numberOfPointsAlongAMeridian=Nj;
alias Nx=Nj;
alias Ny=Nj;
alias geography.Nj=Nj;
alias numberOfPointsAlongYAxis=Nj;

View File

@ -6,13 +6,13 @@ include "grib2/template.3.shape_of_the_earth.def";
constant isGridded = one;
unsigned[4] Ni : dump;
alias numberOfPointsAlongAParallel=Ni;
alias numberOfPointsAlongAParallel = Ni;
alias Nx = Ni;
alias numberOfPointsAlongXAxis = Ni;
alias geography.Ni=Ni;
unsigned[4] Nj : dump;
alias numberOfPointsAlongAMeridian=Nj;
alias numberOfPointsAlongAMeridian = Nj;
alias Ny = Nj;
alias numberOfPointsAlongYAxis = Nj;
alias geography.Nj=Nj;

View File

@ -7,14 +7,17 @@ constant isGridded = one;
# Nx - number of points along X-axis
unsigned[4] numberOfPointsAlongXAxis : dump;
alias Nx = numberOfPointsAlongXAxis;
alias numberOfPointsAlongAParallel = Nx;
alias Ni = Nx;
# Ny - number of points along Y-axis
unsigned[4] numberOfPointsAlongYAxis : dump;
alias Ny = numberOfPointsAlongYAxis;
# La1 - latitude of tangency point
# (centre of grid)
alias numberOfPointsAlongAMeridian = Ny;
alias Nj = Ny;
# La1 - latitude of tangency point (centre of grid)
signed[4] latitudeOfTangencyPoint : dump;
alias La1 = latitudeOfTangencyPoint;
@ -22,6 +25,7 @@ alias La1 = latitudeOfTangencyPoint;
unsigned[4] longitudeOfTangencyPoint : dump;
alias Lo1 = longitudeOfTangencyPoint;
# Resolution and component flag
flags[1] resolutionAndComponentFlags 'grib2/tables/[tablesVersion]/3.3.table' : dump;

View File

@ -11,8 +11,9 @@ alias Nx = Ni;
alias geography.Ni=Ni;
unsigned[4] Nj : dump;
alias numberOfPointsAlongAMeridian=Nj;
alias Ny = Nj ;
alias numberOfPointsAlongAMeridian = Nj;
alias numberOfPointsAlongYAxis = Nj;
alias Ny = Nj;
alias geography.Nj=Nj;
# LaR - geographic latitude of reference point

View File

@ -7,24 +7,25 @@ constant isGridded = one;
# Nx - number of points along X-axis
unsigned[4] numberOfPointsAlongXAxis : dump;
alias Nx = numberOfPointsAlongXAxis;
alias Ni = Nx;
alias Nx = numberOfPointsAlongXAxis;
alias Ni = Nx;
# Ny - number of points along Y-axis
unsigned[4] numberOfPointsAlongYAxis : dump;
alias Ny = numberOfPointsAlongYAxis;
alias Nj = Ny;
alias Ny = numberOfPointsAlongYAxis;
alias numberOfPointsAlongAMeridian = Ny;
alias Nj = Ny;
# La1 - latitude of first grid point
signed[4] latitudeOfFirstGridPoint: edition_specific;
alias La1 = latitudeOfFirstGridPoint;
alias La1 = latitudeOfFirstGridPoint;
meta geography.latitudeOfFirstGridPointInDegrees scale(latitudeOfFirstGridPoint,
one,grib2divider,truncateDegrees) : dump;
#meta latitudeOfFirstGridPointInMicrodegrees times(latitudeOfFirstGridPoint,mAngleMultiplier,angleDivisor): no_copy;
# Lo1 - longitude of first grid point
signed[4] longitudeOfFirstGridPoint: edition_specific ;
alias La1 = longitudeOfFirstGridPoint;
alias La1 = longitudeOfFirstGridPoint;
meta geography.longitudeOfFirstGridPointInDegrees scale(longitudeOfFirstGridPoint,
one,grib2divider,truncateDegrees) : dump;
#meta longitudeOfFirstGridPointInMicrodegrees times(longitudeOfFirstGridPoint,mAngleMultiplier,angleDivisor) : no_copy;

View File

@ -6,15 +6,16 @@ include "grib2/template.3.shape_of_the_earth.def";
constant isGridded = one;
# Nx - number of points along X-axis
unsigned[4] Nx : dump;
alias Ni = Nx;
alias numberOfPointsAlongXAxis = Nx;
unsigned[4] Nx : dump;
alias Ni = Nx;
alias numberOfPointsAlongXAxis = Nx;
alias geography.Nx=Nx;
# Ny - number of points along Y-axis
unsigned[4] Ny : dump;
alias Nj = Ny;
alias numberOfPointsAlongYAxis = Ny;
alias Nj = Ny;
alias numberOfPointsAlongYAxis = Ny;
alias numberOfPointsAlongAMeridian = Nj;
alias geography.Ny=Ny;
# La1 - latitude of first grid point

View File

@ -6,13 +6,14 @@ include "grib2/template.3.shape_of_the_earth.def";
constant isGridded = one;
unsigned[4] Nx : dump;
alias Ni = Nx;
alias Ni = Nx;
alias numberOfPointsAlongXAxis = Nx;
alias geography.Nx=Nx;
unsigned[4] Ny : dump;
alias Nj = Ny;
alias numberOfPointsAlongYAxis = Ny;
unsigned[4] Ny : dump;
alias Nj = Ny;
alias numberOfPointsAlongYAxis = Nj;
alias numberOfPointsAlongAMeridian = Nj;
alias geography.Ny=Ny;
# La1 - latitude of first grid point

View File

@ -5,14 +5,15 @@ include "grib2/template.3.shape_of_the_earth.def";
constant isGridded = one;
unsigned[4] Nx : dump;
alias Ni = Nx;
alias numberOfPointsAlongXAxis = Nx;
unsigned[4] Nx : dump;
alias Ni = Nx;
alias numberOfPointsAlongXAxis = Nx;
alias geography.Nx=Nx;
unsigned[4] Ny : dump;
alias Nj = Ny;
alias numberOfPointsAlongYAxis = Ny;
unsigned[4] Ny : dump;
alias Nj = Ny;
alias numberOfPointsAlongYAxis = Nj;
alias numberOfPointsAlongAMeridian = Nj;
alias geography.Ny=Ny;
# Lap - latitude of sub-satellite point
@ -27,22 +28,22 @@ meta geography.longitudeOfSubSatellitePointInDegrees scale(longitudeOfSubSatel
include "grib2/template.3.resolution_flags.def";
# dx - apparent diameter of Earth in grid lengths, in X-direction
unsigned[4] dx : dump;
unsigned[4] dx : dump;
alias geography.dx=dx;
# dy - apparent diameter of Earth in grid lengths, in Y-direction
unsigned[4] dy : dump;
unsigned[4] dy : dump;
alias geography.dy=dy;
# Xp - X-coordinate of sub-satellite point
# (in units of 10^-3 grid length expressed as an integer)
unsigned[4] Xp : no_copy;
unsigned[4] Xp : no_copy;
meta geography.XpInGridLengths scale(Xp,one,thousand) : dump;
alias xCoordinateOfSubSatellitePoint=XpInGridLengths;
# Yp - Y-coordinate of sub-satellite point
# (in units of 10^-3 grid length expressed as an integer)
unsigned[4] Yp : no_copy;
unsigned[4] Yp : no_copy;
meta geography.YpInGridLengths scale(Yp,one,thousand) : dump;
alias yCoordinateOfSubSatellitePoint=YpInGridLengths;