Merge branch 'develop' into feature/ECC-1868-geography-option

This commit is contained in:
Shahram Najm 2024-07-17 13:58:43 +00:00
commit 71c601989f
2 changed files with 8 additions and 4 deletions

View File

@ -78,8 +78,6 @@ static int grib_get_codeflag(grib_accessor* a, long code, char* codename)
codename[j++] = bval[0];
codename[j++] = ')';
codename[j++] = ' ';
//if (j)
// codename[j++] = ' ';
for (i = (strlen(num) + strlen(bval) + 2); i < linelen - 1; i++)
codename[j++] = line[i];
@ -94,9 +92,8 @@ static int grib_get_codeflag(grib_accessor* a, long code, char* codename)
j--;
codename[j] = 0;
strcat(codename, " (");
strcat(codename, ":");
strcat(codename, fname);
strcat(codename, ")");
fclose(f);
return GRIB_SUCCESS;

View File

@ -155,6 +155,13 @@ file=$data_dir/sst_globus0083.grib
${tools_dir}/grib_dump -O $file > $temp 2>&1
grep -q "12-10227752 codedValues" $temp
# Code tables and code flags
#-----------------------------------------------------------
file=$data_dir/sample.grib2
${tools_dir}/grib_dump -Ot $file > $temp 2>&1
fgrep -q "codetable (int) typeOfFirstFixedSurface = 103 [Specified height level above ground (m) (grib2/tables/4/4.5.table) ]" $temp
fgrep -q "codeflag (int) resolutionAndComponentFlags = 48 [00110000 (grib2/tables/4/3.3.table) ]" $temp
fgrep -q "codeflag (int) scanningMode = 0 [00000000 (grib2/tables/4/3.4.table) ]" $temp
# Error conditions
#-----------------------------------------------------------