Comments etc

This commit is contained in:
Shahram Najm 2019-08-27 16:05:22 +01:00
parent 29441c8167
commit 1e05369e7b
3 changed files with 5 additions and 1 deletions

View File

@ -70,9 +70,11 @@ _if (shapeOfTheEarth == 3){
meta earthMinorAxis from_scale_factor_scaled_value(
scaleFactorOfEarthMinorAxis, scaledValueOfEarthMinorAxis);
# ECC-979
# The 'scale' accessor works with integers so rounds its first argument
# which is not what we want because the inputs are doubles with decimal
# expansions. So use the trick of dividing by 0.001 to multiply by 1000
#
# meta earthMajorAxisInMetres scale(earthMajorAxis, thousand, one, zero);
# meta earthMinorAxisInMetres scale(earthMinorAxis, thousand, one, zero);
meta earthMajorAxisInMetres divdouble(earthMajorAxis, 0.001);

View File

@ -174,6 +174,7 @@ static double eval_value_factor(long value, long factor)
static int pack_double(grib_accessor* a, const double* val, size_t *len)
{
/* See ECC-979 */
/* Evaluate self->scaleFactor and self->scaledValue from input double '*val' */
grib_accessor_from_scale_factor_scaled_value* self = (grib_accessor_from_scale_factor_scaled_value*)a;
grib_handle* hand = grib_handle_of_accessor(a);

View File

@ -1064,7 +1064,8 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
case GRIB_UTIL_GRID_SPEC_LAMBERT_AZIMUTHAL_EQUAL_AREA:
if (editionNumber==1) { /* This grid type is not available in edition 1 */
if (h->context->debug==-1)
fprintf(stderr,"lambert_azimuthal_equal_area specified but input is GRIB1. Output must be a higher edition!\n");
fprintf(stderr,"ECCODES DEBUG grib_util: lambert_azimuthal_equal_area specified "
"but input is GRIB1. Output must be a higher edition!\n");
convertEditionEarlier=1;
}
sprintf(name, "GRIB%ld", editionNumber);