mirror of https://github.com/ecmwf/eccodes.git
Merge remote-tracking branch 'origin/develop' into feature/grib_time_processing_generalisation
This commit is contained in:
commit
ab234d0af2
|
@ -69,6 +69,8 @@ jobs:
|
|||
secrets:
|
||||
url_debian_11: ${{ secrets.NEXUS_TEST_REPO_NIGHTLY_URL_DEBIAN_11 }}
|
||||
token_debian_11: ${{ secrets.NEXUS_TEST_REPO_UPLOAD_TOKEN }}
|
||||
url_debian_12: ${{ secrets.NEXUS_TEST_REPO_URL_DEBIAN_12 }}
|
||||
token_debian_12: ${{ secrets.NEXUS_TEST_REPO_UPLOAD_TOKEN }}
|
||||
url_centos_7: ${{ secrets.NEXUS_TEST_REPO_NIGHTLY_URL_CENTOS_7 }}
|
||||
token_centos_7: ${{ secrets.NEXUS_TEST_REPO_UPLOAD_TOKEN }}
|
||||
url_rocky_8: ${{ secrets.NEXUS_TEST_REPO_NIGHTLY_URL_ROCKY_8 }}
|
||||
|
|
|
@ -18,7 +18,16 @@
|
|||
|
||||
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
|
||||
|
||||
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
||||
find_package( ecbuild 3.7 HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
||||
if(NOT ecbuild_FOUND)
|
||||
message(STATUS "Fetching ecbuild...")
|
||||
include(FetchContent)
|
||||
FetchContent_Populate(ecbuild
|
||||
GIT_REPOSITORY https://github.com/ecmwf/ecbuild.git
|
||||
GIT_TAG 3.8.5
|
||||
)
|
||||
find_package( ecbuild 3.7 REQUIRED HINTS ${ecbuild_SOURCE_DIR})
|
||||
endif()
|
||||
|
||||
# Initialise project
|
||||
project( eccodes LANGUAGES CXX )
|
||||
|
@ -509,11 +518,8 @@ ecbuild_info(" | PRE-RELEASE CANDIDATE |")
|
|||
ecbuild_info(" +--------------------------+")
|
||||
ecbuild_info("")
|
||||
|
||||
ecbuild_info(" +--------------------------------------+")
|
||||
ecbuild_info(" | Please note: |")
|
||||
ecbuild_info(" | For Python3 support, first install |")
|
||||
ecbuild_info(" | ecCodes and then install the Python |")
|
||||
ecbuild_info(" | bindings from PyPI with: |")
|
||||
ecbuild_info(" | $ pip3 install eccodes |")
|
||||
ecbuild_info(" +--------------------------------------+")
|
||||
ecbuild_info("Please note:")
|
||||
ecbuild_info(" For Python3 support, you must install the Python bindings.")
|
||||
ecbuild_info(" See:")
|
||||
ecbuild_info(" https://confluence.ecmwf.int/display/ECC/ecCodes+installation")
|
||||
ecbuild_info("")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# RDB stands for REPORT DATA BASE
|
||||
# See https://confluence.ecmwf.int/pages/viewpage.action?pageId=24316441
|
||||
unsigned[1] rdbType : dump;
|
||||
unsigned[1] oldSubtype: dump;
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ unsigned[1] reservedSection3 = 0;
|
|||
unsigned[2] numberOfSubsets : dump;
|
||||
alias ls.numberOfSubsets=numberOfSubsets;
|
||||
|
||||
if (section2Present && bufrHeaderCentre==98 && section2Length==52) {
|
||||
if (section2Present && bufrHeaderCentre == 98 && section2Length == 52) {
|
||||
if ( rdbType == 2 || rdbType == 3 || rdbType == 8 || rdbType == 12 || rdbType == 30 ) {
|
||||
transient isSatelliteType=1;
|
||||
} else {
|
||||
|
@ -69,10 +69,11 @@ if (section2Present && bufrHeaderCentre==98 && section2Length==52) {
|
|||
meta localLatitude2 bits(keyMore,32,25,-9000000,100000) : dump,no_copy;
|
||||
|
||||
# This rule is taken from BUFRDC. See bufrdc_wmo/buukey.F
|
||||
# Also see ECC-686
|
||||
if (oldSubtype == 255 || numberOfSubsets>255 ||
|
||||
( oldSubtype>=121 && oldSubtype <=130 ) ||
|
||||
oldSubtype==31) {
|
||||
# See ECC-686
|
||||
# and https://confluence.ecmwf.int/pages/viewpage.action?pageId=24316441
|
||||
if (oldSubtype == 255 || numberOfSubsets > 255 ||
|
||||
( oldSubtype >= 121 && oldSubtype <= 130 ) ||
|
||||
oldSubtype == 31) {
|
||||
meta ls.localNumberOfObservations bits(keySat,0,16) : dump,long_type,no_copy;
|
||||
meta ls.satelliteID bits(keySat,16,16) : dump,long_type,no_copy;
|
||||
} else {
|
||||
|
|
|
@ -16,7 +16,7 @@ constant three=1 : hidden;
|
|||
constant eight=8 : hidden;
|
||||
constant eleven=11 : hidden;
|
||||
constant epsPoint=1 : hidden;
|
||||
constant epsContinous=11 : hidden;
|
||||
constant epsContinuous=11 : hidden;
|
||||
constant epsStatisticsPoint=2 : hidden;
|
||||
constant epsStatisticsContinous=12 : hidden;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -10,7 +10,8 @@ transient numberOfUnusedBitsAtEndOfSection3 = 0 : read_only;
|
|||
transient tableReference = 0;
|
||||
|
||||
#position offsetBeforeBitmap;
|
||||
meta bitmap gds_not_present_bitmap( missingValue,numberOfValues,
|
||||
meta bitmap gds_not_present_bitmap(
|
||||
missingValue,numberOfValues,
|
||||
numberOfPoints,
|
||||
latitudeOfFirstGridPoint,
|
||||
Ni,numberOfUnusedBitsAtEndOfSection3) : read_only;
|
||||
|
|
|
@ -40,6 +40,6 @@ transient numberOfPoints= nd *(Ni + 1) * (Ni + 1);
|
|||
alias numberOfDataPoints=numberOfPoints;
|
||||
|
||||
meta numberOfValues
|
||||
number_of_values(values,bitsPerValue,numberOfDataPoints,
|
||||
number_of_values(
|
||||
values,bitsPerValue,numberOfDataPoints,
|
||||
bitmapPresent,bitmap,numberOfCodedValues) : dump;
|
||||
|
||||
|
|
|
@ -79,8 +79,8 @@ 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 ,
|
||||
iterator latlon(numberOfPoints,missingValue,values,longitudeFirstInDegrees,iInc,
|
||||
Ni,Nj,iScansNegatively,
|
||||
latitudeFirstInDegrees,DjInDegrees,jScansPositively,jPointsAreConsecutive,
|
||||
isRotatedGrid, angleOfRotation,
|
||||
latitudeOfSouthernPoleInDegrees,longitudeOfSouthernPoleInDegrees);
|
||||
|
|
|
@ -32,7 +32,7 @@ if (stepType is "instant" ) {
|
|||
}
|
||||
} else {
|
||||
if (numberOfForecastsInEnsemble!=0) {
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ if (stepType is "instant" ) {
|
|||
} else {
|
||||
alias typeOfEnsembleForecast=three;
|
||||
}
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=eight;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ if (stepType is "instant" ) {
|
|||
} else {
|
||||
alias typeOfEnsembleForecast=three;
|
||||
}
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=eight;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ constant grib2LocalSectionNumber=18;
|
|||
if (stepType is "instant" ) {
|
||||
alias productDefinitionTemplateNumber=epsPoint;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
}
|
||||
template mars_labeling "grib1/mars_labeling.def";
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ constant grib2LocalSectionNumber=18;
|
|||
if (stepType is "instant" ) {
|
||||
alias productDefinitionTemplateNumber=epsPoint;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
}
|
||||
template mars_labeling "grib1/mars_labeling.def";
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ constant grib2LocalSectionNumber=26;
|
|||
if (stepType is "instant" ) {
|
||||
alias productDefinitionTemplateNumber=epsPoint;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
}
|
||||
|
||||
constant wrongPadding=1 : hidden;
|
||||
|
|
|
@ -23,7 +23,7 @@ if (stepType is "instant" ) {
|
|||
if (type is "em" || type is "es" ) {
|
||||
alias productDefinitionTemplateNumber=epsStatisticsContinous;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ if (stepType is "instant" ) {
|
|||
} else {
|
||||
alias typeOfEnsembleForecast=three;
|
||||
}
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=eight;
|
||||
}
|
||||
|
|
|
@ -42,10 +42,12 @@
|
|||
141 141 Layer between two isobaric surfaces (mixed precision) pressure of top, in kPa 1100hPa minus pressure of bottom, in hPa
|
||||
# 142-159 Reserved
|
||||
160 dp Depth below sea level meters (2 octets)
|
||||
# 161-199Reserved
|
||||
# 161-199 Reserved
|
||||
200 sfc Entire atmosphere considered as a single layer 0 (2 octets)
|
||||
201 201 Entire ocean considered as a single layer 0 (2 octets)
|
||||
# 202-209 Reserved
|
||||
202 al Abstract Single Level
|
||||
203 al Abstract Multiple Level
|
||||
# 204-209 Reserved
|
||||
210 pl Isobaric surface (Pa) (ECMWF extension)
|
||||
# 211-254 Reserved for local use
|
||||
211 wv Ocean wave level (ECMWF extension)
|
||||
|
|
|
@ -48,7 +48,7 @@ if (stepType is "instant" ) {
|
|||
} else {
|
||||
alias typeOfEnsembleForecast=three;
|
||||
}
|
||||
alias productDefinitionTemplateNumber=epsContinous;
|
||||
alias productDefinitionTemplateNumber=epsContinuous;
|
||||
} else {
|
||||
alias productDefinitionTemplateNumber=eight;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ constant dataRepresentationType = 0;
|
|||
# grib 1 -> 2
|
||||
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;
|
||||
|
|
|
@ -105,7 +105,8 @@ if( indicatorOfTypeOfLevel == 109 ||
|
|||
indicatorOfTypeOfLevel == 100 ||
|
||||
indicatorOfTypeOfLevel == 110 ||
|
||||
indicatorOfTypeOfLevel == 113 ||
|
||||
indicatorOfTypeOfLevel == 117)
|
||||
indicatorOfTypeOfLevel == 117 ||
|
||||
indicatorOfTypeOfLevel == 203)
|
||||
{
|
||||
alias mars.levelist = level;
|
||||
}
|
||||
|
|
|
@ -34,3 +34,5 @@
|
|||
'depthBelowSea' = {indicatorOfTypeOfLevel=160;}
|
||||
'entireAtmosphere' = {indicatorOfTypeOfLevel=200;}
|
||||
'entireOcean' = {indicatorOfTypeOfLevel=201;}
|
||||
'abstractSingleLevel' = {indicatorOfTypeOfLevel=202; level=missing();}
|
||||
'abstractMultipleLevels' = {indicatorOfTypeOfLevel=203;}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
'sfc' = {typeOfFirstFixedSurface=8; typeOfSecondFixedSurface=255;}
|
||||
'sfc' = {typeOfFirstFixedSurface=17; typeOfSecondFixedSurface=255;}
|
||||
'sfc' = {typeOfFirstFixedSurface=18; typeOfSecondFixedSurface=255;}
|
||||
'o2d' = {typeOfFirstFixedSurface=20; scaleFactorOfFirstFixedSurface=-2;
|
||||
scaledValueOfFirstFixedSurface=29315; typeOfSecondFixedSurface=255;}
|
||||
'o2d' = {typeOfFirstFixedSurface=20; 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;
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
|
||||
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,
|
||||
meta class g2_mars_labeling(
|
||||
0,marsClass,
|
||||
marsType,
|
||||
marsStream,
|
||||
experimentVersionNumber,
|
||||
|
@ -15,7 +16,8 @@ meta class g2_mars_labeling(0,marsClass,
|
|||
derivedForecast,
|
||||
typeOfGeneratingProcess);
|
||||
|
||||
meta type g2_mars_labeling(1,marsClass,
|
||||
meta type g2_mars_labeling(
|
||||
1,marsClass,
|
||||
marsType,
|
||||
marsStream,
|
||||
experimentVersionNumber,
|
||||
|
@ -25,7 +27,8 @@ meta type g2_mars_labeling(1,marsClass,
|
|||
derivedForecast,
|
||||
typeOfGeneratingProcess);
|
||||
|
||||
meta stream g2_mars_labeling(2,marsClass,
|
||||
meta stream g2_mars_labeling(
|
||||
2,marsClass,
|
||||
marsType,
|
||||
marsStream,
|
||||
experimentVersionNumber,
|
||||
|
@ -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...
|
||||
|
|
|
@ -6135,6 +6135,27 @@
|
|||
parameterNumber = 148 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
}
|
||||
#Radar reflectivity
|
||||
'Radar reflectivity' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 16 ;
|
||||
parameterNumber = 4 ;
|
||||
}
|
||||
#Pressure at cloud ceiling
|
||||
'Pressure at cloud ceiling' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 0 ;
|
||||
typeOfFirstFixedSurface = 19 ;
|
||||
scaledValueOfFirstFixedSurface = 50 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
}
|
||||
#Visibility through precipitation
|
||||
'Visibility through precipitation' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
}
|
||||
#Burned area
|
||||
'Burned area' = {
|
||||
discipline = 2 ;
|
||||
|
@ -8569,6 +8590,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-mean visibility through precipitation
|
||||
'Time-mean visibility through precipitation' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-maximum temperature tendency due to short-wave radiation
|
||||
'Time-maximum temperature tendency due to short-wave radiation' = {
|
||||
discipline = 0 ;
|
||||
|
@ -10324,6 +10352,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-maximum visibility through precipitation
|
||||
'Time-maximum visibility through precipitation' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-minimum temperature tendency due to short-wave radiation
|
||||
'Time-minimum temperature tendency due to short-wave radiation' = {
|
||||
discipline = 0 ;
|
||||
|
@ -12107,6 +12142,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-minimum visibility through precipitation
|
||||
'Time-minimum visibility through precipitation' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-standard-deviation temperature tendency due to short-wave radiation
|
||||
'Time-standard-deviation temperature tendency due to short-wave radiation' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -6135,6 +6135,27 @@
|
|||
parameterNumber = 148 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
}
|
||||
#Radar reflectivity
|
||||
'231066' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 16 ;
|
||||
parameterNumber = 4 ;
|
||||
}
|
||||
#Pressure at cloud ceiling
|
||||
'231067' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 0 ;
|
||||
typeOfFirstFixedSurface = 19 ;
|
||||
scaledValueOfFirstFixedSurface = 50 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
}
|
||||
#Visibility through precipitation
|
||||
'231068' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
}
|
||||
#Burned area
|
||||
'232000' = {
|
||||
discipline = 2 ;
|
||||
|
@ -8569,6 +8590,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-mean visibility through precipitation
|
||||
'235382' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-maximum temperature tendency due to short-wave radiation
|
||||
'237001' = {
|
||||
discipline = 0 ;
|
||||
|
@ -10324,6 +10352,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-maximum visibility through precipitation
|
||||
'237382' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-minimum temperature tendency due to short-wave radiation
|
||||
'238001' = {
|
||||
discipline = 0 ;
|
||||
|
@ -12107,6 +12142,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-minimum visibility through precipitation
|
||||
'238382' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-standard-deviation temperature tendency due to short-wave radiation
|
||||
'239001' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -6135,6 +6135,27 @@
|
|||
parameterNumber = 148 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
}
|
||||
#Radar reflectivity
|
||||
'rare' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 16 ;
|
||||
parameterNumber = 4 ;
|
||||
}
|
||||
#Pressure at cloud ceiling
|
||||
'pcdc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 0 ;
|
||||
typeOfFirstFixedSurface = 19 ;
|
||||
scaledValueOfFirstFixedSurface = 50 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
}
|
||||
#Visibility through precipitation
|
||||
'visp' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
}
|
||||
#Burned area
|
||||
'fba' = {
|
||||
discipline = 2 ;
|
||||
|
@ -8569,6 +8590,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-mean visibility through precipitation
|
||||
'avg_visp' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-maximum temperature tendency due to short-wave radiation
|
||||
'max_ttswr' = {
|
||||
discipline = 0 ;
|
||||
|
@ -10324,6 +10352,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-maximum visibility through precipitation
|
||||
'max_visp' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-minimum temperature tendency due to short-wave radiation
|
||||
'min_ttswr' = {
|
||||
discipline = 0 ;
|
||||
|
@ -12107,6 +12142,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-minimum visibility through precipitation
|
||||
'min_visp' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-standard-deviation temperature tendency due to short-wave radiation
|
||||
'std_ttswr' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -40,6 +40,7 @@ alias nTileAtt=numberOfUsedTileAttributesForTileAttributeCombination;
|
|||
alias tile.nTileAtt=nTileAtt;
|
||||
|
||||
alias mars.tile=typeOfTile;
|
||||
alias mars.tileAttribute=tileAttribute;
|
||||
transient paramtype = "tile";
|
||||
alias mars.paramType=paramtype;
|
||||
alias mars.tileattribute=tileAttribute;
|
||||
constant paramTypeTile = "tile";
|
||||
unalias mars.paramtype;
|
||||
alias mars.paramtype=paramTypeTile;
|
||||
|
|
|
@ -12,5 +12,7 @@ unsigned[1] SecondOfModelVersion = 0: edition_specific;
|
|||
meta modelVersionDate g2date(YearOfModelVersion,MonthOfModelVersion,DayOfModelVersion) : dump;
|
||||
meta modelVersionTime time(HourOfModelVersion, MinuteOfModelVersion, SecondOfModelVersion) : dump;
|
||||
|
||||
alias referenceDate = modelVersionDate ;
|
||||
|
||||
remove isHindcast;
|
||||
constant isHindcast = 1;
|
||||
|
|
|
@ -54,12 +54,9 @@ statisticalProcessesList list(numberOfTimeRanges)
|
|||
if (numberOfTimeRanges == 1 || numberOfTimeRanges == 2) {
|
||||
concept stepTypeInternal {
|
||||
"instant" = {typeOfStatisticalProcessing=255;}
|
||||
"avg" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=255;}
|
||||
"avg" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=2;}
|
||||
"avg" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=3;}
|
||||
"avg" = {typeOfStatisticalProcessing=0;}
|
||||
"avgd" = {typeOfStatisticalProcessing=0;typeOfTimeIncrement=1;}
|
||||
"accum" = {typeOfStatisticalProcessing=1;typeOfTimeIncrement=255;}
|
||||
"accum" = {typeOfStatisticalProcessing=1;typeOfTimeIncrement=2;}
|
||||
"accum" = {typeOfStatisticalProcessing=1;}
|
||||
"max" = {typeOfStatisticalProcessing=2;}
|
||||
"min" = {typeOfStatisticalProcessing=3;}
|
||||
"diff" = {typeOfStatisticalProcessing=4;} # end-start
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -6135,6 +6135,27 @@
|
|||
parameterNumber = 148 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
}
|
||||
#Radar reflectivity
|
||||
'dB' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 16 ;
|
||||
parameterNumber = 4 ;
|
||||
}
|
||||
#Pressure at cloud ceiling
|
||||
'Pa' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 0 ;
|
||||
typeOfFirstFixedSurface = 19 ;
|
||||
scaledValueOfFirstFixedSurface = 50 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
}
|
||||
#Visibility through precipitation
|
||||
'm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
}
|
||||
#Burned area
|
||||
'%' = {
|
||||
discipline = 2 ;
|
||||
|
@ -8569,6 +8590,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-mean visibility through precipitation
|
||||
'm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 0 ;
|
||||
}
|
||||
#Time-maximum temperature tendency due to short-wave radiation
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
|
@ -10324,6 +10352,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-maximum visibility through precipitation
|
||||
'm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 2 ;
|
||||
}
|
||||
#Time-minimum temperature tendency due to short-wave radiation
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
|
@ -12107,6 +12142,13 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-minimum visibility through precipitation
|
||||
'm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 19 ;
|
||||
parameterNumber = 51 ;
|
||||
typeOfStatisticalProcessing = 3 ;
|
||||
}
|
||||
#Time-standard-deviation temperature tendency due to short-wave radiation
|
||||
'K s**-1' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -4,5 +4,6 @@ alias mars.fcmonth = marsForecastMonth;
|
|||
unalias mars.step;
|
||||
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -6,7 +6,10 @@ if (class is "od") { alias mars.system = systemNumber; }
|
|||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
||||
|
||||
|
|
|
@ -8,7 +8,10 @@ if (class is "od") { alias mars.system = systemNumber; }
|
|||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ if (class isnot "gw") { # ECC-1448
|
|||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ if (class isnot "gw") { # ECC-1448
|
|||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
|
|
@ -5,13 +5,15 @@ unalias mars.step;
|
|||
alias mars.origin = centre;
|
||||
alias mars.method = methodNumber;
|
||||
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en" || class is "c3") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
||||
|
||||
|
|
|
@ -6,13 +6,15 @@ alias mars.number = perturbationNumber;
|
|||
alias mars.origin = centre;
|
||||
alias mars.method = methodNumber;
|
||||
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en" || class is "c3") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
||||
|
||||
|
|
|
@ -6,14 +6,12 @@ alias mars.method = methodNumber;
|
|||
|
||||
unalias mars.step;
|
||||
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
if (class is "ci") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en" || class is "c3" || class is "ci") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@ alias mars.number = perturbationNumber;
|
|||
alias mars.origin = centre;
|
||||
alias mars.method = methodNumber;
|
||||
|
||||
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en" || class is "c3") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
||||
|
|
|
@ -7,13 +7,14 @@ unalias mars.step;
|
|||
|
||||
alias mars.method = methodNumber;
|
||||
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "c3") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en" || class is "c3") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && class is "c3") {
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
grib.msmm.em.def
|
|
@ -0,0 +1,18 @@
|
|||
# assert(16);
|
||||
alias mars.fcmonth = marsForecastMonth;
|
||||
unalias mars.step;
|
||||
|
||||
alias mars.origin = centre;
|
||||
alias mars.method = methodNumber;
|
||||
|
||||
if (class is "od" || class is "me" || class is "en" || class is "c3") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
||||
# See ECC-624
|
||||
if (centre == 80 && subCentre == 98 && (class is "c3" || class is "ci")) {
|
||||
constant cnmc_cmcc = 'cmcc';
|
||||
alias mars.origin = cnmc_cmcc;
|
||||
}
|
||||
|
||||
if (class is "ci") { unalias mars.method; }
|
|
@ -1,5 +1,6 @@
|
|||
alias mars.number = perturbationNumber;
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
alias mars.number = perturbationNumber;
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
alias mars.number = perturbationNumber;
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
alias mars.number = perturbationNumber;
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
alias mars.number = perturbationNumber;
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
|
|||
unalias mars.step;
|
||||
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
|
|||
unalias mars.step;
|
||||
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
|
|||
unalias mars.step;
|
||||
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@ alias mars.number = perturbationNumber;
|
|||
unalias mars.step;
|
||||
|
||||
alias mars.method = methodNumber;
|
||||
if (class is "od") { alias mars.system = systemNumber; }
|
||||
if (class is "me") { alias mars.system = systemNumber; }
|
||||
if (class is "en") { alias mars.system = systemNumber; }
|
||||
if (class is "od" || class is "me" || class is "en") {
|
||||
alias mars.system = systemNumber;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
|
||||
#cmakedefine HAVE_GEOGRAPHY
|
||||
#cmakedefine HAVE_MEMFS
|
||||
#cmakedefine HAVE_FORTRAN
|
||||
|
||||
#ifdef HAVE_MEMFS
|
||||
#undef ECCODES_DEFINITION_PATH
|
||||
|
|
|
@ -26,7 +26,6 @@ list( APPEND test_bins
|
|||
grib_get_data
|
||||
grib_sections_copy
|
||||
grib_copy_keys
|
||||
grib_iterator_bitmap
|
||||
grib_clone
|
||||
grib_copy_message
|
||||
grib_ensemble_index
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
#include <stdio.h>
|
||||
#include "eccodes.h"
|
||||
|
||||
static void usage(const char* app)
|
||||
{
|
||||
fprintf(stderr, "Usage is: %s input_file ouput_file\n", app);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE* in = NULL;
|
||||
|
@ -36,7 +31,6 @@ int main(int argc, char* argv[])
|
|||
int i, err = 0;
|
||||
|
||||
if (argc != 3) {
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
#include <stdio.h>
|
||||
#include "eccodes.h"
|
||||
|
||||
static void usage(const char* app)
|
||||
{
|
||||
fprintf(stderr, "Usage is: %s input_file ouput_file\n", app);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE* in = NULL;
|
||||
|
@ -33,7 +28,6 @@ int main(int argc, char* argv[])
|
|||
int err = 0;
|
||||
|
||||
if (argc != 3) {
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
#include "eccodes.h"
|
||||
#include <assert.h>
|
||||
|
||||
static void usage(const char* prog)
|
||||
{
|
||||
fprintf(stderr, "Usage is: %s input_file ouput_file\n", prog);
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
FILE* in = NULL;
|
||||
|
@ -30,7 +25,6 @@ int main(int argc, char* argv[])
|
|||
int err = 0;
|
||||
|
||||
if (argc != 3) {
|
||||
usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
#include <assert.h>
|
||||
#include "eccodes.h"
|
||||
|
||||
static void usage(const char* prog)
|
||||
{
|
||||
fprintf(stderr, "usage: %s in out\n", prog);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
int err = 0;
|
||||
|
@ -40,7 +34,7 @@ int main(int argc, char** argv)
|
|||
codes_handle* h = NULL;
|
||||
const void* buffer = NULL;
|
||||
|
||||
if (argc != 3) usage(argv[0]);
|
||||
if (argc != 3) return 1;
|
||||
infile = argv[1];
|
||||
outfile = argv[2];
|
||||
|
||||
|
|
|
@ -20,14 +20,11 @@
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
codes_string_list* list;
|
||||
codes_string_list* list2;
|
||||
|
||||
list = codes_grib_util_get_param_id("11.2");
|
||||
const codes_string_list* list = codes_grib_util_get_param_id("11.2");
|
||||
printf("mars.param=11.2 -> paramId= ");
|
||||
while (list) {
|
||||
const codes_string_list* list2 = codes_grib_util_get_param_id("130.128");
|
||||
printf("%s ", list->value);
|
||||
list2 = codes_grib_util_get_param_id("130.128");
|
||||
printf("mars.param=11.2 -> paramId= ");
|
||||
while (list2) {
|
||||
printf("%s ", list2->value);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
#include "eccodes.h"
|
||||
|
||||
void usage(char* prog)
|
||||
void usage(const char* prog)
|
||||
{
|
||||
printf("usage: %s in.nc\n", prog);
|
||||
exit(1);
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ program keys_iterator_skip
|
|||
call codes_skip_coded(kiter)
|
||||
call codes_skip_duplicates(kiter)
|
||||
call codes_skip_read_only(kiter)
|
||||
call codes_skip_function(kiter)
|
||||
call codes_skip_edition_specific(kiter)
|
||||
|
||||
do
|
||||
call codes_keys_iterator_next(kiter, iret)
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
! Description: how to create a new GRIB message by cloning
|
||||
! an existing message.
|
||||
!
|
||||
!
|
||||
! Author: Cristian D. Codorean
|
||||
!
|
||||
!
|
||||
|
|
|
@ -2765,12 +2765,35 @@
|
|||
call grib_skip_read_only(iterid, status)
|
||||
end subroutine codes_skip_read_only
|
||||
|
||||
subroutine codes_skip_function(iterid, status)
|
||||
integer(kind=kindOfInt), intent(in) :: iterid
|
||||
integer(kind=kindOfInt), optional, intent(out) :: status
|
||||
|
||||
call grib_skip_function(iterid, status)
|
||||
end subroutine codes_skip_function
|
||||
|
||||
subroutine codes_skip_edition_specific(iterid, status)
|
||||
integer(kind=kindOfInt), intent(in) :: iterid
|
||||
integer(kind=kindOfInt), optional, intent(out) :: status
|
||||
|
||||
call grib_skip_edition_specific(iterid, status)
|
||||
end subroutine codes_skip_edition_specific
|
||||
|
||||
|
||||
!> Set debug mode
|
||||
subroutine codes_set_debug(dmode)
|
||||
integer(kind=kindOfInt), intent(in) :: dmode
|
||||
call grib_set_debug(dmode)
|
||||
end subroutine codes_set_debug
|
||||
|
||||
!> Set data quality check value (0, 1 or 2)
|
||||
subroutine codes_set_data_quality_checks(val)
|
||||
integer(kind=kindOfInt), intent(in) :: val
|
||||
call grib_set_data_quality_checks(val)
|
||||
end subroutine codes_set_data_quality_checks
|
||||
|
||||
|
||||
|
||||
!> Set the definition path
|
||||
!>
|
||||
!> In case of error, if the status parameter (optional) is not given, the program will
|
||||
|
|
|
@ -7,6 +7,8 @@ public :: codes_keys_iterator_new, &
|
|||
public :: codes_skip_computed, &
|
||||
codes_skip_coded, &
|
||||
codes_skip_duplicates, &
|
||||
codes_skip_function, &
|
||||
codes_skip_edition_specific, &
|
||||
codes_skip_read_only
|
||||
public :: codes_keys_iterator_get_name, &
|
||||
codes_keys_iterator_rewind
|
||||
|
|
|
@ -79,7 +79,7 @@ integer, external :: grib_f_set_int, grib_f_set_int_array, &
|
|||
integer, external :: grib_f_get_message_size, grib_f_copy_message, grib_f_count_in_file
|
||||
integer, external :: grib_f_write, grib_f_multi_write, grib_f_multi_append
|
||||
integer, external :: grib_f_clone, grib_f_copy_namespace
|
||||
external :: grib_f_check , grib_f_set_debug
|
||||
external :: grib_f_check , grib_f_set_debug, grib_f_set_data_quality_checks
|
||||
integer, external :: grib_f_util_sections_copy
|
||||
integer, external :: grib_f_set_definitions_path, grib_f_set_samples_path
|
||||
integer, external :: grib_f_julian_to_datetime, grib_f_datetime_to_julian, grib_f_copy_key
|
||||
|
|
|
@ -3177,12 +3177,46 @@
|
|||
end if
|
||||
end subroutine grib_skip_read_only
|
||||
|
||||
|
||||
subroutine grib_skip_function(iterid, status)
|
||||
integer(kind=kindOfInt), intent(in) :: iterid
|
||||
integer(kind=kindOfInt), optional, intent(out) :: status
|
||||
integer(kind=kindOfInt) :: iret
|
||||
|
||||
iret = grib_f_skip_function(iterid)
|
||||
if (present(status)) then
|
||||
status = iret
|
||||
else
|
||||
call grib_check(iret, 'skip_function', '')
|
||||
end if
|
||||
end subroutine grib_skip_function
|
||||
|
||||
!!!
|
||||
subroutine grib_skip_edition_specific(iterid, status)
|
||||
integer(kind=kindOfInt), intent(in) :: iterid
|
||||
integer(kind=kindOfInt), optional, intent(out) :: status
|
||||
integer(kind=kindOfInt) :: iret
|
||||
|
||||
iret = grib_f_skip_edition_specific(iterid)
|
||||
if (present(status)) then
|
||||
status = iret
|
||||
else
|
||||
call grib_check(iret, 'skip_edition_specific', '')
|
||||
end if
|
||||
end subroutine grib_skip_edition_specific
|
||||
|
||||
!> Set debug mode
|
||||
subroutine grib_set_debug(dmode)
|
||||
integer(kind=kindOfInt), intent(in) :: dmode
|
||||
call grib_f_set_debug(dmode)
|
||||
end subroutine grib_set_debug
|
||||
|
||||
!> Set data quality check value (0, 1 or 2)
|
||||
subroutine grib_set_data_quality_checks(val)
|
||||
integer(kind=kindOfInt), intent(in) :: val
|
||||
call grib_f_set_data_quality_checks(val)
|
||||
end subroutine grib_set_data_quality_checks
|
||||
|
||||
|
||||
!> Set the definition path
|
||||
!>
|
||||
|
|
|
@ -2875,6 +2875,13 @@ void grib_f_set_debug_(int* dmode)
|
|||
grib_context* c = grib_context_get_default();
|
||||
grib_context_set_debug(c, *dmode);
|
||||
}
|
||||
/*****************************************************************************/
|
||||
void grib_f_set_data_quality_checks_(int* val)
|
||||
{
|
||||
Assert(val);
|
||||
grib_context* c = grib_context_get_default();
|
||||
grib_context_set_data_quality_checks(c, *val);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int grib_f_set_definitions_path_(char* path, int len)
|
||||
|
|
|
@ -310,6 +310,7 @@ int codes_f_bufr_keys_iterator_new_(int* gid,int* iterid);
|
|||
int grib_f_read_file_(int* fid, void* buffer, size_t* nbytes);
|
||||
int codes_f_bufr_keys_iterator_delete_(int* iterid);
|
||||
void grib_f_set_debug_(int* mode);
|
||||
void grib_f_set_data_quality_checks_(int* val);
|
||||
int grib_f_set_definitions_path_(char* path, int len);
|
||||
int grib_f_read_any_from_file_(int* fid, void* buffer, size_t* nbytes);
|
||||
int any_f_new_from_file_(int* fid, int* gid);
|
||||
|
|
|
@ -357,7 +357,6 @@ list( APPEND eccodes_src_files
|
|||
eccodes_prototypes.h
|
||||
grib_dumper_class.h
|
||||
grib_dumper_factory.h
|
||||
grib_emoslib.h
|
||||
grib_iterator_class.h
|
||||
grib_iterator_factory.h
|
||||
grib_nearest_class.h
|
||||
|
|
|
@ -835,8 +835,7 @@ static int encode_double_value(grib_context* c, grib_buffer* buff, long* pos, bu
|
|||
return err;
|
||||
}
|
||||
|
||||
static int encode_string_value(grib_context* c, grib_buffer* buff, long* pos, bufr_descriptor* bd,
|
||||
grib_accessor_bufr_data_array_t* self, char* sval)
|
||||
static int encode_string_value(grib_context* c, grib_buffer* buff, long* pos, bufr_descriptor* bd, char* sval)
|
||||
{
|
||||
int err = 0;
|
||||
int len;
|
||||
|
@ -845,7 +844,7 @@ static int encode_string_value(grib_context* c, grib_buffer* buff, long* pos, bu
|
|||
grib_buffer_set_ulength_bits(c, buff, buff->ulength_bits + bd->width);
|
||||
err = grib_encode_string(buff->data, pos, len, sval);
|
||||
if (err) {
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "encode_string_value: %s. Failed to encode '%s'", bd->shortName, sval);
|
||||
grib_context_log(c, GRIB_LOG_ERROR, "%s: %s. Failed to encode '%s'", __func__, bd->shortName, sval);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -1151,7 +1150,7 @@ static int encode_new_element(grib_context* c, grib_accessor_bufr_data_array_t*
|
|||
grib_sarray_delete(c, stringValues);
|
||||
}
|
||||
else {
|
||||
err = encode_string_value(c, buff, pos, bd, self, csval);
|
||||
err = encode_string_value(c, buff, pos, bd, csval);
|
||||
grib_context_free(c, csval);
|
||||
}
|
||||
}
|
||||
|
@ -1273,7 +1272,7 @@ static int encode_element(grib_context* c, grib_accessor_bufr_data_array_t* self
|
|||
grib_context_log(c, GRIB_LOG_ERROR, "encode_element '%s': Invalid index %d", bd->shortName, idx);
|
||||
return GRIB_INVALID_ARGUMENT;
|
||||
}
|
||||
err = encode_string_value(c, buff, pos, bd, self, self->stringValues->v[idx]->v[0]);
|
||||
err = encode_string_value(c, buff, pos, bd, self->stringValues->v[idx]->v[0]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -77,7 +77,7 @@ int grib_accessor_class_g1bitmap_t::value_count(grib_accessor* a, long* count)
|
|||
|
||||
int grib_accessor_class_g1bitmap_t::unpack_bytes(grib_accessor* a, unsigned char* val, size_t* len)
|
||||
{
|
||||
unsigned char* buf = grib_handle_of_accessor(a)->buffer->data;
|
||||
const unsigned char* buf = grib_handle_of_accessor(a)->buffer->data;
|
||||
grib_accessor_g1bitmap_t* self = (grib_accessor_g1bitmap_t*)a;
|
||||
long tlen;
|
||||
int err;
|
||||
|
|
|
@ -90,7 +90,7 @@ int grib_accessor_class_g1end_of_interval_monthly_t::unpack_double(grib_accessor
|
|||
|
||||
int grib_accessor_class_g1end_of_interval_monthly_t::value_count(grib_accessor* a, long* count)
|
||||
{
|
||||
grib_accessor_g1end_of_interval_monthly_t* self = (grib_accessor_g1end_of_interval_monthly_t*)a;
|
||||
const grib_accessor_g1end_of_interval_monthly_t* self = (grib_accessor_g1end_of_interval_monthly_t*)a;
|
||||
*count = self->number_of_elements;
|
||||
return 0;
|
||||
}
|
||||
|
@ -111,9 +111,8 @@ int grib_accessor_class_g1end_of_interval_monthly_t::compare(grib_accessor* a, g
|
|||
long count = 0;
|
||||
size_t alen = 0;
|
||||
size_t blen = 0;
|
||||
int err = 0;
|
||||
|
||||
err = a->value_count(&count);
|
||||
int err = a->value_count(&count);
|
||||
if (err)
|
||||
return err;
|
||||
alen = count;
|
||||
|
@ -133,7 +132,10 @@ int grib_accessor_class_g1end_of_interval_monthly_t::compare(grib_accessor* a, g
|
|||
a->dirty = 1;
|
||||
|
||||
err = a->unpack_double(aval, &alen);
|
||||
if (err) return err;
|
||||
err = b->unpack_double(bval, &blen);
|
||||
if (err) return err;
|
||||
|
||||
for (size_t i = 0; i < alen && retval == GRIB_SUCCESS; ++i) {
|
||||
if (aval[i] != bval[i]) retval = GRIB_DOUBLE_VALUE_MISMATCH;
|
||||
}
|
||||
|
|
|
@ -310,7 +310,7 @@ long grib_accessor_class_gen_t::byte_offset(grib_accessor* a)
|
|||
|
||||
int grib_accessor_class_gen_t::unpack_bytes(grib_accessor* a, unsigned char* val, size_t* len)
|
||||
{
|
||||
unsigned char* buf = grib_handle_of_accessor(a)->buffer->data;
|
||||
const unsigned char* buf = grib_handle_of_accessor(a)->buffer->data;
|
||||
const long length = a->byte_count();
|
||||
const long offset = a->byte_offset();
|
||||
|
||||
|
|
|
@ -19,9 +19,10 @@ void grib_accessor_class_getenv_t::init(grib_accessor* a, const long l, grib_arg
|
|||
grib_accessor_class_ascii_t::init(a, l, args);
|
||||
grib_accessor_getenv_t* self = (grib_accessor_getenv_t*)a;
|
||||
static char undefined[] = "undefined";
|
||||
grib_handle* hand = grib_handle_of_accessor(a);
|
||||
|
||||
self->name = grib_arguments_get_string(grib_handle_of_accessor(a), args, 0);
|
||||
self->default_value = grib_arguments_get_string(grib_handle_of_accessor(a), args, 1);
|
||||
self->envvar = grib_arguments_get_string(hand, args, 0);
|
||||
self->default_value = grib_arguments_get_string(hand, args, 1);
|
||||
if (!self->default_value)
|
||||
self->default_value = undefined;
|
||||
self->value = 0;
|
||||
|
@ -39,7 +40,7 @@ int grib_accessor_class_getenv_t::unpack_string(grib_accessor* a, char* val, siz
|
|||
size_t l = 0;
|
||||
|
||||
if (!self->value) {
|
||||
v = getenv(self->name);
|
||||
v = getenv(self->envvar);
|
||||
if (!v)
|
||||
v = (char*)self->default_value;
|
||||
self->value = v;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
class grib_accessor_getenv_t : public grib_accessor_ascii_t
|
||||
{
|
||||
public:
|
||||
const char* name;
|
||||
const char* envvar;
|
||||
char* value;
|
||||
const char* default_value;
|
||||
};
|
||||
|
@ -23,7 +23,7 @@ public:
|
|||
class grib_accessor_class_getenv_t : public grib_accessor_class_ascii_t
|
||||
{
|
||||
public:
|
||||
grib_accessor_class_getenv_t(const char* name) : grib_accessor_class_ascii_t(name) {}
|
||||
grib_accessor_class_getenv_t(const char* envvar) : grib_accessor_class_ascii_t(envvar) {}
|
||||
grib_accessor* create_empty_accessor() override { return new grib_accessor_getenv_t{}; }
|
||||
int pack_string(grib_accessor*, const char*, size_t* len) override;
|
||||
int unpack_string(grib_accessor*, char*, size_t* len) override;
|
||||
|
@ -31,4 +31,3 @@ public:
|
|||
int value_count(grib_accessor*, long*) override;
|
||||
void init(grib_accessor*, const long, grib_arguments*) override;
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ grib_accessor_class* grib_accessor_class_group = &_grib_accessor_class_group;
|
|||
void grib_accessor_class_group_t::init(grib_accessor* a, const long len, grib_arguments* arg)
|
||||
{
|
||||
grib_accessor_class_gen_t::init(a, len, arg);
|
||||
grib_buffer* buffer = grib_handle_of_accessor(a)->buffer;
|
||||
const grib_buffer* buffer = grib_handle_of_accessor(a)->buffer;
|
||||
grib_accessor_group_t* self = (grib_accessor_group_t*)a;
|
||||
|
||||
size_t i = 0;
|
||||
|
|
|
@ -59,6 +59,6 @@ int grib_accessor_class_gts_header_t::value_count(grib_accessor* a, long* count)
|
|||
|
||||
size_t grib_accessor_class_gts_header_t::string_length(grib_accessor* a)
|
||||
{
|
||||
grib_handle* h = grib_handle_of_accessor(a);
|
||||
const grib_handle* h = grib_handle_of_accessor(a);
|
||||
return h->gts_header_len;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@ void grib_accessor_class_md5_t::init(grib_accessor* a, const long len, grib_argu
|
|||
grib_string_list* current = 0;
|
||||
grib_context* context = a->context;
|
||||
|
||||
self->offset = grib_arguments_get_name(grib_handle_of_accessor(a), arg, n++);
|
||||
self->length = grib_arguments_get_expression(grib_handle_of_accessor(a), arg, n++);
|
||||
self->offset_key = grib_arguments_get_name(grib_handle_of_accessor(a), arg, n++);
|
||||
self->length_key = grib_arguments_get_expression(grib_handle_of_accessor(a), arg, n++);
|
||||
self->blocklist = NULL;
|
||||
while ((b = (char*)grib_arguments_get_name(grib_handle_of_accessor(a), arg, n++)) != NULL) {
|
||||
if (!self->blocklist) {
|
||||
|
@ -99,9 +99,9 @@ int grib_accessor_class_md5_t::unpack_string(grib_accessor* a, char* v, size_t*
|
|||
return GRIB_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offset, &offset)) != GRIB_SUCCESS)
|
||||
if ((ret = grib_get_long_internal(grib_handle_of_accessor(a), self->offset_key, &offset)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
if ((ret = grib_expression_evaluate_long(grib_handle_of_accessor(a), self->length, &length)) != GRIB_SUCCESS)
|
||||
if ((ret = grib_expression_evaluate_long(grib_handle_of_accessor(a), self->length_key, &length)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
mess = (unsigned char*)grib_context_malloc(a->context, length);
|
||||
memcpy(mess, grib_handle_of_accessor(a)->buffer->data + offset, length);
|
||||
|
|
|
@ -17,8 +17,8 @@ class grib_accessor_md5_t : public grib_accessor_gen_t
|
|||
{
|
||||
public:
|
||||
/* Members defined in md5 */
|
||||
const char* offset;
|
||||
grib_expression* length;
|
||||
const char* offset_key;
|
||||
grib_expression* length_key;
|
||||
grib_string_list* blocklist;
|
||||
};
|
||||
|
||||
|
|
|
@ -17,12 +17,10 @@ grib_accessor_class* grib_accessor_class_non_alpha = &_grib_accessor_class_non_a
|
|||
void grib_accessor_class_non_alpha_t::init(grib_accessor* a, const long len, grib_arguments* arg)
|
||||
{
|
||||
grib_accessor_class_gen_t::init(a, len, arg);
|
||||
grib_buffer* buffer = grib_handle_of_accessor(a)->buffer;
|
||||
size_t i = 0;
|
||||
unsigned char* v;
|
||||
|
||||
v = buffer->data + a->offset;
|
||||
i = 0;
|
||||
const grib_buffer* buffer = grib_handle_of_accessor(a)->buffer;
|
||||
unsigned char* v = buffer->data + a->offset;
|
||||
size_t i = 0;
|
||||
while ((*v < 33 || *v > 126) && i <= buffer->ulength) {
|
||||
v++;
|
||||
i++;
|
||||
|
|
|
@ -51,7 +51,7 @@ int grib_accessor_class_optimal_step_units_t::pack_expression(grib_accessor* a,
|
|||
const char* cclass_name = a->cclass->name;
|
||||
|
||||
if (strcmp(e->cclass->name, "long") == 0) {
|
||||
grib_expression_evaluate_long(hand, e, &lval); // TODO: check return value
|
||||
grib_expression_evaluate_long(hand, e, &lval); // TODO(maee): check return value
|
||||
ret = a->pack_long(&lval, &len);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -199,17 +199,16 @@ long grib_accessor_class_signed_t::next_offset(grib_accessor* a)
|
|||
|
||||
int grib_accessor_class_signed_t::is_missing(grib_accessor* a)
|
||||
{
|
||||
int i = 0;
|
||||
unsigned char ff = 0xff;
|
||||
unsigned long offset = a->offset;
|
||||
grib_handle* hand = grib_handle_of_accessor(a);
|
||||
const grib_handle* hand = grib_handle_of_accessor(a);
|
||||
|
||||
if (a->length == 0) {
|
||||
Assert(a->vvalue != NULL);
|
||||
return a->vvalue->missing;
|
||||
}
|
||||
|
||||
for (i = 0; i < a->length; i++) {
|
||||
for (long i = 0; i < a->length; i++) {
|
||||
if (hand->buffer->data[offset] != ff)
|
||||
return 0;
|
||||
offset++;
|
||||
|
|
|
@ -18,7 +18,7 @@ int grib_accessor_class_uint64_t::unpack_long(grib_accessor* a, long* val, size_
|
|||
{
|
||||
long value = 0;
|
||||
long pos = a->offset;
|
||||
unsigned char* data = grib_handle_of_accessor(a)->buffer->data;
|
||||
const unsigned char* data = grib_handle_of_accessor(a)->buffer->data;
|
||||
unsigned long long result = 0, tmp;
|
||||
int i;
|
||||
|
||||
|
|
|
@ -18,15 +18,14 @@ int grib_accessor_class_uint64_little_endian_t::unpack_long(grib_accessor* a, lo
|
|||
{
|
||||
long value = 0;
|
||||
long pos = a->offset;
|
||||
unsigned char* data = grib_handle_of_accessor(a)->buffer->data;
|
||||
const unsigned char* data = grib_handle_of_accessor(a)->buffer->data;
|
||||
unsigned long long result = 0, tmp;
|
||||
int i;
|
||||
|
||||
if (*len < 1) {
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
|
||||
for (i = 7; i >= 0; i--) {
|
||||
for (int i = 7; i >= 0; i--) {
|
||||
result <<= 8;
|
||||
result |= data[pos + i];
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ int grib_accessor_class_uint8_t::unpack_long(grib_accessor* a, long* val, size_t
|
|||
{
|
||||
long value = 0;
|
||||
long pos = a->offset;
|
||||
unsigned char* data = grib_handle_of_accessor(a)->buffer->data;
|
||||
const unsigned char* data = grib_handle_of_accessor(a)->buffer->data;
|
||||
|
||||
if (*len < 1) {
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
|
|
|
@ -162,7 +162,7 @@ int pack_long_unsigned_helper(grib_accessor* a, const long* val, size_t* len, in
|
|||
|
||||
int grib_accessor_class_unsigned_t::unpack_long(grib_accessor* a, long* val, size_t* len)
|
||||
{
|
||||
grib_accessor_unsigned_t* self = (grib_accessor_unsigned_t*)a;
|
||||
const grib_accessor_unsigned_t* self = (grib_accessor_unsigned_t*)a;
|
||||
|
||||
long rlen = 0;
|
||||
unsigned long i = 0;
|
||||
|
@ -245,7 +245,7 @@ int grib_accessor_class_unsigned_t::is_missing(grib_accessor* a)
|
|||
{
|
||||
const unsigned char ff = 0xff;
|
||||
unsigned long offset = a->offset;
|
||||
grib_handle* hand = grib_handle_of_accessor(a);
|
||||
const grib_handle* hand = grib_handle_of_accessor(a);
|
||||
|
||||
if (a->length == 0) {
|
||||
Assert(a->vvalue != NULL);
|
||||
|
|
|
@ -95,7 +95,6 @@ static void grib_dump(grib_action* a, FILE* f, int l)
|
|||
}
|
||||
c = c->super ? *(c->super) : NULL;
|
||||
}
|
||||
DEBUG_ASSERT(0);
|
||||
}
|
||||
|
||||
// void grib_xref(grib_action* a, FILE* f, const char* path)
|
||||
|
@ -210,7 +209,27 @@ void grib_dump_action_tree(grib_context* ctx, FILE* out)
|
|||
Assert(ctx->grib_reader);
|
||||
Assert(ctx->grib_reader->first);
|
||||
Assert(out);
|
||||
grib_dump_action_branch(out, ctx->grib_reader->first->root, 0);
|
||||
|
||||
// grib_dump_action_branch(out, ctx->grib_reader->first->root, 0);
|
||||
// grib_action* next = ctx->grib_reader->first->root;
|
||||
// while (next) {
|
||||
// fprintf(out, "Dump %s\n", next->name);
|
||||
// grib_dump_action_branch(out, next, 0);
|
||||
// next = next->next;
|
||||
// }
|
||||
|
||||
grib_action_file* fr = ctx->grib_reader->first;
|
||||
grib_action_file* fn = fr;
|
||||
while (fn) {
|
||||
fr = fn;
|
||||
fn = fn->next;
|
||||
grib_action* a = fr->root;
|
||||
while (a) {
|
||||
grib_action* na = a->next;
|
||||
grib_dump_action_branch(out, a, 0);
|
||||
a = na;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// void grib_xref_action_branch(FILE* out, grib_action* a, const char* path)
|
||||
|
|
|
@ -24,12 +24,9 @@ static grib_action_class _grib_action_class_NAME = {
|
|||
&init_class, /* init_class */
|
||||
&init, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
&xref, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
¬ify_change, /* notify_change */
|
||||
&reparse, /* reparse */
|
||||
&execute, /* execute */
|
||||
|
|
|
@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_alias = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
0, /* reparse */
|
||||
0, /* execute */
|
||||
|
|
|
@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_assert = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
¬ify_change, /* notify_change */
|
||||
0, /* reparse */
|
||||
&execute, /* execute */
|
||||
|
|
|
@ -50,12 +50,9 @@ static grib_action_class _grib_action_class_close = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
0, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
0, /* create_accessor*/
|
||||
|
||||
0, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
0, /* reparse */
|
||||
&execute, /* execute */
|
||||
|
@ -68,7 +65,7 @@ static void init_class(grib_action_class* c)
|
|||
}
|
||||
/* END_CLASS_IMP */
|
||||
|
||||
grib_action* grib_action_create_close(grib_context* context, char* filename)
|
||||
grib_action* grib_action_create_close(grib_context* context, const char* filename)
|
||||
{
|
||||
char buf[1024];
|
||||
grib_action_close* a;
|
||||
|
|
|
@ -67,12 +67,9 @@ static grib_action_class _grib_action_class_concept = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
0, /* create_accessor*/
|
||||
|
||||
0, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
0, /* reparse */
|
||||
0, /* execute */
|
||||
|
@ -187,15 +184,12 @@ grib_action* grib_action_create_concept(grib_context* context,
|
|||
|
||||
static void dump(grib_action* act, FILE* f, int lvl)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < lvl; i++)
|
||||
for (int i = 0; i < lvl; i++)
|
||||
grib_context_print(act->context, f, " ");
|
||||
|
||||
printf("concept(%s) { ", act->name);
|
||||
printf("\n");
|
||||
printf("concept(%s) { \n", act->name);
|
||||
|
||||
for (i = 0; i < lvl; i++)
|
||||
for (int i = 0; i < lvl; i++)
|
||||
grib_context_print(act->context, f, " ");
|
||||
printf("}\n");
|
||||
}
|
||||
|
@ -224,10 +218,9 @@ static grib_concept_value* get_concept_impl(grib_handle* h, grib_action_concept*
|
|||
char master[1024] = {0,};
|
||||
char local[1024] = {0,};
|
||||
char masterDir[1024] = {0,};
|
||||
size_t lenMasterDir = 1024;
|
||||
size_t lenMasterDir = sizeof(masterDir);
|
||||
char key[4096] = {0,};
|
||||
char* full = 0;
|
||||
int id;
|
||||
const size_t bufLen = sizeof(buf);
|
||||
const size_t keyLen = sizeof(key);
|
||||
|
||||
|
@ -240,7 +233,15 @@ static grib_concept_value* get_concept_impl(grib_handle* h, grib_action_concept*
|
|||
Assert(self->masterDir);
|
||||
grib_get_string(h, self->masterDir, masterDir, &lenMasterDir);
|
||||
|
||||
snprintf(buf, bufLen, "%s/%s", masterDir, self->basename);
|
||||
// See ECC-1920: The basename could be a key or a string
|
||||
char* basename = self->basename; // default is a string
|
||||
Assert(basename);
|
||||
char baseNameValue[1024] = {0,}; // its value if a key
|
||||
size_t lenBaseName = sizeof(baseNameValue);
|
||||
if (grib_get_string(h, self->basename, baseNameValue, &lenBaseName) == GRIB_SUCCESS) {
|
||||
basename = baseNameValue; // self->basename was a key whose value is baseNameValue
|
||||
}
|
||||
snprintf(buf, bufLen, "%s/%s", masterDir, basename);
|
||||
|
||||
grib_recompose_name(h, NULL, buf, master, 1);
|
||||
|
||||
|
@ -248,13 +249,13 @@ static grib_concept_value* get_concept_impl(grib_handle* h, grib_action_concept*
|
|||
char localDir[1024] = {0,};
|
||||
size_t lenLocalDir = 1024;
|
||||
grib_get_string(h, self->localDir, localDir, &lenLocalDir);
|
||||
snprintf(buf, bufLen, "%s/%s", localDir, self->basename);
|
||||
snprintf(buf, bufLen, "%s/%s", localDir, basename);
|
||||
grib_recompose_name(h, NULL, buf, local, 1);
|
||||
}
|
||||
|
||||
snprintf(key, keyLen, "%s%s", master, local);
|
||||
|
||||
id = grib_itrie_get_id(h->context->concepts_index, key);
|
||||
int id = grib_itrie_get_id(h->context->concepts_index, key);
|
||||
if ((c = h->context->concepts[id]) != NULL)
|
||||
return c;
|
||||
|
||||
|
@ -280,7 +281,7 @@ static grib_concept_value* get_concept_impl(grib_handle* h, grib_action_concept*
|
|||
else {
|
||||
grib_context_log(context, GRIB_LOG_FATAL,
|
||||
"unable to find definition file %s in %s:%s\nDefinition files path=\"%s\"",
|
||||
self->basename, master, local, context->grib_definition_files_path);
|
||||
basename, master, local, context->grib_definition_files_path);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,12 +61,9 @@ static grib_action_class _grib_action_class_gen = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
¬ify_change, /* notify_change */
|
||||
0, /* reparse */
|
||||
0, /* execute */
|
||||
|
|
|
@ -68,12 +68,9 @@ static grib_action_class _grib_action_class_hash_array = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
0, /* create_accessor*/
|
||||
|
||||
0, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
0, /* reparse */
|
||||
0, /* execute */
|
||||
|
|
|
@ -68,12 +68,9 @@ static grib_action_class _grib_action_class_if = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
&reparse, /* reparse */
|
||||
&execute, /* execute */
|
||||
|
|
|
@ -63,12 +63,9 @@ static grib_action_class _grib_action_class_list = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
&reparse, /* reparse */
|
||||
0, /* execute */
|
||||
|
|
|
@ -58,12 +58,9 @@ static grib_action_class _grib_action_class_meta = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
0, /* destroy */
|
||||
|
||||
&dump, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
0, /* create_accessor*/
|
||||
|
||||
0, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
0, /* reparse */
|
||||
&execute, /* execute */
|
||||
|
|
|
@ -56,12 +56,9 @@ static grib_action_class _grib_action_class_modify = {
|
|||
&init_class, /* init_class */
|
||||
0, /* init */
|
||||
&destroy, /* destroy */
|
||||
|
||||
0, /* dump */
|
||||
0, /* xref */
|
||||
|
||||
&create_accessor, /* create_accessor*/
|
||||
|
||||
&create_accessor, /* create_accessor */
|
||||
0, /* notify_change */
|
||||
0, /* reparse */
|
||||
0, /* execute */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue