# (C) Copyright 2005- ECMWF.

unsigned[4] Ni : can_be_missing,dump;
alias numberOfPointsAlongAParallel=Ni;
alias Nx = Ni;

unsigned[4] Nj : dump;
alias numberOfPointsAlongAMeridian=Nj;
alias Ny = Nj;

alias geography.Ni=Ni;
alias geography.Nj=Nj;

#  Basic angle of the initial production domain
unsigned[4] basicAngleOfTheInitialProductionDomain = 0;
transient mBasicAngle=basicAngleOfTheInitialProductionDomain*oneMillionConstant;
transient angleMultiplier  = 1;
transient mAngleMultiplier = 1000000;
when (basicAngleOfTheInitialProductionDomain == 0) {
  set angleMultiplier  = 1;
  set mAngleMultiplier = 1000000;
} else {
  set angleMultiplier  = basicAngleOfTheInitialProductionDomain;
  set mAngleMultiplier = mBasicAngle;
}

#  Subdivisions of basic angle used to define extreme longitudes and latitudes, and direction increments
unsigned[4] subdivisionsOfBasicAngle = missing() : can_be_missing;

transient angleDivisor = 1000000;
when (missing(subdivisionsOfBasicAngle) || subdivisionsOfBasicAngle == 0) {
  set angleDivisor  = 1000000;
} else {
  set angleDivisor  = subdivisionsOfBasicAngle;
}

include "grib2/template.3.resolution_flags.def"

include "grib2/template.3.scanning_mode.def";

longitudesList list(Ni) {
    unsigned[4] longitudes;
}

latitudesList list(Nj) {
    signed[4] latitudes;
}
