Merge branch 'develop' into release/2.35.0

This commit is contained in:
shahramn 2024-04-09 13:41:27 +01:00
commit e66391440d
9 changed files with 298 additions and 74 deletions

View File

@ -3824,6 +3824,55 @@
typeOfFirstFixedSurface = 1 ;
typeOfStatisticalProcessing = 1 ;
}
#Lake surface temperature
'lslt' = {
discipline = 1 ;
parameterCategory = 2 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 1 ;
typeOfSecondFixedSurface = 255 ;
}
#Surface bulk Richardson number
'sbrn' = {
discipline = 0 ;
parameterCategory = 7 ;
parameterNumber = 16 ;
typeOfFirstFixedSurface = 1 ;
}
#Time-maximum 2 metre relative humidity
'mx2r' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 2 ;
}
#Time-minimum 2 metre relative humidity
'mn2r' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 3 ;
}
#Surface roughness for heat
'srhe' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 47 ;
typeOfFirstFixedSurface = 1 ;
}
#Surface roughness for moisture
'srmo' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 48 ;
typeOfFirstFixedSurface = 1 ;
}
#Burned area
'fba' = {
discipline = 2 ;
@ -6710,6 +6759,13 @@
parameterCategory = 3 ;
parameterNumber = 19 ;
}
#Leaf Area Index
'lai' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 28 ;
typeOfFirstFixedSurface = 1 ;
}
#Accumulated surface upward short-wave radiation flux, clear sky
'auswrf_cs' = {
discipline = 0 ;

View File

@ -930,7 +930,7 @@
parameterNumber = 197 ;
}
#Leaf Area Index
'~' = {
'Numeric' = {
discipline = 0 ;
parameterCategory = 7 ;
parameterNumber = 198 ;

View File

@ -3824,6 +3824,55 @@
typeOfFirstFixedSurface = 1 ;
typeOfStatisticalProcessing = 1 ;
}
#Lake surface temperature
'Lake surface temperature' = {
discipline = 1 ;
parameterCategory = 2 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 1 ;
typeOfSecondFixedSurface = 255 ;
}
#Surface bulk Richardson number
'Surface bulk Richardson number' = {
discipline = 0 ;
parameterCategory = 7 ;
parameterNumber = 16 ;
typeOfFirstFixedSurface = 1 ;
}
#Time-maximum 2 metre relative humidity
'Time-maximum 2 metre relative humidity' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 2 ;
}
#Time-minimum 2 metre relative humidity
'Time-minimum 2 metre relative humidity' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 3 ;
}
#Surface roughness for heat
'Surface roughness for heat' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 47 ;
typeOfFirstFixedSurface = 1 ;
}
#Surface roughness for moisture
'Surface roughness for moisture' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 48 ;
typeOfFirstFixedSurface = 1 ;
}
#Burned area
'Burned area' = {
discipline = 2 ;
@ -6710,6 +6759,13 @@
parameterCategory = 3 ;
parameterNumber = 19 ;
}
#Leaf Area Index
'Leaf Area Index' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 28 ;
typeOfFirstFixedSurface = 1 ;
}
#Accumulated surface upward short-wave radiation flux, clear sky
'Accumulated surface upward short-wave radiation flux, clear sky' = {
discipline = 0 ;

View File

@ -3824,6 +3824,55 @@
typeOfFirstFixedSurface = 1 ;
typeOfStatisticalProcessing = 1 ;
}
#Lake surface temperature
'231059' = {
discipline = 1 ;
parameterCategory = 2 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 1 ;
typeOfSecondFixedSurface = 255 ;
}
#Surface bulk Richardson number
'231060' = {
discipline = 0 ;
parameterCategory = 7 ;
parameterNumber = 16 ;
typeOfFirstFixedSurface = 1 ;
}
#Time-maximum 2 metre relative humidity
'231061' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 2 ;
}
#Time-minimum 2 metre relative humidity
'231062' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 3 ;
}
#Surface roughness for heat
'231063' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 47 ;
typeOfFirstFixedSurface = 1 ;
}
#Surface roughness for moisture
'231064' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 48 ;
typeOfFirstFixedSurface = 1 ;
}
#Burned area
'232000' = {
discipline = 2 ;
@ -6710,6 +6759,13 @@
parameterCategory = 3 ;
parameterNumber = 19 ;
}
#Leaf Area Index
'260373' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 28 ;
typeOfFirstFixedSurface = 1 ;
}
#Accumulated surface upward short-wave radiation flux, clear sky
'260427' = {
discipline = 0 ;

View File

@ -3824,6 +3824,55 @@
typeOfFirstFixedSurface = 1 ;
typeOfStatisticalProcessing = 1 ;
}
#Lake surface temperature
'lslt' = {
discipline = 1 ;
parameterCategory = 2 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 1 ;
typeOfSecondFixedSurface = 255 ;
}
#Surface bulk Richardson number
'sbrn' = {
discipline = 0 ;
parameterCategory = 7 ;
parameterNumber = 16 ;
typeOfFirstFixedSurface = 1 ;
}
#Time-maximum 2 metre relative humidity
'mx2r' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 2 ;
}
#Time-minimum 2 metre relative humidity
'mn2r' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 3 ;
}
#Surface roughness for heat
'srhe' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 47 ;
typeOfFirstFixedSurface = 1 ;
}
#Surface roughness for moisture
'srmo' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 48 ;
typeOfFirstFixedSurface = 1 ;
}
#Burned area
'fba' = {
discipline = 2 ;
@ -6710,6 +6759,13 @@
parameterCategory = 3 ;
parameterNumber = 19 ;
}
#Leaf Area Index
'lai' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 28 ;
typeOfFirstFixedSurface = 1 ;
}
#Accumulated surface upward short-wave radiation flux, clear sky
'auswrf_cs' = {
discipline = 0 ;

View File

@ -3824,6 +3824,55 @@
typeOfFirstFixedSurface = 1 ;
typeOfStatisticalProcessing = 1 ;
}
#Lake surface temperature
'K' = {
discipline = 1 ;
parameterCategory = 2 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 1 ;
typeOfSecondFixedSurface = 255 ;
}
#Surface bulk Richardson number
'Numeric' = {
discipline = 0 ;
parameterCategory = 7 ;
parameterNumber = 16 ;
typeOfFirstFixedSurface = 1 ;
}
#Time-maximum 2 metre relative humidity
'%' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 2 ;
}
#Time-minimum 2 metre relative humidity
'%' = {
discipline = 0 ;
parameterCategory = 1 ;
parameterNumber = 1 ;
typeOfFirstFixedSurface = 103 ;
scaledValueOfFirstFixedSurface = 2 ;
scaleFactorOfFirstFixedSurface = 0 ;
typeOfStatisticalProcessing = 3 ;
}
#Surface roughness for heat
'm' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 47 ;
typeOfFirstFixedSurface = 1 ;
}
#Surface roughness for moisture
'm' = {
discipline = 0 ;
parameterCategory = 2 ;
parameterNumber = 48 ;
typeOfFirstFixedSurface = 1 ;
}
#Burned area
'%' = {
discipline = 2 ;
@ -6710,6 +6759,13 @@
parameterCategory = 3 ;
parameterNumber = 19 ;
}
#Leaf Area Index
'Numeric' = {
discipline = 2 ;
parameterCategory = 0 ;
parameterNumber = 28 ;
typeOfFirstFixedSurface = 1 ;
}
#Accumulated surface upward short-wave radiation flux, clear sky
'J m**-2' = {
discipline = 0 ;

View File

@ -1339,16 +1339,15 @@ void grib_print_file_statistics(grib_runtime_options* options, grib_tools_file*
file->name);
if (!failed)
return;
/*
fprintf(dump_file,"Following bad messages found in %s\n", file->name);
fprintf(dump_file,"N Error\n");
while (failed){
fprintf(dump_file,"%-*d %s\n", 7,failed->count,
grib_get_error_message(failed->error));
failed=failed->next;
}
fprintf(dump_file,"\n");
*/
// fprintf(dump_file,"Following bad messages found in %s\n", file->name);
// fprintf(dump_file,"N Error\n");
// while (failed){
// fprintf(dump_file,"%-*d %s\n", 7,failed->count,
// grib_get_error_message(failed->error));
// failed=failed->next;
// }
// fprintf(dump_file,"\n");
}
void grib_print_full_statistics(grib_runtime_options* options)
@ -1422,7 +1421,7 @@ void grib_tools_write_message(grib_runtime_options* options, grib_handle* h)
}
if (options->gts && h->gts_header) {
char gts_trailer[4] = { '\x0D', '\x0D', '\x0A', '\x03' };
const char gts_trailer[4] = { '\x0D', '\x0D', '\x0A', '\x03' };
if (fwrite(gts_trailer, 1, 4, of->handle) != 4) {
grib_context_log(h->context, (GRIB_LOG_ERROR) | (GRIB_LOG_PERROR),
"Error writing GTS trailer to %s", filename);

View File

@ -373,14 +373,11 @@ static void save_error(grib_context* c, const char* key)
static int compare_values(const grib_runtime_options* options, grib_handle* h1, grib_handle* h2, const char* name, int type)
{
size_t len1 = 0;
size_t len2 = 0;
int err = 0;
int err1;
int err2;
size_t len1 = 0, len2 = 0;
int err = 0, err1 = 0, err2 = 0;
int type1, type2;
int countdiff;
int isMissing1 = 0, isMissing2 = 0;
// int isMissing1 = 0, isMissing2 = 0;
char *sval1 = NULL, *sval2 = NULL;
long *lval1 = NULL, *lval2 = NULL;
@ -442,30 +439,6 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1,
//isMissing1 = ((grib_is_missing(h1, name, &err1) == 1) && (err1 == 0)) ? 1 : 0;
//isMissing2 = ((grib_is_missing(h2, name, &err2) == 1) && (err2 == 0)) ? 1 : 0;
if ((isMissing1 == 1) && (isMissing2 == 1)) {
if (verbose)
printf(" is set to missing in both fields\n");
return GRIB_SUCCESS;
}
if (isMissing1 == 1) {
if (verbose) printf(" is set to missing in 1st field\n");
printInfo(h1);
printf("%s is set to missing in 1st field but is not missing in 2nd field\n", name);
err1 = GRIB_VALUE_MISMATCH;
save_error(c, name);
return GRIB_VALUE_MISMATCH;
}
if (isMissing2 == 1) {
if (verbose) printf(" is set to missing in 1st field\n");
printInfo(h1);
printf("%s is set to missing in 2nd field but is not missing in 1st field\n", name);
err1 = GRIB_VALUE_MISMATCH;
save_error(c, name);
return GRIB_VALUE_MISMATCH;
}
switch (type1) {
case GRIB_TYPE_STRING:
if (verbose) printf(" as string\n");

View File

@ -426,12 +426,10 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1,
{
size_t len1 = 0;
size_t len2 = 0;
int err = 0, i = 0;
int err1;
int err2;
int err = 0, i = 0, err1 = 0, err2 = 0;
int type1, type2;
int countdiff;
int isMissing1 = 0, isMissing2 = 0;
//int isMissing1 = 0, isMissing2 = 0;
char *sval1 = NULL, *sval2 = NULL;
double *dval1 = NULL, *dval2 = NULL;
@ -498,32 +496,6 @@ static int compare_values(const grib_runtime_options* options, grib_handle* h1,
// isMissing1 = ((grib_is_missing(h1, name, &err1) == 1) && (err1 == 0)) ? 1 : 0;
// isMissing2 = ((grib_is_missing(h2, name, &err2) == 1) && (err2 == 0)) ? 1 : 0;
if ((isMissing1 == 1) && (isMissing2 == 1)) {
if (verbose)
printf(" is set to missing in both fields\n");
return GRIB_SUCCESS;
}
if (isMissing1 == 1) {
if (verbose)
printf(" is set to missing in 1st field\n");
printInfo(h1);
printf("%s is set to missing in 1st field but is not missing in 2nd field\n", name);
err1 = GRIB_VALUE_MISMATCH;
save_error(c, name);
return GRIB_VALUE_MISMATCH;
}
if (isMissing2 == 1) {
if (verbose)
printf(" is set to missing in 1st field\n");
printInfo(h1);
printf("%s is set to missing in 2nd field but is not missing in 1st field\n", name);
err1 = GRIB_VALUE_MISMATCH;
save_error(c, name);
return GRIB_VALUE_MISMATCH;
}
switch (type1) {
case GRIB_TYPE_STRING:
if (verbose)