From 57938127931599a859827507c644409a82c1f843 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 11 Jun 2020 15:09:33 +0100 Subject: [PATCH 01/17] Geoiterator for Lambert Azimuthal Equal Area on ellipsoid (part 1) --- definitions/grib2/template.3.140.def | 2 +- ...rator_class_lambert_azimuthal_equal_area.c | 213 +++++++++++------- 2 files changed, 129 insertions(+), 86 deletions(-) diff --git a/definitions/grib2/template.3.140.def b/definitions/grib2/template.3.140.def index d04ba0764..c19bec845 100644 --- a/definitions/grib2/template.3.140.def +++ b/definitions/grib2/template.3.140.def @@ -55,7 +55,7 @@ include "grib2/template.3.scanning_mode.def"; iterator lambert_azimuthal_equal_area(numberOfPoints,missingValue,values, radius,Nx,Ny, latitudeOfFirstGridPointInDegrees,longitudeOfFirstGridPointInDegrees, - standardParallel,centralLongitude, + standardParallelInDegrees,centralLongitudeInDegrees, Dx,Dy, iScansNegatively, jScansPositively, jPointsAreConsecutive, alternativeRowScanning); diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 73290b326..0b810e54e 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -8,11 +8,6 @@ * virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. */ -/************************************** - * Enrico Fucile - **************************************/ - - #include "grib_api_internal.h" #include @@ -102,111 +97,64 @@ static int next(grib_iterator* i, double* lat, double* lon, double* val) return 1; } -static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) +static int init_oblate(grib_handle* h, + grib_iterator_lambert_azimuthal_equal_area* self, + size_t nv, long nx, long ny, + double Dx, double Dy, double earthMinorAxisInMetres, double earthMajorAxisInMetres, + double latFirstInRadians, double lonFirstInRadians, + double centralLongitudeInRadians, double standardParallelInRadians, + long iScansNegatively, long jScansPositively, long jPointsAreConsecutive) +{ + grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); + return GRIB_GEOCALCULUS_PROBLEM; +} + +static int init_sphere(grib_handle* h, + grib_iterator_lambert_azimuthal_equal_area* self, + size_t nv, long nx, long ny, + double Dx, double Dy, double radius, + double latFirstInRadians, double lonFirstInRadians, + double centralLongitudeInRadians, double standardParallelInRadians, + long iScansNegatively, long jScansPositively, long jPointsAreConsecutive) { - int ret = 0; double *lats, *lons; - double lonFirstInDegrees, latFirstInDegrees, lonFirst, latFirst, radius = 0; - long nx, ny, standardParallel, centralLongitude; - double phi1, lambda0, xFirst, yFirst, x, y, Dx, Dy; + double phi1, lambda0, xFirst, yFirst, x, y; double kp, sinphi1, cosphi1; - long alternativeRowScanning, iScansNegatively; - long jScansPositively, jPointsAreConsecutive; double sinphi, cosphi, cosdlambda, sindlambda; double cosc, sinc; long i, j; - - grib_iterator_lambert_azimuthal_equal_area* self = - (grib_iterator_lambert_azimuthal_equal_area*)iter; - - const char* sradius = grib_arguments_get_name(h, args, self->carg++); - const char* snx = grib_arguments_get_name(h, args, self->carg++); - const char* sny = grib_arguments_get_name(h, args, self->carg++); - const char* slatFirstInDegrees = grib_arguments_get_name(h, args, self->carg++); - const char* slonFirstInDegrees = grib_arguments_get_name(h, args, self->carg++); - const char* sstandardParallel = grib_arguments_get_name(h, args, self->carg++); - const char* scentralLongitude = grib_arguments_get_name(h, args, self->carg++); - const char* sDx = grib_arguments_get_name(h, args, self->carg++); - const char* sDy = grib_arguments_get_name(h, args, self->carg++); - const char* siScansNegatively = grib_arguments_get_name(h, args, self->carg++); - const char* sjScansPositively = grib_arguments_get_name(h, args, self->carg++); - const char* sjPointsAreConsecutive = grib_arguments_get_name(h, args, self->carg++); - const char* salternativeRowScanning = grib_arguments_get_name(h, args, self->carg++); double c, rho; - double epsilon = 1.0e-20; - double d2r = acos(0.0) / 90.0; + const double epsilon = 1.0e-20; + const double d2r = acos(0.0) / 90.0; - if ((ret = grib_get_double_internal(h, sradius, &radius)) != GRIB_SUCCESS) { - /* Check if it's an oblate spheroid */ - if (grib_is_earth_oblate(h)) - grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); - return ret; - } - - if ((ret = grib_get_long_internal(h, snx, &nx)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, sny, &ny)) != GRIB_SUCCESS) - return ret; - - if (iter->nv != nx * ny) { - grib_context_log(h->context, GRIB_LOG_ERROR, - "Wrong number of points (%ld!=%ldx%ld)", - iter->nv, nx, ny); - return GRIB_WRONG_GRID; - } - if ((ret = grib_get_double_internal(h, slatFirstInDegrees, &latFirstInDegrees)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_double_internal(h, slonFirstInDegrees, &lonFirstInDegrees)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, sstandardParallel, &standardParallel)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, scentralLongitude, ¢ralLongitude)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_double_internal(h, sDx, &Dx)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_double_internal(h, sDy, &Dy)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, - sjPointsAreConsecutive, &jPointsAreConsecutive)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, sjScansPositively, &jScansPositively)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, siScansNegatively, &iScansNegatively)) != GRIB_SUCCESS) - return ret; - if ((ret = grib_get_long_internal(h, - salternativeRowScanning, &alternativeRowScanning)) != GRIB_SUCCESS) - return ret; - - lambda0 = d2r * centralLongitude / 1000000; - phi1 = d2r * standardParallel / 1000000; - latFirst = latFirstInDegrees * d2r; - lonFirst = lonFirstInDegrees * d2r; + lambda0 = centralLongitudeInRadians; // / 1000000; + phi1 = standardParallelInRadians; // / 1000000; cosphi1 = cos(phi1); sinphi1 = sin(phi1); Dx = iScansNegatively == 0 ? Dx / 1000 : -Dx / 1000; Dy = jScansPositively == 1 ? Dy / 1000 : -Dy / 1000; - self->lats = (double*)grib_context_malloc(h->context, iter->nv * sizeof(double)); + self->lats = (double*)grib_context_malloc(h->context, nv * sizeof(double)); if (!self->lats) { grib_context_log(h->context, GRIB_LOG_ERROR, - "Error allocating %ld bytes", iter->nv * sizeof(double)); + "Error allocating %ld bytes", nv * sizeof(double)); return GRIB_OUT_OF_MEMORY; } - self->lons = (double*)grib_context_malloc(h->context, iter->nv * sizeof(double)); + self->lons = (double*)grib_context_malloc(h->context, nv * sizeof(double)); if (!self->lats) { grib_context_log(h->context, GRIB_LOG_ERROR, - "Error allocating %ld bytes", iter->nv * sizeof(double)); + "Error allocating %ld bytes", nv * sizeof(double)); return GRIB_OUT_OF_MEMORY; } lats = self->lats; lons = self->lons; /* compute xFirst,yFirst in metres */ - sinphi = sin(latFirst); - cosphi = cos(latFirst); - cosdlambda = cos(lonFirst - lambda0); - sindlambda = sin(lonFirst - lambda0); + sinphi = sin(latFirstInRadians); + cosphi = cos(latFirstInRadians); + cosdlambda = cos(lonFirstInRadians - lambda0); + sindlambda = sin(lonFirstInRadians - lambda0); kp = radius * sqrt(2.0 / (1 + sinphi1 * sinphi + cosphi1 * cosphi * cosdlambda)); xFirst = kp * cosphi * sindlambda; yFirst = kp * (cosphi1 * sinphi - sinphi1 * cosphi * cosdlambda); @@ -267,10 +215,105 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) y += Dy; } } + return GRIB_SUCCESS; +} + +static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) +{ + int err = 0; + int is_oblate = 0; + double lonFirstInDegrees, latFirstInDegrees, lonFirstInRadians, latFirstInRadians, radius = 0; + long nx, ny; + double standardParallelInDegrees, centralLongitudeInDegrees; + double standardParallelInRadians, centralLongitudeInRadians; + double Dx, Dy; + long alternativeRowScanning, iScansNegatively; + long jScansPositively, jPointsAreConsecutive; + double earthMajorAxisInMetres = 0, earthMinorAxisInMetres = 0; + + grib_iterator_lambert_azimuthal_equal_area* self = + (grib_iterator_lambert_azimuthal_equal_area*)iter; + + const char* sradius = grib_arguments_get_name(h, args, self->carg++); + const char* snx = grib_arguments_get_name(h, args, self->carg++); + const char* sny = grib_arguments_get_name(h, args, self->carg++); + const char* slatFirstInDegrees = grib_arguments_get_name(h, args, self->carg++); + const char* slonFirstInDegrees = grib_arguments_get_name(h, args, self->carg++); + const char* sstandardParallel = grib_arguments_get_name(h, args, self->carg++); + const char* scentralLongitude = grib_arguments_get_name(h, args, self->carg++); + const char* sDx = grib_arguments_get_name(h, args, self->carg++); + const char* sDy = grib_arguments_get_name(h, args, self->carg++); + const char* siScansNegatively = grib_arguments_get_name(h, args, self->carg++); + const char* sjScansPositively = grib_arguments_get_name(h, args, self->carg++); + const char* sjPointsAreConsecutive = grib_arguments_get_name(h, args, self->carg++); + const char* salternativeRowScanning = grib_arguments_get_name(h, args, self->carg++); + const double d2r = acos(0.0) / 90.0; + + is_oblate = grib_is_earth_oblate(h); + if (is_oblate) { + if ((err = grib_get_double_internal(h, "earthMinorAxisInMetres", &earthMinorAxisInMetres)) != GRIB_SUCCESS) return err; + if ((err = grib_get_double_internal(h, "earthMajorAxisInMetres", &earthMajorAxisInMetres)) != GRIB_SUCCESS) return err; + } + else { + if ((err = grib_get_double_internal(h, sradius, &radius)) != GRIB_SUCCESS) return err; + } + + if ((err = grib_get_long_internal(h, snx, &nx)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(h, sny, &ny)) != GRIB_SUCCESS) + return err; + + if (iter->nv != nx * ny) { + grib_context_log(h->context, GRIB_LOG_ERROR, + "Wrong number of points (%ld!=%ldx%ld)", + iter->nv, nx, ny); + return GRIB_WRONG_GRID; + } + if ((err = grib_get_double_internal(h, slatFirstInDegrees, &latFirstInDegrees)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_double_internal(h, slonFirstInDegrees, &lonFirstInDegrees)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_double_internal(h, sstandardParallel, &standardParallelInDegrees)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_double_internal(h, scentralLongitude, ¢ralLongitudeInDegrees)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_double_internal(h, sDx, &Dx)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_double_internal(h, sDy, &Dy)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(h, sjPointsAreConsecutive, &jPointsAreConsecutive)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(h, sjScansPositively, &jScansPositively)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(h, siScansNegatively, &iScansNegatively)) != GRIB_SUCCESS) + return err; + if ((err = grib_get_long_internal(h, salternativeRowScanning, &alternativeRowScanning)) != GRIB_SUCCESS) + return err; + + latFirstInRadians = latFirstInDegrees * d2r; + lonFirstInRadians = lonFirstInDegrees * d2r; + centralLongitudeInRadians = centralLongitudeInDegrees * d2r; + standardParallelInRadians = standardParallelInDegrees * d2r; + + if (is_oblate) { + err = init_oblate(h, self, iter->nv, nx, ny, + Dx, Dy, earthMinorAxisInMetres, earthMajorAxisInMetres, + latFirstInRadians, lonFirstInRadians, + centralLongitudeInRadians, standardParallelInRadians, + iScansNegatively, jScansPositively, jPointsAreConsecutive); + } + else { + err = init_sphere(h, self, iter->nv, nx, ny, + Dx, Dy, radius, + latFirstInRadians, lonFirstInRadians, + centralLongitudeInRadians, standardParallelInRadians, + iScansNegatively, jScansPositively, jPointsAreConsecutive); + } + if (err) return err; iter->e = -1; - return ret; + return err; } static int destroy(grib_iterator* i) From 77b632fedcb4c128531df0e8a87eb9df5a9bdaf9 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Fri, 12 Jun 2020 13:12:28 +0100 Subject: [PATCH 02/17] Geoiterator for Lambert Azimuthal Equal Area on ellipsoid (part 2) --- ...rator_class_lambert_azimuthal_equal_area.c | 180 +++++++++++++++++- 1 file changed, 178 insertions(+), 2 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 0b810e54e..2f1539e4f 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -97,6 +97,66 @@ static int next(grib_iterator* i, double* lat, double* lon, double* val) return 1; } +#ifndef M_PI +#define M_PI 3.14159265358979323846 /* Whole pie */ +#endif + +#ifndef M_PI_2 +#define M_PI_2 1.57079632679489661923 /* Half a pie */ +#endif + +#ifndef M_PI_4 +#define M_PI_4 0.78539816339744830962 /* Quarter of a pie */ +#endif + +#define RAD2DEG 57.29577951308232087684 /* 180 over pi */ +#define DEG2RAD 0.01745329251994329576 /* pi over 180 */ + +# define P00 .33333333333333333333 /* 1 / 3 */ +# define P01 .17222222222222222222 /* 31 / 180 */ +# define P02 .10257936507936507937 /* 517 / 5040 */ +# define P10 .06388888888888888888 /* 23 / 360 */ +# define P11 .06640211640211640212 /* 251 / 3780 */ +# define P20 .01677689594356261023 /* 761 / 45360 */ + +void pj_authset(double es, double* APA) +{ + double t; + APA[0] = es * P00; + t = es * es; + APA[0] += t * P01; + APA[1] = t * P10; + t *= es; + APA[0] += t * P02; + APA[1] += t * P11; + APA[2] = t * P20; +} +double pj_authlat(double beta, double *APA) +{ + double t = beta+beta; + return(beta + APA[0] * sin(t) + APA[1] * sin(t+t) + APA[2] * sin(t+t+t)); +} + +static double pj_qsfn(double sinphi, double e, double one_es) +{ + double con, div1, div2; + const double EPSILON = 1.0e-7; + + if (e >= EPSILON) { + con = e * sinphi; + div1 = 1.0 - con * con; + div2 = 1.0 + con; + + /* avoid zero division, fail gracefully */ + if (div1 == 0.0 || div2 == 0.0) + return HUGE_VAL; + + return (one_es * (sinphi / div1 - (.5 / e) * log ((1. - con) / div2 ))); + } else + return (sinphi + sinphi); +} + +#define EPS10 1.e-10 static int init_oblate(grib_handle* h, grib_iterator_lambert_azimuthal_equal_area* self, size_t nv, long nx, long ny, @@ -105,8 +165,124 @@ static int init_oblate(grib_handle* h, double centralLongitudeInRadians, double standardParallelInRadians, long iScansNegatively, long jScansPositively, long jPointsAreConsecutive) { - grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); - return GRIB_GEOCALCULUS_PROBLEM; + double *lats, *lons; + long i, j; + double x0, y0, x, y; + double coslam, sinlam, sinphi, sinphi_, q, sinb=0.0, cosb=0.0, b=0.0, cosb2;//fwd + double Q__qp = 0, Q__rq = 0, Q__mmf = 0, Q__cosb1, Q__sinb1, Q__dd, Q__xmf, Q__ymf, t; + double e, es, temp, one_es; + double false_easting; /* x offset in meters */ + double false_northing; /* y offset in meters */ + double latRad, lonRad, latDeg, lonDeg; + double APA[3] = {0,}; + + //temp = earthMinorAxisInMetres/earthMajorAxisInMetres; + //es = 1.0 - temp * temp; + temp = (earthMajorAxisInMetres - earthMinorAxisInMetres)/earthMajorAxisInMetres; + es = 2*temp - temp*temp; + one_es = 1.0 - es; + e = sqrt(es); + + coslam = cos(lonFirstInRadians - centralLongitudeInRadians); //cos(lp.lam); + sinlam = sin(lonFirstInRadians - centralLongitudeInRadians); + sinphi = sin(latFirstInRadians); // sin(lp.phi); + q = pj_qsfn(sinphi, e, one_es); + + //----------- setp start + t = fabs(standardParallelInRadians); + if (t > M_PI_2 + EPS10 ) { + return GRIB_GEOCALCULUS_PROBLEM; + } + //if (fabs(t - M_HALFPI) < EPS10) + // Q->mode = P->phi0 < 0. ? S_POLE : N_POLE; + //else if (fabs(t) < EPS10) + // Q->mode = EQUIT; + //else + // Q->mode = OBLIQ; + Q__qp = pj_qsfn(1.0, e, one_es); + Q__mmf = 0.5 / one_es; + pj_authset(es, APA); // sets up APA array + Q__rq = sqrt(0.5 * Q__qp); + sinphi_ = sin(standardParallelInRadians); // (P->phi0); + Q__sinb1 = pj_qsfn(sinphi_, e, one_es) / Q__qp; + Q__cosb1 = sqrt(1.0 - Q__sinb1 * Q__sinb1); + Q__dd = cos(standardParallelInRadians) / (sqrt(1. - es * sinphi_ * sinphi_) * Q__rq * Q__cosb1); + Q__ymf = (Q__xmf = Q__rq) / Q__dd; + Q__xmf *= Q__dd; + //----------- setup end + + sinb = q/Q__qp; + cosb2 = 1.0 - sinb * sinb; + cosb = cosb2 > 0 ? sqrt(cosb2) : 0; + b = 1. + Q__sinb1 * sinb + Q__cosb1 * cosb * coslam; + if (fabs(b) < EPS10) { + return GRIB_GEOCALCULUS_PROBLEM; + } + b = sqrt(2.0 / b); + + // OBLIQUE + y0 = Q__ymf * b * (Q__cosb1 * sinb - Q__sinb1 * cosb * coslam); + x0 = Q__xmf * b * cosb * sinlam; + y0 *= earthMajorAxisInMetres; + x0 *= earthMajorAxisInMetres; + + /* Allocate latitude and longitude arrays */ + self->lats = (double*)grib_context_malloc(h->context, nv * sizeof(double)); + if (!self->lats) { + grib_context_log(h->context, GRIB_LOG_ERROR, "Error allocating %ld bytes", nv * sizeof(double)); + return GRIB_OUT_OF_MEMORY; + } + self->lons = (double*)grib_context_malloc(h->context, nv * sizeof(double)); + if (!self->lats) { + grib_context_log(h->context, GRIB_LOG_ERROR, "Error allocating %ld bytes", nv * sizeof(double)); + return GRIB_OUT_OF_MEMORY; + } + + /* Populate the lat and lon arrays */ + false_easting = x0; + false_northing = y0; + for (j = 0; j < ny; j++) { + y = j * Dy; + for (i = 0; i < nx; i++) { + double cCe, sCe, q, rho, ab=0.0, lp__lam, lp__phi, xy_x,xy_y; + const int index = i + j * nx; + + x = i * Dx; + xy_x = x; + xy_y = y; + /* Inverse projection to convert from x,y to lat,lon */ + //_x = x - false_easting; + //_y = rh - y + false_northing; + // calculate latRad and lonRad + xy_x /= Q__dd; + xy_y *= Q__dd; + rho = hypot(xy_x, xy_y); + Assert(rho >= EPS10); // TODO + sCe = 2. * asin(.5 * rho / Q__rq); + cCe = cos(sCe); + sCe = sin(sCe); + xy_x *= sCe; + // if oblique + ab = cCe * Q__sinb1 + xy_y * sCe * Q__cosb1 / rho; + xy_y = rho * Q__cosb1 * cCe - xy_y * Q__sinb1 * sCe; + // else + //ab = xy.y * sCe / rho; + //xy.y = rho * cCe; + + lp__lam = atan2(xy_x, xy_y); //longitude + lp__phi = pj_authlat(asin(ab), APA); // latitude + + latDeg = latRad * RAD2DEG; /* Convert to degrees */ + lonDeg = lonRad * RAD2DEG; + lonDeg = normalise_longitude_in_degrees(lonDeg); + self->lons[index] = lonDeg; + self->lats[index] = latDeg; + } + } + + //grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); + //return GRIB_GEOCALCULUS_PROBLEM; + return GRIB_SUCCESS; } static int init_sphere(grib_handle* h, From bb74b149e812e3720ff8560fc79e590b74d16479 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Sun, 28 Jun 2020 16:19:30 +0100 Subject: [PATCH 03/17] Geoiterator for Lambert Azimuthal Equal Area on ellipsoid (part 3) --- ...rator_class_lambert_azimuthal_equal_area.c | 73 +++++++++++++++++-- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 2f1539e4f..2f61a5d98 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -173,8 +173,12 @@ static int init_oblate(grib_handle* h, double e, es, temp, one_es; double false_easting; /* x offset in meters */ double false_northing; /* y offset in meters */ - double latRad, lonRad, latDeg, lonDeg; + double latRad=0, lonRad=0, latDeg, lonDeg; double APA[3] = {0,}; + double xFirst, yFirst; + + Dx = iScansNegatively == 0 ? Dx / 1000 : -Dx / 1000; + Dy = jScansPositively == 1 ? Dy / 1000 : -Dy / 1000; //temp = earthMinorAxisInMetres/earthMajorAxisInMetres; //es = 1.0 - temp * temp; @@ -182,7 +186,7 @@ static int init_oblate(grib_handle* h, es = 2*temp - temp*temp; one_es = 1.0 - es; e = sqrt(es); - +printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFirstInRadians); coslam = cos(lonFirstInRadians - centralLongitudeInRadians); //cos(lp.lam); sinlam = sin(lonFirstInRadians - centralLongitudeInRadians); sinphi = sin(latFirstInRadians); // sin(lp.phi); @@ -223,8 +227,8 @@ static int init_oblate(grib_handle* h, // OBLIQUE y0 = Q__ymf * b * (Q__cosb1 * sinb - Q__sinb1 * cosb * coslam); x0 = Q__xmf * b * cosb * sinlam; - y0 *= earthMajorAxisInMetres; - x0 *= earthMajorAxisInMetres; + //y0 *= earthMajorAxisInMetres; + //x0 *= earthMajorAxisInMetres; /* Allocate latitude and longitude arrays */ self->lats = (double*)grib_context_malloc(h->context, nv * sizeof(double)); @@ -237,8 +241,63 @@ static int init_oblate(grib_handle* h, grib_context_log(h->context, GRIB_LOG_ERROR, "Error allocating %ld bytes", nv * sizeof(double)); return GRIB_OUT_OF_MEMORY; } + lats = self->lats; + lons = self->lons; /* Populate the lat and lon arrays */ + { + xFirst = x0; yFirst = y0; + y = yFirst; + for (j = 0; j < ny; j++) { + x = xFirst; + for (i = 0; i < nx; i++) { + double cCe, sCe, q, rho, ab=0.0, lp__lam, lp__phi, xy_x=x , xy_y = y; + xy_x /= Q__dd; + xy_y *= Q__dd; + rho = hypot(xy_x, xy_y); + Assert(rho >= EPS10); // TODO + sCe = 2. * asin(.5 * rho / Q__rq); + cCe = cos(sCe); + sCe = sin(sCe); + xy_x *= sCe; + // if oblique + ab = cCe * Q__sinb1 + xy_y * sCe * Q__cosb1 / rho; + xy_y = rho * Q__cosb1 * cCe - xy_y * Q__sinb1 * sCe; + // else + //ab = xy.y * sCe / rho; + //xy.y = rho * cCe; + lp__lam = atan2(xy_x, xy_y); //longitude + lp__phi = pj_authlat(asin(ab), APA); // latitude + //printf("lp__phi=%g, lp__lam=%g\n", lp__phi, lp__lam); + //printf("lp__phi=%g, lp__lam=%g\n", lp__phi * RAD2DEG, lp__lam* RAD2DEG); + + *lats = lp__phi * RAD2DEG; + *lons = lp__lam * RAD2DEG; + //rho = sqrt(x * x + ysq); + //if (rho > epsilon) { + // c = 2 * asin(rho / (2.0 * radius)); + // cosc = cos(c); + // sinc = sin(c); + // *lats = asin(cosc * sinphi1 + y * sinc * cosphi1 / rho) / d2r; + // *lons = (lambda0 + atan2(x * sinc, rho * cosphi1 * cosc - y * sinphi1 * sinc)) / d2r; + //} + //else { + // *lats = phi1 / d2r; + // *lons = lambda0 / d2r; + //} + //if (*lons < 0) *lons += 360; + lons++; + lats++; + + //x += Dx; + x += Dx/earthMajorAxisInMetres; + } + //y += Dy; + y += Dy/earthMajorAxisInMetres; + } + } + +#if 0 false_easting = x0; false_northing = y0; for (j = 0; j < ny; j++) { @@ -271,6 +330,8 @@ static int init_oblate(grib_handle* h, lp__lam = atan2(xy_x, xy_y); //longitude lp__phi = pj_authlat(asin(ab), APA); // latitude + printf("lp__phi=%g, lp__lam=%g\n", lp__phi, lp__lam); + latDeg = latRad * RAD2DEG; /* Convert to degrees */ lonDeg = lonRad * RAD2DEG; @@ -279,7 +340,7 @@ static int init_oblate(grib_handle* h, self->lats[index] = latDeg; } } - +#endif //grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); //return GRIB_GEOCALCULUS_PROBLEM; return GRIB_SUCCESS; @@ -470,7 +531,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) lonFirstInRadians = lonFirstInDegrees * d2r; centralLongitudeInRadians = centralLongitudeInDegrees * d2r; standardParallelInRadians = standardParallelInDegrees * d2r; - +printf("latFirstInDegrees=%g, lonFirstInDegrees=%g\n",latFirstInDegrees,lonFirstInDegrees); if (is_oblate) { err = init_oblate(h, self, iter->nv, nx, ny, Dx, Dy, earthMinorAxisInMetres, earthMajorAxisInMetres, From 66bd71068af4b712a2ff2bccec351be192da0a5e Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 13 Oct 2021 17:02:55 +0100 Subject: [PATCH 04/17] ECC-1290: BUFR: Key spectralWaveDensity decoded incorrectly (1st try) --- src/grib_api_prototypes.h | 5 ++++- src/grib_bits_any_endian.c | 16 ++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/grib_api_prototypes.h b/src/grib_api_prototypes.h index 66ec2432e..a10dabe40 100644 --- a/src/grib_api_prototypes.h +++ b/src/grib_api_prototypes.h @@ -1,3 +1,6 @@ +#ifdef ECCODES_ON_WINDOWS +#include +#endif /* action.c */ void grib_dump(grib_action* a, FILE* f, int l); @@ -1550,7 +1553,7 @@ int grib_optimize_decimal_factor(grib_accessor* a, const char* reference_value, const char* grib_get_git_sha1(void); /* grib_bits_any_endian.c */ -int grib_is_all_bits_one(long val, long nbits); +int grib_is_all_bits_one(int64_t val, long nbits); int grib_encode_string(unsigned char* bitStream, long* bitOffset, size_t numberOfCharacters, const char* string); char* grib_decode_string(const unsigned char* bitStream, long* bitOffset, size_t numberOfCharacters, char* string); unsigned long grib_decode_unsigned_long(const unsigned char* p, long* bitp, long nbits); diff --git a/src/grib_bits_any_endian.c b/src/grib_bits_any_endian.c index c614d0a80..44b2a9a9a 100644 --- a/src/grib_bits_any_endian.c +++ b/src/grib_bits_any_endian.c @@ -13,6 +13,10 @@ * * ***************************************************************************/ +#ifdef ECCODES_ON_WINDOWS +#include +#endif + #if GRIB_PTHREADS static pthread_once_t once = PTHREAD_ONCE_INIT; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; @@ -45,16 +49,16 @@ typedef struct bits_all_one_t { int inited; int size; - long v[128]; + int64_t v[128]; } bits_all_one_t; static bits_all_one_t bits_all_one = { 0, 0, {0,} }; static void init_bits_all_one() { - int size = sizeof(long) * 8; - long* v = 0; - unsigned long cmask = -1; + int size = sizeof(int64_t) * 8; + int64_t* v = 0; + uint64_t cmask = -1; DebugAssert(!bits_all_one.inited); bits_all_one.size = size; @@ -78,7 +82,7 @@ static void init_bits_all_one_if_needed() init_bits_all_one(); GRIB_MUTEX_UNLOCK(&mutex); } -int grib_is_all_bits_one(long val, long nbits) +int grib_is_all_bits_one(int64_t val, long nbits) { /*if (!bits_all_one.inited) init_bits_all_one();*/ init_bits_all_one_if_needed(); @@ -301,7 +305,7 @@ int grib_encode_unsigned_long(unsigned char* p, unsigned long val, long* bitp, l * Note: On x64 Micrsoft Windows a "long" is 32 bits but "size_t" is 64 bits */ #define BIT_MASK_SIZE_T(x) \ - (((x) == max_nbits_size_t) ? (size_t)-1UL : (1UL << (x)) - 1) + (((x) == max_nbits_size_t) ? (size_t)-1ULL : (1ULL << (x)) - 1) size_t grib_decode_size_t(const unsigned char* p, long* bitp, long nbits) { From f9cf8d223975ac5f13bb0d69dcff8263d6fffb99 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 13 Oct 2021 17:04:46 +0100 Subject: [PATCH 05/17] ECC-1290: BUFR: Key spectralWaveDensity decoded incorrectly (1st try) --- src/grib_bits_fast_big_endian.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grib_bits_fast_big_endian.c b/src/grib_bits_fast_big_endian.c index af852d105..4a50349dc 100644 --- a/src/grib_bits_fast_big_endian.c +++ b/src/grib_bits_fast_big_endian.c @@ -41,7 +41,7 @@ static void init_bits_all_one() *(--v) = ~(cmask << --size); } -int grib_is_all_bits_one(long val, long nbits) +int grib_is_all_bits_one(int64_t val, long nbits) { if (!bits_all_one.inited) init_bits_all_one(); From d2af1b658077b40b80c3eda33e58db74def86031 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Wed, 13 Oct 2021 17:21:40 +0100 Subject: [PATCH 06/17] ECC-1290: BUFR: Key spectralWaveDensity decoded incorrectly --- src/grib_accessor_class_bufr_data_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grib_accessor_class_bufr_data_array.c b/src/grib_accessor_class_bufr_data_array.c index 58a68ed55..69cf66a06 100644 --- a/src/grib_accessor_class_bufr_data_array.c +++ b/src/grib_accessor_class_bufr_data_array.c @@ -767,7 +767,7 @@ static int descriptor_get_min_max(bufr_descriptor* bd, long width, long referenc { /* Maximum value is allowed to be the largest number (all bits 1) which means it's MISSING */ unsigned long max1 = (1UL << width) - 1; /* Highest value for number with 'width' bits */ - DebugAssert(width > 0 && width < 64); + DebugAssert(width > 0 && width <= 32); *maxAllowed = (max1 + reference) * factor; *minAllowed = reference * factor; @@ -1100,7 +1100,7 @@ static double decode_double_value(grib_context* c, unsigned char* data, long* po dval = GRIB_MISSING_DOUBLE; } else { - dval = ((long)lval + modifiedReference) * modifiedFactor; + dval = ((int64_t)lval + modifiedReference) * modifiedFactor; } return dval; } From 55e0e3e30b4e8b557f86ee41c6e7ad86c5d7a32f Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 26 Oct 2021 12:19:33 +0100 Subject: [PATCH 07/17] ECC-1291: Merge from develop and make tests pass --- src/grib_iterator_class_lambert_azimuthal_equal_area.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 2f61a5d98..7f53e99fb 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -531,7 +531,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) lonFirstInRadians = lonFirstInDegrees * d2r; centralLongitudeInRadians = centralLongitudeInDegrees * d2r; standardParallelInRadians = standardParallelInDegrees * d2r; -printf("latFirstInDegrees=%g, lonFirstInDegrees=%g\n",latFirstInDegrees,lonFirstInDegrees); +//printf("latFirstInDegrees=%g, lonFirstInDegrees=%g\n",latFirstInDegrees,lonFirstInDegrees); if (is_oblate) { err = init_oblate(h, self, iter->nv, nx, ny, Dx, Dy, earthMinorAxisInMetres, earthMajorAxisInMetres, From f2cd1b425e9bcc2d100a80f62ea7419202d96c09 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 26 Oct 2021 12:35:29 +0100 Subject: [PATCH 08/17] ECC-1291: Improve test --- tests/grib_grid_lamb_az_eq_area.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/grib_grid_lamb_az_eq_area.sh b/tests/grib_grid_lamb_az_eq_area.sh index 71f048746..c3a61d38e 100755 --- a/tests/grib_grid_lamb_az_eq_area.sh +++ b/tests/grib_grid_lamb_az_eq_area.sh @@ -32,16 +32,17 @@ set scaleFactorOfRadiusOfSphericalEarth=0; set scaledValueOfRadiusOfSphericalEarth=6378388; set numberOfValues=100; set latitudeOfFirstGridPointInDegrees = 67.575; -set longitudeOfFirstGridPointInDegrees = -33.4944; +set longitudeOfFirstGridPointInDegrees = 326.5056; set Dx = 5000000; set Dy = 5000000; set standardParallel = 48000000; set centralLongitude = 9000000; -write "lamb_az_eq_area.grib2"; +write; EOF # Use this filter and the input GRIB to create a new GRIB -${tools_dir}/grib_filter $FILTER_FILE $GRIB_INFILE +rm -f "$GRIB_OUTFILE" +${tools_dir}/grib_filter -o $GRIB_OUTFILE $FILTER_FILE $GRIB_INFILE if [ ! -f "$GRIB_OUTFILE" ]; then echo Failed to create output GRIB from filter >&2 exit 1 @@ -60,4 +61,5 @@ ${tools_dir}/grib_ls -l 67,-33,1 $GRIB_OUTFILE # Clean up -rm -f $FILTER_FILE $GRIB_OUTFILE $DATA_OUTFILE +rm -f $FILTER_FILE $DATA_OUTFILE +#rm -f $GRIB_OUTFILE From c9df56b0214c4a7422dbcd7f84b2766b0a19d7f1 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 26 Oct 2021 13:34:19 +0100 Subject: [PATCH 09/17] ECC-1291: Test --- ...rator_class_lambert_azimuthal_equal_area.c | 98 ++++++++++--------- tests/grib_grid_lamb_az_eq_area.sh | 6 +- 2 files changed, 54 insertions(+), 50 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 7f53e99fb..ee8684027 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -112,18 +112,18 @@ static int next(grib_iterator* i, double* lat, double* lon, double* val) #define RAD2DEG 57.29577951308232087684 /* 180 over pi */ #define DEG2RAD 0.01745329251994329576 /* pi over 180 */ -# define P00 .33333333333333333333 /* 1 / 3 */ -# define P01 .17222222222222222222 /* 31 / 180 */ -# define P02 .10257936507936507937 /* 517 / 5040 */ -# define P10 .06388888888888888888 /* 23 / 360 */ -# define P11 .06640211640211640212 /* 251 / 3780 */ -# define P20 .01677689594356261023 /* 761 / 45360 */ +#define P00 .33333333333333333333 /* 1 / 3 */ +#define P01 .17222222222222222222 /* 31 / 180 */ +#define P02 .10257936507936507937 /* 517 / 5040 */ +#define P10 .06388888888888888888 /* 23 / 360 */ +#define P11 .06640211640211640212 /* 251 / 3780 */ +#define P20 .01677689594356261023 /* 761 / 45360 */ void pj_authset(double es, double* APA) { double t; APA[0] = es * P00; - t = es * es; + t = es * es; APA[0] += t * P01; APA[1] = t * P10; t *= es; @@ -131,10 +131,10 @@ void pj_authset(double es, double* APA) APA[1] += t * P11; APA[2] = t * P20; } -double pj_authlat(double beta, double *APA) +double pj_authlat(double beta, double* APA) { - double t = beta+beta; - return(beta + APA[0] * sin(t) + APA[1] * sin(t+t) + APA[2] * sin(t+t+t)); + double t = beta + beta; + return (beta + APA[0] * sin(t) + APA[1] * sin(t + t) + APA[2] * sin(t + t + t)); } static double pj_qsfn(double sinphi, double e, double one_es) @@ -143,7 +143,7 @@ static double pj_qsfn(double sinphi, double e, double one_es) const double EPSILON = 1.0e-7; if (e >= EPSILON) { - con = e * sinphi; + con = e * sinphi; div1 = 1.0 - con * con; div2 = 1.0 + con; @@ -151,8 +151,9 @@ static double pj_qsfn(double sinphi, double e, double one_es) if (div1 == 0.0 || div2 == 0.0) return HUGE_VAL; - return (one_es * (sinphi / div1 - (.5 / e) * log ((1. - con) / div2 ))); - } else + return (one_es * (sinphi / div1 - (.5 / e) * log((1. - con) / div2))); + } + else return (sinphi + sinphi); } @@ -168,33 +169,33 @@ static int init_oblate(grib_handle* h, double *lats, *lons; long i, j; double x0, y0, x, y; - double coslam, sinlam, sinphi, sinphi_, q, sinb=0.0, cosb=0.0, b=0.0, cosb2;//fwd + double coslam, sinlam, sinphi, sinphi_, q, sinb = 0.0, cosb = 0.0, b = 0.0, cosb2; //fwd double Q__qp = 0, Q__rq = 0, Q__mmf = 0, Q__cosb1, Q__sinb1, Q__dd, Q__xmf, Q__ymf, t; double e, es, temp, one_es; double false_easting; /* x offset in meters */ double false_northing; /* y offset in meters */ - double latRad=0, lonRad=0, latDeg, lonDeg; + double latRad = 0, lonRad = 0, latDeg, lonDeg; double APA[3] = {0,}; double xFirst, yFirst; - - Dx = iScansNegatively == 0 ? Dx / 1000 : -Dx / 1000; - Dy = jScansPositively == 1 ? Dy / 1000 : -Dy / 1000; + + Dx = iScansNegatively == 0 ? Dx / 1000 : -Dx / 1000; + Dy = jScansPositively == 1 ? Dy / 1000 : -Dy / 1000; //temp = earthMinorAxisInMetres/earthMajorAxisInMetres; //es = 1.0 - temp * temp; - temp = (earthMajorAxisInMetres - earthMinorAxisInMetres)/earthMajorAxisInMetres; - es = 2*temp - temp*temp; + temp = (earthMajorAxisInMetres - earthMinorAxisInMetres) / earthMajorAxisInMetres; + es = 2 * temp - temp * temp; one_es = 1.0 - es; - e = sqrt(es); -printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFirstInRadians); + e = sqrt(es); + //printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFirstInRadians); coslam = cos(lonFirstInRadians - centralLongitudeInRadians); //cos(lp.lam); sinlam = sin(lonFirstInRadians - centralLongitudeInRadians); - sinphi = sin(latFirstInRadians); // sin(lp.phi); - q = pj_qsfn(sinphi, e, one_es); - + sinphi = sin(latFirstInRadians); // sin(lp.phi); + q = pj_qsfn(sinphi, e, one_es); + //----------- setp start t = fabs(standardParallelInRadians); - if (t > M_PI_2 + EPS10 ) { + if (t > M_PI_2 + EPS10) { return GRIB_GEOCALCULUS_PROBLEM; } //if (fabs(t - M_HALFPI) < EPS10) @@ -203,22 +204,22 @@ printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFi // Q->mode = EQUIT; //else // Q->mode = OBLIQ; - Q__qp = pj_qsfn(1.0, e, one_es); + Q__qp = pj_qsfn(1.0, e, one_es); Q__mmf = 0.5 / one_es; - pj_authset(es, APA); // sets up APA array - Q__rq = sqrt(0.5 * Q__qp); - sinphi_ = sin(standardParallelInRadians); // (P->phi0); + pj_authset(es, APA); // sets up APA array + Q__rq = sqrt(0.5 * Q__qp); + sinphi_ = sin(standardParallelInRadians); // (P->phi0); Q__sinb1 = pj_qsfn(sinphi_, e, one_es) / Q__qp; Q__cosb1 = sqrt(1.0 - Q__sinb1 * Q__sinb1); - Q__dd = cos(standardParallelInRadians) / (sqrt(1. - es * sinphi_ * sinphi_) * Q__rq * Q__cosb1); - Q__ymf = (Q__xmf = Q__rq) / Q__dd; + Q__dd = cos(standardParallelInRadians) / (sqrt(1. - es * sinphi_ * sinphi_) * Q__rq * Q__cosb1); + Q__ymf = (Q__xmf = Q__rq) / Q__dd; Q__xmf *= Q__dd; //----------- setup end - sinb = q/Q__qp; + sinb = q / Q__qp; cosb2 = 1.0 - sinb * sinb; - cosb = cosb2 > 0 ? sqrt(cosb2) : 0; - b = 1. + Q__sinb1 * sinb + Q__cosb1 * cosb * coslam; + cosb = cosb2 > 0 ? sqrt(cosb2) : 0; + b = 1. + Q__sinb1 * sinb + Q__cosb1 * cosb * coslam; if (fabs(b) < EPS10) { return GRIB_GEOCALCULUS_PROBLEM; } @@ -246,31 +247,32 @@ printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFi /* Populate the lat and lon arrays */ { - xFirst = x0; yFirst = y0; - y = yFirst; + xFirst = x0; + yFirst = y0; + y = yFirst; for (j = 0; j < ny; j++) { - x = xFirst; + x = xFirst; for (i = 0; i < nx; i++) { - double cCe, sCe, q, rho, ab=0.0, lp__lam, lp__phi, xy_x=x , xy_y = y; + double cCe, sCe, q, rho, ab = 0.0, lp__lam, lp__phi, xy_x = x, xy_y = y; xy_x /= Q__dd; xy_y *= Q__dd; rho = hypot(xy_x, xy_y); - Assert(rho >= EPS10); // TODO + Assert(rho >= EPS10); // TODO sCe = 2. * asin(.5 * rho / Q__rq); cCe = cos(sCe); sCe = sin(sCe); xy_x *= sCe; // if oblique - ab = cCe * Q__sinb1 + xy_y * sCe * Q__cosb1 / rho; + ab = cCe * Q__sinb1 + xy_y * sCe * Q__cosb1 / rho; xy_y = rho * Q__cosb1 * cCe - xy_y * Q__sinb1 * sCe; // else //ab = xy.y * sCe / rho; //xy.y = rho * cCe; - lp__lam = atan2(xy_x, xy_y); //longitude - lp__phi = pj_authlat(asin(ab), APA); // latitude + lp__lam = atan2(xy_x, xy_y); //longitude + lp__phi = pj_authlat(asin(ab), APA); // latitude //printf("lp__phi=%g, lp__lam=%g\n", lp__phi, lp__lam); //printf("lp__phi=%g, lp__lam=%g\n", lp__phi * RAD2DEG, lp__lam* RAD2DEG); - + *lats = lp__phi * RAD2DEG; *lons = lp__lam * RAD2DEG; //rho = sqrt(x * x + ysq); @@ -290,10 +292,10 @@ printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFi lats++; //x += Dx; - x += Dx/earthMajorAxisInMetres; + x += Dx / earthMajorAxisInMetres; } //y += Dy; - y += Dy/earthMajorAxisInMetres; + y += Dy / earthMajorAxisInMetres; } } @@ -340,7 +342,7 @@ printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFi self->lats[index] = latDeg; } } -#endif +#endif //grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); //return GRIB_GEOCALCULUS_PROBLEM; return GRIB_SUCCESS; @@ -531,7 +533,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) lonFirstInRadians = lonFirstInDegrees * d2r; centralLongitudeInRadians = centralLongitudeInDegrees * d2r; standardParallelInRadians = standardParallelInDegrees * d2r; -//printf("latFirstInDegrees=%g, lonFirstInDegrees=%g\n",latFirstInDegrees,lonFirstInDegrees); + //printf("latFirstInDegrees=%g, lonFirstInDegrees=%g\n",latFirstInDegrees,lonFirstInDegrees); if (is_oblate) { err = init_oblate(h, self, iter->nv, nx, ny, Dx, Dy, earthMinorAxisInMetres, earthMajorAxisInMetres, diff --git a/tests/grib_grid_lamb_az_eq_area.sh b/tests/grib_grid_lamb_az_eq_area.sh index c3a61d38e..f2e8e3bd6 100755 --- a/tests/grib_grid_lamb_az_eq_area.sh +++ b/tests/grib_grid_lamb_az_eq_area.sh @@ -27,9 +27,11 @@ set Nx = 10; set Ny = 10; set values={2}; set numberOfDataPoints=100; -set shapeOfTheEarth=1; + +set shapeOfTheEarth=1; # Earth assumed spherical with radius specified (in m) by data producer set scaleFactorOfRadiusOfSphericalEarth=0; set scaledValueOfRadiusOfSphericalEarth=6378388; + set numberOfValues=100; set latitudeOfFirstGridPointInDegrees = 67.575; set longitudeOfFirstGridPointInDegrees = 326.5056; @@ -62,4 +64,4 @@ ${tools_dir}/grib_ls -l 67,-33,1 $GRIB_OUTFILE # Clean up rm -f $FILTER_FILE $DATA_OUTFILE -#rm -f $GRIB_OUTFILE +rm -f $GRIB_OUTFILE From 08ae2ef1bab6c45d513a155cd2c9b12a6609e1b8 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Mon, 1 Nov 2021 17:39:41 +0000 Subject: [PATCH 10/17] GRIB2: parameter database sync --- definitions/grib2/localConcepts/kwbc/name.def | 552 +++++++++--------- .../grib2/localConcepts/kwbc/paramId.def | 552 +++++++++--------- .../grib2/localConcepts/kwbc/shortName.def | 552 +++++++++--------- .../grib2/localConcepts/kwbc/units.def | 552 +++++++++--------- 4 files changed, 1104 insertions(+), 1104 deletions(-) diff --git a/definitions/grib2/localConcepts/kwbc/name.def b/definitions/grib2/localConcepts/kwbc/name.def index 9b1810666..372f82ba0 100644 --- a/definitions/grib2/localConcepts/kwbc/name.def +++ b/definitions/grib2/localConcepts/kwbc/name.def @@ -1625,6 +1625,282 @@ parameterCategory = 19 ; parameterNumber = 234 ; } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 +'Simulated Brightness Temperature for AMSRE on Aqua, Channel 10' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 11 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 +'Simulated Brightness Temperature for AMSRE on Aqua, Channel 11' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 12 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 +'Simulated Brightness Temperature for AMSRE on Aqua, Channel 12' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 13 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 +'Simulated Brightness Temperature for AMSRE on Aqua, Channel 9' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 10 ; + } +#Simulated Brightness Counts for GOES 12, Channel 3 +'Simulated Brightness Counts for GOES 12, Channel 3' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 4 ; + } +#Simulated Brightness Counts for GOES 12, Channel 4 +'Simulated Brightness Counts for GOES 12, Channel 4' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 5 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 2 +'Simulated Brightness Temperature for GOES 11, Channel 2' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 6 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 3 +'Simulated Brightness Temperature for GOES 11, Channel 3' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 7 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 4 +'Simulated Brightness Temperature for GOES 11, Channel 4' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 8 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 5 +'Simulated Brightness Temperature for GOES 11, Channel 5' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 9 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 2 +'Simulated Brightness Temperature for GOES 12, Channel 2' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 0 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 3 +'Simulated Brightness Temperature for GOES 12, Channel 3' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 1 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 4 +'Simulated Brightness Temperature for GOES 12, Channel 4' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 2 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 6 +'Simulated Brightness Temperature for GOES 12, Channel 6' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 3 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-10 +'Simulated Brightness Temperature for ABI GOES-16, Band-10' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 23 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-11 +'Simulated Brightness Temperature for ABI GOES-16, Band-11' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 24 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-12 +'Simulated Brightness Temperature for ABI GOES-16, Band-12' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 25 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-13 +'Simulated Brightness Temperature for ABI GOES-16, Band-13' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 26 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-14 +'Simulated Brightness Temperature for ABI GOES-16, Band-14' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 27 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-15 +'Simulated Brightness Temperature for ABI GOES-16, Band-15' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 28 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-16 +'Simulated Brightness Temperature for ABI GOES-16, Band-16' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 29 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-7 +'Simulated Brightness Temperature for ABI GOES-16, Band-7' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 20 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-8 +'Simulated Brightness Temperature for ABI GOES-16, Band-8' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 21 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-9 +'Simulated Brightness Temperature for ABI GOES-16, Band-9' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 22 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-10 +'Simulated Brightness Temperature for ABI GOES-17, Band-10' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 39 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-11 +'Simulated Brightness Temperature for ABI GOES-17, Band-11' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 40 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-12 +'Simulated Brightness Temperature for ABI GOES-17, Band-12' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 41 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-13 +'Simulated Brightness Temperature for ABI GOES-17, Band-13' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 42 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-14 +'Simulated Brightness Temperature for ABI GOES-17, Band-14' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 43 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-15 +'Simulated Brightness Temperature for ABI GOES-17, Band-15' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 44 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-16 +'Simulated Brightness Temperature for ABI GOES-17, Band-16' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 45 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-7 +'Simulated Brightness Temperature for ABI GOES-17, Band-7' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 36 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-8 +'Simulated Brightness Temperature for ABI GOES-17, Band-8' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 37 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-9 +'Simulated Brightness Temperature for ABI GOES-17, Band-9' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 38 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-1 +'Simulated Reflectance Factor for ABI GOES-16, Band-1' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 14 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-2 +'Simulated Reflectance Factor for ABI GOES-16, Band-2' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 15 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-3 +'Simulated Reflectance Factor for ABI GOES-16, Band-3' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 16 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-4 +'Simulated Reflectance Factor for ABI GOES-16, Band-4' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 17 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-5 +'Simulated Reflectance Factor for ABI GOES-16, Band-5' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 18 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-6 +'Simulated Reflectance Factor for ABI GOES-16, Band-6' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 19 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-1 +'Simulated Reflectance Factor for ABI GOES-17, Band-1' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 30 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-2 +'Simulated Reflectance Factor for ABI GOES-17, Band-2' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 31 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-3 +'Simulated Reflectance Factor for ABI GOES-17, Band-3' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 32 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-4 +'Simulated Reflectance Factor for ABI GOES-17, Band-4' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 33 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-5 +'Simulated Reflectance Factor for ABI GOES-17, Band-5' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 34 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-6 +'Simulated Reflectance Factor for ABI GOES-17, Band-6' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 35 ; + } #Ventilation Rate 'Ventilation Rate' = { discipline = 0 ; @@ -1649,279 +1925,3 @@ parameterCategory = 1 ; parameterNumber = 8 ; } -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 -'Simulated Brightness Temperature for AMSRE on Aqua, Channel 10' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 11 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 -'Simulated Brightness Temperature for AMSRE on Aqua, Channel 11' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 12 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 -'Simulated Brightness Temperature for AMSRE on Aqua, Channel 12' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 13 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 -'Simulated Brightness Temperature for AMSRE on Aqua, Channel 9' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 10 ; -} -#Simulated Brightness Counts for GOES 12, Channel 3 -'Simulated Brightness Counts for GOES 12, Channel 3' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 4 ; -} -#Simulated Brightness Counts for GOES 12, Channel 4 -'Simulated Brightness Counts for GOES 12, Channel 4' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 5 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 2 -'Simulated Brightness Temperature for GOES 11, Channel 2' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 6 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 3 -'Simulated Brightness Temperature for GOES 11, Channel 3' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 7 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 4 -'Simulated Brightness Temperature for GOES 11, Channel 4' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 8 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 5 -'Simulated Brightness Temperature for GOES 11, Channel 5' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 9 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 2 -'Simulated Brightness Temperature for GOES 12, Channel 2' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 0 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 3 -'Simulated Brightness Temperature for GOES 12, Channel 3' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 1 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 4 -'Simulated Brightness Temperature for GOES 12, Channel 4' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 2 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 6 -'Simulated Brightness Temperature for GOES 12, Channel 6' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 3 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-10 -'Simulated Brightness Temperature for ABI GOES-16, Band-10' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 23 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-11 -'Simulated Brightness Temperature for ABI GOES-16, Band-11' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 24 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-12 -'Simulated Brightness Temperature for ABI GOES-16, Band-12' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 25 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-13 -'Simulated Brightness Temperature for ABI GOES-16, Band-13' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 26 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-14 -'Simulated Brightness Temperature for ABI GOES-16, Band-14' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 27 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-15 -'Simulated Brightness Temperature for ABI GOES-16, Band-15' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 28 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-16 -'Simulated Brightness Temperature for ABI GOES-16, Band-16' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 29 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-7 -'Simulated Brightness Temperature for ABI GOES-16, Band-7' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 20 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-8 -'Simulated Brightness Temperature for ABI GOES-16, Band-8' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 21 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-9 -'Simulated Brightness Temperature for ABI GOES-16, Band-9' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 22 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-10 -'Simulated Brightness Temperature for ABI GOES-17, Band-10' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 39 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-11 -'Simulated Brightness Temperature for ABI GOES-17, Band-11' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 40 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-12 -'Simulated Brightness Temperature for ABI GOES-17, Band-12' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 41 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-13 -'Simulated Brightness Temperature for ABI GOES-17, Band-13' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 42 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-14 -'Simulated Brightness Temperature for ABI GOES-17, Band-14' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 43 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-15 -'Simulated Brightness Temperature for ABI GOES-17, Band-15' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 44 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-16 -'Simulated Brightness Temperature for ABI GOES-17, Band-16' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 45 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-7 -'Simulated Brightness Temperature for ABI GOES-17, Band-7' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 36 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-8 -'Simulated Brightness Temperature for ABI GOES-17, Band-8' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 37 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-9 -'Simulated Brightness Temperature for ABI GOES-17, Band-9' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 38 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-1 -'Simulated Reflectance Factor for ABI GOES-16, Band-1' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 14 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-2 -'Simulated Reflectance Factor for ABI GOES-16, Band-2' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 15 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-3 -'Simulated Reflectance Factor for ABI GOES-16, Band-3' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 16 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-4 -'Simulated Reflectance Factor for ABI GOES-16, Band-4' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 17 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-5 -'Simulated Reflectance Factor for ABI GOES-16, Band-5' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 18 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-6 -'Simulated Reflectance Factor for ABI GOES-16, Band-6' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 19 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-1 -'Simulated Reflectance Factor for ABI GOES-17, Band-1' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 30 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-2 -'Simulated Reflectance Factor for ABI GOES-17, Band-2' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 31 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-3 -'Simulated Reflectance Factor for ABI GOES-17, Band-3' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 32 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-4 -'Simulated Reflectance Factor for ABI GOES-17, Band-4' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 33 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-5 -'Simulated Reflectance Factor for ABI GOES-17, Band-5' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 34 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-6 -'Simulated Reflectance Factor for ABI GOES-17, Band-6' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 35 ; -} diff --git a/definitions/grib2/localConcepts/kwbc/paramId.def b/definitions/grib2/localConcepts/kwbc/paramId.def index 9533c0969..9965dccab 100644 --- a/definitions/grib2/localConcepts/kwbc/paramId.def +++ b/definitions/grib2/localConcepts/kwbc/paramId.def @@ -1625,6 +1625,282 @@ parameterCategory = 19 ; parameterNumber = 234 ; } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 +'7001294' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 11 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 +'7001295' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 12 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 +'7001296' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 13 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 +'7001297' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 10 ; + } +#Simulated Brightness Counts for GOES 12, Channel 3 +'7001298' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 4 ; + } +#Simulated Brightness Counts for GOES 12, Channel 4 +'7001299' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 5 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 2 +'7001300' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 6 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 3 +'7001301' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 7 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 4 +'7001302' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 8 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 5 +'7001303' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 9 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 2 +'7001304' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 0 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 3 +'7001305' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 1 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 4 +'7001306' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 2 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 6 +'7001307' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 3 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-10 +'7001308' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 23 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-11 +'7001309' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 24 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-12 +'7001310' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 25 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-13 +'7001311' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 26 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-14 +'7001312' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 27 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-15 +'7001313' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 28 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-16 +'7001314' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 29 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-7 +'7001315' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 20 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-8 +'7001316' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 21 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-9 +'7001317' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 22 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-10 +'7001318' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 39 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-11 +'7001319' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 40 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-12 +'7001320' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 41 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-13 +'7001321' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 42 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-14 +'7001322' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 43 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-15 +'7001323' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 44 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-16 +'7001324' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 45 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-7 +'7001325' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 36 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-8 +'7001326' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 37 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-9 +'7001327' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 38 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-1 +'7001328' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 14 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-2 +'7001329' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 15 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-3 +'7001330' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 16 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-4 +'7001331' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 17 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-5 +'7001332' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 18 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-6 +'7001333' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 19 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-1 +'7001334' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 30 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-2 +'7001335' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 31 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-3 +'7001336' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 32 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-4 +'7001337' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 33 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-5 +'7001338' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 34 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-6 +'7001339' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 35 ; + } #Ventilation Rate '7001353' = { discipline = 0 ; @@ -1649,279 +1925,3 @@ parameterCategory = 1 ; parameterNumber = 8 ; } -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 -'7001294' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 11 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 -'7001295' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 12 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 -'7001296' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 13 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 -'7001297' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 10 ; -} -#Simulated Brightness Counts for GOES 12, Channel 3 -'7001298' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 4 ; -} -#Simulated Brightness Counts for GOES 12, Channel 4 -'7001299' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 5 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 2 -'7001300' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 6 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 3 -'7001301' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 7 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 4 -'7001302' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 8 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 5 -'7001303' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 9 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 2 -'7001304' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 0 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 3 -'7001305' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 1 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 4 -'7001306' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 2 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 6 -'7001307' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 3 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-10 -'7001308' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 23 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-11 -'7001309' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 24 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-12 -'7001310' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 25 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-13 -'7001311' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 26 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-14 -'7001312' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 27 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-15 -'7001313' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 28 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-16 -'7001314' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 29 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-7 -'7001315' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 20 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-8 -'7001316' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 21 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-9 -'7001317' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 22 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-10 -'7001318' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 39 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-11 -'7001319' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 40 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-12 -'7001320' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 41 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-13 -'7001321' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 42 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-14 -'7001322' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 43 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-15 -'7001323' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 44 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-16 -'7001324' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 45 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-7 -'7001325' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 36 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-8 -'7001326' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 37 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-9 -'7001327' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 38 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-1 -'7001328' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 14 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-2 -'7001329' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 15 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-3 -'7001330' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 16 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-4 -'7001331' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 17 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-5 -'7001332' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 18 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-6 -'7001333' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 19 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-1 -'7001334' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 30 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-2 -'7001335' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 31 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-3 -'7001336' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 32 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-4 -'7001337' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 33 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-5 -'7001338' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 34 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-6 -'7001339' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 35 ; -} diff --git a/definitions/grib2/localConcepts/kwbc/shortName.def b/definitions/grib2/localConcepts/kwbc/shortName.def index de05e2086..da76ff02a 100644 --- a/definitions/grib2/localConcepts/kwbc/shortName.def +++ b/definitions/grib2/localConcepts/kwbc/shortName.def @@ -1625,6 +1625,282 @@ parameterCategory = 19 ; parameterNumber = 234 ; } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 +'AMSRE10' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 11 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 +'AMSRE11' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 12 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 +'AMSRE12' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 13 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 +'AMSRE9' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 10 ; + } +#Simulated Brightness Counts for GOES 12, Channel 3 +'SBC123' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 4 ; + } +#Simulated Brightness Counts for GOES 12, Channel 4 +'SBC124' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 5 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 2 +'SBT112' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 6 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 3 +'SBT113' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 7 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 4 +'SBT114' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 8 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 5 +'SBT115' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 9 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 2 +'SBT122' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 0 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 3 +'SBT123' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 1 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 4 +'SBT124' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 2 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 6 +'SBT126' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 3 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-10 +'SBTA1610' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 23 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-11 +'SBTA1611' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 24 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-12 +'SBTA1612' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 25 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-13 +'SBTA1613' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 26 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-14 +'SBTA1614' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 27 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-15 +'SBTA1615' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 28 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-16 +'SBTA1616' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 29 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-7 +'SBTA167' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 20 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-8 +'SBTA168' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 21 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-9 +'SBTA169' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 22 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-10 +'SBTA1710' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 39 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-11 +'SBTA1711' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 40 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-12 +'SBTA1712' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 41 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-13 +'SBTA1713' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 42 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-14 +'SBTA1714' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 43 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-15 +'SBTA1715' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 44 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-16 +'SBTA1716' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 45 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-7 +'SBTA177' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 36 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-8 +'SBTA178' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 37 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-9 +'SBTA179' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 38 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-1 +'SRFA161' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 14 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-2 +'SRFA162' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 15 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-3 +'SRFA163' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 16 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-4 +'SRFA164' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 17 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-5 +'SRFA165' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 18 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-6 +'SRFA166' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 19 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-1 +'SRFA171' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 30 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-2 +'SRFA172' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 31 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-3 +'SRFA173' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 32 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-4 +'SRFA174' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 33 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-5 +'SRFA175' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 34 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-6 +'SRFA176' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 35 ; + } #Ventilation Rate 'VRATE' = { discipline = 0 ; @@ -1649,279 +1925,3 @@ parameterCategory = 1 ; parameterNumber = 8 ; } -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 -'AMSRE10' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 11 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 -'AMSRE11' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 12 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 -'AMSRE12' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 13 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 -'AMSRE9' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 10 ; -} -#Simulated Brightness Counts for GOES 12, Channel 3 -'SBC123' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 4 ; -} -#Simulated Brightness Counts for GOES 12, Channel 4 -'SBC124' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 5 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 2 -'SBT112' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 6 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 3 -'SBT113' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 7 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 4 -'SBT114' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 8 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 5 -'SBT115' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 9 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 2 -'SBT122' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 0 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 3 -'SBT123' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 1 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 4 -'SBT124' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 2 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 6 -'SBT126' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 3 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-10 -'SBTA1610' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 23 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-11 -'SBTA1611' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 24 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-12 -'SBTA1612' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 25 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-13 -'SBTA1613' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 26 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-14 -'SBTA1614' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 27 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-15 -'SBTA1615' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 28 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-16 -'SBTA1616' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 29 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-7 -'SBTA167' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 20 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-8 -'SBTA168' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 21 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-9 -'SBTA169' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 22 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-10 -'SBTA1710' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 39 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-11 -'SBTA1711' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 40 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-12 -'SBTA1712' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 41 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-13 -'SBTA1713' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 42 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-14 -'SBTA1714' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 43 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-15 -'SBTA1715' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 44 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-16 -'SBTA1716' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 45 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-7 -'SBTA177' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 36 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-8 -'SBTA178' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 37 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-9 -'SBTA179' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 38 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-1 -'SRFA161' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 14 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-2 -'SRFA162' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 15 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-3 -'SRFA163' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 16 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-4 -'SRFA164' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 17 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-5 -'SRFA165' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 18 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-6 -'SRFA166' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 19 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-1 -'SRFA171' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 30 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-2 -'SRFA172' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 31 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-3 -'SRFA173' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 32 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-4 -'SRFA174' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 33 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-5 -'SRFA175' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 34 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-6 -'SRFA176' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 35 ; -} diff --git a/definitions/grib2/localConcepts/kwbc/units.def b/definitions/grib2/localConcepts/kwbc/units.def index a3eafbc0f..302079ac5 100644 --- a/definitions/grib2/localConcepts/kwbc/units.def +++ b/definitions/grib2/localConcepts/kwbc/units.def @@ -1625,6 +1625,282 @@ parameterCategory = 19 ; parameterNumber = 234 ; } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 11 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 12 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 13 ; + } +#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 10 ; + } +#Simulated Brightness Counts for GOES 12, Channel 3 +'Byte' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 4 ; + } +#Simulated Brightness Counts for GOES 12, Channel 4 +'Byte' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 5 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 2 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 6 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 3 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 7 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 4 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 8 ; + } +#Simulated Brightness Temperature for GOES 11, Channel 5 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 9 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 2 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 0 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 3 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 1 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 4 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 2 ; + } +#Simulated Brightness Temperature for GOES 12, Channel 6 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 3 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-10 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 23 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-11 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 24 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-12 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 25 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-13 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 26 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-14 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 27 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-15 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 28 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-16 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 29 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-7 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 20 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-8 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 21 ; + } +#Simulated Brightness Temperature for ABI GOES-16, Band-9 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 22 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-10 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 39 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-11 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 40 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-12 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 41 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-13 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 42 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-14 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 43 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-15 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 44 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-16 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 45 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-7 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 36 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-8 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 37 ; + } +#Simulated Brightness Temperature for ABI GOES-17, Band-9 +'K' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 38 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-1 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 14 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-2 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 15 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-3 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 16 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-4 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 17 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-5 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 18 ; + } +#Simulated Reflectance Factor for ABI GOES-16, Band-6 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 19 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-1 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 30 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-2 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 31 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-3 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 32 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-4 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 33 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-5 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 34 ; + } +#Simulated Reflectance Factor for ABI GOES-17, Band-6 +'~' = { + discipline = 3 ; + parameterCategory = 192 ; + parameterNumber = 35 ; + } #Ventilation Rate 'm**2 s**-1' = { discipline = 0 ; @@ -1649,279 +1925,3 @@ parameterCategory = 1 ; parameterNumber = 8 ; } -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 10 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 11 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 11 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 12 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 12 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 13 ; -} -#Simulated Brightness Temperature for AMSRE on Aqua, Channel 9 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 10 ; -} -#Simulated Brightness Counts for GOES 12, Channel 3 -'Byte' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 4 ; -} -#Simulated Brightness Counts for GOES 12, Channel 4 -'Byte' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 5 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 2 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 6 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 3 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 7 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 4 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 8 ; -} -#Simulated Brightness Temperature for GOES 11, Channel 5 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 9 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 2 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 0 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 3 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 1 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 4 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 2 ; -} -#Simulated Brightness Temperature for GOES 12, Channel 6 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 3 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-10 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 23 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-11 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 24 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-12 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 25 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-13 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 26 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-14 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 27 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-15 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 28 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-16 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 29 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-7 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 20 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-8 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 21 ; -} -#Simulated Brightness Temperature for ABI GOES-16, Band-9 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 22 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-10 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 39 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-11 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 40 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-12 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 41 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-13 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 42 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-14 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 43 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-15 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 44 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-16 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 45 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-7 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 36 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-8 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 37 ; -} -#Simulated Brightness Temperature for ABI GOES-17, Band-9 -'K' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 38 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-1 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 14 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-2 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 15 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-3 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 16 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-4 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 17 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-5 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 18 ; -} -#Simulated Reflectance Factor for ABI GOES-16, Band-6 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 19 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-1 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 30 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-2 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 31 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-3 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 32 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-4 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 33 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-5 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 34 ; -} -#Simulated Reflectance Factor for ABI GOES-17, Band-6 -'-' = { - discipline = 3 ; - parameterCategory = 192 ; - parameterNumber = 35 ; -} From 4842d8e13a5125924c8cd922516952408fdc7062 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 2 Nov 2021 17:13:02 +0000 Subject: [PATCH 11/17] ECC-1291: GRIB2: Implement Lambert Azimuthal geoiterator on oblate spheroid (First working version) --- ...grib_iterator_class_lambert_azimuthal_equal_area.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index ee8684027..155d1ad9d 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -257,7 +257,7 @@ static int init_oblate(grib_handle* h, xy_x /= Q__dd; xy_y *= Q__dd; rho = hypot(xy_x, xy_y); - Assert(rho >= EPS10); // TODO + Assert(rho >= EPS10); // TODO(masn): check sCe = 2. * asin(.5 * rho / Q__rq); cCe = cos(sCe); sCe = sin(sCe); @@ -274,7 +274,8 @@ static int init_oblate(grib_handle* h, //printf("lp__phi=%g, lp__lam=%g\n", lp__phi * RAD2DEG, lp__lam* RAD2DEG); *lats = lp__phi * RAD2DEG; - *lons = lp__lam * RAD2DEG; + *lons = (lp__lam + centralLongitudeInRadians) * RAD2DEG; + //rho = sqrt(x * x + ysq); //if (rho > epsilon) { // c = 2 * asin(rho / (2.0 * radius)); @@ -318,7 +319,7 @@ static int init_oblate(grib_handle* h, xy_x /= Q__dd; xy_y *= Q__dd; rho = hypot(xy_x, xy_y); - Assert(rho >= EPS10); // TODO + Assert(rho >= EPS10); sCe = 2. * asin(.5 * rho / Q__rq); cCe = cos(sCe); sCe = sin(sCe); @@ -334,7 +335,6 @@ static int init_oblate(grib_handle* h, lp__phi = pj_authlat(asin(ab), APA); // latitude printf("lp__phi=%g, lp__lam=%g\n", lp__phi, lp__lam); - latDeg = latRad * RAD2DEG; /* Convert to degrees */ lonDeg = lonRad * RAD2DEG; lonDeg = normalise_longitude_in_degrees(lonDeg); @@ -343,8 +343,7 @@ static int init_oblate(grib_handle* h, } } #endif - //grib_context_log(h->context, GRIB_LOG_ERROR, "Lambert Azimuthal Equal Area only supported for spherical earth."); - //return GRIB_GEOCALCULUS_PROBLEM; + return GRIB_SUCCESS; } From 7f47e8d56741f64215848efad8c50822b31431c9 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 2 Nov 2021 17:33:01 +0000 Subject: [PATCH 12/17] ECC-1291: clean up --- ...rator_class_lambert_azimuthal_equal_area.c | 115 ++++-------------- 1 file changed, 25 insertions(+), 90 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 155d1ad9d..e46fd6d42 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -169,7 +169,7 @@ static int init_oblate(grib_handle* h, double *lats, *lons; long i, j; double x0, y0, x, y; - double coslam, sinlam, sinphi, sinphi_, q, sinb = 0.0, cosb = 0.0, b = 0.0, cosb2; //fwd + double coslam, sinlam, sinphi, sinphi_, q, sinb = 0.0, cosb = 0.0, b = 0.0, cosb2; double Q__qp = 0, Q__rq = 0, Q__mmf = 0, Q__cosb1, Q__sinb1, Q__dd, Q__xmf, Q__ymf, t; double e, es, temp, one_es; double false_easting; /* x offset in meters */ @@ -181,40 +181,37 @@ static int init_oblate(grib_handle* h, Dx = iScansNegatively == 0 ? Dx / 1000 : -Dx / 1000; Dy = jScansPositively == 1 ? Dy / 1000 : -Dy / 1000; - //temp = earthMinorAxisInMetres/earthMajorAxisInMetres; - //es = 1.0 - temp * temp; temp = (earthMajorAxisInMetres - earthMinorAxisInMetres) / earthMajorAxisInMetres; es = 2 * temp - temp * temp; one_es = 1.0 - es; e = sqrt(es); - //printf("latFirstInRadians=%g, lonFirstInRadians=%g\n", latFirstInRadians, lonFirstInRadians); - coslam = cos(lonFirstInRadians - centralLongitudeInRadians); //cos(lp.lam); + + coslam = cos(lonFirstInRadians - centralLongitudeInRadians); /* cos(lp.lam) */ sinlam = sin(lonFirstInRadians - centralLongitudeInRadians); - sinphi = sin(latFirstInRadians); // sin(lp.phi); + sinphi = sin(latFirstInRadians); /* sin(lp.phi) */ q = pj_qsfn(sinphi, e, one_es); - //----------- setp start t = fabs(standardParallelInRadians); if (t > M_PI_2 + EPS10) { return GRIB_GEOCALCULUS_PROBLEM; } - //if (fabs(t - M_HALFPI) < EPS10) - // Q->mode = P->phi0 < 0. ? S_POLE : N_POLE; - //else if (fabs(t) < EPS10) - // Q->mode = EQUIT; - //else - // Q->mode = OBLIQ; + /* if (fabs(t - M_HALFPI) < EPS10) + Q->mode = P->phi0 < 0. ? S_POLE : N_POLE; + else if (fabs(t) < EPS10) + Q->mode = EQUIT; + else + Q->mode = OBLIQ; + */ Q__qp = pj_qsfn(1.0, e, one_es); Q__mmf = 0.5 / one_es; - pj_authset(es, APA); // sets up APA array + pj_authset(es, APA); /* sets up APA array */ Q__rq = sqrt(0.5 * Q__qp); - sinphi_ = sin(standardParallelInRadians); // (P->phi0); + sinphi_ = sin(standardParallelInRadians); /* (P->phi0); */ Q__sinb1 = pj_qsfn(sinphi_, e, one_es) / Q__qp; Q__cosb1 = sqrt(1.0 - Q__sinb1 * Q__sinb1); Q__dd = cos(standardParallelInRadians) / (sqrt(1. - es * sinphi_ * sinphi_) * Q__rq * Q__cosb1); Q__ymf = (Q__xmf = Q__rq) / Q__dd; Q__xmf *= Q__dd; - //----------- setup end sinb = q / Q__qp; cosb2 = 1.0 - sinb * sinb; @@ -225,11 +222,9 @@ static int init_oblate(grib_handle* h, } b = sqrt(2.0 / b); - // OBLIQUE + /* OBLIQUE */ y0 = Q__ymf * b * (Q__cosb1 * sinb - Q__sinb1 * cosb * coslam); x0 = Q__xmf * b * cosb * sinlam; - //y0 *= earthMajorAxisInMetres; - //x0 *= earthMajorAxisInMetres; /* Allocate latitude and longitude arrays */ self->lats = (double*)grib_context_malloc(h->context, nv * sizeof(double)); @@ -257,93 +252,33 @@ static int init_oblate(grib_handle* h, xy_x /= Q__dd; xy_y *= Q__dd; rho = hypot(xy_x, xy_y); - Assert(rho >= EPS10); // TODO(masn): check + Assert(rho >= EPS10); /* TODO(masn): check */ sCe = 2. * asin(.5 * rho / Q__rq); cCe = cos(sCe); sCe = sin(sCe); xy_x *= sCe; - // if oblique + /* if oblique */ ab = cCe * Q__sinb1 + xy_y * sCe * Q__cosb1 / rho; xy_y = rho * Q__cosb1 * cCe - xy_y * Q__sinb1 * sCe; - // else - //ab = xy.y * sCe / rho; - //xy.y = rho * cCe; - lp__lam = atan2(xy_x, xy_y); //longitude - lp__phi = pj_authlat(asin(ab), APA); // latitude - //printf("lp__phi=%g, lp__lam=%g\n", lp__phi, lp__lam); - //printf("lp__phi=%g, lp__lam=%g\n", lp__phi * RAD2DEG, lp__lam* RAD2DEG); + /* else + ab = xy.y * sCe / rho; + xy.y = rho * cCe; + */ + lp__lam = atan2(xy_x, xy_y); /* longitude */ + lp__phi = pj_authlat(asin(ab), APA); /* latitude */ *lats = lp__phi * RAD2DEG; *lons = (lp__lam + centralLongitudeInRadians) * RAD2DEG; - //rho = sqrt(x * x + ysq); - //if (rho > epsilon) { - // c = 2 * asin(rho / (2.0 * radius)); - // cosc = cos(c); - // sinc = sin(c); - // *lats = asin(cosc * sinphi1 + y * sinc * cosphi1 / rho) / d2r; - // *lons = (lambda0 + atan2(x * sinc, rho * cosphi1 * cosc - y * sinphi1 * sinc)) / d2r; - //} - //else { - // *lats = phi1 / d2r; - // *lons = lambda0 / d2r; - //} - //if (*lons < 0) *lons += 360; lons++; lats++; - //x += Dx; x += Dx / earthMajorAxisInMetres; } - //y += Dy; y += Dy / earthMajorAxisInMetres; } } -#if 0 - false_easting = x0; - false_northing = y0; - for (j = 0; j < ny; j++) { - y = j * Dy; - for (i = 0; i < nx; i++) { - double cCe, sCe, q, rho, ab=0.0, lp__lam, lp__phi, xy_x,xy_y; - const int index = i + j * nx; - - x = i * Dx; - xy_x = x; - xy_y = y; - /* Inverse projection to convert from x,y to lat,lon */ - //_x = x - false_easting; - //_y = rh - y + false_northing; - // calculate latRad and lonRad - xy_x /= Q__dd; - xy_y *= Q__dd; - rho = hypot(xy_x, xy_y); - Assert(rho >= EPS10); - sCe = 2. * asin(.5 * rho / Q__rq); - cCe = cos(sCe); - sCe = sin(sCe); - xy_x *= sCe; - // if oblique - ab = cCe * Q__sinb1 + xy_y * sCe * Q__cosb1 / rho; - xy_y = rho * Q__cosb1 * cCe - xy_y * Q__sinb1 * sCe; - // else - //ab = xy.y * sCe / rho; - //xy.y = rho * cCe; - - lp__lam = atan2(xy_x, xy_y); //longitude - lp__phi = pj_authlat(asin(ab), APA); // latitude - printf("lp__phi=%g, lp__lam=%g\n", lp__phi, lp__lam); - - latDeg = latRad * RAD2DEG; /* Convert to degrees */ - lonDeg = lonRad * RAD2DEG; - lonDeg = normalise_longitude_in_degrees(lonDeg); - self->lons[index] = lonDeg; - self->lats[index] = latDeg; - } - } -#endif - return GRIB_SUCCESS; } @@ -365,8 +300,8 @@ static int init_sphere(grib_handle* h, const double epsilon = 1.0e-20; const double d2r = acos(0.0) / 90.0; - lambda0 = centralLongitudeInRadians; // / 1000000; - phi1 = standardParallelInRadians; // / 1000000; + lambda0 = centralLongitudeInRadians; + phi1 = standardParallelInRadians; cosphi1 = cos(phi1); sinphi1 = sin(phi1); @@ -532,7 +467,7 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args) lonFirstInRadians = lonFirstInDegrees * d2r; centralLongitudeInRadians = centralLongitudeInDegrees * d2r; standardParallelInRadians = standardParallelInDegrees * d2r; - //printf("latFirstInDegrees=%g, lonFirstInDegrees=%g\n",latFirstInDegrees,lonFirstInDegrees); + if (is_oblate) { err = init_oblate(h, self, iter->nv, nx, ny, Dx, Dy, earthMinorAxisInMetres, earthMajorAxisInMetres, From 66e78b52564f02ee2e0b54f8fde9ad256d7a8d6a Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 2 Nov 2021 17:38:51 +0000 Subject: [PATCH 13/17] ECC-1291: Remove unused variables --- ...rator_class_lambert_azimuthal_equal_area.c | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index e46fd6d42..402b8bccb 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -170,11 +170,9 @@ static int init_oblate(grib_handle* h, long i, j; double x0, y0, x, y; double coslam, sinlam, sinphi, sinphi_, q, sinb = 0.0, cosb = 0.0, b = 0.0, cosb2; - double Q__qp = 0, Q__rq = 0, Q__mmf = 0, Q__cosb1, Q__sinb1, Q__dd, Q__xmf, Q__ymf, t; + double Q__qp = 0, Q__rq = 0, Q__cosb1, Q__sinb1, Q__dd, Q__xmf, Q__ymf, t; + /* double Q__mmf = 0; */ double e, es, temp, one_es; - double false_easting; /* x offset in meters */ - double false_northing; /* y offset in meters */ - double latRad = 0, lonRad = 0, latDeg, lonDeg; double APA[3] = {0,}; double xFirst, yFirst; @@ -185,10 +183,10 @@ static int init_oblate(grib_handle* h, es = 2 * temp - temp * temp; one_es = 1.0 - es; e = sqrt(es); - - coslam = cos(lonFirstInRadians - centralLongitudeInRadians); /* cos(lp.lam) */ + + coslam = cos(lonFirstInRadians - centralLongitudeInRadians); /* cos(lp.lam) */ sinlam = sin(lonFirstInRadians - centralLongitudeInRadians); - sinphi = sin(latFirstInRadians); /* sin(lp.phi) */ + sinphi = sin(latFirstInRadians); /* sin(lp.phi) */ q = pj_qsfn(sinphi, e, one_es); t = fabs(standardParallelInRadians); @@ -203,10 +201,10 @@ static int init_oblate(grib_handle* h, Q->mode = OBLIQ; */ Q__qp = pj_qsfn(1.0, e, one_es); - Q__mmf = 0.5 / one_es; - pj_authset(es, APA); /* sets up APA array */ + /* Q__mmf = 0.5 / one_es; ---- TODO(masn): do I need this? */ + pj_authset(es, APA); /* sets up APA array */ Q__rq = sqrt(0.5 * Q__qp); - sinphi_ = sin(standardParallelInRadians); /* (P->phi0); */ + sinphi_ = sin(standardParallelInRadians); /* (P->phi0); */ Q__sinb1 = pj_qsfn(sinphi_, e, one_es) / Q__qp; Q__cosb1 = sqrt(1.0 - Q__sinb1 * Q__sinb1); Q__dd = cos(standardParallelInRadians) / (sqrt(1. - es * sinphi_ * sinphi_) * Q__rq * Q__cosb1); @@ -248,11 +246,11 @@ static int init_oblate(grib_handle* h, for (j = 0; j < ny; j++) { x = xFirst; for (i = 0; i < nx; i++) { - double cCe, sCe, q, rho, ab = 0.0, lp__lam, lp__phi, xy_x = x, xy_y = y; + double cCe, sCe, rho, ab = 0.0, lp__lam, lp__phi, xy_x = x, xy_y = y; xy_x /= Q__dd; xy_y *= Q__dd; rho = hypot(xy_x, xy_y); - Assert(rho >= EPS10); /* TODO(masn): check */ + Assert(rho >= EPS10); /* TODO(masn): check */ sCe = 2. * asin(.5 * rho / Q__rq); cCe = cos(sCe); sCe = sin(sCe); @@ -264,8 +262,8 @@ static int init_oblate(grib_handle* h, ab = xy.y * sCe / rho; xy.y = rho * cCe; */ - lp__lam = atan2(xy_x, xy_y); /* longitude */ - lp__phi = pj_authlat(asin(ab), APA); /* latitude */ + lp__lam = atan2(xy_x, xy_y); /* longitude */ + lp__phi = pj_authlat(asin(ab), APA); /* latitude */ *lats = lp__phi * RAD2DEG; *lons = (lp__lam + centralLongitudeInRadians) * RAD2DEG; From 86c6ee5b09e59fdbebb6f1003b8e577ca8df5467 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Tue, 2 Nov 2021 21:14:46 +0000 Subject: [PATCH 14/17] ECC-1291: Add test --- tests/grib_grid_lamb_az_eq_area.sh | 58 ++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/tests/grib_grid_lamb_az_eq_area.sh b/tests/grib_grid_lamb_az_eq_area.sh index f2e8e3bd6..206b1623f 100755 --- a/tests/grib_grid_lamb_az_eq_area.sh +++ b/tests/grib_grid_lamb_az_eq_area.sh @@ -8,7 +8,7 @@ # virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction. . ./include.sh -#set -x + GRIB_INFILE=${data_dir}/regular_gaussian_pressure_level_constant.grib2 REF_FILE=grib_lamb_az_eq_area.ref @@ -19,20 +19,23 @@ GRIB_OUTFILE=lamb_az_eq_area.grib2 DATA_OUTFILE=lamb_data.txt rm -f $FILTER_FILE $GRIB_OUTFILE $DATA_OUTFILE +# Spherical Earth +# ---------------- + # Create a filter cat > $FILTER_FILE<&2 - exit 1 -fi -# Now get the data from the newly created GRIB file + +# Now run the Geoiterator on the newly created GRIB file ${tools_dir}/grib_get_data $GRIB_OUTFILE > $DATA_OUTFILE # Compare output with reference. If the diff fails, script will immediately exit with status 1 @@ -62,6 +62,36 @@ grib_check_key_equals $GRIB_OUTFILE xDirectionGridLengthInMetres,yDirectionGridL ${tools_dir}/grib_ls -l 67,-33,1 $GRIB_OUTFILE +# Oblate spheroid +# -------------------- + +cat > $FILTER_FILE< Date: Wed, 3 Nov 2021 16:17:48 +0000 Subject: [PATCH 15/17] ECC-1295: GRIB: nearest function fails on regular lat/lon grid on oblate spheroid --- src/grib_nearest_class_regular.c | 26 ++++++++++++++++++-------- tests/grib_nearest_test.sh | 8 ++++++++ 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/grib_nearest_class_regular.c b/src/grib_nearest_class_regular.c index 18f1c6f50..6849294cc 100644 --- a/src/grib_nearest_class_regular.c +++ b/src/grib_nearest_class_regular.c @@ -232,7 +232,7 @@ static int find(grib_nearest* nearest, grib_handle* h, int ret = 0, kk = 0, ii = 0, jj = 0; size_t nvalues = 0; long iradius; - double radius; + double radius; /* radius in km */ grib_iterator* iter = NULL; double lat = 0, lon = 0; @@ -248,14 +248,24 @@ static int find(grib_nearest* nearest, grib_handle* h, return ret; nearest->values_count = nvalues; - if (grib_is_missing(h, self->radius, &ret)) { - grib_context_log(h->context, GRIB_LOG_DEBUG, "Key '%s' is missing", self->radius); - return ret ? ret : GRIB_GEOCALCULUS_PROBLEM; + /* We need the radius to calculate the nearest distance. For an oblate earth + approximate this using the average of the semimajor and semiminor axes */ + if ((ret = grib_get_long(h, self->radius, &iradius)) == GRIB_SUCCESS) { + if (grib_is_missing(h, self->radius, &ret) || iradius == GRIB_MISSING_LONG) { + grib_context_log(h->context, GRIB_LOG_DEBUG, "Key '%s' is missing", self->radius); + return GRIB_GEOCALCULUS_PROBLEM; + } + radius = ((double)iradius) / 1000.0; + } + else { + double minor = 0, major = 0; + if ((ret = grib_get_double_internal(h, "earthMinorAxisInMetres", &minor)) != GRIB_SUCCESS) return ret; + if ((ret = grib_get_double_internal(h, "earthMajorAxisInMetres", &major)) != GRIB_SUCCESS) return ret; + if (grib_is_missing(h, "earthMinorAxisInMetres", &ret)) return GRIB_GEOCALCULUS_PROBLEM; + if (grib_is_missing(h, "earthMajorAxisInMetres", &ret)) return GRIB_GEOCALCULUS_PROBLEM; + radius = (major + minor) / 2.0; + radius = radius / 1000.0; } - - if ((ret = grib_get_long(h, self->radius, &iradius)) != GRIB_SUCCESS) - return ret; - radius = ((double)iradius) / 1000.0; /* Compute lat/lon info, create iterator etc if it's the 1st time or different grid. * This is for performance: if the grid has not changed, we only do this once diff --git a/tests/grib_nearest_test.sh b/tests/grib_nearest_test.sh index 666e1b26e..03a35aa49 100755 --- a/tests/grib_nearest_test.sh +++ b/tests/grib_nearest_test.sh @@ -51,5 +51,13 @@ Idx lat lon dist EOF diff $tempRef $temp +# ECC-1295: regular lat/lon on ellipsoid +# ---------------------------------------- +sample2=$ECCODES_SAMPLES_PATH/GRIB2.tmpl +${tools_dir}/grib_set -s shapeOfTheEarth=5 $sample2 $temp +grib_check_key_equals $sample2 earthIsOblate 0 +grib_check_key_equals $temp earthIsOblate 1 +${tools_dir}/grib_ls -l 0,0 $temp + # Clean up rm -f $temp $tempRef From 8bf71575472b270318e59a846456c65c90f9cbf6 Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 4 Nov 2021 11:07:09 +0000 Subject: [PATCH 16/17] Clang warning [-Wmissing-prototypes] --- src/grib_iterator_class_lambert_azimuthal_equal_area.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grib_iterator_class_lambert_azimuthal_equal_area.c b/src/grib_iterator_class_lambert_azimuthal_equal_area.c index 402b8bccb..0ba3be713 100644 --- a/src/grib_iterator_class_lambert_azimuthal_equal_area.c +++ b/src/grib_iterator_class_lambert_azimuthal_equal_area.c @@ -119,7 +119,7 @@ static int next(grib_iterator* i, double* lat, double* lon, double* val) #define P11 .06640211640211640212 /* 251 / 3780 */ #define P20 .01677689594356261023 /* 761 / 45360 */ -void pj_authset(double es, double* APA) +static void pj_authset(double es, double* APA) { double t; APA[0] = es * P00; @@ -131,7 +131,7 @@ void pj_authset(double es, double* APA) APA[1] += t * P11; APA[2] = t * P20; } -double pj_authlat(double beta, double* APA) +static double pj_authlat(double beta, double* APA) { double t = beta + beta; return (beta + APA[0] * sin(t) + APA[1] * sin(t + t) + APA[2] * sin(t + t + t)); From 040ab8d66d7686230b6f1537e9dd13ac30454eec Mon Sep 17 00:00:00 2001 From: Shahram Najm Date: Thu, 4 Nov 2021 15:31:26 +0000 Subject: [PATCH 17/17] ECC-1290: make test pass (encoding now works) --- src/grib_accessor_class_bufr_data_array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/grib_accessor_class_bufr_data_array.c b/src/grib_accessor_class_bufr_data_array.c index 69cf66a06..955bf7c14 100644 --- a/src/grib_accessor_class_bufr_data_array.c +++ b/src/grib_accessor_class_bufr_data_array.c @@ -766,8 +766,8 @@ static int descriptor_get_min_max(bufr_descriptor* bd, long width, long referenc double* minAllowed, double* maxAllowed) { /* Maximum value is allowed to be the largest number (all bits 1) which means it's MISSING */ - unsigned long max1 = (1UL << width) - 1; /* Highest value for number with 'width' bits */ - DebugAssert(width > 0 && width <= 32); + size_t max1 = (1ULL << width) - 1; /* Highest value for number with 'width' bits */ + DebugAssert(width > 0 && width < 64); *maxAllowed = (max1 + reference) * factor; *minAllowed = reference * factor;