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 #Snow depth
'lwe_thickness_of_surface_snow_amount' = { 'lwe_thickness_of_surface_snow_amount' = {
localTablesVersion = 1 ;
discipline = 0 ; discipline = 0 ;
parameterNumber = 11 ;
parameterCategory = 1 ; parameterCategory = 1 ;
unitsFactor = 1000 ; parameterNumber = 254 ;
} }
#Convective precipitation #Convective precipitation
'lwe_thickness_of_convective_precipitation_amount' = { 'lwe_thickness_of_convective_precipitation_amount' = {

View File

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

View File

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

View File

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

View File

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

View File

@ -697,10 +697,10 @@
} }
#Snow depth #Snow depth
'm of water equivalent' = { 'm of water equivalent' = {
localTablesVersion = 1 ;
discipline = 0 ; discipline = 0 ;
parameterCategory = 1 ; parameterCategory = 1 ;
parameterNumber = 11 ; parameterNumber = 254 ;
unitsFactor = 1000 ;
} }
#Large-scale precipitation #Large-scale precipitation
'm' = { '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; grib_accessor_g2latlon* self = (grib_accessor_g2latlon*)a;
int ret = 0; int ret = 0;
double grid[6]; double grid[6];
size_t size = 6; size_t size = 6;
double new_val = *val; double new_val = *val;
grib_handle* hand = grib_handle_of_accessor(a);
if (*len < 1) { if (*len < 1) {
ret = GRIB_ARRAY_TOO_SMALL; 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) { if (self->given) {
long given = *val != GRIB_MISSING_DOUBLE; 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; 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; return ret;
/* index 1 is longitudeOfFirstGridPointInDegrees /* 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: /* WMO regulation for GRIB edition 2:
* The longitude values shall be limited to the range 0 to 360 degrees inclusive */ * The longitude values shall be limited to the range 0 to 360 degrees inclusive */
new_val = normalise_longitude_in_degrees(*val); 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; 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) 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; grib_accessor_g2latlon* self = (grib_accessor_g2latlon*)a;
long given = 1; long given = 1;
if (self->given) if (self->given)
grib_get_long_internal(grib_handle_of_accessor(a), self->given, &given); grib_get_long_internal(grib_handle_of_accessor(a), self->given, &given);
return !given; return !given;
} }