mirror of https://github.com/ecmwf/eccodes.git
Fix broken regr. test grib-872.sh and merge develop
This commit is contained in:
commit
b4593b4449
|
@ -2,7 +2,7 @@
|
|||
# general configuration #
|
||||
#---------------------------------#
|
||||
|
||||
version: 2.14.0-{build}-{branch}
|
||||
version: 2.15.0-{build}-{branch}
|
||||
|
||||
branches:
|
||||
only:
|
||||
|
|
|
@ -64,6 +64,7 @@ endif()
|
|||
|
||||
ecbuild_debug("ECCODES_BIG_ENDIAN=${ECCODES_BIG_ENDIAN}")
|
||||
ecbuild_debug("ECCODES_LITTLE_ENDIAN=${ECCODES_LITTLE_ENDIAN}")
|
||||
ecbuild_info("Operating system=${CMAKE_SYSTEM} (${EC_OS_BITS} bits)")
|
||||
|
||||
###############################################################################
|
||||
# some variables/options of this project
|
||||
|
|
|
@ -1 +1 @@
|
|||
set( ${PROJECT_NAME}_VERSION_STR "2.14.0" )
|
||||
set( ${PROJECT_NAME}_VERSION_STR "2.15.0" )
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
17 dctb DCTB Duct base height (m)
|
||||
18 tplb TPLB Trapping layer base height (m)
|
||||
19 tplt TPLT Trapping layer top height (m)
|
||||
20 degm10l -10 degrees C isothermal level (m)
|
||||
21 fdir FDIR Total sky direct solar radiation at surface (J m**-2)
|
||||
22 cdir CDIR Clear-sky direct solar radiation at surface (J m**-2)
|
||||
23 cbh CBH Cloud base height (m)
|
||||
|
|
|
@ -9519,6 +9519,11 @@
|
|||
table2Version = 221 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'degm10l' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 20 ;
|
||||
}
|
||||
#Total sky direct solar radiation at surface
|
||||
'fdir' = {
|
||||
table2Version = 228 ;
|
||||
|
@ -9534,7 +9539,7 @@
|
|||
table2Version = 228 ;
|
||||
indicatorOfParameter = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
#0 degrees C isothermal level (atm)
|
||||
'deg0l' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 24 ;
|
||||
|
|
|
@ -9519,6 +9519,11 @@
|
|||
table2Version = 221 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'-10 degrees C isothermal level (atm)' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 20 ;
|
||||
}
|
||||
#Total sky direct solar radiation at surface
|
||||
'Total sky direct solar radiation at surface' = {
|
||||
table2Version = 228 ;
|
||||
|
@ -9534,8 +9539,8 @@
|
|||
table2Version = 228 ;
|
||||
indicatorOfParameter = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
'Zero degree level' = {
|
||||
#0 degrees C isothermal level (atm)
|
||||
'0 degrees C isothermal level (atm)' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 24 ;
|
||||
}
|
||||
|
|
|
@ -9519,6 +9519,11 @@
|
|||
table2Version = 221 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'228020' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 20 ;
|
||||
}
|
||||
#Total sky direct solar radiation at surface
|
||||
'228021' = {
|
||||
table2Version = 228 ;
|
||||
|
@ -9534,7 +9539,7 @@
|
|||
table2Version = 228 ;
|
||||
indicatorOfParameter = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
#0 degrees C isothermal level (atm)
|
||||
'228024' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 24 ;
|
||||
|
|
|
@ -9519,6 +9519,11 @@
|
|||
table2Version = 221 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'degm10l' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 20 ;
|
||||
}
|
||||
#Total sky direct solar radiation at surface
|
||||
'fdir' = {
|
||||
table2Version = 228 ;
|
||||
|
@ -9534,7 +9539,7 @@
|
|||
table2Version = 228 ;
|
||||
indicatorOfParameter = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
#0 degrees C isothermal level (atm)
|
||||
'deg0l' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 24 ;
|
||||
|
|
|
@ -9519,6 +9519,11 @@
|
|||
table2Version = 221 ;
|
||||
indicatorOfParameter = 56 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'm' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 20 ;
|
||||
}
|
||||
#Total sky direct solar radiation at surface
|
||||
'J m**-2' = {
|
||||
table2Version = 228 ;
|
||||
|
@ -9534,7 +9539,7 @@
|
|||
table2Version = 228 ;
|
||||
indicatorOfParameter = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
#0 degrees C isothermal level (atm)
|
||||
'm' = {
|
||||
table2Version = 228 ;
|
||||
indicatorOfParameter = 24 ;
|
||||
|
|
|
@ -196,3 +196,19 @@
|
|||
scaledValueOfFirstFixedSurface = 0 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'surface_net_downward_shortwave_flux_assuming_clear_sky' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 11 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'surface_net_downward_longwave_flux_assuming_clear_sky' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 5 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
|
|
|
@ -261,6 +261,22 @@
|
|||
parameterCategory = 14 ;
|
||||
parameterNumber = 1 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'ssrc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 11 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'strc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 5 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Specific cloud liquid water content
|
||||
'clwc' = {
|
||||
discipline = 0 ;
|
||||
|
@ -417,6 +433,18 @@
|
|||
}
|
||||
#Mean sea water potential temperature in the upper 300 m
|
||||
'mswpt300m' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 18 ;
|
||||
typeOfFirstFixedSurface = 160 ;
|
||||
typeOfSecondFixedSurface = 160 ;
|
||||
scaledValueOfFirstFixedSurface = 0 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
scaledValueOfSecondFixedSurface = 300 ;
|
||||
scaleFactorOfSecondFixedSurface = 0 ;
|
||||
}
|
||||
#Mean sea water temperature in the upper 300 m
|
||||
'mswt300m' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 15 ;
|
||||
|
@ -521,6 +549,24 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
aerosolType = 62003 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'degm10l' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 26315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#0 degrees C isothermal level (atm)
|
||||
'deg0l' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 27315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#10 metre wind gust in the last 3 hours
|
||||
'fg310' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -127,18 +127,6 @@
|
|||
parameterCategory = 128 ;
|
||||
parameterNumber = 185 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'surface_net_downward_shortwave_flux_assuming_clear_sky' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 210 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'surface_net_downward_longwave_flux_assuming_clear_sky' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 211 ;
|
||||
}
|
||||
#Temperature of snow layer
|
||||
'temperature_in_surface_snow' = {
|
||||
discipline = 192 ;
|
||||
|
|
|
@ -968,18 +968,6 @@
|
|||
parameterCategory = 128 ;
|
||||
parameterNumber = 209 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'ssrc' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 210 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'strc' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 211 ;
|
||||
}
|
||||
#TOA incident solar radiation
|
||||
'tisr' = {
|
||||
discipline = 192 ;
|
||||
|
@ -13295,12 +13283,6 @@
|
|||
parameterCategory = 228 ;
|
||||
parameterNumber = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
'deg0l' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 228 ;
|
||||
parameterNumber = 24 ;
|
||||
}
|
||||
#Horizontal visibility
|
||||
'hvis' = {
|
||||
discipline = 192 ;
|
||||
|
|
|
@ -968,18 +968,6 @@
|
|||
parameterCategory = 128 ;
|
||||
parameterNumber = 209 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'Surface net solar radiation, clear sky' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 210 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'Surface net thermal radiation, clear sky' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 211 ;
|
||||
}
|
||||
#TOA incident solar radiation
|
||||
'TOA incident solar radiation' = {
|
||||
discipline = 192 ;
|
||||
|
@ -13295,12 +13283,6 @@
|
|||
parameterCategory = 228 ;
|
||||
parameterNumber = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
'Zero degree level' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 228 ;
|
||||
parameterNumber = 24 ;
|
||||
}
|
||||
#Horizontal visibility
|
||||
'Horizontal visibility' = {
|
||||
discipline = 192 ;
|
||||
|
|
|
@ -968,18 +968,6 @@
|
|||
parameterCategory = 128 ;
|
||||
parameterNumber = 209 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'210' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 210 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'211' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 211 ;
|
||||
}
|
||||
#TOA incident solar radiation
|
||||
'212' = {
|
||||
discipline = 192 ;
|
||||
|
@ -13295,12 +13283,6 @@
|
|||
parameterCategory = 228 ;
|
||||
parameterNumber = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
'228024' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 228 ;
|
||||
parameterNumber = 24 ;
|
||||
}
|
||||
#Horizontal visibility
|
||||
'228025' = {
|
||||
discipline = 192 ;
|
||||
|
|
|
@ -968,18 +968,6 @@
|
|||
parameterCategory = 128 ;
|
||||
parameterNumber = 209 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'ssrc' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 210 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'strc' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 211 ;
|
||||
}
|
||||
#TOA incident solar radiation
|
||||
'tisr' = {
|
||||
discipline = 192 ;
|
||||
|
@ -13295,12 +13283,6 @@
|
|||
parameterCategory = 228 ;
|
||||
parameterNumber = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
'deg0l' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 228 ;
|
||||
parameterNumber = 24 ;
|
||||
}
|
||||
#Horizontal visibility
|
||||
'hvis' = {
|
||||
discipline = 192 ;
|
||||
|
|
|
@ -968,18 +968,6 @@
|
|||
parameterCategory = 128 ;
|
||||
parameterNumber = 209 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'J m**-2' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 210 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'J m**-2' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 128 ;
|
||||
parameterNumber = 211 ;
|
||||
}
|
||||
#TOA incident solar radiation
|
||||
'J m**-2' = {
|
||||
discipline = 192 ;
|
||||
|
@ -13295,12 +13283,6 @@
|
|||
parameterCategory = 228 ;
|
||||
parameterNumber = 23 ;
|
||||
}
|
||||
#Zero degree level
|
||||
'm' = {
|
||||
discipline = 192 ;
|
||||
parameterCategory = 228 ;
|
||||
parameterNumber = 24 ;
|
||||
}
|
||||
#Horizontal visibility
|
||||
'm' = {
|
||||
discipline = 192 ;
|
||||
|
|
|
@ -101,8 +101,8 @@
|
|||
parameterCategory = 1 ;
|
||||
parameterNumber = 205 ;
|
||||
}
|
||||
#Water equivalent of accumulated snow depth
|
||||
'Water equivalent of accumulated snow depth' = {
|
||||
#Water equivalent of accumulated snow depth (deprecated)
|
||||
'Water equivalent of accumulated snow depth (deprecated)' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 11 ;
|
||||
|
@ -1648,4 +1648,4 @@
|
|||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 8 ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
parameterCategory = 1 ;
|
||||
parameterNumber = 205 ;
|
||||
}
|
||||
#Water equivalent of accumulated snow depth
|
||||
#Water equivalent of accumulated snow depth (deprecated)
|
||||
'260056' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
|
@ -1648,4 +1648,4 @@
|
|||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 8 ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
parameterCategory = 1 ;
|
||||
parameterNumber = 205 ;
|
||||
}
|
||||
#Water equivalent of accumulated snow depth
|
||||
#Water equivalent of accumulated snow depth (deprecated)
|
||||
'sdwe' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
|
@ -1648,4 +1648,4 @@
|
|||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
parameterNumber = 8 ;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
parameterCategory = 1 ;
|
||||
parameterNumber = 205 ;
|
||||
}
|
||||
#Water equivalent of accumulated snow depth
|
||||
#Water equivalent of accumulated snow depth (deprecated)
|
||||
'kg m**-2' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 1 ;
|
||||
|
|
|
@ -261,6 +261,22 @@
|
|||
parameterCategory = 14 ;
|
||||
parameterNumber = 1 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'Surface net solar radiation, clear sky' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 11 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'Surface net thermal radiation, clear sky' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 5 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Specific cloud liquid water content
|
||||
'Specific cloud liquid water content' = {
|
||||
discipline = 0 ;
|
||||
|
@ -417,6 +433,18 @@
|
|||
}
|
||||
#Mean sea water potential temperature in the upper 300 m
|
||||
'Mean sea water potential temperature in the upper 300 m' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 18 ;
|
||||
typeOfFirstFixedSurface = 160 ;
|
||||
typeOfSecondFixedSurface = 160 ;
|
||||
scaledValueOfFirstFixedSurface = 0 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
scaledValueOfSecondFixedSurface = 300 ;
|
||||
scaleFactorOfSecondFixedSurface = 0 ;
|
||||
}
|
||||
#Mean sea water temperature in the upper 300 m
|
||||
'Mean sea water temperature in the upper 300 m' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 15 ;
|
||||
|
@ -521,6 +549,24 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfSecondFixedSurface = 8 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'-10 degrees C isothermal level (atm)' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 26315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#0 degrees C isothermal level (atm)
|
||||
'0 degrees C isothermal level (atm)' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 27315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#10 metre wind gust in the last 3 hours
|
||||
'10 metre wind gust in the last 3 hours' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -261,6 +261,22 @@
|
|||
parameterCategory = 14 ;
|
||||
parameterNumber = 1 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'210' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 11 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'211' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 5 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Specific cloud liquid water content
|
||||
'246' = {
|
||||
discipline = 0 ;
|
||||
|
@ -416,6 +432,18 @@
|
|||
scaleFactorOfLowerLimit = 0 ;
|
||||
}
|
||||
#Mean sea water potential temperature in the upper 300 m
|
||||
'151126' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 18 ;
|
||||
typeOfFirstFixedSurface = 160 ;
|
||||
typeOfSecondFixedSurface = 160 ;
|
||||
scaledValueOfFirstFixedSurface = 0 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
scaledValueOfSecondFixedSurface = 300 ;
|
||||
scaleFactorOfSecondFixedSurface = 0 ;
|
||||
}
|
||||
#Mean sea water temperature in the upper 300 m
|
||||
'151127' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
|
@ -521,6 +549,24 @@
|
|||
aerosolType = 62003 ;
|
||||
is_aerosol = 1 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'228020' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 26315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#0 degrees C isothermal level (atm)
|
||||
'228024' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 27315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#10 metre wind gust in the last 3 hours
|
||||
'228028' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -126,9 +126,9 @@ if ( ((section1Length > 21) or setCalendarId > 0) and deleteCalendarId == 0) {
|
|||
}
|
||||
|
||||
concept is_uerra(zero) {
|
||||
'1' = {productionStatusOfProcessedData=9;}
|
||||
'1' = {productionStatusOfProcessedData=8;}
|
||||
'1' = {productionStatusOfProcessedData=10;}
|
||||
'1' = {productionStatusOfProcessedData=11;}
|
||||
'1' = {productionStatusOfProcessedData=9;}
|
||||
'1' = {productionStatusOfProcessedData=8;}
|
||||
'0' = {dummy=1;}
|
||||
}
|
||||
|
|
|
@ -261,6 +261,22 @@
|
|||
parameterCategory = 14 ;
|
||||
parameterNumber = 1 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'ssrc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 11 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'strc' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 5 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Specific cloud liquid water content
|
||||
'clwc' = {
|
||||
discipline = 0 ;
|
||||
|
@ -417,6 +433,18 @@
|
|||
}
|
||||
#Mean sea water potential temperature in the upper 300 m
|
||||
'mswpt300m' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 18 ;
|
||||
typeOfFirstFixedSurface = 160 ;
|
||||
typeOfSecondFixedSurface = 160 ;
|
||||
scaledValueOfFirstFixedSurface = 0 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
scaledValueOfSecondFixedSurface = 300 ;
|
||||
scaleFactorOfSecondFixedSurface = 0 ;
|
||||
}
|
||||
#Mean sea water temperature in the upper 300 m
|
||||
'mswt300m' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 15 ;
|
||||
|
@ -521,6 +549,24 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
aerosolType = 62003 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'degm10l' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 26315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#0 degrees C isothermal level (atm)
|
||||
'deg0l' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 27315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#10 metre wind gust in the last 3 hours
|
||||
'10fg3' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -261,6 +261,22 @@
|
|||
parameterCategory = 14 ;
|
||||
parameterNumber = 1 ;
|
||||
}
|
||||
#Surface net solar radiation, clear sky
|
||||
'J m**-2' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 11 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Surface net thermal radiation, clear sky
|
||||
'J m**-2' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 5 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfStatisticalProcessing = 1 ;
|
||||
}
|
||||
#Specific cloud liquid water content
|
||||
'kg kg**-1' = {
|
||||
discipline = 0 ;
|
||||
|
@ -416,6 +432,18 @@
|
|||
typeOfStatisticalProcessing = 10 ;
|
||||
}
|
||||
#Mean sea water potential temperature in the upper 300 m
|
||||
'K' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
parameterNumber = 18 ;
|
||||
typeOfFirstFixedSurface = 160 ;
|
||||
typeOfSecondFixedSurface = 160 ;
|
||||
scaledValueOfFirstFixedSurface = 0 ;
|
||||
scaleFactorOfFirstFixedSurface = 0 ;
|
||||
scaledValueOfSecondFixedSurface = 300 ;
|
||||
scaleFactorOfSecondFixedSurface = 0 ;
|
||||
}
|
||||
#Mean sea water temperature in the upper 300 m
|
||||
'K' = {
|
||||
discipline = 10 ;
|
||||
parameterCategory = 4 ;
|
||||
|
@ -521,6 +549,24 @@
|
|||
typeOfFirstFixedSurface = 1 ;
|
||||
typeOfSecondFixedSurface = 8 ;
|
||||
}
|
||||
#-10 degrees C isothermal level (atm)
|
||||
'm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 26315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#0 degrees C isothermal level (atm)
|
||||
'm' = {
|
||||
discipline = 0 ;
|
||||
parameterCategory = 3 ;
|
||||
parameterNumber = 6 ;
|
||||
typeOfFirstFixedSurface = 20 ;
|
||||
scaledValueOfFirstFixedSurface = 27315 ;
|
||||
scaleFactorOfFirstFixedSurface = 2 ;
|
||||
}
|
||||
#10 metre wind gust in the last 3 hours
|
||||
'm s**-1' = {
|
||||
discipline = 0 ;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* Description: How to decode GRIB messages containing multiple
|
||||
* fields. Try to turn on and off multi support to
|
||||
* see the difference. Default is OFF.
|
||||
* For all the tools defalut is multi support ON.
|
||||
* For all the tools default is multi support ON.
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -29,8 +29,8 @@ int main()
|
|||
}
|
||||
|
||||
for (i=0; i<ni*nj; i++) {
|
||||
double r = rand();
|
||||
values[i] = 10*r;
|
||||
double r = rand() * 1.0 / RAND_MAX;
|
||||
values[i] = r;
|
||||
}
|
||||
|
||||
h = codes_grib_handle_new_from_samples(0, "GRIB1");
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* Description: How to decode grib messages containing multiple
|
||||
* fields. Try to turn on and off multi support to
|
||||
* see the difference. Default is OFF.
|
||||
* For all the tools defalut is multi support ON.
|
||||
* For all the tools default is multi support ON.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
|
|
@ -13,7 +13,7 @@ C
|
|||
C Description: How to decode grib messages containing multiple
|
||||
C fields. Try to turn on and off multi support to
|
||||
C see the difference. Default is OFF.
|
||||
C For all the tools defalut is multi support ON.
|
||||
C For all the tools default is multi support ON.
|
||||
C
|
||||
C
|
||||
C
|
||||
|
|
128
license.pl
128
license.pl
|
@ -1,128 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
use strict;
|
||||
|
||||
my $APACHE = <<"EOF";
|
||||
Copyright 2005-2019 ECMWF.
|
||||
|
||||
This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
|
||||
In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
EOF
|
||||
|
||||
my $LGPL = <<"EOF";
|
||||
Copyright 2005-2007 ECMWF
|
||||
|
||||
Licensed under the GNU Lesser General Public License which
|
||||
incorporates the terms and conditions of version 3 of the GNU
|
||||
General Public License.
|
||||
See LICENSE and gpl-3.0.txt for details.
|
||||
EOF
|
||||
|
||||
my $GPL = <<"EOF";
|
||||
Copyright 2005-2007 ECMWF
|
||||
|
||||
Licensed under the GNU General Public License version 3.
|
||||
See LICENSE for details.
|
||||
EOF
|
||||
|
||||
|
||||
my $LICENSE = $APACHE;
|
||||
|
||||
my %COMMENTS = (
|
||||
|
||||
java => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
xml => { start => "<!--\n", end => "-->\n\n" , after => "\<\?xml[^<]*\>" },
|
||||
# xsd => { start => "<!--\n", end => "-->\n\n" },
|
||||
# jsp => { start => "<!--\n", end => "-->\n\n" },
|
||||
sh => { comment => "# ", end => "\n", after => "^#!/.*\n" },
|
||||
pl => { comment => "# ", end => "\n", after => "^#!/.*\n" },
|
||||
js => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
c => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
h => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
l => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
y => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
css => { start => "/**\n" , end => "*/\n\n" , comment => "* " },
|
||||
sql => { comment => "-- ", end => "\n" },
|
||||
properties => { comment => "# ", end => "\n" },
|
||||
def => { comment => "# ", end => "\n" },
|
||||
F => { comment => "C ", end => "C\n\n " },
|
||||
f => { comment => "C ", end => "C\n\n" },
|
||||
|
||||
);
|
||||
|
||||
|
||||
foreach my $file ( @ARGV )
|
||||
{
|
||||
my $doit=1;
|
||||
|
||||
$file =~ /\.(\w+)/;
|
||||
my $ext = $1;
|
||||
|
||||
my $c = $COMMENTS{$ext};
|
||||
|
||||
unless($c)
|
||||
{
|
||||
print "$file: unsupported extension. File ignored\n";
|
||||
next;
|
||||
}
|
||||
|
||||
open(IN,"<$file") or die "$file: $!";
|
||||
my @text = <IN>;
|
||||
close(IN);
|
||||
|
||||
if(join("",@text) =~ /Licensed under the/gs)
|
||||
{
|
||||
print "$file: License already stated. File ignored\n";
|
||||
next;
|
||||
}
|
||||
|
||||
open(OUT,">$file.tmp") or die "$file.tmp: $!";
|
||||
|
||||
if($c->{after})
|
||||
{
|
||||
my @x;
|
||||
my $re = $c->{after};
|
||||
loop: while(@text)
|
||||
{
|
||||
if($text[0] =~ m/$re/)
|
||||
{
|
||||
print OUT @x, shift @text;
|
||||
@x = ();
|
||||
last loop;
|
||||
}
|
||||
push @x,shift @text;
|
||||
}
|
||||
@text = (@x,@text);
|
||||
}
|
||||
|
||||
print OUT $c->{start};
|
||||
foreach my $line ( split("\n",$LICENSE) )
|
||||
{
|
||||
print OUT $c->{comment}, $line,"\n";
|
||||
}
|
||||
print OUT $c->{end};
|
||||
|
||||
print OUT @text;
|
||||
close(OUT) or die "$file: $!";
|
||||
|
||||
if($doit) {
|
||||
use File::Copy qw(cp);
|
||||
use File::Compare qw(compare_text compare);
|
||||
|
||||
if(compare_text("$file.tmp",$file)) {
|
||||
print "UPDATING file $file\n";
|
||||
system("p4 edit $file") unless(-w $file);
|
||||
cp($file,"$file.old") or die "cp($file,$file.old): $!";
|
||||
cp("$file.tmp",$file) or die "cp($file.tmp,$file): $!";
|
||||
}
|
||||
} else {
|
||||
print "IGNORING file $file\n";
|
||||
}
|
||||
|
||||
unlink("$file.tmp");
|
||||
|
||||
|
||||
}
|
||||
|
2
memfs.py
2
memfs.py
|
@ -38,7 +38,7 @@ for directory in dirs:
|
|||
for dirpath, dirnames, files in os.walk(directory, followlinks=True):
|
||||
for ex in EXCLUDED:
|
||||
if ex in dirnames:
|
||||
print('Note: %s/%s will not be included.' % (dirpath,ex))
|
||||
print('Note: eccodes memfs.py script: %s/%s will not be included.' % (dirpath,ex))
|
||||
|
||||
# Prune the walk by modifying the dirnames in-place
|
||||
dirnames[:] = [dirname for dirname in dirnames if dirname not in EXCLUDED]
|
||||
|
|
|
@ -371,7 +371,6 @@ list( APPEND grib_api_srcs
|
|||
grib_dumper_class.h
|
||||
grib_dumper_factory.h
|
||||
grib_emoslib.h
|
||||
grib_expression.h
|
||||
grib_iterator_class.h
|
||||
grib_iterator_factory.h
|
||||
grib_nearest_class.h
|
||||
|
|
|
@ -406,7 +406,6 @@ noinst_HEADERS = grib_api_internal.h \
|
|||
grib_dumper_factory.h \
|
||||
grib_accessor_class.h \
|
||||
grib_accessor_factory.h \
|
||||
grib_expression.h \
|
||||
grib_nearest_class.h \
|
||||
grib_nearest_factory.h \
|
||||
grib_box_class.h \
|
||||
|
|
|
@ -79,81 +79,81 @@ static void init_class(grib_action_class* c)
|
|||
|
||||
grib_action* grib_action_create_assert( grib_context* context, grib_expression* expression)
|
||||
{
|
||||
grib_action_assert* a = NULL;
|
||||
grib_action_class* c = grib_action_class_assert;
|
||||
grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context,c->size);
|
||||
act->next = NULL;
|
||||
act->name = grib_context_strdup_persistent(context, "assertion");
|
||||
act->op = grib_context_strdup_persistent(context, "evaluate");
|
||||
act->cclass = c;
|
||||
act->context = context;
|
||||
a = (grib_action_assert*)act;
|
||||
a->expression = expression;
|
||||
return act;
|
||||
grib_action_assert* a = NULL;
|
||||
grib_action_class* c = grib_action_class_assert;
|
||||
grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context,c->size);
|
||||
act->next = NULL;
|
||||
act->name = grib_context_strdup_persistent(context, "assertion");
|
||||
act->op = grib_context_strdup_persistent(context, "evaluate");
|
||||
act->cclass = c;
|
||||
act->context = context;
|
||||
a = (grib_action_assert*)act;
|
||||
a->expression = expression;
|
||||
return act;
|
||||
}
|
||||
|
||||
static int create_accessor(grib_section* p, grib_action* act,grib_loader *h)
|
||||
{
|
||||
grib_action_assert* self = (grib_action_assert*)act;
|
||||
grib_accessor* as = grib_accessor_factory(p, act,0,NULL);
|
||||
if(!as)return GRIB_INTERNAL_ERROR;
|
||||
grib_dependency_observe_expression(as,self->expression);
|
||||
grib_action_assert* self = (grib_action_assert*)act;
|
||||
grib_accessor* as = grib_accessor_factory(p, act,0,NULL);
|
||||
if(!as)return GRIB_INTERNAL_ERROR;
|
||||
grib_dependency_observe_expression(as,self->expression);
|
||||
|
||||
grib_push_accessor(as,p->block);
|
||||
grib_push_accessor(as,p->block);
|
||||
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
static void dump( grib_action* act, FILE* f, int lvl)
|
||||
{
|
||||
int i =0;
|
||||
grib_action_assert* self=(grib_action_assert*)act;
|
||||
for (i=0;i<lvl;i++)
|
||||
grib_context_print(act->context,f," ");
|
||||
grib_expression_print(act->context,self->expression,0);
|
||||
printf("\n");
|
||||
int i =0;
|
||||
grib_action_assert* self=(grib_action_assert*)act;
|
||||
for (i=0;i<lvl;i++)
|
||||
grib_context_print(act->context,f," ");
|
||||
grib_expression_print(act->context,self->expression,0);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
static void destroy(grib_context* context,grib_action* act)
|
||||
{
|
||||
grib_action_assert* a = ( grib_action_assert*)act;
|
||||
grib_expression_free(context,a->expression);
|
||||
grib_context_free_persistent(context, act->name);
|
||||
grib_context_free_persistent(context, act->op);
|
||||
grib_action_assert* a = ( grib_action_assert*)act;
|
||||
grib_expression_free(context,a->expression);
|
||||
grib_context_free_persistent(context, act->name);
|
||||
grib_context_free_persistent(context, act->op);
|
||||
}
|
||||
|
||||
static int execute(grib_action* a,grib_handle* h) {
|
||||
int ret=0;
|
||||
double res=0;
|
||||
grib_action_assert* self= (grib_action_assert*)a;
|
||||
static int execute(grib_action* a,grib_handle* h)
|
||||
{
|
||||
int ret=0;
|
||||
double res=0;
|
||||
grib_action_assert* self= (grib_action_assert*)a;
|
||||
|
||||
if ((ret=grib_expression_evaluate_double(h,self->expression,&res)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
if ((ret=grib_expression_evaluate_double(h,self->expression,&res)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
|
||||
if (res != 0)
|
||||
return GRIB_SUCCESS;
|
||||
else {
|
||||
grib_context_log(h->context,GRIB_LOG_ERROR,"Assertion failure: ");
|
||||
grib_expression_print(h->context,self->expression,h);
|
||||
printf("\n");
|
||||
return GRIB_ASSERTION_FAILURE;
|
||||
}
|
||||
if (res != 0) {
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
else {
|
||||
grib_context_log(h->context,GRIB_LOG_ERROR,"Assertion failure: ");
|
||||
grib_expression_print(h->context,self->expression,h);
|
||||
printf("\n");
|
||||
return GRIB_ASSERTION_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
static int notify_change(grib_action* a, grib_accessor* observer,grib_accessor* observed)
|
||||
{
|
||||
grib_action_assert* self = (grib_action_assert*) a;
|
||||
grib_action_assert* self = (grib_action_assert*) a;
|
||||
|
||||
int ret = GRIB_SUCCESS;
|
||||
long lres;
|
||||
int ret = GRIB_SUCCESS;
|
||||
long lres;
|
||||
|
||||
if ((ret = grib_expression_evaluate_long(grib_handle_of_accessor(observed), self->expression,&lres))
|
||||
!= GRIB_SUCCESS) return ret;
|
||||
if ((ret = grib_expression_evaluate_long(grib_handle_of_accessor(observed), self->expression,&lres))
|
||||
!= GRIB_SUCCESS) return ret;
|
||||
|
||||
|
||||
if (lres != 0)
|
||||
return GRIB_SUCCESS;
|
||||
else
|
||||
return GRIB_ASSERTION_FAILURE;
|
||||
if (lres != 0)
|
||||
return GRIB_SUCCESS;
|
||||
else
|
||||
return GRIB_ASSERTION_FAILURE;
|
||||
}
|
||||
|
|
|
@ -72,57 +72,54 @@ static void init_class(grib_action_class* c)
|
|||
|
||||
grib_action* grib_action_create_close( grib_context* context, char* filename)
|
||||
{
|
||||
char buf[1024];
|
||||
char buf[1024];
|
||||
|
||||
grib_action_close* a ;
|
||||
grib_action_class* c = grib_action_class_close;
|
||||
grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context,c->size);
|
||||
act->op = grib_context_strdup_persistent(context,"section");
|
||||
grib_action_close* a ;
|
||||
grib_action_class* c = grib_action_class_close;
|
||||
grib_action* act = (grib_action*)grib_context_malloc_clear_persistent(context,c->size);
|
||||
act->op = grib_context_strdup_persistent(context,"section");
|
||||
|
||||
act->cclass = c;
|
||||
a = (grib_action_close*)act;
|
||||
act->context = context;
|
||||
act->cclass = c;
|
||||
a = (grib_action_close*)act;
|
||||
act->context = context;
|
||||
|
||||
a->filename = grib_context_strdup_persistent(context,filename);
|
||||
a->filename = grib_context_strdup_persistent(context,filename);
|
||||
|
||||
sprintf(buf,"close_%p",(void*)a->filename);
|
||||
sprintf(buf,"close_%p",(void*)a->filename);
|
||||
|
||||
act->name = grib_context_strdup_persistent(context,buf);
|
||||
act->name = grib_context_strdup_persistent(context,buf);
|
||||
|
||||
return act;
|
||||
return act;
|
||||
}
|
||||
|
||||
static int execute(grib_action* act, grib_handle *h)
|
||||
{
|
||||
char filename[2048]={0,};
|
||||
size_t len=2048;
|
||||
grib_action_close* self = (grib_action_close*) act;
|
||||
int err =0;
|
||||
grib_file* file=0;
|
||||
char filename[2048]={0,};
|
||||
size_t len=2048;
|
||||
grib_action_close* self = (grib_action_close*) act;
|
||||
int err =0;
|
||||
grib_file* file=0;
|
||||
|
||||
err=grib_get_string(h,self->filename,filename,&len);
|
||||
/* fprintf(stderr,"++++ name %s\n",filename); */
|
||||
if (err) return err;
|
||||
/* grib_file_close(filename,1,&err); */
|
||||
file=grib_get_file(filename,&err);
|
||||
if (err) return err;
|
||||
if (file) grib_file_pool_delete_file(file);
|
||||
err=grib_get_string(h,self->filename,filename,&len);
|
||||
/* fprintf(stderr,"++++ name %s\n",filename); */
|
||||
if (err) return err;
|
||||
/* grib_file_close(filename,1,&err); */
|
||||
file=grib_get_file(filename,&err);
|
||||
if (err) return err;
|
||||
if (file) grib_file_pool_delete_file(file);
|
||||
|
||||
return err;
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
static void dump(grib_action* act, FILE* f, int lvl)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static void destroy(grib_context* context,grib_action* act)
|
||||
{
|
||||
grib_action_close* a = (grib_action_close*) act;
|
||||
|
||||
grib_context_free_persistent(context, a->filename);
|
||||
grib_context_free_persistent(context, act->name);
|
||||
grib_context_free_persistent(context, act->op);
|
||||
grib_action_close* a = (grib_action_close*) act;
|
||||
|
||||
grib_context_free_persistent(context, a->filename);
|
||||
grib_context_free_persistent(context, act->name);
|
||||
grib_context_free_persistent(context, act->op);
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ int codes_bufr_keys_iterator_rewind(bufr_keys_iterator* ki)
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
static int is_ident_key(bufr_keys_iterator* kiter)
|
||||
static int is_ident_key(const bufr_keys_iterator* kiter)
|
||||
{
|
||||
if (kiter->current->sub_section)
|
||||
return 0;
|
||||
|
@ -200,8 +200,9 @@ int codes_bufr_keys_iterator_next(bufr_keys_iterator* kiter)
|
|||
|
||||
/* The return value is constructed so we allocate memory for it. */
|
||||
/* We free in codes_bufr_keys_iterator_delete() */
|
||||
char* codes_bufr_keys_iterator_get_name(bufr_keys_iterator* kiter)
|
||||
char* codes_bufr_keys_iterator_get_name(const bufr_keys_iterator* ckiter)
|
||||
{
|
||||
bufr_keys_iterator* kiter = (bufr_keys_iterator*)ckiter;
|
||||
int *r=0;
|
||||
char* ret=0;
|
||||
grib_context* c = kiter->handle->context;
|
||||
|
|
100
src/bufr_util.c
100
src/bufr_util.c
|
@ -141,9 +141,6 @@ static int bufr_extract_edition(const void* message, long* edition)
|
|||
/* The ECMWF BUFR local use section */
|
||||
static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes_bufr_header* hdr)
|
||||
{
|
||||
const long nbits_section2Length = 3*8;
|
||||
long pos_section2Length = offset_section2*8;
|
||||
|
||||
long nbits_rdbType = 1*8;
|
||||
long pos_rdbType = (offset_section2+4)*8;
|
||||
long nbits_oldSubtype = 1*8;
|
||||
|
@ -165,7 +162,6 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes
|
|||
|
||||
DebugAssert(hdr->localSectionPresent);
|
||||
|
||||
hdr->section2Length = grib_decode_unsigned_long(message, &pos_section2Length, nbits_section2Length);
|
||||
hdr->rdbType = (long)grib_decode_unsigned_long(message, &pos_rdbType, nbits_rdbType);
|
||||
hdr->oldSubtype = (long)grib_decode_unsigned_long(message, &pos_oldSubtype, nbits_oldSubtype);
|
||||
|
||||
|
@ -204,16 +200,14 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes
|
|||
static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2, codes_bufr_header* hdr)
|
||||
{
|
||||
size_t i = 0;
|
||||
|
||||
int isSatelliteType = 0;
|
||||
int isSatellite = 0;
|
||||
long start = 0;
|
||||
const long offset_keyData = offset_section2 + 6;
|
||||
const long offset_keyMore = offset_section2 + 19; /* 8 bytes long */
|
||||
const long offset_keySat = offset_section2 + 27; /* 9 bytes long */
|
||||
|
||||
/*const long offset_keyData = offset_section2 + 6;*/
|
||||
const long offset_keyMore = offset_section2 + 19;
|
||||
/*const long offset_keySat = offset_section2 + 27;*/
|
||||
|
||||
/*unsigned char* p = (unsigned char*)message + offset_keyData;*/
|
||||
char* q = (char*)message + offset_keyMore;
|
||||
unsigned char* pKeyData = (unsigned char*)message + offset_keyData;
|
||||
char* pKeyMore = (char*)message + offset_keyMore;
|
||||
|
||||
DebugAssert(hdr->localSectionPresent);
|
||||
|
||||
|
@ -221,15 +215,57 @@ static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2,
|
|||
isSatelliteType = 1;
|
||||
}
|
||||
if (isSatelliteType || hdr->numberOfSubsets > 1) {
|
||||
isSatellite = 1;
|
||||
hdr->isSatellite = 1;
|
||||
} else {
|
||||
isSatellite = 0;
|
||||
hdr->isSatellite = 0;
|
||||
}
|
||||
|
||||
if (hdr->isSatellite) {
|
||||
unsigned char* pKeyMoreLong = (unsigned char*)message + offset_keyMore; /* as an integer */
|
||||
unsigned char* pKeySat = (unsigned char*)message + offset_keySat;
|
||||
long lValue = 0;
|
||||
start = 40;
|
||||
lValue = (long)grib_decode_unsigned_long(pKeyData, &start, 26);
|
||||
hdr->localLongitude1 = (lValue - 18000000.0)/100000.0;
|
||||
start = 72;
|
||||
lValue = (long)grib_decode_unsigned_long(pKeyData, &start, 25);
|
||||
hdr->localLatitude1 = (lValue - 9000000.0)/100000.0;
|
||||
start = 0;
|
||||
lValue = (long)grib_decode_unsigned_long(pKeyMoreLong, &start, 26);
|
||||
hdr->localLongitude2 = (lValue -18000000.0)/100000.0;
|
||||
start = 32;
|
||||
lValue = (long)grib_decode_unsigned_long(pKeyMoreLong, &start, 25);
|
||||
hdr->localLatitude2 = (lValue - 9000000)/100000.0;
|
||||
|
||||
if (hdr->oldSubtype == 255 || hdr->numberOfSubsets > 255 ||
|
||||
(hdr->oldSubtype >= 121 && hdr->oldSubtype <= 130) ||
|
||||
hdr->oldSubtype==31)
|
||||
{
|
||||
start = 0;
|
||||
hdr->localNumberOfObservations = (long)grib_decode_unsigned_long(pKeySat, &start, 16);
|
||||
start = 16;
|
||||
hdr->satelliteID = (long)grib_decode_unsigned_long(pKeySat, &start, 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
start = 0;
|
||||
hdr->localNumberOfObservations = (long)grib_decode_unsigned_long(pKeySat, &start, 8);
|
||||
start = 8;
|
||||
hdr->satelliteID = (long)grib_decode_unsigned_long(pKeySat, &start, 16);
|
||||
}
|
||||
}
|
||||
else {
|
||||
long lValue = 0;
|
||||
start = 72;
|
||||
lValue = (long)grib_decode_unsigned_long(pKeyData, &start, 25);
|
||||
hdr->localLatitude = (lValue -9000000.0)/100000.0;
|
||||
start = 40;
|
||||
lValue = (long)grib_decode_unsigned_long(pKeyData, &start, 26);
|
||||
hdr->localLongitude = (lValue - 18000000.0)/100000.0;
|
||||
|
||||
if (!isSatellite) {
|
||||
/* interpret keyMore as a string */
|
||||
for (i=0; i<8; ++i) {
|
||||
hdr->ident[i] = *q++;
|
||||
hdr->ident[i] = *pKeyMore++;
|
||||
}
|
||||
hdr->ident[i] = '\0';
|
||||
}
|
||||
|
@ -260,6 +296,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr)
|
|||
long nbits_updateSequenceNumber = 1*8;
|
||||
long pos_updateSequenceNumber = 14*8;
|
||||
|
||||
long section1Flags = 0;
|
||||
long nbits_section1Flags = 1*8;
|
||||
long pos_section1Flags = 15*8;
|
||||
|
||||
|
@ -290,6 +327,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr)
|
|||
long nbits_typicalMinute = 1*8;
|
||||
long pos_typicalMinute = 24*8;
|
||||
|
||||
long section2Length = 0;
|
||||
long offset_section2 = 0;
|
||||
long offset_section3 = 0;
|
||||
long nbits_numberOfSubsets = 2*8;
|
||||
|
@ -305,7 +343,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr)
|
|||
hdr->bufrHeaderSubCentre = (long)grib_decode_unsigned_long(message, &pos_bufrHeaderSubCentre, nbits_bufrHeaderSubCentre);
|
||||
hdr->bufrHeaderCentre = (long)grib_decode_unsigned_long(message, &pos_bufrHeaderCentre, nbits_bufrHeaderCentre);
|
||||
hdr->updateSequenceNumber = (long)grib_decode_unsigned_long(message, &pos_updateSequenceNumber, nbits_updateSequenceNumber);
|
||||
hdr->section1Flags = (long)grib_decode_unsigned_long(message, &pos_section1Flags, nbits_section1Flags);
|
||||
section1Flags = (long)grib_decode_unsigned_long(message, &pos_section1Flags, nbits_section1Flags);
|
||||
hdr->dataCategory = (long)grib_decode_unsigned_long(message, &pos_dataCategory, nbits_dataCategory);
|
||||
hdr->dataSubCategory = (long)grib_decode_unsigned_long(message, &pos_dataSubCategory, nbits_dataSubCategory);
|
||||
hdr->masterTablesVersionNumber = (long)grib_decode_unsigned_long(
|
||||
|
@ -318,21 +356,21 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr)
|
|||
hdr->typicalMinute = (long)grib_decode_unsigned_long(message, &pos_typicalMinute, nbits_typicalMinute);
|
||||
|
||||
offset_section2 = BUFR_SECTION0_LEN + section1Length; /*bytes*/
|
||||
hdr->section2Length = 0;
|
||||
hdr->localSectionPresent = (hdr->section1Flags != 0);
|
||||
section2Length = 0;
|
||||
hdr->localSectionPresent = (section1Flags != 0);
|
||||
if (hdr->localSectionPresent) {
|
||||
long pos_section2Length;
|
||||
const long nbits_section2Length = 3*8;
|
||||
pos_section2Length = offset_section2*8;
|
||||
|
||||
hdr->section2Length = grib_decode_unsigned_long(message, &pos_section2Length, nbits_section2Length);
|
||||
section2Length = grib_decode_unsigned_long(message, &pos_section2Length, nbits_section2Length);
|
||||
|
||||
if (hdr->bufrHeaderCentre == 98) {
|
||||
err = bufr_decode_rdb_keys(message, offset_section2, hdr);
|
||||
}
|
||||
}
|
||||
|
||||
offset_section3 = BUFR_SECTION0_LEN + section1Length + hdr->section2Length; /*bytes*/
|
||||
offset_section3 = BUFR_SECTION0_LEN + section1Length + section2Length; /*bytes*/
|
||||
nbits_numberOfSubsets = 2*8;
|
||||
pos_numberOfSubsets = (offset_section3+4)*8;
|
||||
hdr->numberOfSubsets = grib_decode_unsigned_long(message, &pos_numberOfSubsets, nbits_numberOfSubsets);
|
||||
|
@ -342,7 +380,7 @@ static int bufr_decode_edition3(const void* message, codes_bufr_header* hdr)
|
|||
hdr->observedData = (section3Flags & 1<<7) ? 1 : 0;
|
||||
hdr->compressedData = (section3Flags & 1<<6) ? 1 : 0;
|
||||
|
||||
if (hdr->localSectionPresent && hdr->bufrHeaderCentre == 98 && hdr->section2Length == 52) {
|
||||
if (hdr->localSectionPresent && hdr->bufrHeaderCentre == 98 && section2Length == 52) {
|
||||
err = bufr_decode_extra_rdb_keys(message, offset_section2, hdr);
|
||||
}
|
||||
|
||||
|
@ -372,6 +410,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr)
|
|||
long nbits_updateSequenceNumber = 1*8;
|
||||
long pos_updateSequenceNumber = 16*8;
|
||||
|
||||
long section1Flags = 0;
|
||||
long nbits_section1Flags = 1*8;
|
||||
long pos_section1Flags = 17*8;
|
||||
|
||||
|
@ -408,6 +447,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr)
|
|||
long nbits_typicalSecond = 1*8;
|
||||
long pos_typicalSecond = 29*8;
|
||||
|
||||
long section2Length = 0;
|
||||
long offset_section2 = 0;
|
||||
long offset_section3 = 0;
|
||||
long nbits_numberOfSubsets = 2*8;
|
||||
|
@ -423,7 +463,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr)
|
|||
hdr->bufrHeaderCentre = (long)grib_decode_unsigned_long(message, &pos_bufrHeaderCentre, nbits_bufrHeaderCentre);
|
||||
hdr->bufrHeaderSubCentre = (long)grib_decode_unsigned_long(message, &pos_bufrHeaderSubCentre, nbits_bufrHeaderSubCentre);
|
||||
hdr->updateSequenceNumber = (long)grib_decode_unsigned_long(message, &pos_updateSequenceNumber, nbits_updateSequenceNumber);
|
||||
hdr->section1Flags = (long)grib_decode_unsigned_long(message, &pos_section1Flags, nbits_section1Flags);
|
||||
section1Flags = (long)grib_decode_unsigned_long(message, &pos_section1Flags, nbits_section1Flags);
|
||||
hdr->dataCategory = (long)grib_decode_unsigned_long(message, &pos_dataCategory, nbits_dataCategory);
|
||||
hdr->internationalDataSubCategory = (long)grib_decode_unsigned_long(message, &pos_internationalDataSubCategory, nbits_internationalDataSubCategory);
|
||||
hdr->dataSubCategory = (long)grib_decode_unsigned_long(message, &pos_dataSubCategory, nbits_dataSubCategory);
|
||||
|
@ -437,21 +477,21 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr)
|
|||
hdr->typicalSecond = (long)grib_decode_unsigned_long(message, &pos_typicalSecond, nbits_typicalSecond);
|
||||
|
||||
offset_section2 = BUFR_SECTION0_LEN + section1Length; /*bytes*/
|
||||
hdr->section2Length = 0;
|
||||
hdr->localSectionPresent = (hdr->section1Flags != 0);
|
||||
section2Length = 0;
|
||||
hdr->localSectionPresent = (section1Flags != 0);
|
||||
if (hdr->localSectionPresent) {
|
||||
long pos_section2Length;
|
||||
const long nbits_section2Length = 3*8;
|
||||
pos_section2Length = offset_section2*8;
|
||||
|
||||
hdr->section2Length = grib_decode_unsigned_long(message, &pos_section2Length, nbits_section2Length);
|
||||
section2Length = grib_decode_unsigned_long(message, &pos_section2Length, nbits_section2Length);
|
||||
|
||||
if (hdr->bufrHeaderCentre == 98) {
|
||||
err = bufr_decode_rdb_keys(message, offset_section2, hdr);
|
||||
}
|
||||
}
|
||||
|
||||
offset_section3 = BUFR_SECTION0_LEN + section1Length + hdr->section2Length; /*bytes*/
|
||||
offset_section3 = BUFR_SECTION0_LEN + section1Length + section2Length; /*bytes*/
|
||||
nbits_numberOfSubsets = 2*8;
|
||||
pos_numberOfSubsets = (offset_section3+4)*8;
|
||||
hdr->numberOfSubsets = grib_decode_unsigned_long(message, &pos_numberOfSubsets, nbits_numberOfSubsets);
|
||||
|
@ -461,7 +501,7 @@ static int bufr_decode_edition4(const void* message, codes_bufr_header* hdr)
|
|||
hdr->observedData = (section3Flags & 1<<7) ? 1 : 0;
|
||||
hdr->compressedData = (section3Flags & 1<<6) ? 1 : 0;
|
||||
|
||||
if (hdr->localSectionPresent && hdr->bufrHeaderCentre == 98 && hdr->section2Length == 52) {
|
||||
if (hdr->localSectionPresent && hdr->bufrHeaderCentre == 98 && section2Length == 52) {
|
||||
err = bufr_decode_extra_rdb_keys(message, offset_section2, hdr);
|
||||
}
|
||||
|
||||
|
@ -472,8 +512,8 @@ static int bufr_decode_header(const void* message, off_t offset, size_t size, co
|
|||
{
|
||||
int err = GRIB_SUCCESS;
|
||||
|
||||
hdr->message_offset = offset;
|
||||
hdr->message_size = size;
|
||||
hdr->message_offset = (unsigned long)offset;
|
||||
hdr->message_size = (unsigned long)size;
|
||||
|
||||
err = bufr_extract_edition(message, &hdr->edition);
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ const char* codes_get_type_name(int type)
|
|||
{
|
||||
return grib_get_type_name(type);
|
||||
}
|
||||
int codes_get_native_type(grib_handle* h, const char* name,int* type)
|
||||
int codes_get_native_type(const grib_handle* h, const char* name,int* type)
|
||||
{
|
||||
return grib_get_native_type(h,name,type);
|
||||
}
|
||||
|
@ -116,19 +116,19 @@ grib_index* codes_index_read(grib_context* c,const char* filename,int *err)
|
|||
{
|
||||
return grib_index_read(c,filename,err);
|
||||
}
|
||||
int codes_index_get_size(grib_index* index,const char* key,size_t* size)
|
||||
int codes_index_get_size(const grib_index* index,const char* key,size_t* size)
|
||||
{
|
||||
return grib_index_get_size(index,key,size);
|
||||
}
|
||||
int codes_index_get_long(grib_index* index,const char* key,long* values,size_t *size)
|
||||
int codes_index_get_long(const grib_index* index,const char* key,long* values,size_t *size)
|
||||
{
|
||||
return grib_index_get_long(index,key,values,size);
|
||||
}
|
||||
int codes_index_get_double(grib_index* index,const char* key, double* values,size_t *size)
|
||||
int codes_index_get_double(const grib_index* index,const char* key, double* values,size_t *size)
|
||||
{
|
||||
return grib_index_get_double(index,key,values,size);
|
||||
}
|
||||
int codes_index_get_string(grib_index* index,const char* key,char** values,size_t *size)
|
||||
int codes_index_get_string(const grib_index* index,const char* key,char** values,size_t *size)
|
||||
{
|
||||
return grib_index_get_string(index,key,values,size);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void codes_index_delete(grib_index* index)
|
|||
|
||||
/* Create handle */
|
||||
/******************************************************************************/
|
||||
int codes_write_message(grib_handle* h,const char* file,const char* mode)
|
||||
int codes_write_message(const grib_handle* h,const char* file,const char* mode)
|
||||
{
|
||||
return grib_write_message(h,file,mode);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ grib_handle* codes_grib_handle_new_from_samples(grib_context* c, const char* sam
|
|||
{
|
||||
return grib_handle_new_from_samples(c, sample_name);
|
||||
}
|
||||
grib_handle* codes_handle_clone(grib_handle* h)
|
||||
grib_handle* codes_handle_clone(const grib_handle* h)
|
||||
{
|
||||
return grib_handle_clone(h);
|
||||
}
|
||||
|
@ -187,11 +187,11 @@ grib_handle* codes_handle_new_from_partial_message(grib_context* c, const void*
|
|||
{
|
||||
return grib_handle_new_from_partial_message(c,data,buflen);
|
||||
}
|
||||
int codes_get_message(grib_handle* h ,const void** message, size_t *message_length )
|
||||
int codes_get_message(const grib_handle* h ,const void** message, size_t *message_length )
|
||||
{
|
||||
return grib_get_message(h,message,message_length);
|
||||
}
|
||||
int codes_get_message_copy(grib_handle* h, void* message,size_t *message_length )
|
||||
int codes_get_message_copy(const grib_handle* h, void* message,size_t *message_length )
|
||||
{
|
||||
return grib_get_message_copy(h,message,message_length);
|
||||
}
|
||||
|
@ -255,11 +255,11 @@ int codes_grib_multi_handle_write(grib_multi_handle* mh,FILE* f)
|
|||
|
||||
/* Lat/Lon iterator and nearest (GRIB specific) */
|
||||
/******************************************************************************/
|
||||
grib_iterator* codes_grib_iterator_new(grib_handle* h, unsigned long flags,int* error)
|
||||
grib_iterator* codes_grib_iterator_new(const grib_handle* h, unsigned long flags,int* error)
|
||||
{
|
||||
return grib_iterator_new(h,flags,error);
|
||||
}
|
||||
int codes_grib_get_data(grib_handle *h, double *lats, double *lons, double *values)
|
||||
int codes_grib_get_data(const grib_handle *h, double *lats, double *lons, double *values)
|
||||
{
|
||||
return grib_get_data(h,lats,lons,values);
|
||||
}
|
||||
|
@ -284,20 +284,20 @@ int codes_grib_iterator_delete(grib_iterator *i)
|
|||
return grib_iterator_delete(i);
|
||||
}
|
||||
|
||||
grib_nearest* codes_grib_nearest_new(grib_handle* h, int* error)
|
||||
grib_nearest* codes_grib_nearest_new(const grib_handle* h, int* error)
|
||||
{
|
||||
return grib_nearest_new(h,error);
|
||||
}
|
||||
int codes_grib_nearest_find(grib_nearest *nearest,grib_handle* h,double inlat,double inlon,
|
||||
int codes_grib_nearest_find(grib_nearest *nearest, const grib_handle* h,double inlat,double inlon,
|
||||
unsigned long flags,double* outlats,double* outlons,
|
||||
double* values,double* distances,int* indexes,size_t *len)
|
||||
{
|
||||
return grib_nearest_find(nearest, h, inlat, inlon, flags, outlats, outlons, values, distances, indexes, len);
|
||||
}
|
||||
int codes_grib_nearest_find_multiple(grib_handle* h,int is_lsm,
|
||||
double* inlats,double* inlons,long npoints,
|
||||
double* outlats,double* outlons,
|
||||
double* values,double* distances, int* indexes)
|
||||
int codes_grib_nearest_find_multiple(const grib_handle* h, int is_lsm,
|
||||
const double* inlats, const double* inlons, long npoints,
|
||||
double* outlats, double* outlons,
|
||||
double* values, double* distances, int* indexes)
|
||||
{
|
||||
return grib_nearest_find_multiple(h, is_lsm, inlats, inlons, npoints, outlats, outlons, values, distances, indexes);
|
||||
}
|
||||
|
@ -309,11 +309,11 @@ int codes_grib_nearest_delete(grib_nearest *nearest)
|
|||
|
||||
/* get/set keys */
|
||||
/******************************************************************************/
|
||||
int codes_is_missing(grib_handle* h, const char* key, int* err)
|
||||
int codes_is_missing(const grib_handle* h, const char* key, int* err)
|
||||
{
|
||||
return grib_is_missing(h,key,err);
|
||||
}
|
||||
int codes_is_defined(grib_handle* h, const char* key)
|
||||
int codes_is_defined(const grib_handle* h, const char* key)
|
||||
{
|
||||
return grib_is_defined(h,key);
|
||||
}
|
||||
|
@ -321,47 +321,47 @@ int codes_set_missing(grib_handle* h, const char* key)
|
|||
{
|
||||
return grib_set_missing(h,key);
|
||||
}
|
||||
int codes_get_size(grib_handle* h, const char* key,size_t *size)
|
||||
int codes_get_size(const grib_handle* h, const char* key,size_t *size)
|
||||
{
|
||||
return grib_get_size(h,key,size);
|
||||
}
|
||||
int codes_get_length(grib_handle* h, const char* key,size_t *length)
|
||||
int codes_get_length(const grib_handle* h, const char* key,size_t *length)
|
||||
{
|
||||
return grib_get_length(h,key,length);
|
||||
}
|
||||
int codes_get_long(grib_handle* h, const char* key, long* value)
|
||||
int codes_get_long(const grib_handle* h, const char* key, long* value)
|
||||
{
|
||||
return grib_get_long(h,key,value);
|
||||
}
|
||||
int codes_get_double(grib_handle* h, const char* key, double* value)
|
||||
int codes_get_double(const grib_handle* h, const char* key, double* value)
|
||||
{
|
||||
return grib_get_double(h,key,value);
|
||||
}
|
||||
int codes_get_double_element(grib_handle* h, const char* key, int i, double* value)
|
||||
int codes_get_double_element(const grib_handle* h, const char* key, int i, double* value)
|
||||
{
|
||||
return grib_get_double_element(h,key,i,value);
|
||||
}
|
||||
int codes_get_double_elements(grib_handle* h, const char* key, int* i, long size,double* value)
|
||||
int codes_get_double_elements(const grib_handle* h, const char* key, int* i, long size,double* value)
|
||||
{
|
||||
return grib_get_double_elements(h,key,i,size,value);
|
||||
}
|
||||
int codes_get_string(grib_handle* h, const char* key, char* mesg, size_t *length)
|
||||
int codes_get_string(const grib_handle* h, const char* key, char* mesg, size_t *length)
|
||||
{
|
||||
return grib_get_string(h,key,mesg,length);
|
||||
}
|
||||
int codes_get_string_array(grib_handle* h, const char* key, char** vals, size_t *length)
|
||||
int codes_get_string_array(const grib_handle* h, const char* key, char** vals, size_t *length)
|
||||
{
|
||||
return grib_get_string_array(h,key,vals,length);
|
||||
}
|
||||
int codes_get_bytes(grib_handle* h, const char* key, unsigned char* bytes, size_t *length)
|
||||
int codes_get_bytes(const grib_handle* h, const char* key, unsigned char* bytes, size_t *length)
|
||||
{
|
||||
return grib_get_bytes(h,key,bytes,length);
|
||||
}
|
||||
int codes_get_double_array(grib_handle* h, const char* key, double* vals, size_t *length)
|
||||
int codes_get_double_array(const grib_handle* h, const char* key, double* vals, size_t *length)
|
||||
{
|
||||
return grib_get_double_array(h,key,vals,length);
|
||||
}
|
||||
int codes_get_long_array(grib_handle* h, const char* key, long* vals, size_t *length)
|
||||
int codes_get_long_array(const grib_handle* h, const char* key, long* vals, size_t *length)
|
||||
{
|
||||
return grib_get_long_array(h,key,vals,length);
|
||||
}
|
||||
|
@ -407,15 +407,15 @@ int codes_set_values(grib_handle* h,grib_values* grib_values , size_t arg_count
|
|||
{
|
||||
return grib_set_values(h,grib_values,arg_count);
|
||||
}
|
||||
int codes_get_message_offset ( grib_handle* h,off_t* offset )
|
||||
int codes_get_message_offset(const grib_handle* h,off_t* offset)
|
||||
{
|
||||
return grib_get_message_offset (h,offset);
|
||||
}
|
||||
int codes_get_message_size ( grib_handle* h,size_t* size )
|
||||
int codes_get_message_size(const grib_handle* h,size_t* size)
|
||||
{
|
||||
return grib_get_message_size (h,size);
|
||||
}
|
||||
void codes_dump_content(grib_handle* h,FILE* out,const char* mode, unsigned long option_flags,void* arg)
|
||||
void codes_dump_content(const grib_handle* h,FILE* out,const char* mode, unsigned long option_flags,void* arg)
|
||||
{
|
||||
grib_dump_content(h, out, mode, option_flags, arg);
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ int codes_keys_iterator_next(grib_keys_iterator *kiter)
|
|||
{
|
||||
return grib_keys_iterator_next(kiter);
|
||||
}
|
||||
const char* codes_keys_iterator_get_name(grib_keys_iterator *kiter)
|
||||
const char* codes_keys_iterator_get_name(const grib_keys_iterator *kiter)
|
||||
{
|
||||
return grib_keys_iterator_get_name(kiter);
|
||||
}
|
||||
|
@ -464,19 +464,19 @@ int codes_keys_iterator_set_flags(grib_keys_iterator *kiter,unsigned long flags)
|
|||
{
|
||||
return grib_keys_iterator_set_flags(kiter,flags);
|
||||
}
|
||||
int codes_keys_iterator_get_long(grib_keys_iterator *kiter, long *v, size_t *len)
|
||||
int codes_keys_iterator_get_long(const grib_keys_iterator *kiter, long *v, size_t *len)
|
||||
{
|
||||
return grib_keys_iterator_get_long(kiter,v,len);
|
||||
}
|
||||
int codes_keys_iterator_get_double(grib_keys_iterator *kiter, double *v, size_t *len)
|
||||
int codes_keys_iterator_get_double(const grib_keys_iterator *kiter, double *v, size_t *len)
|
||||
{
|
||||
return grib_keys_iterator_get_double(kiter,v,len);
|
||||
}
|
||||
int codes_keys_iterator_get_string(grib_keys_iterator *kiter, char *v, size_t *len)
|
||||
int codes_keys_iterator_get_string(const grib_keys_iterator *kiter, char *v, size_t *len)
|
||||
{
|
||||
return grib_keys_iterator_get_string(kiter,v,len);
|
||||
}
|
||||
int codes_keys_iterator_get_bytes(grib_keys_iterator *kiter, unsigned char *v, size_t *len)
|
||||
int codes_keys_iterator_get_bytes(const grib_keys_iterator *kiter, unsigned char *v, size_t *len)
|
||||
{
|
||||
return grib_keys_iterator_get_bytes(kiter,v,len);
|
||||
}
|
||||
|
|
|
@ -250,7 +250,7 @@ codes_index* codes_index_read(codes_context* c, const char* filename, int *err);
|
|||
* @param size : number of distinct values of the key in the index
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_index_get_size(codes_index* index, const char* key, size_t* size);
|
||||
int codes_index_get_size(const codes_index* index, const char* key, size_t* size);
|
||||
|
||||
/**
|
||||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.
|
||||
|
@ -262,7 +262,7 @@ int codes_index_get_size(codes_index* index, const char* key, size_t* size);
|
|||
* @param size : size of the values array
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_index_get_long(codes_index* index, const char* key, long* values, size_t *size);
|
||||
int codes_index_get_long(const codes_index* index, const char* key, long* values, size_t *size);
|
||||
|
||||
/**
|
||||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as double or when the native type of the key is double.
|
||||
|
@ -274,7 +274,7 @@ int codes_index_get_long(codes_index* index, const char* key, long* values, size
|
|||
* @param size : size of the values array
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_index_get_double(codes_index* index, const char* key, double* values, size_t *size);
|
||||
int codes_index_get_double(const codes_index* index, const char* key, double* values, size_t *size);
|
||||
|
||||
/**
|
||||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as string or when the native type of the key is string.
|
||||
|
@ -286,7 +286,7 @@ int codes_index_get_double(codes_index* index, const char* key, double* values,
|
|||
* @param size : size of the values array
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_index_get_string(codes_index* index, const char* key, char** values, size_t *size);
|
||||
int codes_index_get_string(const codes_index* index, const char* key, char** values, size_t *size);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -415,7 +415,7 @@ codes_handle* codes_bufr_handle_new_from_file(codes_context* c, FILE* f, int* er
|
|||
* @param mode : mode
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_write_message(codes_handle* h, const char* file, const char* mode);
|
||||
int codes_write_message(const codes_handle* h, const char* file, const char* mode);
|
||||
|
||||
codes_handle* codes_grib_util_sections_copy(codes_handle* hfrom, codes_handle* hto, int what, int *err);
|
||||
codes_string_list* codes_grib_util_get_param_id(const char* mars_param);
|
||||
|
@ -485,7 +485,7 @@ codes_handle* codes_bufr_handle_new_from_samples(codes_context* c, const char* s
|
|||
* @param h : The handle to be cloned
|
||||
* @return the new handle, NULL if the message is invalid or a problem is encountered
|
||||
*/
|
||||
codes_handle* codes_handle_clone(codes_handle* h);
|
||||
codes_handle* codes_handle_clone(const codes_handle* h);
|
||||
|
||||
/**
|
||||
* Frees a handle, also frees the message if it is not a user message
|
||||
|
@ -552,7 +552,7 @@ int codes_grib_multi_handle_write(codes_multi_handle* mh, FILE* f);
|
|||
* @param message_length : On exit, the message size in number of bytes
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_message(codes_handle* h, const void** message, size_t *message_length);
|
||||
int codes_get_message(const codes_handle* h, const void** message, size_t *message_length);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -564,7 +564,7 @@ int codes_get_message(codes_handle* h, const void** message, size_t *message_len
|
|||
* On exit, the actual message length in number of bytes
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_message_copy(codes_handle* h, void* message, size_t *message_length);
|
||||
int codes_get_message_copy(const codes_handle* h, void* message, size_t *message_length);
|
||||
/*! @} */
|
||||
|
||||
/*! \defgroup iterators Iterating on latitude/longitude/values */
|
||||
|
@ -578,7 +578,7 @@ int codes_get_message_copy(codes_handle* h, void* message, size_t *message_lengt
|
|||
* \param error : error code
|
||||
* \return the new iterator, NULL if no iterator can be created
|
||||
*/
|
||||
codes_iterator* codes_grib_iterator_new(codes_handle* h, unsigned long flags, int* error);
|
||||
codes_iterator* codes_grib_iterator_new(const codes_handle* h, unsigned long flags, int* error);
|
||||
|
||||
/**
|
||||
* Get latitude/longitude and data values.
|
||||
|
@ -591,7 +591,7 @@ codes_iterator* codes_grib_iterator_new(codes_handle* h, unsigned long flags, in
|
|||
* @param values : returned array of data values
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_grib_get_data(codes_handle *h, double *lats, double *lons, double *values);
|
||||
int codes_grib_get_data(const codes_handle *h, double *lats, double *lons, double *values);
|
||||
|
||||
/**
|
||||
* Get the next value from an iterator.
|
||||
|
@ -646,7 +646,7 @@ int codes_grib_iterator_delete(codes_iterator *i);
|
|||
* \param error : error code
|
||||
* \return the new nearest, NULL if no nearest can be created
|
||||
*/
|
||||
codes_nearest* codes_grib_nearest_new(codes_handle* h, int* error);
|
||||
codes_nearest* codes_grib_nearest_new(const codes_handle* h, int* error);
|
||||
|
||||
/**
|
||||
* Find the 4 nearest points of a latitude longitude point.
|
||||
|
@ -669,7 +669,7 @@ codes_nearest* codes_grib_nearest_new(codes_handle* h, int* error);
|
|||
* @param len : size of the arrays
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_grib_nearest_find(codes_nearest *nearest, codes_handle* h, double inlat, double inlon,
|
||||
int codes_grib_nearest_find(codes_nearest *nearest, const codes_handle* h, double inlat, double inlon,
|
||||
unsigned long flags, double* outlats, double* outlons,
|
||||
double* values, double* distances, int* indexes, size_t *len);
|
||||
|
||||
|
@ -705,8 +705,8 @@ int codes_grib_nearest_delete(codes_nearest *nearest);
|
|||
* @param indexes : returned array of indexes of the nearest points
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_grib_nearest_find_multiple(codes_handle* h, int is_lsm,
|
||||
double* inlats, double* inlons, long npoints,
|
||||
int codes_grib_nearest_find_multiple(const codes_handle* h, int is_lsm,
|
||||
const double* inlats, const double* inlons, long npoints,
|
||||
double* outlats, double* outlons,
|
||||
double* values, double* distances, int* indexes);
|
||||
|
||||
|
@ -723,7 +723,7 @@ int codes_grib_nearest_find_multiple(codes_handle* h, int is_lsm,
|
|||
* @param offset : the address of a size_t where the offset will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_offset(codes_handle* h, const char* key, size_t* offset);
|
||||
int codes_get_offset(const codes_handle* h, const char* key, size_t* offset);
|
||||
|
||||
/**
|
||||
* Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned
|
||||
|
@ -733,7 +733,7 @@ int codes_get_offset(codes_handle* h, const char* key, size_t* offset);
|
|||
* @param size : the address of a size_t where the size will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_size(codes_handle* h, const char* key, size_t *size);
|
||||
int codes_get_size(const codes_handle* h, const char* key, size_t *size);
|
||||
|
||||
/**
|
||||
* Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned
|
||||
|
@ -743,7 +743,7 @@ int codes_get_size(codes_handle* h, const char* key, size_t *size);
|
|||
* @param length : the address of a size_t where the length will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_length(codes_handle* h, const char* key, size_t *length);
|
||||
int codes_get_length(const codes_handle* h, const char* key, size_t *length);
|
||||
|
||||
/**
|
||||
* Get a long value from a key, if several keys of the same name are present, the last one is returned
|
||||
|
@ -754,7 +754,7 @@ int codes_get_length(codes_handle* h, const char* key, size_t *length);
|
|||
* @param value : the address of a long where the data will be retrieved
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_long(codes_handle* h, const char* key, long* value);
|
||||
int codes_get_long(const codes_handle* h, const char* key, long* value);
|
||||
|
||||
/**
|
||||
* Get a double value from a key, if several keys of the same name are present, the last one is returned
|
||||
|
@ -765,7 +765,7 @@ int codes_get_long(codes_handle* h, const char* key, long* value);
|
|||
* @param value : the address of a double where the data will be retrieved
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_double(codes_handle* h, const char* key, double* value);
|
||||
int codes_get_double(const codes_handle* h, const char* key, double* value);
|
||||
|
||||
/**
|
||||
* Get as double the i-th element of the "key" array
|
||||
|
@ -776,7 +776,7 @@ int codes_get_double(codes_handle* h, const char* key, double* value);
|
|||
* @param value : the address of a double where the data will be retrieved
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_double_element(codes_handle* h, const char* key, int i, double* value);
|
||||
int codes_get_double_element(const codes_handle* h, const char* key, int i, double* value);
|
||||
|
||||
/**
|
||||
* Get as double array the elements of the "key" array whose indexes are listed in the input array i
|
||||
|
@ -788,7 +788,7 @@ int codes_get_double_element(codes_handle* h, const char* key, int i, double* va
|
|||
* @param value : the double array for the data values
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_double_elements(codes_handle* h, const char* key, int* i, long size, double* value);
|
||||
int codes_get_double_elements(const codes_handle* h, const char* key, int* i, long size, double* value);
|
||||
|
||||
/**
|
||||
* Get a string value from a key, if several keys of the same name are present, the last one is returned
|
||||
|
@ -800,7 +800,7 @@ int codes_get_double_elements(codes_handle* h, const char* key, int* i, long siz
|
|||
* @param length : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_string(codes_handle* h, const char* key, char* mesg, size_t *length);
|
||||
int codes_get_string(const codes_handle* h, const char* key, char* mesg, size_t *length);
|
||||
|
||||
/**
|
||||
* Get string array values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -812,7 +812,7 @@ int codes_get_string(codes_handle* h, const char* key, char* mesg, size_t *lengt
|
|||
* @param length : the address of a size_t that contains allocated length of the array on input, and that contains the actual length of the array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_string_array(codes_handle* h, const char* key, char** vals, size_t *length);
|
||||
int codes_get_string_array(const codes_handle* h, const char* key, char** vals, size_t *length);
|
||||
|
||||
/**
|
||||
* Get raw bytes values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -824,7 +824,7 @@ int codes_get_string_array(codes_handle* h, const char* key, char** vals, size_t
|
|||
* @param length : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_bytes(codes_handle* h, const char* key, unsigned char* bytes, size_t *length);
|
||||
int codes_get_bytes(const codes_handle* h, const char* key, unsigned char* bytes, size_t *length);
|
||||
|
||||
/**
|
||||
* Get double array values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -836,7 +836,7 @@ int codes_get_bytes(codes_handle* h, const char* key, unsigned char* bytes, size
|
|||
* @param length : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_double_array(codes_handle* h, const char* key, double* vals, size_t *length);
|
||||
int codes_get_double_array(const codes_handle* h, const char* key, double* vals, size_t *length);
|
||||
|
||||
/**
|
||||
* Get long array values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -848,7 +848,7 @@ int codes_get_double_array(codes_handle* h, const char* key, double* vals, size_
|
|||
* @param length : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int codes_get_long_array(codes_handle* h, const char* key, long* vals, size_t *length);
|
||||
int codes_get_long_array(const codes_handle* h, const char* key, long* vals, size_t *length);
|
||||
|
||||
|
||||
/* setting data */
|
||||
|
@ -963,7 +963,7 @@ int codes_set_string_array(codes_handle *h, const char *key, const char **vals,
|
|||
* @param option_flags : all the CODES_DUMP_FLAG_x flags can be used
|
||||
* @param arg : used to provide a format to output data (experimental)
|
||||
*/
|
||||
void codes_dump_content(codes_handle* h, FILE* out, const char* mode, unsigned long option_flags, void* arg);
|
||||
void codes_dump_content(const codes_handle* h, FILE* out, const char* mode, unsigned long option_flags, void* arg);
|
||||
|
||||
/**
|
||||
* Print all keys from the parsed definition files available in a context
|
||||
|
@ -1155,7 +1155,7 @@ int codes_keys_iterator_next(codes_keys_iterator *kiter);
|
|||
* @param kiter : valid codes_keys_iterator
|
||||
* @return key name
|
||||
*/
|
||||
const char* codes_keys_iterator_get_name(codes_keys_iterator *kiter);
|
||||
const char* codes_keys_iterator_get_name(const codes_keys_iterator *kiter);
|
||||
|
||||
/*! Delete the keys iterator.
|
||||
* @param kiter : valid codes_keys_iterator
|
||||
|
@ -1171,10 +1171,10 @@ int codes_keys_iterator_rewind(codes_keys_iterator* kiter);
|
|||
|
||||
|
||||
int codes_keys_iterator_set_flags(codes_keys_iterator *kiter, unsigned long flags);
|
||||
int codes_keys_iterator_get_long(codes_keys_iterator *kiter, long *v, size_t *len);
|
||||
int codes_keys_iterator_get_double(codes_keys_iterator *kiter, double *v, size_t *len);
|
||||
int codes_keys_iterator_get_string(codes_keys_iterator *kiter, char *v, size_t *len);
|
||||
int codes_keys_iterator_get_bytes(codes_keys_iterator *kiter, unsigned char *v, size_t *len);
|
||||
int codes_keys_iterator_get_long(const codes_keys_iterator *kiter, long *v, size_t *len);
|
||||
int codes_keys_iterator_get_double(const codes_keys_iterator *kiter, double *v, size_t *len);
|
||||
int codes_keys_iterator_get_string(const codes_keys_iterator *kiter, char *v, size_t *len);
|
||||
int codes_keys_iterator_get_bytes(const codes_keys_iterator *kiter, unsigned char *v, size_t *len);
|
||||
|
||||
/* @} */
|
||||
|
||||
|
@ -1189,7 +1189,7 @@ void codes_update_sections_lengths(codes_handle* h);
|
|||
const char* codes_get_error_message(int code);
|
||||
const char* codes_get_type_name(int type);
|
||||
|
||||
int codes_get_native_type(codes_handle* h, const char* name, int* type);
|
||||
int codes_get_native_type(const codes_handle* h, const char* name, int* type);
|
||||
|
||||
void codes_check(const char* call, const char* file, int line, int e, const char* msg);
|
||||
#define CODES_CHECK(a, msg) GRIB_CHECK(a, msg)
|
||||
|
@ -1199,8 +1199,8 @@ void codes_check(const char* call, const char* file, int line, int e, const char
|
|||
int codes_set_values(codes_handle* h, codes_values* codes_values, size_t arg_count);
|
||||
codes_handle* codes_handle_new_from_partial_message_copy(codes_context* c, const void* data, size_t size);
|
||||
codes_handle* codes_handle_new_from_partial_message(codes_context* c, const void* data, size_t buflen);
|
||||
int codes_is_missing(codes_handle* h, const char* key, int* err);
|
||||
int codes_is_defined(codes_handle* h, const char* key);
|
||||
int codes_is_missing(const codes_handle* h, const char* key, int* err);
|
||||
int codes_is_defined(const codes_handle* h, const char* key);
|
||||
int codes_set_missing(codes_handle* h, const char* key);
|
||||
/* The truncation is the Gaussian number (or order) */
|
||||
int codes_get_gaussian_latitudes(long truncation, double* latitudes);
|
||||
|
@ -1215,9 +1215,9 @@ void codes_get_reduced_row_p(long pl, double lon_first, double lon_last, long *n
|
|||
|
||||
|
||||
/* read products */
|
||||
int codes_get_message_offset(codes_handle* h, off_t* offset);
|
||||
int codes_get_message_size(codes_handle* h, size_t* size);
|
||||
int codes_get_product_kind(codes_handle* h, ProductKind* product_kind);
|
||||
int codes_get_message_offset(const codes_handle* h, off_t* offset);
|
||||
int codes_get_message_size(const codes_handle* h, size_t* size);
|
||||
int codes_get_product_kind(const codes_handle* h, ProductKind* product_kind);
|
||||
int codes_check_message_header(const void* bytes, size_t length, ProductKind product);
|
||||
int codes_check_message_footer(const void* bytes, size_t length, ProductKind product);
|
||||
|
||||
|
|
|
@ -199,11 +199,8 @@ void encode_double_array_unrolled(int numBits, long packStart, long datasize,
|
|||
{
|
||||
U_BYTEORDER;
|
||||
long i, j, z = *gz;
|
||||
#ifdef _ARCH_PWR6
|
||||
|
||||
#define __UNROLL_DEPTH_2 8
|
||||
#else
|
||||
#define __UNROLL_DEPTH_2 8
|
||||
#endif
|
||||
|
||||
data += packStart;
|
||||
datasize -= packStart;
|
||||
|
|
|
@ -129,28 +129,29 @@ static void init_class(grib_accessor_class* c)
|
|||
|
||||
static void init(grib_accessor* a, const long len , grib_arguments* arg )
|
||||
{
|
||||
grib_get_long_internal(grib_handle_of_accessor(a), grib_arguments_get_name(a->parent->h, arg, 0), &a->length);
|
||||
Assert(a->length>=0);
|
||||
|
||||
grib_get_long_internal(grib_handle_of_accessor(a), grib_arguments_get_name(a->parent->h, arg, 0), &a->length);
|
||||
Assert(a->length>=0);
|
||||
}
|
||||
|
||||
static int get_native_type(grib_accessor* a){
|
||||
return GRIB_TYPE_BYTES;
|
||||
static int get_native_type(grib_accessor* a)
|
||||
{
|
||||
return GRIB_TYPE_BYTES;
|
||||
}
|
||||
|
||||
static int unpack_bytes (grib_accessor* a,unsigned char* buffer, size_t *len) {
|
||||
if (*len < a->length) {
|
||||
*len = a->length;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
*len = a->length;
|
||||
static int unpack_bytes (grib_accessor* a,unsigned char* buffer, size_t *len)
|
||||
{
|
||||
if (*len < a->length) {
|
||||
*len = a->length;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
*len = a->length;
|
||||
|
||||
memcpy(buffer, grib_handle_of_accessor(a)->buffer->data + a->offset, *len);
|
||||
memcpy(buffer, grib_handle_of_accessor(a)->buffer->data + a->offset, *len);
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
static void dump(grib_accessor* a, grib_dumper* dumper)
|
||||
{
|
||||
grib_dump_bytes(dumper,a,NULL);
|
||||
grib_dump_bytes(dumper,a,NULL);
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ static int build_long_array(grib_context* c, grib_handle* h, int compressed,
|
|||
long** array, const char* key, long numberOfSubsets, int zero_on_error)
|
||||
{
|
||||
int err = 0;
|
||||
size_t i;
|
||||
long i;
|
||||
size_t n=numberOfSubsets;
|
||||
*array=(long*)grib_context_malloc_clear(c, sizeof(long)*numberOfSubsets);
|
||||
if(compressed) {
|
||||
|
|
|
@ -129,47 +129,48 @@ static void init_class(grib_accessor_class* c)
|
|||
|
||||
static void init(grib_accessor* a, const long len , grib_arguments* arg )
|
||||
{
|
||||
/*grib_accessor_signed* self = (grib_accessor_signed*)a; */
|
||||
a->length = len;
|
||||
Assert(a->length>=0);
|
||||
|
||||
/*grib_accessor_signed* self = (grib_accessor_signed*)a; */
|
||||
a->length = len;
|
||||
Assert(a->length>=0);
|
||||
}
|
||||
|
||||
static int get_native_type(grib_accessor* a){
|
||||
return GRIB_TYPE_BYTES;
|
||||
static int get_native_type(grib_accessor* a)
|
||||
{
|
||||
return GRIB_TYPE_BYTES;
|
||||
}
|
||||
|
||||
static int compare(grib_accessor* a, grib_accessor* b)
|
||||
{
|
||||
int retval=GRIB_SUCCESS;
|
||||
|
||||
static int compare(grib_accessor* a, grib_accessor* b) {
|
||||
int retval=GRIB_SUCCESS;
|
||||
size_t alen = (size_t)grib_byte_count(a);
|
||||
size_t blen = (size_t)grib_byte_count(b);
|
||||
|
||||
size_t alen = (size_t)grib_byte_count(a);
|
||||
size_t blen = (size_t)grib_byte_count(b);
|
||||
if (alen != blen) return GRIB_COUNT_MISMATCH;
|
||||
|
||||
if (alen != blen) return GRIB_COUNT_MISMATCH;
|
||||
|
||||
return retval;
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int unpack_string(grib_accessor *a , char* v, size_t *len){
|
||||
unsigned char* p=NULL;
|
||||
char* s=v;
|
||||
int i;
|
||||
long length=grib_byte_count(a);
|
||||
static int unpack_string(grib_accessor *a , char* v, size_t *len)
|
||||
{
|
||||
unsigned char* p=NULL;
|
||||
char* s=v;
|
||||
int i;
|
||||
long length=grib_byte_count(a);
|
||||
|
||||
if (*len < 2*length) {
|
||||
*len=2*length;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
|
||||
p = grib_handle_of_accessor(a)->buffer->data + grib_byte_offset(a);
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
sprintf (s,"%02x", *(p++));
|
||||
s+=2;
|
||||
}
|
||||
|
||||
*len=length;
|
||||
if (*len < 2*length) {
|
||||
*len=2*length;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
}
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
p = grib_handle_of_accessor(a)->buffer->data + grib_byte_offset(a);
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
sprintf (s,"%02x", *(p++));
|
||||
s+=2;
|
||||
}
|
||||
|
||||
*len=length;
|
||||
|
||||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -359,7 +359,8 @@ static grib_codetable* load_table(grib_accessor_codetable* self)
|
|||
} else {
|
||||
size = grib_byte_count((grib_accessor*)self) * 8;
|
||||
}
|
||||
size = grib_power(size,2);
|
||||
|
||||
size = (1UL << size); /* 2^size */
|
||||
|
||||
t = (grib_codetable*)grib_context_malloc_clear_persistent(c,sizeof(grib_codetable) +
|
||||
(size-1)*sizeof(code_table_entry));
|
||||
|
|
|
@ -529,6 +529,28 @@ static int is_local_ecmwf_grib2_param_key(grib_accessor* a, long edition, long c
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char* get_legacy_param_info(const char* key_name, long paramId)
|
||||
{
|
||||
if (paramId == 210) {
|
||||
if (strcmp(key_name, "paramId")==0) return "210";
|
||||
if (strcmp(key_name, "shortName")==0) return "ssrc";
|
||||
if (strcmp(key_name, "units")==0) return "J m**-2";
|
||||
if (strcmp(key_name, "name")==0) return "Surface net solar radiation, clear sky";
|
||||
if (strcmp(key_name, "cfVarName")==0) return "ssrc";
|
||||
if (strcmp(key_name, "cfName")==0) return "surface_net_downward_shortwave_flux_assuming_clear_sky";
|
||||
} else if (paramId == 211) {
|
||||
if (strcmp(key_name, "paramId")==0) return "211";
|
||||
if (strcmp(key_name, "shortName")==0) return "strc";
|
||||
if (strcmp(key_name, "units")==0) return "J m**-2";
|
||||
if (strcmp(key_name, "name")==0) return "Surface net thermal radiation, clear sky";
|
||||
if (strcmp(key_name, "cfVarName")==0) return "strc";
|
||||
if (strcmp(key_name, "cfName")==0) return "surface_net_downward_longwave_flux_assuming_clear_sky";
|
||||
} else if (paramId == 228051 || paramId == 228053 || paramId == 228057 || paramId == 228058 || paramId == 228059 || paramId == 228060) {
|
||||
if (strcmp(key_name, "cfName")==0) return "unknown";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Try to get the name, shortName, units etc for a GRIB2 message with
|
||||
* local ECMWF coding i.e. discipline=192 etc
|
||||
*/
|
||||
|
@ -544,11 +566,16 @@ static const char* get_ECMWF_local_parameter(grib_accessor* a, grib_handle* h)
|
|||
err=grib_get_long(h,"edition",&edition);
|
||||
if (err) return NULL;
|
||||
if (is_local_ecmwf_grib2_param_key(a,edition,centre)) {
|
||||
char* pLocalParam = NULL;
|
||||
/* Must be one of: 'name', 'shortName', 'units', 'cfName' etc */
|
||||
grib_accessor* a2 = NULL;
|
||||
long pid_guess = guess_paramId(h);
|
||||
const long pid_guess = guess_paramId(h);
|
||||
if (pid_guess == -1) return NULL;
|
||||
|
||||
/* TODO: Need to revisit */
|
||||
pLocalParam = get_legacy_param_info(key_name, pid_guess);
|
||||
if (pLocalParam) return pLocalParam;
|
||||
|
||||
/* Change the paramId so we can get the other string key*/
|
||||
err = grib_set_long(h, "paramId", pid_guess);
|
||||
if (err) return NULL;
|
||||
|
|
|
@ -283,7 +283,7 @@ static int pack_double(grib_accessor* a, const double* cval, size_t *len)
|
|||
case GRIB_SUCCESS:
|
||||
break;
|
||||
default:
|
||||
grib_context_log(a->context,GRIB_LOG_ERROR,"unable to compute packing parameters\n");
|
||||
grib_context_log(a->context,GRIB_LOG_ERROR,"GRIB1 simple packing: unable to set values");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ static int pack_double(grib_accessor* a, const double* cval, size_t *len)
|
|||
case GRIB_SUCCESS:
|
||||
break;
|
||||
default:
|
||||
grib_context_log(a->context,GRIB_LOG_ERROR,"unable to compute packing parameters\n");
|
||||
grib_context_log(a->context,GRIB_LOG_ERROR,"GRIB2 simple packing: unable to set values");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ static int _unpack_double(grib_accessor* a, double* val, size_t *len,unsigned c
|
|||
GRIB_SUCCESS)
|
||||
return err;
|
||||
|
||||
/*/
|
||||
/*
|
||||
* check we don't decode bpv > max(ulong) as it is
|
||||
* not currently supported by the algorithm
|
||||
*/
|
||||
|
@ -557,7 +557,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t *len)
|
|||
if((err = grib_get_long_internal(gh,self->optimize_scaling_factor, &optimize_scaling_factor))
|
||||
!= GRIB_SUCCESS)
|
||||
return err;
|
||||
/*/
|
||||
/*
|
||||
* check we don't encode bpv > max(ulong)-1 as it is
|
||||
* not currently supported by the algorithm
|
||||
*/
|
||||
|
|
|
@ -224,9 +224,9 @@ static int pack_long(grib_accessor* a, const long* val,size_t *len)
|
|||
if((ret = pack_long_unsigned_helper(a,&tlen,len,/*check=*/0)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
/*
|
||||
if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
*/
|
||||
if((ret = super->pack_long(a,&tlen,len)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
*/
|
||||
|
||||
{
|
||||
long total_length = -1, sec4_length = -1;
|
||||
|
|
|
@ -144,8 +144,9 @@ static void dump(grib_accessor* a,grib_dumper* dumper)
|
|||
grib_dump_label(dumper,a,NULL);
|
||||
}
|
||||
|
||||
grib_iterator* grib_iterator_new(grib_handle* h,unsigned long flags,int* error)
|
||||
{
|
||||
grib_iterator* grib_iterator_new(const grib_handle* ch, unsigned long flags, int* error)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_accessor* a = NULL;
|
||||
grib_accessor_iterator* ita =NULL;
|
||||
grib_iterator* iter =NULL;
|
||||
|
|
|
@ -129,8 +129,6 @@ static void init_class(grib_accessor_class* c)
|
|||
|
||||
/* END_CLASS_IMP */
|
||||
|
||||
|
||||
|
||||
static int get_native_type(grib_accessor* a)
|
||||
{
|
||||
return GRIB_TYPE_LONG;
|
||||
|
@ -216,8 +214,7 @@ static int unpack_double(grib_accessor* a, double* val,size_t *len)
|
|||
if (ret) return ret;
|
||||
rlen=count;
|
||||
|
||||
if(*len < rlen)
|
||||
{
|
||||
if(*len < rlen) {
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR, " wrong size for %s it contains %d values ", a->name , rlen);
|
||||
*len = 0;
|
||||
return GRIB_ARRAY_TOO_SMALL;
|
||||
|
@ -234,7 +231,6 @@ static int unpack_double(grib_accessor* a, double* val,size_t *len)
|
|||
values = (long*)grib_context_malloc(a->context,rlen*sizeof(long));
|
||||
if(!values) return GRIB_INTERNAL_ERROR;
|
||||
|
||||
|
||||
ret = grib_unpack_long(a,values,&rlen);
|
||||
if(ret != GRIB_SUCCESS){
|
||||
grib_context_free(a->context,values);
|
||||
|
|
|
@ -140,8 +140,9 @@ static void dump(grib_accessor* a,grib_dumper* dumper)
|
|||
grib_dump_label(dumper,a,NULL);
|
||||
}
|
||||
|
||||
grib_nearest* grib_nearest_new(grib_handle* h,int* error)
|
||||
grib_nearest* grib_nearest_new(const grib_handle* ch, int* error)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_accessor* a = NULL;
|
||||
grib_accessor_nearest* na =NULL;
|
||||
grib_nearest* n =NULL;
|
||||
|
|
|
@ -281,7 +281,7 @@ static grib_smart_table* load_table(grib_accessor_smart_table* self)
|
|||
next = next->next;
|
||||
}
|
||||
|
||||
size = grib_power(self->widthOfCode,2);
|
||||
size = (1UL << self->widthOfCode); /* 2 ^ self->widthOfCode */
|
||||
|
||||
t = (grib_smart_table*)grib_context_malloc_clear_persistent(c,sizeof(grib_smart_table));
|
||||
t->entries=(grib_smart_table_entry*)grib_context_malloc_clear_persistent(c,size*sizeof(grib_smart_table_entry));
|
||||
|
@ -473,7 +473,7 @@ static int get_table_codes(grib_accessor* a)
|
|||
|
||||
if (!self->dirty) return 0;
|
||||
|
||||
table_size = grib_power(self->widthOfCode,2);
|
||||
table_size = (1 << self->widthOfCode); /* 2 ^ self->widthOfCode */
|
||||
|
||||
if(!self->table)
|
||||
self->table = load_table(self);
|
||||
|
|
|
@ -244,7 +244,7 @@ int pack_long_unsigned_helper(grib_accessor* a, const long* val, size_t *len, in
|
|||
}
|
||||
if (nbits < 33) {
|
||||
unsigned long maxval = (1UL << nbits)-1;
|
||||
if (v > maxval) {
|
||||
if (maxval > 0 && v > maxval) { /* See ECC-1002 */
|
||||
grib_context_log(a->context, GRIB_LOG_ERROR,
|
||||
"Key \"%s\": Trying to encode value of %ld but the maximum allowable value is %ld (number of bits=%ld)\n",
|
||||
a->name, v, maxval, nbits);
|
||||
|
|
|
@ -160,28 +160,28 @@ static void init(grib_accessor* a, const long length , grib_arguments* args )
|
|||
|
||||
switch(self->type)
|
||||
{
|
||||
case GRIB_TYPE_DOUBLE:
|
||||
grib_expression_evaluate_double(hand,expression,&d);
|
||||
pack_double(a,&d,&len);
|
||||
break;
|
||||
case GRIB_TYPE_DOUBLE:
|
||||
grib_expression_evaluate_double(hand,expression,&d);
|
||||
pack_double(a,&d,&len);
|
||||
break;
|
||||
|
||||
case GRIB_TYPE_LONG:
|
||||
grib_expression_evaluate_long(hand,expression,&l);
|
||||
pack_long(a,&l,&len);
|
||||
break;
|
||||
case GRIB_TYPE_LONG:
|
||||
grib_expression_evaluate_long(hand,expression,&l);
|
||||
pack_long(a,&l,&len);
|
||||
break;
|
||||
|
||||
default: {
|
||||
char tmp[1024];
|
||||
len = sizeof(tmp);
|
||||
p = grib_expression_evaluate_string(hand,expression,tmp,&len,&ret);
|
||||
if (ret != GRIB_SUCCESS) {
|
||||
grib_context_log(a->context,GRIB_LOG_ERROR,"unable to evaluate %s as string",a->name);
|
||||
Assert(0);
|
||||
}
|
||||
len = strlen(p)+1;
|
||||
pack_string(a,p,&len);
|
||||
break;
|
||||
default: {
|
||||
char tmp[1024];
|
||||
len = sizeof(tmp);
|
||||
p = grib_expression_evaluate_string(hand,expression,tmp,&len,&ret);
|
||||
if (ret != GRIB_SUCCESS) {
|
||||
grib_context_log(a->context,GRIB_LOG_ERROR,"unable to evaluate %s as string",a->name);
|
||||
Assert(0);
|
||||
}
|
||||
len = strlen(p)+1;
|
||||
pack_string(a,p,&len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ static long byte_count(grib_accessor* a) {
|
|||
return strlen(buf)+1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
static int compare(grib_accessor* a, grib_accessor* b)
|
||||
{
|
||||
|
|
124
src/grib_api.h
124
src/grib_api.h
|
@ -292,7 +292,7 @@ grib_index* grib_index_read(grib_context* c,const char* filename,int *err);
|
|||
* @param size : number of distinct values of the key in the index
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_index_get_size(grib_index* index,const char* key,size_t* size);
|
||||
int grib_index_get_size(const grib_index* index,const char* key,size_t* size);
|
||||
|
||||
/**
|
||||
* Get the distinct values of the key in argument contained in the index. The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.
|
||||
|
@ -304,7 +304,7 @@ int grib_index_get_size(grib_index* index,const char* key,size_t* size);
|
|||
* @param size : size of the values array
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_index_get_long(grib_index* index,const char* key,
|
||||
int grib_index_get_long(const grib_index* index,const char* key,
|
||||
long* values,size_t *size);
|
||||
|
||||
/**
|
||||
|
@ -317,7 +317,7 @@ int grib_index_get_long(grib_index* index,const char* key,
|
|||
* @param size : size of the values array
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_index_get_double(grib_index* index,const char* key,
|
||||
int grib_index_get_double(const grib_index* index,const char* key,
|
||||
double* values,size_t *size);
|
||||
|
||||
/**
|
||||
|
@ -330,7 +330,7 @@ int grib_index_get_double(grib_index* index,const char* key,
|
|||
* @param size : size of the values array
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_index_get_string(grib_index* index,const char* key,
|
||||
int grib_index_get_string(const grib_index* index,const char* key,
|
||||
char** values,size_t *size);
|
||||
|
||||
|
||||
|
@ -373,7 +373,7 @@ int grib_index_select_string(grib_index* index,const char* key,char* value);
|
|||
* When no more handles are available from the index a NULL pointer is returned and the err variable is set to GRIB_END_OF_INDEX.
|
||||
*
|
||||
* @param index : an index created from a file.
|
||||
* @param err : 0 if OK, integer value on error. GRIB_END_OF_INDEX when no more handles are contained in the index.
|
||||
* @param err : 0 if OK, integer value on error. GRIB_END_OF_INDEX when no more handles are contained in the index.
|
||||
* @return grib handle.
|
||||
*/
|
||||
grib_handle* grib_handle_new_from_index(grib_index* index,int *err);
|
||||
|
@ -433,7 +433,7 @@ grib_handle* grib_handle_new_from_file(grib_context* c, FILE* f, int* error);
|
|||
* @param mode : mode
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_write_message(grib_handle* h,const char* file,const char* mode);
|
||||
int grib_write_message(const grib_handle* h,const char* file,const char* mode);
|
||||
|
||||
typedef struct grib_string_list grib_string_list;
|
||||
struct grib_string_list {
|
||||
|
@ -502,7 +502,7 @@ grib_handle* grib_handle_new_from_samples (grib_context* c, const char* sample_n
|
|||
* @param h : The handle to be cloned
|
||||
* @return the new handle, NULL if the message is invalid or a problem is encountered
|
||||
*/
|
||||
grib_handle* grib_handle_clone(grib_handle* h) ;
|
||||
grib_handle* grib_handle_clone(const grib_handle* h) ;
|
||||
|
||||
/**
|
||||
* Frees a handle, also frees the message if it is not a user message
|
||||
|
@ -565,7 +565,7 @@ int grib_multi_handle_write(grib_multi_handle* mh,FILE* f);
|
|||
* @param message_length : On exit, the message size in number of bytes
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_message(grib_handle* h ,const void** message, size_t *message_length);
|
||||
int grib_get_message(const grib_handle* h ,const void** message, size_t *message_length);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -577,7 +577,7 @@ int grib_get_message(grib_handle* h ,const void** message, size_t *message_lengt
|
|||
* On exit, the actual message length in number of bytes
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_message_copy(grib_handle* h , void* message,size_t *message_length);
|
||||
int grib_get_message_copy(const grib_handle* h, void* message,size_t *message_length);
|
||||
/*! @} */
|
||||
|
||||
/*! \defgroup iterators Iterating on latitude/longitude/values */
|
||||
|
@ -591,7 +591,7 @@ int grib_get_message_copy(grib_handle* h , void* message,size_t *message_length
|
|||
* \param error : error code
|
||||
* \return the new iterator, NULL if no iterator can be created
|
||||
*/
|
||||
grib_iterator* grib_iterator_new(grib_handle* h, unsigned long flags,int* error);
|
||||
grib_iterator* grib_iterator_new(const grib_handle* h, unsigned long flags, int* error);
|
||||
|
||||
/**
|
||||
* Get latitude/longitude and data values.
|
||||
|
@ -604,7 +604,7 @@ grib_iterator* grib_iterator_new(grib_handle* h, unsigned long flags,int* erro
|
|||
* @param values : returned array of data values
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_data(grib_handle *h, double *lats, double *lons, double *values);
|
||||
int grib_get_data(const grib_handle *h, double *lats, double *lons, double *values);
|
||||
|
||||
/**
|
||||
* Get the next value from an iterator.
|
||||
|
@ -659,7 +659,7 @@ int grib_iterator_delete(grib_iterator *i);
|
|||
* \param error : error code
|
||||
* \return the new nearest, NULL if no nearest can be created
|
||||
*/
|
||||
grib_nearest* grib_nearest_new(grib_handle* h, int* error);
|
||||
grib_nearest* grib_nearest_new(const grib_handle* h, int* error);
|
||||
|
||||
/**
|
||||
* Find the 4 nearest points of a latitude longitude point.
|
||||
|
@ -682,9 +682,9 @@ grib_nearest* grib_nearest_new(grib_handle* h, int* error);
|
|||
* @param len : size of the arrays
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_nearest_find(grib_nearest *nearest,grib_handle* h,double inlat,double inlon,
|
||||
unsigned long flags,double* outlats,double* outlons,
|
||||
double* values,double* distances,int* indexes,size_t *len);
|
||||
int grib_nearest_find(grib_nearest* nearest, const grib_handle* h, double inlat, double inlon,
|
||||
unsigned long flags, double* outlats, double* outlons,
|
||||
double* values, double* distances, int* indexes, size_t* len);
|
||||
|
||||
/**
|
||||
* Frees an nearest from memory
|
||||
|
@ -718,10 +718,10 @@ int grib_nearest_delete(grib_nearest *nearest);
|
|||
* @param indexes : returned array of indexes of the nearest points
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_nearest_find_multiple(grib_handle* h,int is_lsm,
|
||||
double* inlats,double* inlons,long npoints,
|
||||
double* outlats,double* outlons,
|
||||
double* values,double* distances, int* indexes);
|
||||
int grib_nearest_find_multiple(const grib_handle* h, int is_lsm,
|
||||
const double* inlats, const double* inlons, long npoints,
|
||||
double* outlats, double* outlons,
|
||||
double* values, double* distances, int* indexes);
|
||||
|
||||
/* @} */
|
||||
|
||||
|
@ -736,7 +736,7 @@ int grib_nearest_find_multiple(grib_handle* h,int is_lsm,
|
|||
* @param offset : the address of a size_t where the offset will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_offset(grib_handle* h, const char* key, size_t* offset);
|
||||
int grib_get_offset(const grib_handle* h, const char* key, size_t* offset);
|
||||
|
||||
/**
|
||||
* Get the number of coded value from a key, if several keys of the same name are present, the total sum is returned
|
||||
|
@ -746,7 +746,7 @@ int grib_get_offset(grib_handle* h, const char* key, size_t* offset);
|
|||
* @param size : the address of a size_t where the size will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_size(grib_handle* h, const char* key,size_t *size);
|
||||
int grib_get_size(const grib_handle* h, const char* key,size_t *size);
|
||||
|
||||
/**
|
||||
* Get the length of the string representation of the key, if several keys of the same name are present, the maximum length is returned
|
||||
|
@ -756,7 +756,7 @@ int grib_get_size(grib_handle* h, const char* key,size_t *size);
|
|||
* @param length : the address of a size_t where the length will be set
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_length(grib_handle* h, const char* key,size_t *length);
|
||||
int grib_get_length(const grib_handle* h, const char* key,size_t *length);
|
||||
|
||||
/**
|
||||
* Get a long value from a key, if several keys of the same name are present, the last one is returned
|
||||
|
@ -767,7 +767,7 @@ int grib_get_length(grib_handle* h, const char* key,size_t *length);
|
|||
* @param value : the address of a long where the data will be retrieved
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_long(grib_handle* h, const char* key, long* value);
|
||||
int grib_get_long(const grib_handle* h, const char* key, long* value);
|
||||
|
||||
/**
|
||||
* Get a double value from a key, if several keys of the same name are present, the last one is returned
|
||||
|
@ -778,7 +778,7 @@ int grib_get_long(grib_handle* h, const char* key, long* value);
|
|||
* @param value : the address of a double where the data will be retrieved
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_double(grib_handle* h, const char* key, double* value);
|
||||
int grib_get_double(const grib_handle* h, const char* key, double* value);
|
||||
|
||||
/**
|
||||
* Get as double the i-th element of the "key" array
|
||||
|
@ -789,7 +789,7 @@ int grib_get_double(grib_handle* h, const char* key, double* value);
|
|||
* @param value : the address of a double where the data will be retrieved
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_double_element(grib_handle* h, const char* key, int i, double* value);
|
||||
int grib_get_double_element(const grib_handle* h, const char* key, int i, double* value);
|
||||
|
||||
/**
|
||||
* Get as double array the elements of the "key" array whose indexes are listed in the input array i
|
||||
|
@ -801,7 +801,7 @@ int grib_get_double_element(grib_handle* h, const char* key, int i, double* valu
|
|||
* @param value : the double array for the data values
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_double_elements(grib_handle* h, const char* key, int* i, long size, double* value);
|
||||
int grib_get_double_elements(const grib_handle* h, const char* key, int* i, long size, double* value);
|
||||
|
||||
/**
|
||||
* Get a string value from a key, if several keys of the same name are present, the last one is returned
|
||||
|
@ -813,7 +813,7 @@ int grib_get_double_elements(grib_handle* h, const char* key, int* i, long size,
|
|||
* @param length : the address of a size_t that contains allocated length of the string on input, and that contains the actual length of the string on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_string(grib_handle* h, const char* key, char* mesg, size_t *length);
|
||||
int grib_get_string(const grib_handle* h, const char* key, char* mesg, size_t *length);
|
||||
|
||||
/**
|
||||
* Get string array values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -825,7 +825,7 @@ int grib_get_string(grib_handle* h, const char* key, char* mesg, size_t *length)
|
|||
* @param length : the address of a size_t that contains allocated length of the array on input, and that contains the actual length of the array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_string_array(grib_handle* h, const char* key, char** vals, size_t *length);
|
||||
int grib_get_string_array(const grib_handle* h, const char* key, char** vals, size_t *length);
|
||||
|
||||
/**
|
||||
* Get raw bytes values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -837,7 +837,7 @@ int grib_get_string_array(grib_handle* h, const char* key, char** vals, size_t *
|
|||
* @param length : the address of a size_t that contains allocated length of the byte array on input, and that contains the actual length of the byte array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_bytes(grib_handle* h, const char* key, unsigned char* bytes, size_t *length);
|
||||
int grib_get_bytes(const grib_handle* h, const char* key, unsigned char* bytes, size_t *length);
|
||||
/**
|
||||
* Get double array values from a key. If several keys of the same name are present, the last one is returned
|
||||
* @see grib_set_double_array
|
||||
|
@ -848,7 +848,7 @@ int grib_get_bytes(grib_handle* h, const char* key, unsigned char* bytes, size_
|
|||
* @param length : the address of a size_t that contains allocated length of the double array on input, and that contains the actual length of the double array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_double_array(grib_handle* h, const char* key, double* vals, size_t *length);
|
||||
int grib_get_double_array(const grib_handle* h, const char* key, double* vals, size_t *length);
|
||||
|
||||
/**
|
||||
* Get long array values from a key. If several keys of the same name are present, the last one is returned
|
||||
|
@ -860,7 +860,7 @@ int grib_get_double_array(grib_handle* h, const char* key, double* vals, size_t
|
|||
* @param length : the address of a size_t that contains allocated length of the long array on input, and that contains the actual length of the long array on output
|
||||
* @return 0 if OK, integer value on error
|
||||
*/
|
||||
int grib_get_long_array(grib_handle* h, const char* key, long* vals, size_t *length);
|
||||
int grib_get_long_array(const grib_handle* h, const char* key, long* vals, size_t *length);
|
||||
|
||||
|
||||
/* setting data */
|
||||
|
@ -975,7 +975,7 @@ int grib_set_string_array(grib_handle* h, const char *key, const char **vals, si
|
|||
* @param option_flags : all the GRIB_DUMP_FLAG_x flags can be used
|
||||
* @param arg : used to provide a format to output data (experimental)
|
||||
*/
|
||||
void grib_dump_content(grib_handle* h,FILE* out,const char* mode, unsigned long option_flags,void* arg);
|
||||
void grib_dump_content(const grib_handle* h,FILE* out,const char* mode, unsigned long option_flags,void* arg);
|
||||
|
||||
/**
|
||||
* Print all keys from the parsed definition files available in a context
|
||||
|
@ -1288,8 +1288,8 @@ int codes_bufr_keys_iterator_next(bufr_keys_iterator* kiter);
|
|||
* @param kiter : valid grib_keys_iterator
|
||||
* @return key name
|
||||
*/
|
||||
const char* grib_keys_iterator_get_name(grib_keys_iterator *kiter);
|
||||
char* codes_bufr_keys_iterator_get_name(bufr_keys_iterator* kiter);
|
||||
const char* grib_keys_iterator_get_name(const grib_keys_iterator *kiter);
|
||||
char* codes_bufr_keys_iterator_get_name(const bufr_keys_iterator* kiter);
|
||||
|
||||
/*! Delete the iterator.
|
||||
* @param kiter : valid grib_keys_iterator
|
||||
|
@ -1307,10 +1307,10 @@ int codes_bufr_keys_iterator_rewind(bufr_keys_iterator* kiter);
|
|||
|
||||
int grib_keys_iterator_set_flags(grib_keys_iterator *kiter,unsigned long flags);
|
||||
|
||||
int grib_keys_iterator_get_long(grib_keys_iterator *kiter, long *v, size_t *len);
|
||||
int grib_keys_iterator_get_double(grib_keys_iterator *kiter, double *v, size_t *len);
|
||||
int grib_keys_iterator_get_string(grib_keys_iterator *kiter, char *v, size_t *len);
|
||||
int grib_keys_iterator_get_bytes(grib_keys_iterator *kiter, unsigned char *v, size_t *len);
|
||||
int grib_keys_iterator_get_long(const grib_keys_iterator *kiter, long *v, size_t *len);
|
||||
int grib_keys_iterator_get_double(const grib_keys_iterator *kiter, double *v, size_t *len);
|
||||
int grib_keys_iterator_get_string(const grib_keys_iterator *kiter, char *v, size_t *len);
|
||||
int grib_keys_iterator_get_bytes(const grib_keys_iterator *kiter, unsigned char *v, size_t *len);
|
||||
int codes_copy_key(grib_handle* h1,grib_handle* h2,const char* key,int type);
|
||||
|
||||
/* @} */
|
||||
|
@ -1326,7 +1326,7 @@ void grib_update_sections_lengths(grib_handle* h);
|
|||
const char* grib_get_error_message(int code);
|
||||
const char* grib_get_type_name(int type);
|
||||
|
||||
int grib_get_native_type(grib_handle* h, const char* name,int* type);
|
||||
int grib_get_native_type(const grib_handle* h, const char* name,int* type);
|
||||
|
||||
void grib_check(const char* call,const char* file,int line,int e,const char* msg);
|
||||
#define GRIB_CHECK(a,msg) grib_check(#a,__FILE__,__LINE__,a,msg)
|
||||
|
@ -1336,8 +1336,8 @@ void grib_check(const char* call,const char* file,int line,int e,const char* ms
|
|||
int grib_set_values(grib_handle* h,grib_values* grib_values , size_t arg_count);
|
||||
grib_handle* grib_handle_new_from_partial_message_copy(grib_context* c, const void* data, size_t size);
|
||||
grib_handle* grib_handle_new_from_partial_message(grib_context* c, const void* data, size_t buflen);
|
||||
int grib_is_missing(grib_handle* h, const char* key, int* err);
|
||||
int grib_is_defined(grib_handle* h, const char* key);
|
||||
int grib_is_missing(const grib_handle* h, const char* key, int* err);
|
||||
int grib_is_defined(const grib_handle* h, const char* key);
|
||||
int grib_set_missing(grib_handle* h, const char* key);
|
||||
/* The truncation is the Gaussian number (or order) */
|
||||
int grib_get_gaussian_latitudes(long truncation,double* latitudes);
|
||||
|
@ -1365,8 +1365,8 @@ void *wmo_read_bufr_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t
|
|||
void *wmo_read_grib_from_file_malloc(FILE* f,int headers_only,size_t *size,off_t *offset,int* err);
|
||||
|
||||
int grib_read_any_from_file(grib_context *ctx, FILE *f, void *buffer, size_t *len);
|
||||
int grib_get_message_offset ( grib_handle* h,off_t* offset);
|
||||
int grib_get_message_size ( grib_handle* h,size_t* size);
|
||||
int grib_get_message_offset(const grib_handle* h,off_t* offset);
|
||||
int grib_get_message_size(const grib_handle* h,size_t* size);
|
||||
|
||||
struct grib_points {
|
||||
grib_context* context;
|
||||
|
@ -1497,14 +1497,15 @@ typedef struct grib_util_grid_spec2 {
|
|||
|
||||
} grib_util_grid_spec2;
|
||||
|
||||
#define GRIB_UTIL_PACKING_TYPE_SAME_AS_INPUT 0
|
||||
#define GRIB_UTIL_PACKING_TYPE_SPECTRAL_COMPLEX 1
|
||||
#define GRIB_UTIL_PACKING_TYPE_SPECTRAL_SIMPLE 2
|
||||
#define GRIB_UTIL_PACKING_TYPE_JPEG 3
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_COMPLEX 4
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE 5
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE_MATRIX 6
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_SECOND_ORDER 7
|
||||
#define GRIB_UTIL_PACKING_TYPE_SAME_AS_INPUT 0
|
||||
#define GRIB_UTIL_PACKING_TYPE_SPECTRAL_COMPLEX 1
|
||||
#define GRIB_UTIL_PACKING_TYPE_SPECTRAL_SIMPLE 2
|
||||
#define GRIB_UTIL_PACKING_TYPE_JPEG 3
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_COMPLEX 4
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE 5
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE_MATRIX 6
|
||||
#define GRIB_UTIL_PACKING_TYPE_GRID_SECOND_ORDER 7
|
||||
#define GRIB_UTIL_PACKING_TYPE_CCSDS 8
|
||||
|
||||
#define GRIB_UTIL_PACKING_SAME_AS_INPUT 0
|
||||
#define GRIB_UTIL_PACKING_USE_PROVIDED 1
|
||||
|
@ -1561,8 +1562,8 @@ int parse_keyval_string(const char *grib_tool, char *arg, int values_required, i
|
|||
grib_handle *grib_new_from_file(grib_context *c, FILE *f, int headers_only, int *error);
|
||||
|
||||
typedef struct codes_bufr_header {
|
||||
off_t message_offset;
|
||||
size_t message_size;
|
||||
unsigned long message_offset;
|
||||
unsigned long message_size;
|
||||
|
||||
/* Section 0 keys */
|
||||
long edition;
|
||||
|
@ -1573,7 +1574,6 @@ typedef struct codes_bufr_header {
|
|||
long bufrHeaderSubCentre;
|
||||
long bufrHeaderCentre;
|
||||
long updateSequenceNumber;
|
||||
long section1Flags;
|
||||
long dataCategory;
|
||||
long dataSubCategory;
|
||||
long masterTablesVersionNumber;
|
||||
|
@ -1592,7 +1592,6 @@ typedef struct codes_bufr_header {
|
|||
long localSectionPresent;
|
||||
|
||||
/* ECMWF local section keys */
|
||||
unsigned long section2Length;
|
||||
long rdbType;
|
||||
long oldSubtype;
|
||||
char ident[9];
|
||||
|
@ -1613,9 +1612,18 @@ typedef struct codes_bufr_header {
|
|||
long rectimeMinute;
|
||||
long rectimeSecond;
|
||||
|
||||
long qualityControl;
|
||||
long newSubtype;
|
||||
long daLoop;
|
||||
long isSatellite;
|
||||
double localLongitude1;
|
||||
double localLatitude1;
|
||||
double localLongitude2;
|
||||
double localLatitude2;
|
||||
double localLatitude;
|
||||
double localLongitude;
|
||||
long localNumberOfObservations;
|
||||
long satelliteID;
|
||||
long qualityControl;
|
||||
long newSubtype;
|
||||
long daLoop;
|
||||
|
||||
/* Section 3 keys */
|
||||
unsigned long numberOfSubsets;
|
||||
|
|
|
@ -519,12 +519,12 @@ void accessor_constant_set_type(grib_accessor *a, int type);
|
|||
void accessor_constant_set_dval(grib_accessor *a, double dval);
|
||||
|
||||
/* grib_accessor_class_iterator.c */
|
||||
grib_iterator *grib_iterator_new(grib_handle *h, unsigned long flags, int *error);
|
||||
grib_iterator *grib_iterator_new(const grib_handle *h, unsigned long flags, int *error);
|
||||
|
||||
/* grib_accessor_class_message.c */
|
||||
|
||||
/* grib_accessor_class_nearest.c */
|
||||
grib_nearest *grib_nearest_new(grib_handle *h, int *error);
|
||||
grib_nearest *grib_nearest_new(const grib_handle *h, int *error);
|
||||
|
||||
/* grib_accessor_class_box.c */
|
||||
grib_box *grib_box_new(grib_handle *h, int *error);
|
||||
|
@ -744,10 +744,10 @@ grib_handle *new_message_from_file(int message_type, grib_context *c, FILE *f, i
|
|||
int _codes_index_add_file(grib_index *index, const char *filename, int message_type);
|
||||
int grib_index_add_file(grib_index *index, const char *filename);
|
||||
grib_index *grib_index_new_from_file(grib_context *c, char *filename, const char *keys, int *err);
|
||||
int grib_index_get_size(grib_index *index, const char *key, size_t *size);
|
||||
int grib_index_get_string(grib_index *index, const char *key, char **values, size_t *size);
|
||||
int grib_index_get_long(grib_index *index, const char *key, long *values, size_t *size);
|
||||
int grib_index_get_double(grib_index *index, const char *key, double *values, size_t *size);
|
||||
int grib_index_get_size(const grib_index *index, const char *key, size_t *size);
|
||||
int grib_index_get_string(const grib_index *index, const char *key, char **values, size_t *size);
|
||||
int grib_index_get_long(const grib_index *index, const char *key, long *values, size_t *size);
|
||||
int grib_index_get_double(const grib_index *index, const char *key, double *values, size_t *size);
|
||||
int grib_index_select_long(grib_index *index, const char *skey, long value);
|
||||
int grib_index_select_double(grib_index *index, const char *skey, double value);
|
||||
int grib_index_select_string(grib_index *index, const char *skey, char *value);
|
||||
|
@ -916,8 +916,8 @@ void grib_dump_bytes(grib_dumper *d, grib_accessor *a, const char *comment);
|
|||
void grib_dump_bits(grib_dumper *d, grib_accessor *a, const char *comment);
|
||||
void grib_dump_section(grib_dumper *d, grib_accessor *a, grib_block_of_accessors *block);
|
||||
void grib_dump_values(grib_dumper *d, grib_accessor *a);
|
||||
void grib_dump_header(grib_dumper *d, grib_handle *h);
|
||||
void grib_dump_footer(grib_dumper *d, grib_handle *h);
|
||||
void grib_dump_header(grib_dumper *d, const grib_handle *h);
|
||||
void grib_dump_footer(grib_dumper *d, const grib_handle *h);
|
||||
|
||||
/* grib_dumper_class_serialize.c */
|
||||
|
||||
|
@ -952,11 +952,11 @@ void grib_dump_footer(grib_dumper *d, grib_handle *h);
|
|||
/* grib_dumper_class_wmo.c */
|
||||
|
||||
/* grib_dumper_class.c */
|
||||
grib_dumper *grib_dumper_factory(const char *op, grib_handle *h, FILE *out, unsigned long option_flags, void *arg);
|
||||
grib_dumper *grib_dumper_factory(const char *op, const grib_handle *h, FILE *out, unsigned long option_flags, void *arg);
|
||||
void grib_dump_accessors_block(grib_dumper *dumper, grib_block_of_accessors *block);
|
||||
void grib_dump_accessors_list(grib_dumper *dumper, grib_accessors_list *al);
|
||||
int grib_print(grib_handle *h, const char *name, grib_dumper *d);
|
||||
void grib_dump_content(grib_handle *h, FILE *f, const char *mode, unsigned long flags, void *data);
|
||||
void grib_dump_content(const grib_handle *h, FILE *f, const char *mode, unsigned long flags, void *data);
|
||||
void grib_dump_keys(grib_handle* h, FILE* f, const char* mode, unsigned long flags, void *data, const char **keys, size_t num_keys);
|
||||
grib_dumper *grib_dump_content_with_dumper(grib_handle *h, grib_dumper *dumper, FILE *f, const char *mode, unsigned long flags, void *data);
|
||||
void codes_dump_bufr_flat(grib_accessors_list *al, grib_handle *h, FILE *f, const char *mode, unsigned long flags, void *data);
|
||||
|
@ -1070,8 +1070,8 @@ int grib_handle_delete(grib_handle *h);
|
|||
grib_handle *grib_new_handle(grib_context *c);
|
||||
grib_handle *grib_handle_new_from_samples(grib_context *c, const char *name);
|
||||
grib_handle *codes_bufr_handle_new_from_samples(grib_context *c, const char *name);
|
||||
int grib_write_message(grib_handle *h, const char *file, const char *mode);
|
||||
grib_handle *grib_handle_clone(grib_handle *h);
|
||||
int grib_write_message(const grib_handle *h, const char *file, const char *mode);
|
||||
grib_handle *grib_handle_clone(const grib_handle *h);
|
||||
grib_handle *codes_handle_new_from_file(grib_context *c, FILE *f, ProductKind product, int *error);
|
||||
grib_handle *codes_grib_handle_new_from_file(grib_context *c, FILE *f, int *error);
|
||||
grib_handle *codes_bufr_handle_new_from_file(grib_context *c, FILE *f, int *error);
|
||||
|
@ -1095,13 +1095,13 @@ int grib_multi_handle_append(grib_handle *h, int start_section, grib_multi_handl
|
|||
int grib_multi_handle_write(grib_multi_handle *h, FILE *f);
|
||||
int grib_get_partial_message(grib_handle *h, const void **msg, size_t *len, int start_section);
|
||||
int grib_get_partial_message_copy(grib_handle *h, void *message, size_t *len, int start_section);
|
||||
int grib_get_message_copy(grib_handle *h, void *message, size_t *len);
|
||||
int grib_get_message_offset(grib_handle *h, off_t *offset);
|
||||
int codes_get_product_kind(grib_handle *h, ProductKind *product_kind);
|
||||
int grib_get_message_copy(const grib_handle *h, void *message, size_t *len);
|
||||
int grib_get_message_offset(const grib_handle *h, off_t *offset);
|
||||
int codes_get_product_kind(const grib_handle *h, ProductKind *product_kind);
|
||||
int codes_check_message_header(const void *bytes, size_t length, ProductKind product);
|
||||
int codes_check_message_footer(const void *bytes, size_t length, ProductKind product);
|
||||
int grib_get_message_size(grib_handle *h, size_t *size);
|
||||
int grib_get_message(grib_handle *h, const void **msg, size_t *size);
|
||||
int grib_get_message_size(const grib_handle *h, size_t *size);
|
||||
int grib_get_message(const grib_handle *h, const void **msg, size_t *size);
|
||||
int grib_get_message_headers(grib_handle *h, const void **msg, size_t *size);
|
||||
grib_handle *grib_handle_new(grib_context *c);
|
||||
grib_action *grib_action_from_filter(const char *filter);
|
||||
|
@ -1183,21 +1183,21 @@ grib_keys_iterator *grib_keys_iterator_new(grib_handle *h, unsigned long filter_
|
|||
int grib_keys_iterator_set_flags(grib_keys_iterator *ki, unsigned long flags);
|
||||
int grib_keys_iterator_rewind(grib_keys_iterator *ki);
|
||||
int grib_keys_iterator_next(grib_keys_iterator *kiter);
|
||||
const char *grib_keys_iterator_get_name(grib_keys_iterator *kiter);
|
||||
const char *grib_keys_iterator_get_name(const grib_keys_iterator *kiter);
|
||||
grib_accessor *grib_keys_iterator_get_accessor(grib_keys_iterator *kiter);
|
||||
int grib_keys_iterator_delete(grib_keys_iterator *kiter);
|
||||
int grib_keys_iterator_get_long(grib_keys_iterator *kiter, long *v, size_t *len);
|
||||
int grib_keys_iterator_get_double(grib_keys_iterator *kiter, double *v, size_t *len);
|
||||
int grib_keys_iterator_get_string(grib_keys_iterator *kiter, char *v, size_t *len);
|
||||
int grib_keys_iterator_get_bytes(grib_keys_iterator *kiter, unsigned char *v, size_t *len);
|
||||
int grib_keys_iterator_get_native_type(grib_keys_iterator *kiter);
|
||||
int grib_keys_iterator_get_long(const grib_keys_iterator *kiter, long *v, size_t *len);
|
||||
int grib_keys_iterator_get_double(const grib_keys_iterator *kiter, double *v, size_t *len);
|
||||
int grib_keys_iterator_get_string(const grib_keys_iterator *kiter, char *v, size_t *len);
|
||||
int grib_keys_iterator_get_bytes(const grib_keys_iterator *kiter, unsigned char *v, size_t *len);
|
||||
int grib_keys_iterator_get_native_type(const grib_keys_iterator *kiter);
|
||||
|
||||
/* bufr_keys_iterator.c */
|
||||
bufr_keys_iterator *codes_bufr_keys_iterator_new(grib_handle *h, unsigned long filter_flags);
|
||||
bufr_keys_iterator *codes_bufr_data_section_keys_iterator_new(grib_handle *h);
|
||||
int codes_bufr_keys_iterator_rewind(bufr_keys_iterator *ki);
|
||||
int codes_bufr_keys_iterator_next(bufr_keys_iterator *kiter);
|
||||
char *codes_bufr_keys_iterator_get_name(bufr_keys_iterator *kiter);
|
||||
char *codes_bufr_keys_iterator_get_name(const bufr_keys_iterator *kiter);
|
||||
grib_accessor *codes_bufr_keys_iterator_get_accessor(bufr_keys_iterator *kiter);
|
||||
int codes_bufr_keys_iterator_delete(bufr_keys_iterator *kiter);
|
||||
|
||||
|
@ -1219,9 +1219,9 @@ grib_action *grib_parse_file(grib_context *gc, const char *filename);
|
|||
int grib_type_to_int(char id);
|
||||
|
||||
/* grib_query.c */
|
||||
grib_accessors_list *grib_find_accessors_list(grib_handle *h, const char *name);
|
||||
grib_accessors_list *grib_find_accessors_list(const grib_handle *h, const char *name);
|
||||
char *grib_split_name_attribute(grib_context *c, const char *name, char *attribute_name);
|
||||
grib_accessor *grib_find_accessor(grib_handle *h, const char *name);
|
||||
grib_accessor *grib_find_accessor(const grib_handle *h, const char *name);
|
||||
grib_accessor *grib_find_attribute(grib_handle *h, const char *name, const char *attr_name, int *err);
|
||||
grib_accessor *grib_find_accessor_fast(grib_handle *h, const char *name);
|
||||
|
||||
|
@ -1267,8 +1267,8 @@ int grib_is_missing_long(grib_accessor *a, long x);
|
|||
int grib_is_missing_double(grib_accessor *a, double x);
|
||||
int grib_is_missing_string(grib_accessor *a, unsigned char *x, size_t len);
|
||||
int grib_accessor_is_missing(grib_accessor *a, int *err);
|
||||
int grib_is_missing(grib_handle *h, const char *name, int *err);
|
||||
int grib_is_defined(grib_handle *h, const char *name);
|
||||
int grib_is_missing(const grib_handle *h, const char *name, int *err);
|
||||
int grib_is_defined(const grib_handle *h, const char *name);
|
||||
int grib_set_flag(grib_handle *h, const char *name, unsigned long flag);
|
||||
int grib_set_double_array_internal(grib_handle *h, const char *name, const double *val, size_t length);
|
||||
int grib_set_force_double_array(grib_handle *h, const char *name, const double *val, size_t length);
|
||||
|
@ -1278,34 +1278,34 @@ int grib_set_long_array(grib_handle *h, const char *name, const long *val, size_
|
|||
int grib_get_long_internal(grib_handle *h, const char *name, long *val);
|
||||
int grib_is_in_dump(grib_handle *h, const char *name);
|
||||
int grib_attributes_count(grib_accessor *a, size_t *size);
|
||||
int grib_get_long(grib_handle *h, const char *name, long *val);
|
||||
int grib_get_long(const grib_handle *h, const char *name, long *val);
|
||||
int grib_get_double_internal(grib_handle *h, const char *name, double *val);
|
||||
int grib_get_double(grib_handle *h, const char *name, double *val);
|
||||
int grib_get_double(const grib_handle *h, const char *name, double *val);
|
||||
int grib_get_double_element_internal(grib_handle *h, const char *name, int i, double *val);
|
||||
int grib_get_double_element(grib_handle *h, const char *name, int i, double *val);
|
||||
int grib_get_double_element(const grib_handle *h, const char *name, int i, double *val);
|
||||
int grib_points_get_values(grib_handle *h, grib_points *points, double *val);
|
||||
int grib_get_double_elements(grib_handle *h, const char *name, int *index_array, long len, double *val_array);
|
||||
int grib_get_double_elements(const grib_handle *h, const char *name, int *index_array, long len, double *val_array);
|
||||
int grib_get_string_internal(grib_handle *h, const char *name, char *val, size_t *length);
|
||||
int grib_get_string(grib_handle *h, const char *name, char *val, size_t *length);
|
||||
int grib_get_bytes_internal(grib_handle *h, const char *name, unsigned char *val, size_t *length);
|
||||
int grib_get_bytes(grib_handle *h, const char *name, unsigned char *val, size_t *length);
|
||||
int grib_get_native_type(grib_handle *h, const char *name, int *type);
|
||||
int grib_get_string(const grib_handle *h, const char *name, char *val, size_t *length);
|
||||
int grib_get_bytes_internal(const grib_handle *h, const char *name, unsigned char *val, size_t *length);
|
||||
int grib_get_bytes(const grib_handle *h, const char *name, unsigned char *val, size_t *length);
|
||||
int grib_get_native_type(const grib_handle *h, const char *name, int *type);
|
||||
const char *grib_get_accessor_class_name(grib_handle *h, const char *name);
|
||||
int _grib_get_double_array_internal(grib_handle *h, grib_accessor *a, double *val, size_t buffer_len, size_t *decoded_length);
|
||||
int grib_get_double_array_internal(grib_handle *h, const char *name, double *val, size_t *length);
|
||||
int grib_get_double_array(grib_handle *h, const char *name, double *val, size_t *length);
|
||||
int _grib_get_double_array_internal(const grib_handle *h, grib_accessor *a, double *val, size_t buffer_len, size_t *decoded_length);
|
||||
int grib_get_double_array_internal(const grib_handle *h, const char *name, double *val, size_t *length);
|
||||
int grib_get_double_array(const grib_handle *h, const char *name, double *val, size_t *length);
|
||||
int _grib_get_string_length(grib_accessor *a, size_t *size);
|
||||
int grib_get_string_length(grib_handle *h, const char *name, size_t *size);
|
||||
int _grib_get_size(grib_handle *h, grib_accessor *a, size_t *size);
|
||||
int grib_get_size(grib_handle *h, const char *name, size_t *size);
|
||||
int grib_get_length(grib_handle *h, const char *name, size_t *length);
|
||||
int grib_get_string_length(const grib_handle *h, const char *name, size_t *size);
|
||||
int _grib_get_size(const grib_handle *h, grib_accessor *a, size_t *size);
|
||||
int grib_get_size(const grib_handle *h, const char *name, size_t *size);
|
||||
int grib_get_length(const grib_handle *h, const char *name, size_t *length);
|
||||
int grib_get_count(grib_handle *h, const char *name, size_t *size);
|
||||
int grib_get_offset(grib_handle *h, const char *key, size_t *val);
|
||||
int _grib_get_string_array_internal(grib_handle *h, grib_accessor *a, char **val, size_t buffer_len, size_t *decoded_length);
|
||||
int grib_get_string_array(grib_handle *h, const char *name, char **val, size_t *length);
|
||||
int _grib_get_long_array_internal(grib_handle *h, grib_accessor *a, long *val, size_t buffer_len, size_t *decoded_length);
|
||||
int grib_get_offset(const grib_handle *h, const char *key, size_t *val);
|
||||
int _grib_get_string_array_internal(const grib_handle *h, grib_accessor *a, char **val, size_t buffer_len, size_t *decoded_length);
|
||||
int grib_get_string_array(const grib_handle *h, const char *name, char **val, size_t *length);
|
||||
int _grib_get_long_array_internal(const grib_handle *h, grib_accessor *a, long *val, size_t buffer_len, size_t *decoded_length);
|
||||
int grib_get_long_array_internal(grib_handle *h, const char *name, long *val, size_t *length);
|
||||
int grib_get_long_array(grib_handle *h, const char *name, long *val, size_t *length);
|
||||
int grib_get_long_array(const grib_handle *h, const char *name, long *val, size_t *length);
|
||||
grib_key_value_list *grib_key_value_list_clone(grib_context *c, grib_key_value_list *list);
|
||||
void grib_key_value_list_delete(grib_context *c, grib_key_value_list *kvl);
|
||||
int grib_get_key_value_list(grib_handle *h, grib_key_value_list *list);
|
||||
|
@ -1386,12 +1386,12 @@ grib_box *grib_box_factory(grib_handle *h, grib_arguments *args);
|
|||
/* grib_box_class_reduced_gaussian.c */
|
||||
|
||||
/* grib_nearest.c */
|
||||
int grib_nearest_find(grib_nearest *nearest, grib_handle *h, double inlat, double inlon, unsigned long flags, double *outlats, double *outlons, double *values, double *distances, int *indexes, size_t *len);
|
||||
int grib_nearest_find(grib_nearest *nearest, const grib_handle *h, double inlat, double inlon, unsigned long flags, double *outlats, double *outlons, double *values, double *distances, int *indexes, size_t *len);
|
||||
int grib_nearest_init(grib_nearest *i, grib_handle *h, grib_arguments *args);
|
||||
int grib_nearest_delete(grib_nearest *i);
|
||||
void grib_binary_search(double xx[], const unsigned long n, double x, int *ju, int *jl);
|
||||
double grib_nearest_distance(double radius, double lon1, double lat1, double lon2, double lat2);
|
||||
int grib_nearest_find_multiple(grib_handle *h, int is_lsm, double *inlats, double *inlons, long npoints, double *outlats, double *outlons, double *values, double *distances, int *indexes);
|
||||
int grib_nearest_find_multiple(const grib_handle *h, int is_lsm, const double *inlats, const double *inlons, long npoints, double *outlats, double *outlons, double *values, double *distances, int *indexes);
|
||||
|
||||
/* grib_nearest_class.c */
|
||||
grib_nearest *grib_nearest_factory(grib_handle *h, grib_arguments *args);
|
||||
|
@ -1417,7 +1417,7 @@ grib_nearest *grib_nearest_factory(grib_handle *h, grib_arguments *args);
|
|||
/* grib_iterator_class_lambert_conformal.c */
|
||||
|
||||
/* grib_iterator.c */
|
||||
int grib_get_data(grib_handle *h, double *lats, double *lons, double *values);
|
||||
int grib_get_data(const grib_handle *h, double *lats, double *lons, double *values);
|
||||
int grib_iterator_next(grib_iterator *i, double *lat, double *lon, double *value);
|
||||
int grib_iterator_has_next(grib_iterator *i);
|
||||
int grib_iterator_previous(grib_iterator *i, double *lat, double *lon, double *value);
|
||||
|
|
|
@ -211,8 +211,9 @@ void grib_dump_values(grib_dumper* d,grib_accessor* a)
|
|||
Assert(0);
|
||||
}
|
||||
|
||||
void grib_dump_header(grib_dumper* d,grib_handle* h)
|
||||
void grib_dump_header(grib_dumper* d, const grib_handle* ch)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_dumper_class *c = d->cclass;
|
||||
while(c)
|
||||
{
|
||||
|
@ -225,8 +226,9 @@ void grib_dump_header(grib_dumper* d,grib_handle* h)
|
|||
}
|
||||
}
|
||||
|
||||
void grib_dump_footer(grib_dumper* d,grib_handle* h)
|
||||
void grib_dump_footer(grib_dumper* d, const grib_handle* ch)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_dumper_class *c = d->cclass;
|
||||
while(c)
|
||||
{
|
||||
|
|
|
@ -29,7 +29,7 @@ static struct table_entry table[] =
|
|||
|
||||
#define NUMBER(x) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
grib_dumper* grib_dumper_factory(const char* op, grib_handle* h, FILE* out, unsigned long option_flags,void* arg)
|
||||
grib_dumper* grib_dumper_factory(const char* op, const grib_handle* h, FILE* out, unsigned long option_flags,void* arg)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < NUMBER(table) ; i++)
|
||||
|
@ -38,7 +38,7 @@ grib_dumper* grib_dumper_factory(const char* op, grib_handle* h, FILE* out, unsi
|
|||
grib_dumper_class* c = *(table[i].cclass);
|
||||
grib_dumper* d = (grib_dumper*) grib_context_malloc_clear(h->context,c->size);
|
||||
d->depth = 0;
|
||||
d->handle = h;
|
||||
d->handle = (grib_handle*)h;
|
||||
d->cclass = c;
|
||||
d->option_flags = option_flags;
|
||||
d->arg = arg;
|
||||
|
@ -80,7 +80,7 @@ int grib_print(grib_handle* h, const char* name, grib_dumper *d ){
|
|||
return GRIB_NOT_FOUND;
|
||||
}
|
||||
|
||||
void grib_dump_content(grib_handle* h, FILE* f,const char* mode,unsigned long flags,void *data)
|
||||
void grib_dump_content(const grib_handle* h, FILE* f,const char* mode,unsigned long flags,void *data)
|
||||
{
|
||||
grib_dumper *dumper;
|
||||
dumper = grib_dumper_factory(mode?mode:"serialize", h, f, flags, data);
|
||||
|
|
|
@ -205,7 +205,7 @@ static void dump_values(grib_dumper* d,grib_accessor* a)
|
|||
|
||||
depth-=2;
|
||||
/* Note: In Python to make a tuple with one element, you need the trailing comma */
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %ld values\n", size);
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %lu values\n", (unsigned long)size);
|
||||
else fprintf(self->dumper.out,",)\n");
|
||||
grib_context_free(c,values);
|
||||
|
||||
|
@ -287,7 +287,7 @@ static void dump_values_attribute(grib_dumper* d,grib_accessor* a, const char* p
|
|||
|
||||
depth-=2;
|
||||
/* Note: In python to make a tuple with one element, you need the trailing comma */
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %ld values\n", size);
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %lu values\n", (unsigned long)size);
|
||||
else fprintf(self->dumper.out,",)\n");
|
||||
grib_context_free(c,values);
|
||||
|
||||
|
@ -374,7 +374,7 @@ static void dump_long(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
|
||||
depth-=2;
|
||||
/* Note: In python to make a tuple with one element, you need the trailing comma */
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %ld values\n", size);
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %lu values\n", (unsigned long)size);
|
||||
else fprintf(self->dumper.out,",)\n");
|
||||
grib_context_free(a->context,values);
|
||||
|
||||
|
@ -462,7 +462,7 @@ static void dump_long_attribute(grib_dumper* d, grib_accessor* a, const char* pr
|
|||
|
||||
depth-=2;
|
||||
/* Note: In python to make a tuple with one element, you need the trailing comma */
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %ld values\n", size);
|
||||
if (size > 4) fprintf(self->dumper.out,",) # %lu values\n", (unsigned long)size);
|
||||
else fprintf(self->dumper.out,",)\n");
|
||||
grib_context_free(a->context,values);
|
||||
|
||||
|
@ -697,7 +697,7 @@ static void _dump_long_array(grib_handle* h, FILE* f, const char* key, const cha
|
|||
}
|
||||
if (icount>cols) {fprintf(f," \n ");}
|
||||
/* Note: In python to make a tuple with one element, you need the trailing comma */
|
||||
if (size > 4) fprintf(f,"%ld ,) # %ld values\n",val[size-1], size);
|
||||
if (size > 4) fprintf(f,"%ld ,) # %lu values\n",val[size-1], (unsigned long)size);
|
||||
else fprintf(f,"%ld ,)\n",val[size-1]);
|
||||
|
||||
grib_context_free(h->context,val);
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
/*
|
||||
* Copyright 2005-2019 ECMWF.
|
||||
*
|
||||
* This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
*
|
||||
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
* virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
*/
|
||||
|
||||
#ifndef grib_expression_H
|
||||
#define grib_expression_H
|
||||
|
||||
#include "grib_api_internal.h"
|
||||
|
||||
|
||||
typedef int (*expression_evaluate_long_proc)(grib_expression*,grib_handle*,long*);
|
||||
typedef int (*expression_evaluate_double_proc)(grib_expression*,grib_handle*,double*);
|
||||
typedef const char* (*expression_evaluate_string_proc)(grib_expression*,grib_handle*,char*,size_t*,int*);
|
||||
typedef const char* (*expression_get_name_proc)(grib_expression*);
|
||||
|
||||
typedef void (*expression_print_proc)(grib_context*,grib_expression*,grib_handle*);
|
||||
typedef void (*expression_compile_proc)(grib_expression*,grib_compiler*);
|
||||
typedef void (*expression_add_dependency_proc) (grib_expression*e, grib_accessor* observer );
|
||||
|
||||
typedef struct grib_expression_class grib_expression_class;
|
||||
|
||||
typedef void (*expression_class_init_proc) (grib_expression_class*e);
|
||||
typedef void (*expression_init_proc) (grib_expression*e);
|
||||
typedef void (*expression_destroy_proc) (grib_context*,grib_expression*e);
|
||||
|
||||
typedef int (*expression_native_type_proc)(grib_expression*,grib_handle*);
|
||||
|
||||
struct grib_expression {
|
||||
grib_expression_class* cclass;
|
||||
};
|
||||
|
||||
struct grib_expression_class {
|
||||
|
||||
grib_expression_class **super;
|
||||
const char *name;
|
||||
size_t size;
|
||||
int inited;
|
||||
|
||||
expression_class_init_proc init_class;
|
||||
expression_init_proc init;
|
||||
expression_destroy_proc destroy;
|
||||
|
||||
|
||||
expression_print_proc print;
|
||||
expression_compile_proc compile;
|
||||
expression_add_dependency_proc add_dependency;
|
||||
|
||||
expression_native_type_proc native_type;
|
||||
expression_get_name_proc get_name;
|
||||
|
||||
expression_evaluate_long_proc evaluate_long;
|
||||
expression_evaluate_double_proc evaluate_double;
|
||||
expression_evaluate_string_proc evaluate_string;
|
||||
};
|
||||
|
||||
|
||||
struct grib_arguments {
|
||||
struct grib_arguments *next;
|
||||
grib_expression *expression;
|
||||
char value[80];
|
||||
};
|
||||
|
||||
|
||||
long grib_expression_evaluate(grib_handle*,grib_expression*);
|
||||
void grib_expression_free(grib_context*,grib_expression*);
|
||||
|
||||
grib_arguments* grib_arguments_new(grib_context*,grib_expression*,grib_arguments*);
|
||||
void grib_arguments_free(grib_context*,grib_arguments*);
|
||||
|
||||
const char* grib_argument_next(grib_arguments**);
|
||||
|
||||
#endif
|
|
@ -295,7 +295,7 @@ grib_handle* codes_bufr_handle_new_from_samples ( grib_context* c, const char* n
|
|||
return g;
|
||||
}
|
||||
|
||||
int grib_write_message(grib_handle* h,const char* file,const char* mode)
|
||||
int grib_write_message(const grib_handle* h,const char* file,const char* mode)
|
||||
{
|
||||
FILE* fh=0;
|
||||
int err;
|
||||
|
@ -324,9 +324,9 @@ int grib_write_message(grib_handle* h,const char* file,const char* mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
grib_handle* grib_handle_clone ( grib_handle* h )
|
||||
grib_handle* grib_handle_clone(const grib_handle* h)
|
||||
{
|
||||
grib_handle* result = grib_handle_new_from_message_copy ( h->context, h->buffer->data, h->buffer->ulength );
|
||||
grib_handle* result = grib_handle_new_from_message_copy(h->context, h->buffer->data, h->buffer->ulength );
|
||||
result->product_kind = h->product_kind;
|
||||
return result;
|
||||
}
|
||||
|
@ -1264,7 +1264,7 @@ int grib_get_partial_message_copy ( grib_handle* h , void* message,size_t *len,
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_message_copy ( grib_handle* h , void* message,size_t *len )
|
||||
int grib_get_message_copy(const grib_handle* h, void* message,size_t *len)
|
||||
{
|
||||
if ( !h )
|
||||
return GRIB_NOT_FOUND;
|
||||
|
@ -1278,7 +1278,7 @@ int grib_get_message_copy ( grib_handle* h , void* message,size_t *len )
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_message_offset ( grib_handle* h,off_t* offset )
|
||||
int grib_get_message_offset(const grib_handle* h,off_t* offset)
|
||||
{
|
||||
if (h) *offset=h->offset;
|
||||
else return GRIB_INTERNAL_ERROR;
|
||||
|
@ -1286,7 +1286,7 @@ int grib_get_message_offset ( grib_handle* h,off_t* offset )
|
|||
return 0;
|
||||
}
|
||||
|
||||
int codes_get_product_kind(grib_handle* h, ProductKind* product_kind)
|
||||
int codes_get_product_kind(const grib_handle* h, ProductKind* product_kind)
|
||||
{
|
||||
if (h) {
|
||||
*product_kind = h->product_kind;
|
||||
|
@ -1327,20 +1327,22 @@ int codes_check_message_footer(const void* bytes, size_t length, ProductKind pro
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_message_size ( grib_handle* h,size_t* size )
|
||||
int grib_get_message_size(const grib_handle* ch,size_t* size)
|
||||
{
|
||||
long totalLength=0;
|
||||
int ret=0;
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
*size = h->buffer->ulength;
|
||||
ret=grib_get_long(h,"totalLength",&totalLength);
|
||||
if (!ret) *size=totalLength;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_message ( grib_handle* h,const void** msg,size_t* size )
|
||||
int grib_get_message(const grib_handle* ch, const void** msg, size_t* size)
|
||||
{
|
||||
long totalLength=0;
|
||||
int ret=0;
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
*msg = h->buffer->data;
|
||||
*size = h->buffer->ulength;
|
||||
|
||||
|
|
|
@ -1278,7 +1278,7 @@ grib_index* grib_index_new_from_file(grib_context* c, char* filename, const char
|
|||
return index;
|
||||
}
|
||||
|
||||
int grib_index_get_size(grib_index* index,const char* key,size_t* size)
|
||||
int grib_index_get_size(const grib_index* index,const char* key,size_t* size)
|
||||
{
|
||||
grib_index_key* k=index->keys;
|
||||
while (k && strcmp(k->name,key)) k=k->next;
|
||||
|
@ -1287,7 +1287,7 @@ int grib_index_get_size(grib_index* index,const char* key,size_t* size)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int grib_index_get_string(grib_index* index, const char* key, char** values, size_t *size)
|
||||
int grib_index_get_string(const grib_index* index, const char* key, char** values, size_t *size)
|
||||
{
|
||||
grib_index_key* k=index->keys;
|
||||
grib_string_list* kv;
|
||||
|
@ -1308,7 +1308,7 @@ int grib_index_get_string(grib_index* index, const char* key, char** values, siz
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_index_get_long(grib_index* index, const char* key, long* values, size_t *size)
|
||||
int grib_index_get_long(const grib_index* index, const char* key, long* values, size_t *size)
|
||||
{
|
||||
grib_index_key* k=index->keys;
|
||||
grib_string_list* kv;
|
||||
|
@ -1334,7 +1334,7 @@ int grib_index_get_long(grib_index* index, const char* key, long* values, size_t
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_index_get_double(grib_index* index,const char* key, double* values,size_t *size)
|
||||
int grib_index_get_double(const grib_index* index,const char* key, double* values,size_t *size)
|
||||
{
|
||||
grib_index_key* k=index->keys;
|
||||
grib_string_list* kv;
|
||||
|
|
|
@ -494,7 +494,9 @@ static int read_HDF5_offset(reader *r, int length, unsigned long* v, unsigned ch
|
|||
|
||||
static int read_HDF5(reader *r)
|
||||
{
|
||||
/* See: http://www.hdfgroup.org/HDF5/doc/H5.format.html#Superblock */
|
||||
/*
|
||||
* See: http://www.hdfgroup.org/HDF5/doc/H5.format.html#Superblock
|
||||
*/
|
||||
unsigned char tmp[49]; /* Should be enough */
|
||||
unsigned char buf[4];
|
||||
|
||||
|
@ -629,7 +631,9 @@ static int read_HDF5(reader *r)
|
|||
|
||||
static int read_WRAP(reader *r)
|
||||
{
|
||||
/* See: http://www.hdfgroup.org/HDF5/doc/H5.format.html#Superblock */
|
||||
/*
|
||||
* See: http://www.hdfgroup.org/HDF5/doc/H5.format.html#Superblock
|
||||
*/
|
||||
unsigned char tmp[36]; /* Should be enough */
|
||||
unsigned char buf[8];
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ static void init_mutex()
|
|||
#endif
|
||||
|
||||
|
||||
int grib_get_data(grib_handle* h,double* lats, double* lons,double* values)
|
||||
int grib_get_data(const grib_handle* h,double* lats, double* lons,double* values)
|
||||
{
|
||||
int err=0;
|
||||
grib_iterator* iter=NULL;
|
||||
|
|
|
@ -177,7 +177,9 @@ static int init(grib_iterator* iter, grib_handle* h, grib_arguments* args)
|
|||
if((err = grib_get_long_internal(h, salternativeRowScanning,&alternativeRowScanning)) !=GRIB_SUCCESS)
|
||||
return err;
|
||||
|
||||
/* See Wolfram MathWorld: http://mathworld.wolfram.com/LambertConformalConicProjection.html */
|
||||
/*
|
||||
* See Wolfram MathWorld: http://mathworld.wolfram.com/LambertConformalConicProjection.html
|
||||
*/
|
||||
latFirstInRadians = latFirstInDegrees * DEG2RAD;
|
||||
lonFirstInRadians = lonFirstInDegrees * DEG2RAD;
|
||||
Latin1InRadians = Latin1InDegrees * DEG2RAD;
|
||||
|
|
|
@ -168,7 +168,7 @@ int grib_keys_iterator_next(grib_keys_iterator* kiter)
|
|||
return kiter->current != NULL;
|
||||
}
|
||||
|
||||
const char* grib_keys_iterator_get_name(grib_keys_iterator* kiter)
|
||||
const char* grib_keys_iterator_get_name(const grib_keys_iterator* kiter)
|
||||
{
|
||||
/* if(kiter->name_space) */
|
||||
Assert(kiter->current);
|
||||
|
@ -192,27 +192,27 @@ int grib_keys_iterator_delete( grib_keys_iterator* kiter)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int grib_keys_iterator_get_long(grib_keys_iterator* kiter,long* v,size_t* len)
|
||||
int grib_keys_iterator_get_long(const grib_keys_iterator* kiter, long* v, size_t* len)
|
||||
{
|
||||
return grib_unpack_long( kiter->current,v,len);
|
||||
}
|
||||
|
||||
int grib_keys_iterator_get_double(grib_keys_iterator* kiter,double* v,size_t* len)
|
||||
int grib_keys_iterator_get_double(const grib_keys_iterator* kiter,double* v,size_t* len)
|
||||
{
|
||||
return grib_unpack_double( kiter->current,v,len);
|
||||
}
|
||||
|
||||
int grib_keys_iterator_get_string(grib_keys_iterator* kiter,char* v,size_t* len)
|
||||
int grib_keys_iterator_get_string(const grib_keys_iterator* kiter,char* v,size_t* len)
|
||||
{
|
||||
return grib_unpack_string( kiter->current,v,len);
|
||||
}
|
||||
|
||||
int grib_keys_iterator_get_bytes(grib_keys_iterator* kiter,unsigned char* v,size_t* len)
|
||||
int grib_keys_iterator_get_bytes(const grib_keys_iterator* kiter,unsigned char* v,size_t* len)
|
||||
{
|
||||
return grib_unpack_bytes( kiter->current,v,len);
|
||||
}
|
||||
|
||||
int grib_keys_iterator_get_native_type(grib_keys_iterator* kiter)
|
||||
int grib_keys_iterator_get_native_type(const grib_keys_iterator* kiter)
|
||||
{
|
||||
return grib_accessor_get_native_type(kiter->current);
|
||||
}
|
||||
|
|
|
@ -17,12 +17,13 @@
|
|||
#include "grib_api_internal.h"
|
||||
|
||||
int grib_nearest_find(
|
||||
grib_nearest *nearest, grib_handle* h,
|
||||
grib_nearest *nearest, const grib_handle* ch,
|
||||
double inlat, double inlon,
|
||||
unsigned long flags,
|
||||
double* outlats,double* outlons,
|
||||
double* values, double* distances, int* indexes, size_t *len)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_nearest_class *c = NULL;
|
||||
if (!nearest) return GRIB_INVALID_ARGUMENT;
|
||||
c = nearest->cclass;
|
||||
|
@ -128,10 +129,11 @@ double grib_nearest_distance(double radius,double lon1, double lat1, double lon2
|
|||
return radius*acos(a);
|
||||
}
|
||||
|
||||
int grib_nearest_find_multiple(grib_handle* h,int is_lsm,
|
||||
double* inlats,double* inlons,long npoints,
|
||||
double* outlats,double* outlons,
|
||||
double* values,double* distances, int* indexes)
|
||||
int grib_nearest_find_multiple(
|
||||
const grib_handle* h, int is_lsm,
|
||||
const double* inlats, const double* inlons, long npoints,
|
||||
double* outlats, double* outlons,
|
||||
double* values, double* distances, int* indexes)
|
||||
{
|
||||
grib_nearest* nearest=0;
|
||||
double* pdistances=distances;
|
||||
|
|
|
@ -211,7 +211,9 @@ cleanup:
|
|||
|
||||
/* OpenJPEG 2.1 version of grib_openjpeg_encoding.c */
|
||||
|
||||
/* opj_* Helper code from https://groups.google.com/forum/#!topic/openjpeg/8cebr0u7JgY */
|
||||
/* opj_* Helper code from
|
||||
* https://groups.google.com/forum/#!topic/openjpeg/8cebr0u7JgY
|
||||
*/
|
||||
/* These routines are added to use memory instead of a file for input and output */
|
||||
/* struct need to treat memory as a stream */
|
||||
typedef struct
|
||||
|
|
|
@ -421,12 +421,13 @@ static void grib_find_same_and_push(grib_accessors_list* al,grib_accessor* a)
|
|||
}
|
||||
}
|
||||
|
||||
grib_accessors_list* grib_find_accessors_list(grib_handle* h,const char* name)
|
||||
grib_accessors_list* grib_find_accessors_list(const grib_handle* ch,const char* name)
|
||||
{
|
||||
char* str=NULL;
|
||||
grib_accessors_list* al=NULL;
|
||||
codes_condition* condition=NULL;
|
||||
grib_accessor* a=NULL;
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
|
||||
if (name[0]=='/') {
|
||||
condition=(codes_condition*)grib_context_malloc_clear(h->context,sizeof(codes_condition));
|
||||
|
@ -475,8 +476,9 @@ static grib_accessor* search_and_cache(grib_handle* h, const char* name,const ch
|
|||
return a;
|
||||
}
|
||||
|
||||
static grib_accessor* _grib_find_accessor(grib_handle* h, const char* name)
|
||||
static grib_accessor* _grib_find_accessor(const grib_handle* ch, const char* name)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_accessor* a = NULL;
|
||||
char* p = NULL;
|
||||
DebugAssert(name);
|
||||
|
@ -523,7 +525,7 @@ char* grib_split_name_attribute(grib_context* c,const char* name,char* attribute
|
|||
return accessor_name;
|
||||
}
|
||||
|
||||
grib_accessor* grib_find_accessor(grib_handle* h, const char* name)
|
||||
grib_accessor* grib_find_accessor(const grib_handle* h, const char* name)
|
||||
{
|
||||
grib_accessor* aret = NULL;
|
||||
Assert(h);
|
||||
|
|
|
@ -857,6 +857,7 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
|
|||
int packingTypeIsSet=0;
|
||||
int setSecondOrder=0;
|
||||
int setJpegPacking=0;
|
||||
int setCcsdsPacking=0;
|
||||
int convertEditionEarlier=0;/* For cases when we cannot set some keys without converting */
|
||||
size_t slen=17;
|
||||
int grib1_high_resolution_fix = 0; /* boolean: See GRIB-863 */
|
||||
|
@ -925,6 +926,10 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
|
|||
if (strcmp(input_packing_type,"grid_jpeg") && !strcmp(input_packing_type,"grid_simple"))
|
||||
SET_STRING_VALUE("packingType","grid_jpeg");
|
||||
break;
|
||||
case GRIB_UTIL_PACKING_TYPE_CCSDS:
|
||||
if (strcmp(input_packing_type,"grid_ccsds") && !strcmp(input_packing_type,"grid_simple"))
|
||||
SET_STRING_VALUE("packingType","grid_ccsds");
|
||||
break;
|
||||
case GRIB_UTIL_PACKING_TYPE_GRID_SECOND_ORDER:
|
||||
/* we delay the set of grid_second_order because we don't want
|
||||
to do it on a field with bitsPerValue=0 */
|
||||
|
@ -1327,6 +1332,14 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
|
|||
if (strcmp(input_packing_type,"grid_jpeg") && !strcmp(input_packing_type,"grid_simple"))
|
||||
setJpegPacking = 1;
|
||||
break;
|
||||
case GRIB_UTIL_PACKING_TYPE_CCSDS:
|
||||
/* Have to delay CCSDS packing:
|
||||
* Reason 1: It is not available in GRIB1 and so we have to wait until we change edition
|
||||
* Reason 2: It has to be done AFTER we set the data values
|
||||
*/
|
||||
if (strcmp(input_packing_type,"grid_ccsds") && !strcmp(input_packing_type,"grid_simple"))
|
||||
setCcsdsPacking = 1;
|
||||
break;
|
||||
case GRIB_UTIL_PACKING_TYPE_GRID_SECOND_ORDER:
|
||||
/* we delay the set of grid_second_order because we don't want
|
||||
to do it on a field with bitsPerValue=0 */
|
||||
|
@ -1606,6 +1619,14 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
|
|||
goto cleanup;
|
||||
}
|
||||
}
|
||||
if (setCcsdsPacking == 1) {
|
||||
*err = grib_set_string(outh, "packingType", "grid_ccsds", &slen);
|
||||
if (*err != GRIB_SUCCESS) {
|
||||
fprintf(stderr,"GRIB_UTIL_SET_SPEC: Failed to change packingType to CCSDS: %s\n",
|
||||
grib_get_error_message(*err));
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (packing_spec->deleteLocalDefinition) {
|
||||
|
|
|
@ -586,14 +586,14 @@ int grib_accessor_is_missing(grib_accessor* a,int* err)
|
|||
}
|
||||
}
|
||||
|
||||
int grib_is_missing(grib_handle* h, const char* name,int* err)
|
||||
int grib_is_missing(const grib_handle* h, const char* name,int* err)
|
||||
{
|
||||
grib_accessor* a = grib_find_accessor(h, name);
|
||||
return grib_accessor_is_missing(a,err);
|
||||
}
|
||||
|
||||
/* Return true if the given key exists (is defined) in our grib message */
|
||||
int grib_is_defined(grib_handle* h, const char* name)
|
||||
int grib_is_defined(const grib_handle* h, const char* name)
|
||||
{
|
||||
grib_accessor* a = grib_find_accessor(h, name);
|
||||
return (a ? 1 : 0);
|
||||
|
@ -868,7 +868,7 @@ int grib_attributes_count(grib_accessor* a, size_t* size)
|
|||
return GRIB_NOT_FOUND;
|
||||
}
|
||||
|
||||
int grib_get_long(grib_handle* h, const char* name, long* val)
|
||||
int grib_get_long(const grib_handle* h, const char* name, long* val)
|
||||
{
|
||||
size_t length = 1;
|
||||
grib_accessor* a = NULL;
|
||||
|
@ -900,7 +900,7 @@ int grib_get_double_internal(grib_handle* h, const char* name, double* val)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_double(grib_handle* h, const char* name, double* val)
|
||||
int grib_get_double(const grib_handle* h, const char* name, double* val)
|
||||
{
|
||||
size_t length = 1;
|
||||
grib_accessor* a = NULL;
|
||||
|
@ -932,7 +932,7 @@ int grib_get_double_element_internal(grib_handle* h, const char* name, int i,dou
|
|||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_double_element(grib_handle* h, const char* name, int i, double* val)
|
||||
int grib_get_double_element(const grib_handle* h, const char* name, int i, double* val)
|
||||
{
|
||||
grib_accessor* act = grib_find_accessor(h, name);
|
||||
|
||||
|
@ -957,7 +957,7 @@ int grib_points_get_values(grib_handle* h, grib_points* points, double* val)
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_double_elements(grib_handle* h, const char* name, int* index_array, long len, double* val_array)
|
||||
int grib_get_double_elements(const grib_handle* h, const char* name, int* index_array, long len, double* val_array)
|
||||
{
|
||||
double* values=0;
|
||||
int err=0;
|
||||
|
@ -1016,7 +1016,7 @@ int grib_get_string_internal(grib_handle* h, const char* name, char* val, size_t
|
|||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_string(grib_handle* h, const char* name, char* val, size_t *length)
|
||||
int grib_get_string(const grib_handle* h, const char* name, char* val, size_t *length)
|
||||
{
|
||||
grib_accessor* a = NULL;
|
||||
grib_accessors_list* al=NULL;
|
||||
|
@ -1035,7 +1035,7 @@ int grib_get_string(grib_handle* h, const char* name, char* val, size_t *length)
|
|||
}
|
||||
}
|
||||
|
||||
int grib_get_bytes_internal(grib_handle* h, const char* name, unsigned char* val, size_t *length)
|
||||
int grib_get_bytes_internal(const grib_handle* h, const char* name, unsigned char* val, size_t *length)
|
||||
{
|
||||
int ret = grib_get_bytes(h,name,val,length);
|
||||
|
||||
|
@ -1047,7 +1047,7 @@ int grib_get_bytes_internal(grib_handle* h, const char* name, unsigned char* val
|
|||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_bytes(grib_handle* h, const char* name, unsigned char* val, size_t *length)
|
||||
int grib_get_bytes(const grib_handle* h, const char* name, unsigned char* val, size_t *length)
|
||||
{
|
||||
int err=0;
|
||||
grib_accessor* act = grib_find_accessor(h, name);
|
||||
|
@ -1057,7 +1057,7 @@ int grib_get_bytes(grib_handle* h, const char* name, unsigned char* val, size_t
|
|||
return err;
|
||||
}
|
||||
|
||||
int grib_get_native_type(grib_handle* h, const char* name,int* type)
|
||||
int grib_get_native_type(const grib_handle* h, const char* name,int* type)
|
||||
{
|
||||
grib_accessors_list* al=NULL;
|
||||
grib_accessor* a =NULL;
|
||||
|
@ -1085,7 +1085,7 @@ const char* grib_get_accessor_class_name(grib_handle* h, const char* name)
|
|||
return act?act->cclass->name:NULL;
|
||||
}
|
||||
|
||||
int _grib_get_double_array_internal(grib_handle* h,grib_accessor* a,double* val, size_t buffer_len,size_t *decoded_length)
|
||||
int _grib_get_double_array_internal(const grib_handle* h,grib_accessor* a,double* val, size_t buffer_len,size_t *decoded_length)
|
||||
{
|
||||
if(a) {
|
||||
int err = _grib_get_double_array_internal(h,a->same,val,buffer_len,decoded_length);
|
||||
|
@ -1104,7 +1104,7 @@ int _grib_get_double_array_internal(grib_handle* h,grib_accessor* a,double* val,
|
|||
}
|
||||
}
|
||||
|
||||
int grib_get_double_array_internal(grib_handle* h, const char* name, double* val, size_t *length)
|
||||
int grib_get_double_array_internal(const grib_handle* h, const char* name, double* val, size_t *length)
|
||||
{
|
||||
int ret = grib_get_double_array(h,name,val,length);
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ int grib_get_double_array_internal(grib_handle* h, const char* name, double* val
|
|||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_double_array(grib_handle* h, const char* name, double* val, size_t *length)
|
||||
int grib_get_double_array(const grib_handle* h, const char* name, double* val, size_t *length)
|
||||
{
|
||||
size_t len = *length;
|
||||
grib_accessor* a = NULL;
|
||||
|
@ -1156,7 +1156,7 @@ int _grib_get_string_length(grib_accessor* a, size_t* size)
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_string_length(grib_handle* h, const char* name,size_t* size)
|
||||
int grib_get_string_length(const grib_handle* h, const char* name,size_t* size)
|
||||
{
|
||||
grib_accessor* a = NULL;
|
||||
grib_accessors_list* al=NULL;
|
||||
|
@ -1175,7 +1175,7 @@ int grib_get_string_length(grib_handle* h, const char* name,size_t* size)
|
|||
}
|
||||
}
|
||||
|
||||
int _grib_get_size(grib_handle* h, grib_accessor* a,size_t* size)
|
||||
int _grib_get_size(const grib_handle* h, grib_accessor* a,size_t* size)
|
||||
{
|
||||
long count=0;
|
||||
int err=0;
|
||||
|
@ -1195,8 +1195,9 @@ int _grib_get_size(grib_handle* h, grib_accessor* a,size_t* size)
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_size(grib_handle* h, const char* name,size_t* size)
|
||||
int grib_get_size(const grib_handle* ch, const char* name,size_t* size)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_accessor* a =NULL;
|
||||
grib_accessors_list* al=NULL;
|
||||
int ret=0;
|
||||
|
@ -1220,7 +1221,7 @@ int grib_get_size(grib_handle* h, const char* name,size_t* size)
|
|||
}
|
||||
}
|
||||
|
||||
int grib_get_length(grib_handle* h, const char* name, size_t* length)
|
||||
int grib_get_length(const grib_handle* h, const char* name, size_t* length)
|
||||
{
|
||||
return grib_get_string_length(h, name, length);
|
||||
}
|
||||
|
@ -1238,8 +1239,9 @@ int grib_get_count(grib_handle* h, const char* name,size_t* size)
|
|||
return GRIB_SUCCESS;
|
||||
}
|
||||
|
||||
int grib_get_offset(grib_handle* h, const char* key,size_t* val)
|
||||
int grib_get_offset(const grib_handle* ch, const char* key,size_t* val)
|
||||
{
|
||||
grib_handle* h = (grib_handle*)ch;
|
||||
grib_accessor* act = grib_find_accessor(h, key);
|
||||
if(act) {
|
||||
*val = (size_t)grib_byte_offset(act);
|
||||
|
@ -1248,7 +1250,7 @@ int grib_get_offset(grib_handle* h, const char* key,size_t* val)
|
|||
return GRIB_NOT_FOUND;
|
||||
}
|
||||
|
||||
int _grib_get_string_array_internal(grib_handle* h,grib_accessor* a,char** val, size_t buffer_len,size_t *decoded_length)
|
||||
int _grib_get_string_array_internal(const grib_handle* h,grib_accessor* a,char** val, size_t buffer_len,size_t *decoded_length)
|
||||
{
|
||||
if(a) {
|
||||
int err = _grib_get_string_array_internal(h,a->same,val,buffer_len,decoded_length);
|
||||
|
@ -1267,7 +1269,7 @@ int _grib_get_string_array_internal(grib_handle* h,grib_accessor* a,char** val,
|
|||
}
|
||||
}
|
||||
|
||||
int grib_get_string_array(grib_handle* h, const char* name, char** val, size_t *length)
|
||||
int grib_get_string_array(const grib_handle* h, const char* name, char** val, size_t *length)
|
||||
{
|
||||
size_t len = *length;
|
||||
grib_accessor* a = NULL;
|
||||
|
@ -1292,7 +1294,7 @@ int grib_get_string_array(grib_handle* h, const char* name, char** val, size_t *
|
|||
}
|
||||
}
|
||||
|
||||
int _grib_get_long_array_internal(grib_handle* h,grib_accessor* a,long* val, size_t buffer_len,size_t *decoded_length)
|
||||
int _grib_get_long_array_internal(const grib_handle* h,grib_accessor* a,long* val, size_t buffer_len,size_t *decoded_length)
|
||||
{
|
||||
if(a) {
|
||||
int err = _grib_get_long_array_internal(h,a->same,val,buffer_len,decoded_length);
|
||||
|
@ -1323,7 +1325,7 @@ int grib_get_long_array_internal(grib_handle* h, const char* name, long* val, si
|
|||
return ret;
|
||||
}
|
||||
|
||||
int grib_get_long_array(grib_handle* h, const char* name, long* val, size_t *length)
|
||||
int grib_get_long_array(const grib_handle* h, const char* name, long* val, size_t *length)
|
||||
{
|
||||
size_t len = *length;
|
||||
grib_accessor* a = NULL;
|
||||
|
|
|
@ -57,7 +57,6 @@ list( APPEND tests_no_data_reqd
|
|||
grib_2nd_order_numValues
|
||||
grib_ecc-136
|
||||
grib_ecc-967
|
||||
grib_ecc-979
|
||||
julian
|
||||
bufr_dump_samples
|
||||
bufr_json_samples
|
||||
|
@ -115,7 +114,10 @@ list( APPEND tests_data_reqd
|
|||
grib_ecc-873
|
||||
grib_ecc-600
|
||||
grib_ecc-923
|
||||
grib_ecc-979
|
||||
grib_ecc-984
|
||||
grib_ecc-1000
|
||||
grib_ecc-1001
|
||||
bufr_ecc-556
|
||||
gts_get
|
||||
gts_ls
|
||||
|
|
|
@ -19,7 +19,7 @@ int opt_write = 0; /* If 1 write handle to file */
|
|||
|
||||
static int encode_file(char *template_file, char *output_file)
|
||||
{
|
||||
FILE *in, *out;
|
||||
FILE *in, *out=NULL;
|
||||
codes_handle *source_handle = NULL;
|
||||
const void *buffer = NULL;
|
||||
size_t size = 0;
|
||||
|
|
|
@ -13,16 +13,21 @@
|
|||
|
||||
static const char* not_found = "not_found";
|
||||
|
||||
void print_rdb_key(int has_local, long value)
|
||||
static void print_rdb_key(int local, long value)
|
||||
{
|
||||
if (has_local)
|
||||
printf("%ld ", value);
|
||||
else
|
||||
printf("%s ", not_found);
|
||||
if (local) printf("%ld ", value);
|
||||
else printf("%s ", not_found);
|
||||
}
|
||||
void print_rdb_ident(int has_local, const char* value)
|
||||
|
||||
static void print_rdb_key_double(int local, double value)
|
||||
{
|
||||
if (value == NULL || strlen(value) == 0)
|
||||
if (local) printf("%g ", value);
|
||||
else printf("%s ", not_found);
|
||||
}
|
||||
|
||||
static void print_rdb_ident(int local, const char* value)
|
||||
{
|
||||
if (!local || value == NULL || strlen(value) == 0)
|
||||
printf("%s ", not_found);
|
||||
else
|
||||
printf("%s ", value);
|
||||
|
@ -47,8 +52,7 @@ int main(int argc, char* argv[])
|
|||
for (i=0; i < num_messages; ++i) {
|
||||
codes_bufr_header bh = headers[i];
|
||||
/*
|
||||
* Mimic the behaviour of bufr_get -f -p keys
|
||||
* for testing
|
||||
* Mimic the behaviour of bufr_get -f -p keys for testing
|
||||
*/
|
||||
const int has_ecmwf_local = (bh.localSectionPresent == 1 && bh.bufrHeaderCentre == 98);
|
||||
|
||||
|
@ -60,7 +64,6 @@ int main(int argc, char* argv[])
|
|||
if (strstr(keys, "bufrHeaderSubCentre")) printf("%ld ", bh.bufrHeaderSubCentre);
|
||||
if (strstr(keys, "bufrHeaderCentre")) printf("%ld ", bh.bufrHeaderCentre);
|
||||
if (strstr(keys, "updateSequenceNumber")) printf("%ld ", bh.updateSequenceNumber);
|
||||
if (strstr(keys, "section1Flags")) printf("%ld ", bh.section1Flags);
|
||||
if (strstr(keys, "dataCategory")) printf("%ld ", bh.dataCategory);
|
||||
if (strstr(keys, "dataSubCategory")) printf("%ld ", bh.dataSubCategory);
|
||||
if (strstr(keys, "masterTablesVersionNumber")) printf("%ld ", bh.masterTablesVersionNumber);
|
||||
|
@ -75,8 +78,6 @@ int main(int argc, char* argv[])
|
|||
if (strstr(keys, "typicalSecond")) printf("%ld ", bh.typicalSecond);
|
||||
if (strstr(keys, "localSectionPresent")) printf("%ld ", bh.localSectionPresent);
|
||||
|
||||
if (strstr(keys, "section2Length")) printf("%ld ", bh.section2Length);
|
||||
|
||||
if (strstr(keys, "rdbType")) print_rdb_key(has_ecmwf_local, bh.rdbType);
|
||||
if (strstr(keys, "oldSubtype")) print_rdb_key(has_ecmwf_local, bh.oldSubtype);
|
||||
if (strstr(keys, "localYear")) print_rdb_key(has_ecmwf_local, bh.localYear);
|
||||
|
@ -97,9 +98,16 @@ int main(int argc, char* argv[])
|
|||
if (strstr(keys, "newSubtype")) print_rdb_key(has_ecmwf_local, bh.newSubtype);
|
||||
if (strstr(keys, "daLoop")) print_rdb_key(has_ecmwf_local, bh.daLoop);
|
||||
|
||||
if (strstr(keys, "numberOfSubsets")) printf("%ld ", bh.numberOfSubsets);
|
||||
if (strstr(keys, "observedData")) printf("%ld ", bh.observedData);
|
||||
if (strstr(keys, "compressedData")) printf("%ld ", bh.compressedData);
|
||||
if (strstr(keys, "localLongitude1")) print_rdb_key_double(has_ecmwf_local, bh.localLongitude1);
|
||||
if (strstr(keys, "localLatitude1")) print_rdb_key_double(has_ecmwf_local, bh.localLatitude1);
|
||||
if (strstr(keys, "localLongitude2")) print_rdb_key_double(has_ecmwf_local, bh.localLongitude2);
|
||||
if (strstr(keys, "localLatitude2")) print_rdb_key_double(has_ecmwf_local, bh.localLatitude2);
|
||||
|
||||
if (strstr(keys, "localNumberOfObservations")) printf("%ld ", bh.localNumberOfObservations);
|
||||
if (strstr(keys, "satelliteID")) printf("%ld ", bh.satelliteID);
|
||||
if (strstr(keys, "numberOfSubsets")) printf("%ld ", bh.numberOfSubsets);
|
||||
if (strstr(keys, "observedData")) printf("%ld ", bh.observedData);
|
||||
if (strstr(keys, "compressedData")) printf("%ld ", bh.compressedData);
|
||||
|
||||
if (strstr(keys, "ident")) print_rdb_ident(has_ecmwf_local, bh.ident);
|
||||
printf("\n");
|
||||
|
|
|
@ -27,5 +27,116 @@ for bf in ${bufr_files}; do
|
|||
diff -w $temp1 $temp2
|
||||
done
|
||||
|
||||
# BUFRs with localLatitude1, localLongitude1, localLongitude2 etc
|
||||
bufr_files="
|
||||
aaen_55.bufr
|
||||
aben_55.bufr
|
||||
aeolus_wmo_26.bufr
|
||||
ahws_139.bufr
|
||||
airs_57.bufr
|
||||
alws_139.bufr
|
||||
amsa_55.bufr
|
||||
amsb_55.bufr
|
||||
amse_55.bufr
|
||||
amsu_55.bufr
|
||||
amv2_87.bufr
|
||||
amv3_87.bufr
|
||||
asbh_139.bufr
|
||||
asbl_139.bufr
|
||||
asca_139.bufr
|
||||
asch_139.bufr
|
||||
ascs_139.bufr
|
||||
aseh_139.bufr
|
||||
asel_139.bufr
|
||||
ashs_139.bufr
|
||||
atap_55.bufr
|
||||
ateu_155.bufr
|
||||
atms_201.bufr
|
||||
atov_55.bufr
|
||||
avhm_87.bufr
|
||||
avhn_87.bufr
|
||||
avhr_58.bufr
|
||||
b003_56.bufr
|
||||
b005_87.bufr
|
||||
b005_89.bufr
|
||||
b007_31.bufr
|
||||
cmwi_87.bufr
|
||||
cmwn_87.bufr
|
||||
cori_156.bufr
|
||||
crit_202.bufr
|
||||
csrh_189.bufr
|
||||
emsg_189.bufr
|
||||
emsg_87.bufr
|
||||
euwv_87.bufr
|
||||
fy3a_154.bufr
|
||||
fy3b_154.bufr
|
||||
g2nd_208.bufr
|
||||
g2to_206.bufr
|
||||
go15_87.bufr
|
||||
goee_87.bufr
|
||||
goes_87.bufr
|
||||
goga_89.bufr
|
||||
gosat.bufr
|
||||
grst_26.bufr
|
||||
gsd1_208.bufr
|
||||
gsd2_208.bufr
|
||||
gsd3_208.bufr
|
||||
gst4_26.bufr
|
||||
hirb_55.bufr
|
||||
hirs_55.bufr
|
||||
ias1_240.bufr
|
||||
iasi_241.bufr
|
||||
ifco_208.bufr
|
||||
ikco_217.bufr
|
||||
imssnow.bufr
|
||||
itrg_208.bufr
|
||||
itwt_233.bufr
|
||||
j2eo_216.bufr
|
||||
j2nb_216.bufr
|
||||
jaso_214.bufr
|
||||
kond_209.bufr
|
||||
maer_207.bufr
|
||||
mhen_55.bufr
|
||||
mhsa_55.bufr
|
||||
mhsb_55.bufr
|
||||
mhse_55.bufr
|
||||
mloz_206.bufr
|
||||
modi_87.bufr
|
||||
modw_87.bufr
|
||||
monw_87.bufr
|
||||
nomi_206.bufr
|
||||
nos1_208.bufr
|
||||
nos2_208.bufr
|
||||
nos3_208.bufr
|
||||
nos4_208.bufr
|
||||
nos5_208.bufr
|
||||
nos6_208.bufr
|
||||
nos7_208.bufr
|
||||
nos8_208.bufr
|
||||
pgps_110.bufr
|
||||
rada_250.bufr
|
||||
rado_250.bufr
|
||||
s4kn_165.bufr
|
||||
sb19_206.bufr
|
||||
sbu8_206.bufr
|
||||
smin_49.bufr
|
||||
smis_49.bufr
|
||||
smiu_49.bufr
|
||||
smos_203.bufr
|
||||
sn4k_165.bufr
|
||||
ssbt_127.bufr
|
||||
tmr7_129.bufr
|
||||
tropical_cyclone.bufr
|
||||
tros_31.bufr
|
||||
"
|
||||
|
||||
KEYS='localLongitude1,localLatitude1,localLongitude2,localLatitude2,localNumberOfObservations,satelliteID'
|
||||
for bf in ${bufr_files}; do
|
||||
input=${data_dir}/bufr/$bf
|
||||
$EXEC ${test_dir}/bufr_extract_headers $KEYS $input > $temp1
|
||||
${tools_dir}/bufr_get -f -p $KEYS $input > $temp2
|
||||
diff -w $temp1 $temp2
|
||||
done
|
||||
|
||||
|
||||
rm -f $temp1 $temp2
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2005-2019 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
|
||||
. ./include.sh
|
||||
set -u
|
||||
# ---------------------------------------------------------
|
||||
# This is the test for the JIRA issue ECC-1000
|
||||
# Nearest neighbour using grib_get/grib_ls on severa files
|
||||
# ---------------------------------------------------------
|
||||
label="grib_ecc-1000-test"
|
||||
tempOut=temp.${label}.out
|
||||
tempRef=temp.${label}.ref
|
||||
|
||||
input_ll=${data_dir}/regular_latlon_surface.grib1
|
||||
input_gg=${data_dir}/reduced_gaussian_model_level.grib1
|
||||
|
||||
# Test 'grib_get' tool
|
||||
# --------------------
|
||||
${tools_dir}/grib_get -F%.1f -l0,0 $input_ll $input_gg > $tempOut
|
||||
cat > $tempRef <<EOF
|
||||
300.8 300.1 300.9 300.9
|
||||
198.3 198.5 199.3 199.6
|
||||
EOF
|
||||
diff -w $tempRef $tempOut
|
||||
rm -f $tempOut $tempRef
|
||||
|
||||
${tools_dir}/grib_get -F%.1f -l0,0 $input_gg $input_ll > $tempOut
|
||||
cat > $tempRef <<EOF
|
||||
198.3 198.5 199.3 199.6
|
||||
300.8 300.1 300.9 300.9
|
||||
EOF
|
||||
diff -w $tempRef $tempOut
|
||||
|
||||
|
||||
# Test grib_ls
|
||||
# ---------------------
|
||||
${tools_dir}/grib_ls -F%.1f -l0,0 $input_ll $input_gg
|
||||
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempOut $tempRef
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
# Copyright 2005-2019 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
|
||||
. ./include.sh
|
||||
set -u
|
||||
# ---------------------------------------------------------
|
||||
# This is the test for the JIRA issue ECC-1001
|
||||
# grib_ls -j -l command (JSON for nearest)
|
||||
# ---------------------------------------------------------
|
||||
label="grib_ecc-1001-test"
|
||||
tempOut=temp.${label}.out
|
||||
|
||||
# Decide if we have the JSON verifier commandline utility
|
||||
JSON_VERIF="json_xs"
|
||||
JSON_CHECK=""
|
||||
if command -v $JSON_VERIF >/dev/null 2>&1; then
|
||||
JSON_CHECK=$JSON_VERIF
|
||||
fi
|
||||
|
||||
inputs="
|
||||
$ECCODES_SAMPLES_PATH/GRIB1.tmpl
|
||||
$ECCODES_SAMPLES_PATH/GRIB2.tmpl
|
||||
${data_dir}/high_level_api.grib2
|
||||
"
|
||||
|
||||
for f in $inputs; do
|
||||
rm -f $tempOut
|
||||
${tools_dir}/grib_ls -m -j -l 51.0,1.0,1 $f > $tempOut
|
||||
if test "x$JSON_CHECK" != "x"; then
|
||||
$JSON_VERIF -t none < $tempOut
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempOut
|
|
@ -18,7 +18,7 @@ int opt_write = 0; /* If 1 write handle to file */
|
|||
|
||||
static int encode_file(char *template_file, char *output_file)
|
||||
{
|
||||
FILE *in, *out;
|
||||
FILE *in, *out=NULL;
|
||||
grib_handle *source_handle = NULL;
|
||||
const void *buffer = NULL;
|
||||
size_t size = 0;
|
||||
|
|
|
@ -76,11 +76,11 @@ static int encode_file(char *input_file, char *output_file)
|
|||
GRIB_CHECK(grib_get_size(clone_handle, "values", &values_len),0);
|
||||
values = (double*)malloc(values_len*sizeof(double));
|
||||
|
||||
d=10e-8;
|
||||
d=10e-10;
|
||||
e=d;
|
||||
count=1;
|
||||
for (i=0;i<values_len;i++) {
|
||||
if (count>100) {e*=10; count=1;}
|
||||
if (count>1000) {e*=2; count=1;}
|
||||
values[i]=d;
|
||||
d+=e;
|
||||
count++;
|
||||
|
|
|
@ -23,6 +23,8 @@ static int get_packing_type_code(const char* packingType)
|
|||
|
||||
if (STR_EQUAL(packingType, "grid_jpeg"))
|
||||
result = GRIB_UTIL_PACKING_TYPE_JPEG;
|
||||
if (STR_EQUAL(packingType, "grid_ccsds"))
|
||||
result = GRIB_UTIL_PACKING_TYPE_CCSDS;
|
||||
else if (STR_EQUAL(packingType, "grid_simple"))
|
||||
result = GRIB_UTIL_PACKING_TYPE_GRID_SIMPLE;
|
||||
else if (STR_EQUAL(packingType, "grid_second_order"))
|
||||
|
@ -178,6 +180,7 @@ static void test_regular_ll(int remove_local_def, int edition, const char* packi
|
|||
spec.Nj = 14;
|
||||
spec.Ni = 17;
|
||||
outlen = spec.Nj * spec.Ni;
|
||||
/* outlen = inlen; */
|
||||
spec.iDirectionIncrementInDegrees = 1.5;
|
||||
spec.jDirectionIncrementInDegrees = 1.5;
|
||||
spec.latitudeOfFirstGridPointInDegrees = 60.0001;
|
||||
|
@ -330,7 +333,7 @@ static void test_grid_complex_spatial_differencing(int remove_local_def, int edi
|
|||
static void usage(const char *prog)
|
||||
{
|
||||
fprintf(stderr, "%s: [-p packingType] [-r] [-e edition] in.grib out.grib\n", prog);
|
||||
fprintf(stderr, "-p packingType: one of grid_jpeg, grid_second_order or grid_simple\n");
|
||||
fprintf(stderr, "-p packingType: one of grid_jpeg, grid_ccsds, grid_second_order or grid_simple\n");
|
||||
fprintf(stderr, "-r remove local definition\n");
|
||||
fprintf(stderr, "-e edition: 1 or 2\n");
|
||||
exit(1);
|
||||
|
|
|
@ -58,9 +58,20 @@ if [ $HAVE_JPEG -eq 1 ]; then
|
|||
[ "$res" = "2 1 grid_jpeg" ]
|
||||
fi
|
||||
|
||||
# Convert to edition2 and use CCSDS for packing
|
||||
if [ $HAVE_AEC -eq 1 ]; then
|
||||
infile=../data/latlon.grib
|
||||
$EXEC $grib_util_set_spec -e 2 -p grid_ccsds $infile $outfile > /dev/null
|
||||
res=`${tools_dir}/grib_get -p edition,section2Used,packingType $outfile`
|
||||
[ "$res" = "2 1 grid_ccsds" ]
|
||||
fi
|
||||
|
||||
# --------------------------------------------------
|
||||
# Reduced Gaussian Grid N=32 second order packing
|
||||
# --------------------------------------------------
|
||||
# The gaussian tests intentionally cause an error so need to stop it failing
|
||||
unset ECCODES_FAIL_IF_LOG_MESSAGE
|
||||
|
||||
infile=../data/reduced_gaussian_model_level.grib2
|
||||
outfile=out.grib_util_set_spec.grib
|
||||
rm -f $outfile
|
||||
|
|
|
@ -160,6 +160,8 @@ int grib_tool_new_filename_action(grib_runtime_options* options,const char* file
|
|||
int grib_tool_new_file_action(grib_runtime_options* options,grib_tools_file* file)
|
||||
{
|
||||
exit_if_input_is_directory(grib_tool_name, file->name);
|
||||
if (nearest) grib_nearest_delete(nearest);
|
||||
nearest = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -213,7 +215,7 @@ void grib_tool_print_key_values(grib_runtime_options* options,grib_handle* h)
|
|||
int grib_tool_finalise_action(grib_runtime_options* options)
|
||||
{
|
||||
if (nearest) grib_nearest_delete(nearest);
|
||||
|
||||
nearest = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,13 @@ int grib_options_count=sizeof(grib_options)/sizeof(grib_option);
|
|||
static double lat=0;
|
||||
static double lon=0;
|
||||
static int mode=0;
|
||||
/* Note:
|
||||
* There are two JSON-output modes:
|
||||
* 1. With a provided lat-lon for the nearest neighbour (options->latlon==1)
|
||||
* 2. All other cases (options->json_output==1)
|
||||
* The first is special and has a very different format. They need to be
|
||||
* treated differently
|
||||
*/
|
||||
static int json_latlon=0;
|
||||
static int first_handle=1;
|
||||
static grib_nearest* nearest=NULL;
|
||||
|
@ -193,6 +200,8 @@ int grib_tool_new_filename_action(grib_runtime_options* options,const char* file
|
|||
int grib_tool_new_file_action(grib_runtime_options* options,grib_tools_file* file)
|
||||
{
|
||||
exit_if_input_is_directory(grib_tool_name, file->name);
|
||||
if (nearest) grib_nearest_delete(nearest);
|
||||
nearest = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -333,7 +342,7 @@ int grib_tool_new_handle_action(grib_runtime_options* options, grib_handle* h)
|
|||
}
|
||||
}
|
||||
|
||||
if (options->json_output) {
|
||||
if (!json_latlon && options->json_output) {
|
||||
if (!first_handle && options->handle_count>1) {
|
||||
fprintf(stdout,",\n");
|
||||
}
|
||||
|
@ -392,7 +401,7 @@ int grib_tool_finalise_action(grib_runtime_options* options)
|
|||
}
|
||||
}
|
||||
|
||||
if (options->json_output) fprintf(stdout,"\n]}\n");
|
||||
if (!json_latlon && options->json_output) fprintf(stdout,"\n]}\n");
|
||||
|
||||
if (nearest) grib_nearest_delete(nearest);
|
||||
if (json_latlon) printf("\n]\n");
|
||||
|
|
|
@ -248,7 +248,7 @@ static int grib_tool_with_orderby(grib_runtime_options* options)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (options->json_output == 0)
|
||||
if (options->json_output == 0 || options->latlon)
|
||||
grib_print_header(options,h);
|
||||
else
|
||||
grib_tools_set_print_keys(options,h,options->name_space);
|
||||
|
@ -351,7 +351,7 @@ static int grib_tool_without_orderby(grib_runtime_options* options)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (options->json_output == 0)
|
||||
if (options->json_output == 0 || options->latlon)
|
||||
grib_print_header(options,h);
|
||||
else
|
||||
grib_tools_set_print_keys(options,h,options->name_space);
|
||||
|
@ -619,7 +619,7 @@ static void grib_print_header(grib_runtime_options* options,grib_handle* h)
|
|||
size_t strlenkey=0;
|
||||
int width;
|
||||
int written_to_dump = 0; /* boolean */
|
||||
if (options->json_output)
|
||||
if (options->json_output && !options->latlon)
|
||||
return; /* For JSON output we do not print a single header for all msgs */
|
||||
if (options->handle_count!=1)
|
||||
return;
|
||||
|
@ -969,7 +969,7 @@ void grib_print_key_values(grib_runtime_options* options, grib_handle* h)
|
|||
|
||||
if (!options->verbose) return;
|
||||
|
||||
if (options->json_output) {
|
||||
if (options->json_output && !options->latlon) {
|
||||
/* fprintf(dump_file, "\"message %d\" : {\n", options->handle_count); */
|
||||
fprintf(dump_file, " {\n");
|
||||
for (i=0;i<options->print_keys_count;i++) {
|
||||
|
@ -1151,7 +1151,7 @@ void grib_print_file_statistics(grib_runtime_options* options,grib_tools_file* f
|
|||
{
|
||||
grib_failed* failed=NULL;
|
||||
Assert(file);
|
||||
if (options->json_output)
|
||||
if (options->json_output && !options->latlon)
|
||||
return;
|
||||
|
||||
failed=file->failed;
|
||||
|
@ -1179,7 +1179,7 @@ void grib_print_file_statistics(grib_runtime_options* options,grib_tools_file* f
|
|||
|
||||
void grib_print_full_statistics(grib_runtime_options* options)
|
||||
{
|
||||
if (options->json_output)
|
||||
if (options->json_output && !options->latlon)
|
||||
return;
|
||||
if (options->print_statistics && options->verbose)
|
||||
fprintf(dump_file,"%d of %d total messages in %d files\n",
|
||||
|
|
13
version.sh
13
version.sh
|
@ -1,20 +1,9 @@
|
|||
# Copyright 2005-2019 ECMWF.
|
||||
#
|
||||
# This software is licensed under the terms of the Apache Licence Version 2.0
|
||||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
|
||||
#
|
||||
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
|
||||
# virtue of its status as an intergovernmental organisation nor does it submit to any jurisdiction.
|
||||
#
|
||||
# Package name and versioning information
|
||||
#
|
||||
#
|
||||
# Package base name
|
||||
PACKAGE_NAME='eccodes'
|
||||
|
||||
# Package version
|
||||
ECCODES_MAJOR_VERSION=2
|
||||
ECCODES_MINOR_VERSION=14
|
||||
ECCODES_MINOR_VERSION=15
|
||||
ECCODES_REVISION_VERSION=0
|
||||
|
||||
ECCODES_CURRENT=1
|
||||
|
|
|
@ -1838,10 +1838,6 @@
|
|||
RelativePath="..\..\..\src\grib_emoslib.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\grib_expression.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\grib_iterator_class.h"
|
||||
>
|
||||
|
|
|
@ -547,7 +547,6 @@
|
|||
<ClInclude Include="..\..\..\src\grib_dumper_class.h" />
|
||||
<ClInclude Include="..\..\..\src\grib_dumper_factory.h" />
|
||||
<ClInclude Include="..\..\..\src\grib_emoslib.h" />
|
||||
<ClInclude Include="..\..\..\src\grib_expression.h" />
|
||||
<ClInclude Include="..\..\..\src\grib_iterator_class.h" />
|
||||
<ClInclude Include="..\..\..\src\grib_iterator_factory.h" />
|
||||
<ClInclude Include="..\..\..\src\grib_nearest_class.h" />
|
||||
|
|
|
@ -1166,9 +1166,6 @@
|
|||
<ClInclude Include="..\..\..\src\grib_emoslib.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\grib_expression.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\src\grib_iterator_class.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
@ -1206,4 +1203,4 @@
|
|||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue