Merge branch 'develop' into feature/modernisation_merge_accessor_classes

This commit is contained in:
Eugen Betke 2024-09-20 15:36:37 +02:00
commit 859399da2c
10 changed files with 121 additions and 115 deletions

View File

@ -114,7 +114,6 @@ if(matrixOfValues == 0)
# From GRIBEX:
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# ! !
# ! This is the WMO definition, but it is entirely !
# ! inadequate when secondary bit maps are present !
# ! eg 3x3 global grid with a matrix of values !
@ -129,7 +128,6 @@ if(matrixOfValues == 0)
# ! missing'). !
# ! This definition will accommodate a 1x1 !
# ! degree global grid. !
# ! !
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#
constant datumSize = NC*NR;

View File

@ -10,10 +10,11 @@ transient numberOfUnusedBitsAtEndOfSection3 = 0 : read_only;
transient tableReference = 0;
#position offsetBeforeBitmap;
meta bitmap gds_not_present_bitmap( missingValue,numberOfValues,
numberOfPoints,
latitudeOfFirstGridPoint,
Ni,numberOfUnusedBitsAtEndOfSection3) : read_only;
meta bitmap gds_not_present_bitmap(
missingValue,numberOfValues,
numberOfPoints,
latitudeOfFirstGridPoint,
Ni,numberOfUnusedBitsAtEndOfSection3) : read_only;
#position offsetAfterBitmap;
#padtoeven padding_sec3_1(offsetSection3,section3Length);

View File

@ -40,6 +40,6 @@ transient numberOfPoints= nd *(Ni + 1) * (Ni + 1);
alias numberOfDataPoints=numberOfPoints;
meta numberOfValues
number_of_values(values,bitsPerValue,numberOfDataPoints,
bitmapPresent,bitmap,numberOfCodedValues) : dump;
number_of_values(
values,bitsPerValue,numberOfDataPoints,
bitmapPresent,bitmap,numberOfCodedValues) : dump;

View File

@ -79,11 +79,11 @@ if(missing(Ni)){
nearest latlon_reduced(values,radius,Nj,pl);
} else {
transient iteratorDisableUnrotate = 0 : hidden; # ECC-808
iterator latlon(numberOfPoints,missingValue,values,longitudeFirstInDegrees,iInc ,
Ni,Nj,iScansNegatively ,
latitudeFirstInDegrees,DjInDegrees,jScansPositively,jPointsAreConsecutive,
isRotatedGrid, angleOfRotation,
latitudeOfSouthernPoleInDegrees,longitudeOfSouthernPoleInDegrees);
iterator latlon(numberOfPoints,missingValue,values,longitudeFirstInDegrees,iInc,
Ni,Nj,iScansNegatively,
latitudeFirstInDegrees,DjInDegrees,jScansPositively,jPointsAreConsecutive,
isRotatedGrid, angleOfRotation,
latitudeOfSouthernPoleInDegrees,longitudeOfSouthernPoleInDegrees);
nearest regular(values,radius,Ni,Nj);
}
meta latLonValues latlonvalues(values);

View File

@ -24,9 +24,9 @@ constant dataRepresentationType = 0;
# (according to data representation type - octet 6 above)
# grib 1 -> 2
constant gridDefinitionTemplateNumber = 0;
constant gridDefinitionTemplateNumber = 0;
# START 1/grid_definition.latitude_longitude_grid ----------------------------------------------------------------------
# START 1/grid_definition.latitude_longitude_grid
# GRID DEFINITION latitude/longitude grid (or equidistant cylindrical)
alias numberOfPointsAlongAParallel=Ni;
@ -122,6 +122,6 @@ constant tableReference = 0;
#position offsetBeforeBitmap;
# meta bitmap gds_not_present_bitmap( missingValue,numberOfValues,
# numberOfPoints,
# latitudeOfFirstGridPoint,
# Ni,numberOfUnusedBitsAtEndOfSection3) : read_only;
# numberOfPoints,
# latitudeOfFirstGridPoint,
# Ni,numberOfUnusedBitsAtEndOfSection3) : read_only;

View File

@ -1,69 +1,70 @@
# Concept marsLevtype
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=8;}
'o2d' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=9;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=162;}
'sfc' = {typeOfFirstFixedSurface=2; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=7; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=8; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=17; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=18; typeOfSecondFixedSurface=255;}
'o2d' = {discipline=10; typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;}
'pl' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=255;}
'pl' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=100;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=100;
scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=80000;}
'sfc' = {typeOfFirstFixedSurface=100; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=80000;
typeOfSecondFixedSurface=100; scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=45000;}
'sfc' = {typeOfFirstFixedSurface=100; scaleFactorOfFirstFixedSurface=0;
scaledValueOfFirstFixedSurface=45000; typeOfSecondFixedSurface=8;}
'sfc' = {typeOfFirstFixedSurface=101; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=103;}
'ml' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=255;}
'ml' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=105;}
'sfc' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=106;typeOfSecondFixedSurface=106;}
'pt' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=255;}
'pt' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=107;}
'pv' = {typeOfFirstFixedSurface=109; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=114;}
'hhl' = {typeOfFirstFixedSurface=118; typeOfSecondFixedSurface=255;}
'hpl' = {typeOfFirstFixedSurface=119; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=151;}
'sol' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=152;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0;
scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=9;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=20;
scaledValueOfFirstFixedSurface=0; scaleFactorOfFirstFixedSurface=0;}
'sfc' = {typeOfFirstFixedSurface=162; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=166; typeOfSecondFixedSurface=255;}
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=255;}
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=168;}
'o2d' = {typeOfFirstFixedSurface=169; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=170; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=171; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=173; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=173; typeOfSecondFixedSurface=175;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255; discipline=1;}
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=176; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=160;
scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=0;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176;}
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176; discipline=1;}
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=176;}
'sfc' = {typeOfFirstFixedSurface=177; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=188; typeOfSecondFixedSurface=189;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=8;}
'o2d' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=9;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=162;}
'sfc' = {typeOfFirstFixedSurface=2; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=7; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=8; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=17; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=18; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=19; typeOfSecondFixedSurface=255;}
'o2d' = {discipline=10; typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;}
'pl' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=255;}
'pl' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=100;}
'sfc' = {typeOfFirstFixedSurface=1; typeOfSecondFixedSurface=100;
scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=80000;}
'sfc' = {typeOfFirstFixedSurface=100; scaleFactorOfFirstFixedSurface=0; scaledValueOfFirstFixedSurface=80000;
typeOfSecondFixedSurface=100; scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=45000;}
'sfc' = {typeOfFirstFixedSurface=100; scaleFactorOfFirstFixedSurface=0;
scaledValueOfFirstFixedSurface=45000; typeOfSecondFixedSurface=8;}
'sfc' = {typeOfFirstFixedSurface=101; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=103;}
'ml' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=255;}
'ml' = {typeOfFirstFixedSurface=105; typeOfSecondFixedSurface=105;}
'sfc' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=106;typeOfSecondFixedSurface=106;}
'pt' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=255;}
'pt' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=107;}
'pv' = {typeOfFirstFixedSurface=109; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=114; typeOfSecondFixedSurface=114;}
'hhl' = {typeOfFirstFixedSurface=118; typeOfSecondFixedSurface=255;}
'hpl' = {typeOfFirstFixedSurface=119; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=151; typeOfSecondFixedSurface=151;}
'sol' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=255;}
'sol' = {typeOfFirstFixedSurface=152; typeOfSecondFixedSurface=152;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=160; scaleFactorOfFirstFixedSurface=0;
scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=9;}
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=20;
scaledValueOfFirstFixedSurface=0; scaleFactorOfFirstFixedSurface=0;}
'sfc' = {typeOfFirstFixedSurface=162; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=166; typeOfSecondFixedSurface=255;}
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=255;}
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=168;}
'o2d' = {typeOfFirstFixedSurface=169; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=170; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=171; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=173; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=173; typeOfSecondFixedSurface=175;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255; discipline=1;}
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=176; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=160;
scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=0;}
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176;}
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176; discipline=1;}
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=176;}
'sfc' = {typeOfFirstFixedSurface=177; typeOfSecondFixedSurface=255;}
'o2d' = {typeOfFirstFixedSurface=188; typeOfSecondFixedSurface=189;}
'sfc' = {typeOfFirstFixedSurface=5; typeOfSecondFixedSurface=255;}
'sfc' = {typeOfFirstFixedSurface=14; typeOfSecondFixedSurface=255;}

View File

@ -1,39 +1,42 @@
# (C) Copyright 2005- ECMWF.
codetable[2] marsClass "mars/class.table" = "od" : dump,string_type,lowercase;
codetable[2] marsClass "mars/class.table" = "od" : dump,string_type,lowercase;
codetable[2] marsType "mars/type.table" = "an" : dump,string_type,no_fail,lowercase;
codetable[2] marsStream "mars/stream.table" = "oper" : dump,string_type,lowercase ;
codetable[2] marsStream "mars/stream.table" = "oper" : dump,string_type,lowercase;
ksec1expver[4] experimentVersionNumber = "0001" : dump;
meta class g2_mars_labeling(0,marsClass,
marsType,
marsStream,
experimentVersionNumber,
typeOfProcessedData,
productDefinitionTemplateNumber,
stepType,
derivedForecast,
typeOfGeneratingProcess);
meta class g2_mars_labeling(
0,marsClass,
marsType,
marsStream,
experimentVersionNumber,
typeOfProcessedData,
productDefinitionTemplateNumber,
stepType,
derivedForecast,
typeOfGeneratingProcess);
meta type g2_mars_labeling(1,marsClass,
marsType,
marsStream,
experimentVersionNumber,
typeOfProcessedData,
productDefinitionTemplateNumber,
stepType,
derivedForecast,
typeOfGeneratingProcess);
meta type g2_mars_labeling(
1,marsClass,
marsType,
marsStream,
experimentVersionNumber,
typeOfProcessedData,
productDefinitionTemplateNumber,
stepType,
derivedForecast,
typeOfGeneratingProcess);
meta stream g2_mars_labeling(2,marsClass,
marsType,
marsStream,
experimentVersionNumber,
typeOfProcessedData,
productDefinitionTemplateNumber,
stepType,
derivedForecast,
typeOfGeneratingProcess);
meta stream g2_mars_labeling(
2,marsClass,
marsType,
marsStream,
experimentVersionNumber,
typeOfProcessedData,
productDefinitionTemplateNumber,
stepType,
derivedForecast,
typeOfGeneratingProcess);
alias ls.dataType = marsType;
@ -41,5 +44,4 @@ alias mars.class = class;
alias mars.type = type;
alias mars.stream = stream;
alias mars.expver = experimentVersionNumber;
alias mars.domain = globalDomain; # For now...
alias mars.domain = globalDomain; # For now...

View File

@ -20,6 +20,7 @@
'neutralBuoyancy' = {typeOfFirstFixedSurface=16; typeOfSecondFixedSurface=255;}
'mostUnstableParcel' = {typeOfFirstFixedSurface=17; typeOfSecondFixedSurface=255;}
'mixedLayerParcel' = {typeOfFirstFixedSurface=18; typeOfSecondFixedSurface=255;}
'lowestLevelOfCloudCoverExceedance' = {typeOfFirstFixedSurface=19; typeOfSecondFixedSurface=255;}
'isothermal' = {typeOfFirstFixedSurface=20; typeOfSecondFixedSurface=255;}
'isobaricInPa' = {typeOfFirstFixedSurface=100; typeOfSecondFixedSurface=255; pressureUnits='Pa';}
'isobaricInhPa' = {typeOfFirstFixedSurface=100; pressureUnits='hPa'; typeOfSecondFixedSurface=255;}

View File

@ -31,8 +31,10 @@ program codes_dump_test
if (iret == CODES_END_OF_FILE) exit
call codes_set_debug(0)
call codes_set_data_quality_checks(1)
call codes_dump(msgid)
call codes_set_debug(1)
call codes_set_data_quality_checks(0)
call codes_release(msgid)

View File

@ -244,6 +244,7 @@ void grib_context_set_print_proc(grib_context* c, grib_print_proc p)
void grib_context_set_data_quality_checks(grib_context* c, int val)
{
c = c ? c : grib_context_get_default();
// If val == 0, disable data quality checks
// If val == 1, failure results in an error
// If val == 2, failure results in a warning
Assert(val == 0 || val == 1 || val == 2);