Merge branch 'develop' into fix_free_concept_value

This commit is contained in:
Shinji Suzuki 2020-08-19 11:50:15 +09:00 committed by GitHub
commit a2b707833e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 18 deletions

View File

@ -13,10 +13,10 @@
}
#Snow depth
'lwe_thickness_of_surface_snow_amount' = {
localTablesVersion = 1 ;
discipline = 0 ;
parameterNumber = 11 ;
parameterCategory = 1 ;
unitsFactor = 1000 ;
parameterNumber = 254 ;
}
#Convective precipitation
'lwe_thickness_of_convective_precipitation_amount' = {

View File

@ -697,10 +697,10 @@
}
#Snow depth
'sd' = {
localTablesVersion = 1 ;
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 11 ;
unitsFactor = 1000 ;
parameterNumber = 254 ;
}
#Large-scale precipitation
'lsp' = {

View File

@ -697,10 +697,10 @@
}
#Snow depth
'Snow depth' = {
localTablesVersion = 1 ;
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 11 ;
unitsFactor = 1000 ;
parameterNumber = 254 ;
}
#Large-scale precipitation
'Large-scale precipitation' = {

View File

@ -697,10 +697,10 @@
}
#Snow depth
'141' = {
localTablesVersion = 1 ;
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 11 ;
unitsFactor = 1000 ;
parameterNumber = 254 ;
}
#Large-scale precipitation
'142' = {

View File

@ -697,10 +697,10 @@
}
#Snow depth
'sd' = {
localTablesVersion = 1 ;
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 11 ;
unitsFactor = 1000 ;
parameterNumber = 254 ;
}
#Large-scale precipitation
'lsp' = {

View File

@ -697,10 +697,10 @@
}
#Snow depth
'm of water equivalent' = {
localTablesVersion = 1 ;
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 11 ;
unitsFactor = 1000 ;
parameterNumber = 254 ;
}
#Large-scale precipitation
'm' = {

View File

@ -185,10 +185,10 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
{
grib_accessor_g2latlon* self = (grib_accessor_g2latlon*)a;
int ret = 0;
double grid[6];
size_t size = 6;
double new_val = *val;
grib_handle* hand = grib_handle_of_accessor(a);
if (*len < 1) {
ret = GRIB_ARRAY_TOO_SMALL;
@ -197,11 +197,11 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
if (self->given) {
long given = *val != GRIB_MISSING_DOUBLE;
if ((ret = grib_set_long_internal(grib_handle_of_accessor(a), self->given, given)) != GRIB_SUCCESS)
if ((ret = grib_set_long_internal(hand, self->given, given)) != GRIB_SUCCESS)
return ret;
}
if ((ret = grib_get_double_array_internal(grib_handle_of_accessor(a), self->grid, grid, &size)) != GRIB_SUCCESS)
if ((ret = grib_get_double_array_internal(hand, self->grid, grid, &size)) != GRIB_SUCCESS)
return ret;
/* index 1 is longitudeOfFirstGridPointInDegrees
@ -211,10 +211,13 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
/* WMO regulation for GRIB edition 2:
* The longitude values shall be limited to the range 0 to 360 degrees inclusive */
new_val = normalise_longitude_in_degrees(*val);
if (hand->context->debug && new_val != *val) {
fprintf(stderr, "ECCODES DEBUG pack_double g2latlon: normalise longitude %g -> %g\n", *val, new_val);
}
}
grid[self->index] = new_val;
return grib_set_double_array_internal(grib_handle_of_accessor(a), self->grid, grid, size);
return grib_set_double_array_internal(hand, self->grid, grid, size);
}
static int pack_missing(grib_accessor* a)
@ -234,10 +237,8 @@ static int is_missing(grib_accessor* a)
grib_accessor_g2latlon* self = (grib_accessor_g2latlon*)a;
long given = 1;
if (self->given)
grib_get_long_internal(grib_handle_of_accessor(a), self->given, &given);
return !given;
}