mirror of https://github.com/ecmwf/eccodes.git
Merge release/2.30.0 to master
This commit is contained in:
commit
f7730c5e30
|
@ -4,6 +4,7 @@ AccessModifierOffset: -4
|
||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments: true
|
AlignConsecutiveAssignments: true
|
||||||
AlignConsecutiveDeclarations: false
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignConsecutiveMacros: true
|
||||||
AlignEscapedNewlines: Left
|
AlignEscapedNewlines: Left
|
||||||
AlignOperands: true
|
AlignOperands: true
|
||||||
AlignTrailingComments: true
|
AlignTrailingComments: true
|
||||||
|
@ -66,6 +67,7 @@ IncludeCategories:
|
||||||
Priority: 3
|
Priority: 3
|
||||||
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
IncludeIsMainRegex: '([-_](test|unittest))?$'
|
||||||
IndentCaseLabels: true
|
IndentCaseLabels: true
|
||||||
|
IndentPPDirectives: BeforeHash
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentWrappedFunctionNames: false
|
IndentWrappedFunctionNames: false
|
||||||
JavaScriptQuotes: Leave
|
JavaScriptQuotes: Leave
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
-DENABLE_EXTRA_TESTS=1
|
|
@ -21,7 +21,7 @@ cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
|
||||||
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
find_package( ecbuild 3.7 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)
|
||||||
|
|
||||||
# Initialise project
|
# Initialise project
|
||||||
project( eccodes VERSION 2.29.1 LANGUAGES CXX )
|
project( eccodes VERSION 2.30.0 LANGUAGES CXX )
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
@ -65,6 +65,11 @@ ecbuild_debug("ECCODES_BIG_ENDIAN=${ECCODES_BIG_ENDIAN}")
|
||||||
ecbuild_debug("ECCODES_LITTLE_ENDIAN=${ECCODES_LITTLE_ENDIAN}")
|
ecbuild_debug("ECCODES_LITTLE_ENDIAN=${ECCODES_LITTLE_ENDIAN}")
|
||||||
ecbuild_info("Operating system=${CMAKE_SYSTEM} (${EC_OS_BITS} bits)")
|
ecbuild_info("Operating system=${CMAKE_SYSTEM} (${EC_OS_BITS} bits)")
|
||||||
|
|
||||||
|
# Only support 64 bit operating systems
|
||||||
|
if( NOT EC_OS_BITS EQUAL "64" )
|
||||||
|
ecbuild_critical( "Operating system ${CMAKE_SYSTEM} (${EC_OS_BITS} bits) -- ecCodes only supports 64 bit platforms" )
|
||||||
|
endif()
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# some variables/options of this project
|
# some variables/options of this project
|
||||||
|
|
||||||
|
@ -315,11 +320,6 @@ if( IEEE_LE )
|
||||||
set( IEEE_BE 0 )
|
set( IEEE_BE 0 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( ECCODES_ON_LINUX_32BIT 0 )
|
|
||||||
if( EC_OS_NAME MATCHES "linux" AND EC_OS_BITS EQUAL "32" )
|
|
||||||
set( ECCODES_ON_LINUX_32BIT 1 )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set( ECCODES_ON_WINDOWS 0 )
|
set( ECCODES_ON_WINDOWS 0 )
|
||||||
if( EC_OS_NAME MATCHES "windows" )
|
if( EC_OS_NAME MATCHES "windows" )
|
||||||
# Symbols need to be explicitly exported on Windows so we can link to dlls.
|
# Symbols need to be explicitly exported on Windows so we can link to dlls.
|
||||||
|
@ -430,9 +430,10 @@ add_subdirectory( samples )
|
||||||
add_subdirectory( ifs_samples ) # must come after samples
|
add_subdirectory( ifs_samples ) # must come after samples
|
||||||
|
|
||||||
# ecbuild_dont_pack( DIRS samples DONT_PACK_REGEX "*.grib" )
|
# ecbuild_dont_pack( DIRS samples DONT_PACK_REGEX "*.grib" )
|
||||||
|
ecbuild_dont_pack( FILES .cproject .project )
|
||||||
ecbuild_dont_pack( DIRS
|
ecbuild_dont_pack( DIRS
|
||||||
experimental deprecated doxygen confluence tests/tests.ecmwf
|
experimental deprecated doxygen confluence tests/deprecated tests/tests.ecmwf
|
||||||
config m4 examples/F77 src/deprecated tools/deprecated ifs_samples/grib1_mlgrib2_ieee32
|
src/deprecated tools/deprecated ifs_samples/grib1_mlgrib2_ieee32
|
||||||
examples/examples.dev examples/extra examples/deprecated bamboo
|
examples/examples.dev examples/extra examples/deprecated bamboo
|
||||||
fortran/fortranCtypes tigge/tools share/eccodes .settings )
|
fortran/fortranCtypes tigge/tools share/eccodes .settings )
|
||||||
#ecbuild_dont_pack( DIRS data/bufr DONT_PACK_REGEX "*.bufr" )
|
#ecbuild_dont_pack( DIRS data/bufr DONT_PACK_REGEX "*.bufr" )
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
[[ $(uname) == "Darwin" ]] && return
|
# [[ $(uname) == "Darwin" ]] && return
|
||||||
|
|
||||||
# initialise module environment if it is not
|
# initialise module environment if it is not
|
||||||
if [[ ! $(command -v module > /dev/null 2>&1) ]]; then
|
#if [[ ! $(command -v module > /dev/null 2>&1) ]]; then
|
||||||
. /usr/local/apps/module/init/bash
|
# . /usr/local/apps/module/init/bash
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
module unload grib_api
|
#module unload grib_api
|
||||||
module unload eccodes
|
#module unload eccodes
|
||||||
module unload emos
|
#module unload emos
|
||||||
module unload fftw
|
#module unload fftw
|
||||||
module unload libemos
|
#module unload libemos
|
||||||
module unload metview
|
#module unload metview
|
||||||
|
|
||||||
module load cmake/3.16.5
|
#module load cmake/3.16.5
|
||||||
module load aec
|
#module load aec
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# data/CMakeLists.txt
|
# data/CMakeLists.txt
|
||||||
|
set(ECBUILD_DOWNLOAD_TIMEOUT 60)
|
||||||
|
set(ECBUILD_DOWNLOAD_RETRIES 3)
|
||||||
|
|
||||||
add_subdirectory(tigge)
|
add_subdirectory(tigge)
|
||||||
add_subdirectory(bufr)
|
add_subdirectory(bufr)
|
||||||
add_subdirectory(metar)
|
add_subdirectory(metar)
|
||||||
|
|
|
@ -12,13 +12,18 @@ file(READ "bufr_ref_files.txt" bufr_refs_to_download)
|
||||||
string(REGEX REPLACE "\n" ";" bufr_refs_to_download "${bufr_refs_to_download}")
|
string(REGEX REPLACE "\n" ";" bufr_refs_to_download "${bufr_refs_to_download}")
|
||||||
|
|
||||||
# Exceptional case: download bufr files which have to be treated specially
|
# Exceptional case: download bufr files which have to be treated specially
|
||||||
list(APPEND bufr_refs_to_download "vos308014_v3_26.bufr") # See test ecc-197
|
list(APPEND bufr_files_to_download "vos308014_v3_26.bufr") # See test ecc-197
|
||||||
|
|
||||||
if( ENABLE_EXTRA_TESTS )
|
if( ENABLE_EXTRA_TESTS )
|
||||||
ecbuild_get_test_multidata(
|
ecbuild_get_test_multidata(
|
||||||
TARGET eccodes_download_bufrs
|
TARGET eccodes_download_bufrs
|
||||||
NOCHECK
|
NOCHECK
|
||||||
NAMES ${bufr_files_to_download} ${bufr_refs_to_download}
|
NAMES ${bufr_files_to_download}
|
||||||
|
)
|
||||||
|
ecbuild_get_test_multidata(
|
||||||
|
TARGET eccodes_download_bufr_refs
|
||||||
|
NOCHECK
|
||||||
|
NAMES ${bufr_refs_to_download}
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -262,110 +262,6 @@ synop_multi_subset.bufr.desc.ref
|
||||||
aaen_55.bufr.ls.ref
|
aaen_55.bufr.ls.ref
|
||||||
syno_multi.bufr.header.ref
|
syno_multi.bufr.header.ref
|
||||||
207003.bufr.json.ref
|
207003.bufr.json.ref
|
||||||
new_207003.bufr.ref
|
|
||||||
new_aaen_55.bufr.ref
|
|
||||||
new_aben_55.bufr.ref
|
|
||||||
new_ahws_139.bufr.ref
|
|
||||||
new_airc_142.bufr.ref
|
|
||||||
new_airc_144.bufr.ref
|
|
||||||
new_airs_57.bufr.ref
|
|
||||||
new_alws_139.bufr.ref
|
|
||||||
new_amda_144.bufr.ref
|
|
||||||
new_amsa_55.bufr.ref
|
|
||||||
new_amsb_55.bufr.ref
|
|
||||||
new_amse_55.bufr.ref
|
|
||||||
new_amsu_55.bufr.ref
|
|
||||||
new_amv2_87.bufr.ref
|
|
||||||
new_amv3_87.bufr.ref
|
|
||||||
new_asbh_139.bufr.ref
|
|
||||||
new_asbl_139.bufr.ref
|
|
||||||
new_asca_139.bufr.ref
|
|
||||||
new_asch_139.bufr.ref
|
|
||||||
new_ascs_139.bufr.ref
|
|
||||||
new_aseh_139.bufr.ref
|
|
||||||
new_asel_139.bufr.ref
|
|
||||||
new_ashs_139.bufr.ref
|
|
||||||
new_atap_55.bufr.ref
|
|
||||||
new_ateu_155.bufr.ref
|
|
||||||
new_atms_201.bufr.ref
|
|
||||||
new_atov_55.bufr.ref
|
|
||||||
new_avhm_87.bufr.ref
|
|
||||||
new_avhn_87.bufr.ref
|
|
||||||
new_avhr_58.bufr.ref
|
|
||||||
new_b002_95.bufr.ref
|
|
||||||
new_b002_96.bufr.ref
|
|
||||||
new_b003_56.bufr.ref
|
|
||||||
new_b004_145.bufr.ref
|
|
||||||
new_b005_87.bufr.ref
|
|
||||||
new_b006_96.bufr.ref
|
|
||||||
new_b007_31.bufr.ref
|
|
||||||
new_bssh_170.bufr.ref
|
|
||||||
new_bssh_176.bufr.ref
|
|
||||||
new_bssh_178.bufr.ref
|
|
||||||
new_bssh_180.bufr.ref
|
|
||||||
new_btem_109.bufr.ref
|
|
||||||
new_buoy_27.bufr.ref
|
|
||||||
new_cmwi_87.bufr.ref
|
|
||||||
new_cmwn_87.bufr.ref
|
|
||||||
new_cnow_28.bufr.ref
|
|
||||||
new_cori_156.bufr.ref
|
|
||||||
new_crit_202.bufr.ref
|
|
||||||
new_emsg_87.bufr.ref
|
|
||||||
new_euwv_87.bufr.ref
|
|
||||||
new_fy3a_154.bufr.ref
|
|
||||||
new_fy3b_154.bufr.ref
|
|
||||||
new_go15_87.bufr.ref
|
|
||||||
new_goee_87.bufr.ref
|
|
||||||
new_goes_87.bufr.ref
|
|
||||||
new_grst_26.bufr.ref
|
|
||||||
new_gst4_26.bufr.ref
|
|
||||||
new_hirb_55.bufr.ref
|
|
||||||
new_hirs_55.bufr.ref
|
|
||||||
new_ias1_240.bufr.ref
|
|
||||||
new_iasi_241.bufr.ref
|
|
||||||
new_itwt_233.bufr.ref
|
|
||||||
new_j2eo_216.bufr.ref
|
|
||||||
new_j2nb_216.bufr.ref
|
|
||||||
new_jaso_214.bufr.ref
|
|
||||||
new_meta_140.bufr.ref
|
|
||||||
new_mhen_55.bufr.ref
|
|
||||||
new_mhsa_55.bufr.ref
|
|
||||||
new_mhsb_55.bufr.ref
|
|
||||||
new_mhse_55.bufr.ref
|
|
||||||
new_modi_87.bufr.ref
|
|
||||||
new_modw_87.bufr.ref
|
|
||||||
new_monw_87.bufr.ref
|
|
||||||
new_mytemp.bufr.ref
|
|
||||||
new_new.bufr.ref
|
|
||||||
new_ocea_131.bufr.ref
|
|
||||||
new_ocea_132.bufr.ref
|
|
||||||
new_ocea_133.bufr.ref
|
|
||||||
new_ocea_21.bufr.ref
|
|
||||||
new_pgps_110.bufr.ref
|
|
||||||
new_pilo_91.bufr.ref
|
|
||||||
new_s4kn_165.bufr.ref
|
|
||||||
new_ship_13.bufr.ref
|
|
||||||
new_ship_19.bufr.ref
|
|
||||||
new_ship_9.bufr.ref
|
|
||||||
new_smin_49.bufr.ref
|
|
||||||
new_smis_49.bufr.ref
|
|
||||||
new_smiu_49.bufr.ref
|
|
||||||
new_smos_203.bufr.ref
|
|
||||||
new_sn4k_165.bufr.ref
|
|
||||||
new_soil_7.bufr.ref
|
|
||||||
new_ssbt_127.bufr.ref
|
|
||||||
new_stuk_7.bufr.ref
|
|
||||||
new_syno_1.bufr.ref
|
|
||||||
new_syno_3.bufr.ref
|
|
||||||
new_syno_4.bufr.ref
|
|
||||||
new_syno_multi.bufr.ref
|
|
||||||
new_synop_multi_subset.bufr.ref
|
|
||||||
new_temp_101.bufr.ref
|
|
||||||
new_temp_102.bufr.ref
|
|
||||||
new_temp_106.bufr.ref
|
|
||||||
new_tmr7_129.bufr.ref
|
|
||||||
new_tros_31.bufr.ref
|
|
||||||
new_wavb_134.bufr.ref
|
|
||||||
311001.bufr.ref
|
311001.bufr.ref
|
||||||
uegabe.bufr.num.ref
|
uegabe.bufr.num.ref
|
||||||
syno.bufr.out.ref
|
syno.bufr.out.ref
|
||||||
|
|
|
@ -105,38 +105,65 @@ my $lcount = 0;
|
||||||
if ($SANITY_CHECK) {
|
if ($SANITY_CHECK) {
|
||||||
my %map_sn = (); # map of shortNames
|
my %map_sn = (); # map of shortNames
|
||||||
my %map_pid = (); # map of paramIds
|
my %map_pid = (); # map of paramIds
|
||||||
|
my $sanity_error_count = 0;
|
||||||
print "Checking sanity: uniqueness of paramId and shortName keys ...\n";
|
print "Checking sanity: uniqueness of paramId and shortName keys ...\n";
|
||||||
while (<>) {
|
while (<>) {
|
||||||
chomp;
|
chomp;
|
||||||
|
$lcount++;
|
||||||
s/\r//g; # Remove DOS carriage returns
|
s/\r//g; # Remove DOS carriage returns
|
||||||
if ($first == 1) {
|
if ($first == 1) {
|
||||||
$first = 0;
|
$first = 0;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
$lcount++;
|
|
||||||
($paramId, $shortName, $name, $units) = split(/\t/);
|
($paramId, $shortName, $name, $units) = split(/\t/);
|
||||||
|
|
||||||
die "Error: shortName=$shortName is duplicated (line ", $lcount+1, ")\n" if (exists $map_sn{$shortName});
|
die "Error: shortName=$shortName is duplicated (line $lcount)\n" if (exists $map_sn{$shortName});
|
||||||
$map_sn{$shortName}++; # increment count in shortName map
|
$map_sn{$shortName}++; # increment count in shortName map
|
||||||
|
|
||||||
die "Error: paramId=$paramId is duplicated (line ", $lcount+1, ")\n" if (exists $map_pid{$paramId});
|
die "Error: paramId=$paramId is duplicated (line $lcount)\n" if (exists $map_pid{$paramId});
|
||||||
$map_pid{$paramId}++; # increment count in paramId map
|
$map_pid{$paramId}++; # increment count in paramId map
|
||||||
|
|
||||||
die "Error: paramId=$paramId is not an integer (line ", $lcount+1, ")\n" if (!is_integer($paramId));
|
if (!is_integer($paramId)) {
|
||||||
|
warn "Error: paramId=$paramId is not an integer (line $lcount)\n";
|
||||||
|
$sanity_error_count++;
|
||||||
|
}
|
||||||
|
|
||||||
my $x = $dbh->selectrow_array("select * from param.param where id = ?",undef,$paramId);
|
my $x = $dbh->selectrow_array("select * from param.param where id = ?",undef,$paramId);
|
||||||
die "Error: paramId=$x exists in the database (line ", $lcount+1, ")\n" if (defined $x);
|
if (defined $x) {
|
||||||
|
warn "Error: paramId=$x exists in the database (line $lcount)\n";
|
||||||
|
$sanity_error_count++;
|
||||||
|
}
|
||||||
|
|
||||||
die "Error: Name '$name': ends in space" if ($name =~ / $/);
|
if ($name =~ / $/) {
|
||||||
die "Error: Name '$name': starts with space" if ($name =~ /^ /);
|
warn "Error: Name '$name': ends in space" ;
|
||||||
|
$sanity_error_count++;
|
||||||
# Will die if it fails
|
}
|
||||||
get_db_units_code($units);
|
if ($name =~ /^ /) {
|
||||||
|
warn "Error: Name '$name': starts with space" ;
|
||||||
|
$sanity_error_count++;
|
||||||
|
}
|
||||||
|
if ($name !~ /^[A-Z0-9]/) {
|
||||||
|
warn "Error: name \"$name\" should have uppercase 1st letter or digit (line $lcount)\n";
|
||||||
|
$sanity_error_count++;
|
||||||
|
}
|
||||||
|
|
||||||
$x = $dbh->selectrow_array("select shortName from param.param where shortName = ?",undef,$shortName);
|
$x = $dbh->selectrow_array("select shortName from param.param where shortName = ?",undef,$shortName);
|
||||||
die "Error: shortName=$x exists in the database (line ", $lcount+1, ")\n" if (defined $x);
|
if (defined $x) {
|
||||||
|
warn "Error: shortName=$x exists in the database (line $lcount)\n";
|
||||||
|
$sanity_error_count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!check_units($units)) {
|
||||||
|
warn "Error: Database does not contain units=$units (line $lcount)\n";
|
||||||
|
$sanity_error_count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($sanity_error_count == 0) {
|
||||||
|
print "\nSanity checking completed. $lcount rows checked. No errors.\n";
|
||||||
|
} else {
|
||||||
|
die "\nSanity checking FAILED. $lcount rows checked. $sanity_error_count error(s).\n";
|
||||||
}
|
}
|
||||||
print "\nSanity checking completed. $lcount rows checked. No errors.\nExiting.\n";
|
|
||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,6 +325,13 @@ sub centre_as_str {
|
||||||
return "ECMWF" if ($cc eq $centre_ecmwf);
|
return "ECMWF" if ($cc eq $centre_ecmwf);
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
sub check_units {
|
||||||
|
my $u = shift;
|
||||||
|
my $unit_id = $dbh->selectrow_array("select id from units where name = ?",undef,$u);
|
||||||
|
return 0 if (!$unit_id);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
sub get_db_units_code {
|
sub get_db_units_code {
|
||||||
my $u = shift;
|
my $u = shift;
|
||||||
my $unit_id = $dbh->selectrow_array("select id from units where name = ?",undef,$u);
|
my $unit_id = $dbh->selectrow_array("select id from units where name = ?",undef,$u);
|
||||||
|
|
|
@ -137,8 +137,6 @@ codetable[1] timeRangeIndicator ('5.table',tablesLocalDir,tablesMasterDir) = 1 :
|
||||||
|
|
||||||
unsigned[2] numberIncludedInAverage;
|
unsigned[2] numberIncludedInAverage;
|
||||||
|
|
||||||
meta mybits bits(numberIncludedInAverage,0,12);
|
|
||||||
|
|
||||||
unsigned[1] numberMissingFromAveragesOrAccumulations;
|
unsigned[1] numberMissingFromAveragesOrAccumulations;
|
||||||
unsigned[1] centuryOfReferenceTimeOfData;
|
unsigned[1] centuryOfReferenceTimeOfData;
|
||||||
|
|
||||||
|
|
|
@ -190,6 +190,18 @@
|
||||||
scaledValueOfSecondFixedSurface = missing() ;
|
scaledValueOfSecondFixedSurface = missing() ;
|
||||||
scaleFactorOfSecondFixedSurface = missing() ;
|
scaleFactorOfSecondFixedSurface = missing() ;
|
||||||
}
|
}
|
||||||
|
#Heat flux correction
|
||||||
|
'heat_flux_correction' = {
|
||||||
|
discipline = 10 ;
|
||||||
|
parameterCategory = 3 ;
|
||||||
|
parameterNumber = 18 ;
|
||||||
|
typeOfFirstFixedSurface = 160 ;
|
||||||
|
typeOfSecondFixedSurface = 255 ;
|
||||||
|
scaledValueOfFirstFixedSurface = 0 ;
|
||||||
|
scaleFactorOfFirstFixedSurface = 0 ;
|
||||||
|
scaledValueOfSecondFixedSurface = missing() ;
|
||||||
|
scaleFactorOfSecondFixedSurface = missing() ;
|
||||||
|
}
|
||||||
#Eastward sea water velocity
|
#Eastward sea water velocity
|
||||||
'eastward_sea_water_velocity' = {
|
'eastward_sea_water_velocity' = {
|
||||||
discipline = 10 ;
|
discipline = 10 ;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17069,12 +17069,6 @@
|
||||||
parameterCategory = 151 ;
|
parameterCategory = 151 ;
|
||||||
parameterNumber = 148 ;
|
parameterNumber = 148 ;
|
||||||
}
|
}
|
||||||
#Bottom Pressure (equivalent height)
|
|
||||||
'btp' = {
|
|
||||||
discipline = 192 ;
|
|
||||||
parameterCategory = 151 ;
|
|
||||||
parameterNumber = 149 ;
|
|
||||||
}
|
|
||||||
#Steric height
|
#Steric height
|
||||||
'sh' = {
|
'sh' = {
|
||||||
discipline = 192 ;
|
discipline = 192 ;
|
||||||
|
|
|
@ -17069,12 +17069,6 @@
|
||||||
parameterCategory = 151 ;
|
parameterCategory = 151 ;
|
||||||
parameterNumber = 148 ;
|
parameterNumber = 148 ;
|
||||||
}
|
}
|
||||||
#Bottom Pressure (equivalent height)
|
|
||||||
'Bottom Pressure (equivalent height)' = {
|
|
||||||
discipline = 192 ;
|
|
||||||
parameterCategory = 151 ;
|
|
||||||
parameterNumber = 149 ;
|
|
||||||
}
|
|
||||||
#Steric height
|
#Steric height
|
||||||
'Steric height' = {
|
'Steric height' = {
|
||||||
discipline = 192 ;
|
discipline = 192 ;
|
||||||
|
|
|
@ -17069,12 +17069,6 @@
|
||||||
parameterCategory = 151 ;
|
parameterCategory = 151 ;
|
||||||
parameterNumber = 148 ;
|
parameterNumber = 148 ;
|
||||||
}
|
}
|
||||||
#Bottom Pressure (equivalent height)
|
|
||||||
'151149' = {
|
|
||||||
discipline = 192 ;
|
|
||||||
parameterCategory = 151 ;
|
|
||||||
parameterNumber = 149 ;
|
|
||||||
}
|
|
||||||
#Steric height
|
#Steric height
|
||||||
'151150' = {
|
'151150' = {
|
||||||
discipline = 192 ;
|
discipline = 192 ;
|
||||||
|
|
|
@ -17069,12 +17069,6 @@
|
||||||
parameterCategory = 151 ;
|
parameterCategory = 151 ;
|
||||||
parameterNumber = 148 ;
|
parameterNumber = 148 ;
|
||||||
}
|
}
|
||||||
#Bottom Pressure (equivalent height)
|
|
||||||
'btp' = {
|
|
||||||
discipline = 192 ;
|
|
||||||
parameterCategory = 151 ;
|
|
||||||
parameterNumber = 149 ;
|
|
||||||
}
|
|
||||||
#Steric height
|
#Steric height
|
||||||
'sh' = {
|
'sh' = {
|
||||||
discipline = 192 ;
|
discipline = 192 ;
|
||||||
|
|
|
@ -17069,12 +17069,6 @@
|
||||||
parameterCategory = 151 ;
|
parameterCategory = 151 ;
|
||||||
parameterNumber = 148 ;
|
parameterNumber = 148 ;
|
||||||
}
|
}
|
||||||
#Bottom Pressure (equivalent height)
|
|
||||||
'm' = {
|
|
||||||
discipline = 192 ;
|
|
||||||
parameterCategory = 151 ;
|
|
||||||
parameterNumber = 149 ;
|
|
||||||
}
|
|
||||||
#Steric height
|
#Steric height
|
||||||
'm' = {
|
'm' = {
|
||||||
discipline = 192 ;
|
discipline = 192 ;
|
||||||
|
|
|
@ -65,12 +65,6 @@
|
||||||
parameterCategory = 1 ;
|
parameterCategory = 1 ;
|
||||||
parameterNumber = 199 ;
|
parameterNumber = 199 ;
|
||||||
}
|
}
|
||||||
#Potential evaporation rate
|
|
||||||
'Potential evaporation rate' = {
|
|
||||||
discipline = 0 ;
|
|
||||||
parameterCategory = 1 ;
|
|
||||||
parameterNumber = 200 ;
|
|
||||||
}
|
|
||||||
#Snow cover
|
#Snow cover
|
||||||
'Snow cover' = {
|
'Snow cover' = {
|
||||||
discipline = 0 ;
|
discipline = 0 ;
|
||||||
|
|
|
@ -65,12 +65,6 @@
|
||||||
parameterCategory = 1 ;
|
parameterCategory = 1 ;
|
||||||
parameterNumber = 199 ;
|
parameterNumber = 199 ;
|
||||||
}
|
}
|
||||||
#Potential evaporation rate
|
|
||||||
'260037' = {
|
|
||||||
discipline = 0 ;
|
|
||||||
parameterCategory = 1 ;
|
|
||||||
parameterNumber = 200 ;
|
|
||||||
}
|
|
||||||
#Snow cover
|
#Snow cover
|
||||||
'260038' = {
|
'260038' = {
|
||||||
discipline = 0 ;
|
discipline = 0 ;
|
||||||
|
|
|
@ -65,12 +65,6 @@
|
||||||
parameterCategory = 1 ;
|
parameterCategory = 1 ;
|
||||||
parameterNumber = 199 ;
|
parameterNumber = 199 ;
|
||||||
}
|
}
|
||||||
#Potential evaporation rate
|
|
||||||
'pevpr' = {
|
|
||||||
discipline = 0 ;
|
|
||||||
parameterCategory = 1 ;
|
|
||||||
parameterNumber = 200 ;
|
|
||||||
}
|
|
||||||
#Snow cover
|
#Snow cover
|
||||||
'snowc' = {
|
'snowc' = {
|
||||||
discipline = 0 ;
|
discipline = 0 ;
|
||||||
|
|
|
@ -65,12 +65,6 @@
|
||||||
parameterCategory = 1 ;
|
parameterCategory = 1 ;
|
||||||
parameterNumber = 199 ;
|
parameterNumber = 199 ;
|
||||||
}
|
}
|
||||||
#Potential evaporation rate
|
|
||||||
'W m**-2' = {
|
|
||||||
discipline = 0 ;
|
|
||||||
parameterCategory = 1 ;
|
|
||||||
parameterNumber = 200 ;
|
|
||||||
}
|
|
||||||
#Snow cover
|
#Snow cover
|
||||||
'%' = {
|
'%' = {
|
||||||
discipline = 0 ;
|
discipline = 0 ;
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;}
|
scaledValueOfFirstFixedSurface=0; typeOfSecondFixedSurface=255;}
|
||||||
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;}
|
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=160;}
|
||||||
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=9;}
|
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=9;}
|
||||||
|
'o2d' = {typeOfFirstFixedSurface=160; typeOfSecondFixedSurface=20;
|
||||||
|
scaledValueOfFirstFixedSurface=0; scaleFactorOfFirstFixedSurface=0;}
|
||||||
'sfc' = {typeOfFirstFixedSurface=162; typeOfSecondFixedSurface=255;}
|
'sfc' = {typeOfFirstFixedSurface=162; typeOfSecondFixedSurface=255;}
|
||||||
'sfc' = {typeOfFirstFixedSurface=166; typeOfSecondFixedSurface=255;}
|
'sfc' = {typeOfFirstFixedSurface=166; typeOfSecondFixedSurface=255;}
|
||||||
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=255;}
|
'o3d' = {typeOfFirstFixedSurface=168; typeOfSecondFixedSurface=255;}
|
||||||
|
@ -49,7 +51,11 @@
|
||||||
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255; discipline=1;}
|
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=255; discipline=1;}
|
||||||
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=255;}
|
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=255;}
|
||||||
'o2d' = {typeOfFirstFixedSurface=176; typeOfSecondFixedSurface=255;}
|
'o2d' = {typeOfFirstFixedSurface=176; typeOfSecondFixedSurface=255;}
|
||||||
|
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=160;
|
||||||
|
scaleFactorOfSecondFixedSurface=0; scaledValueOfSecondFixedSurface=0;}
|
||||||
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176;}
|
'o2d' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176;}
|
||||||
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176; discipline=1;}
|
'sfc' = {typeOfFirstFixedSurface=174; typeOfSecondFixedSurface=176; discipline=1;}
|
||||||
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=176;}
|
'o2d' = {typeOfFirstFixedSurface=175; typeOfSecondFixedSurface=176;}
|
||||||
'sfc' = {typeOfFirstFixedSurface=177; typeOfSecondFixedSurface=255;}
|
'sfc' = {typeOfFirstFixedSurface=177; typeOfSecondFixedSurface=255;}
|
||||||
|
'o2d' = {typeOfFirstFixedSurface=188; typeOfSecondFixedSurface=189;}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -48,6 +48,7 @@ concept packingType (unknown) {
|
||||||
"spectral_ieee" = { dataRepresentationTemplateNumber = 50000; }
|
"spectral_ieee" = { dataRepresentationTemplateNumber = 50000; }
|
||||||
"grid_simple_log_preprocessing" = { dataRepresentationTemplateNumber = 61; }
|
"grid_simple_log_preprocessing" = { dataRepresentationTemplateNumber = 61; }
|
||||||
"bifourier_complex" = { dataRepresentationTemplateNumber = 53; spectralType=2; }
|
"bifourier_complex" = { dataRepresentationTemplateNumber = 53; spectralType=2; }
|
||||||
|
"grid_run_length" = { dataRepresentationTemplateNumber = 200; }
|
||||||
} : dump;
|
} : dump;
|
||||||
|
|
||||||
template dataRepresentation "grib2/template.5.[dataRepresentationTemplateNumber:l].def";
|
template dataRepresentation "grib2/template.5.[dataRepresentationTemplateNumber:l].def";
|
||||||
|
|
|
@ -50,6 +50,10 @@ if (bitMapIndicator == 255)
|
||||||
if (dataRepresentationTemplateNumber == 2 || dataRepresentationTemplateNumber == 3) {
|
if (dataRepresentationTemplateNumber == 2 || dataRepresentationTemplateNumber == 3) {
|
||||||
transient missingValuesPresent = (missingValueManagementUsed != 0) : read_only;
|
transient missingValuesPresent = (missingValueManagementUsed != 0) : read_only;
|
||||||
}
|
}
|
||||||
|
if (dataRepresentationTemplateNumber == 200) {
|
||||||
|
# This template can have undefined values within its Data Section
|
||||||
|
transient missingValuesPresent = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
meta md5Section6 md5(offsetSection6,section6Length);
|
meta md5Section6 md5(offsetSection6,section6Length);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,10 @@
|
||||||
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
|
# TEMPLATE 4.108, Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for generic optical properties
|
||||||
|
|
||||||
|
include "grib2/template.4.parameter.def"
|
||||||
|
include "grib2/template.4.optical.def"
|
||||||
|
include "grib2/template.4.generating_process.def"
|
||||||
|
include "grib2/template.4.forecast_time.def"
|
||||||
|
include "grib2/template.4.point_in_time.def"
|
||||||
|
include "grib2/template.4.horizontal.def"
|
|
@ -0,0 +1,11 @@
|
||||||
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
|
# TEMPLATE 4.109, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for generic optical properties
|
||||||
|
|
||||||
|
include "grib2/template.4.parameter.def"
|
||||||
|
include "grib2/template.4.optical.def"
|
||||||
|
include "grib2/template.4.generating_process.def"
|
||||||
|
include "grib2/template.4.forecast_time.def"
|
||||||
|
include "grib2/template.4.point_in_time.def"
|
||||||
|
include "grib2/template.4.horizontal.def"
|
||||||
|
include "grib2/template.4.eps.def"
|
|
@ -0,0 +1,10 @@
|
||||||
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
|
# TEMPLATE 4.110 - Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties
|
||||||
|
|
||||||
|
include "grib2/template.4.parameter.def"
|
||||||
|
include "grib2/template.4.optical.def"
|
||||||
|
include "grib2/template.4.generating_process.def"
|
||||||
|
include "grib2/template.4.forecast_time.def"
|
||||||
|
include "grib2/template.4.horizontal.def"
|
||||||
|
include "grib2/template.4.statistical.def"
|
|
@ -0,0 +1,11 @@
|
||||||
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
|
# TEMPLATE 4.111, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for generic optical properties
|
||||||
|
|
||||||
|
include "grib2/template.4.parameter.def"
|
||||||
|
include "grib2/template.4.optical.def"
|
||||||
|
include "grib2/template.4.generating_process.def"
|
||||||
|
include "grib2/template.4.forecast_time.def"
|
||||||
|
include "grib2/template.4.horizontal.def"
|
||||||
|
include "grib2/template.4.eps.def"
|
||||||
|
include "grib2/template.4.statistical.def"
|
|
@ -0,0 +1,10 @@
|
||||||
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
|
# TEMPLATE 4.62, Average, accumulation, and/or extreme values or other statistically processed values at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles at a horizontal level or horizontal layer at a point in time
|
||||||
|
|
||||||
|
include "grib2/template.4.parameter.def"
|
||||||
|
include "grib2/template.4.tile.def"
|
||||||
|
include "grib2/template.4.generating_process.def"
|
||||||
|
include "grib2/template.4.forecast_time.def"
|
||||||
|
include "grib2/template.4.horizontal.def"
|
||||||
|
include "grib2/template.4.statistical.def"
|
|
@ -0,0 +1,11 @@
|
||||||
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
|
# TEMPLATE 4.63, Individual ensemble forecast, control and perturbed, at a horizontal level or in a horizontal layer in a continuous or non-continuous time interval for spatio-temporal changing tiles
|
||||||
|
|
||||||
|
include "grib2/template.4.parameter.def"
|
||||||
|
include "grib2/template.4.tile.def"
|
||||||
|
include "grib2/template.4.generating_process.def"
|
||||||
|
include "grib2/template.4.forecast_time.def"
|
||||||
|
include "grib2/template.4.horizontal.def"
|
||||||
|
include "grib2/template.4.eps.def"
|
||||||
|
include "grib2/template.4.statistical.def"
|
|
@ -5,7 +5,9 @@
|
||||||
include "grib2/template.4.parameter.def"
|
include "grib2/template.4.parameter.def"
|
||||||
include "grib2/template.4.postproc.def"
|
include "grib2/template.4.postproc.def"
|
||||||
include "grib2/template.4.generating_process.def"
|
include "grib2/template.4.generating_process.def"
|
||||||
|
|
||||||
#include "grib2/template.4.forecast_time.def"
|
#include "grib2/template.4.forecast_time.def"
|
||||||
#include "grib2/template.4.point_in_time.def"
|
#include "grib2/template.4.point_in_time.def"
|
||||||
|
|
||||||
include "grib2/template.4.horizontal.def"
|
include "grib2/template.4.horizontal.def"
|
||||||
include "grib2/template.4.localtime.def"
|
include "grib2/template.4.localtime.def"
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
include "grib2/template.4.parameter.def"
|
include "grib2/template.4.parameter.def"
|
||||||
include "grib2/template.4.postproc.def"
|
include "grib2/template.4.postproc.def"
|
||||||
include "grib2/template.4.generating_process.def"
|
include "grib2/template.4.generating_process.def"
|
||||||
|
|
||||||
#include "grib2/template.4.forecast_time.def"
|
#include "grib2/template.4.forecast_time.def"
|
||||||
#include "grib2/template.4.point_in_time.def"
|
#include "grib2/template.4.point_in_time.def"
|
||||||
|
|
||||||
include "grib2/template.4.horizontal.def"
|
include "grib2/template.4.horizontal.def"
|
||||||
include "grib2/template.4.eps.def"
|
include "grib2/template.4.eps.def"
|
||||||
include "grib2/template.4.localtime.def"
|
include "grib2/template.4.localtime.def"
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
|
|
||||||
include "grib2/template.4.parameter.def"
|
include "grib2/template.4.parameter.def"
|
||||||
include "grib2/template.4.generating_process.def"
|
include "grib2/template.4.generating_process.def"
|
||||||
|
|
||||||
# no template.4.forecast_time.def component in this template.
|
# no template.4.forecast_time.def component in this template.
|
||||||
|
|
||||||
include "grib2/template.4.horizontal.def"
|
include "grib2/template.4.horizontal.def"
|
||||||
include "grib2/template.4.localtime_statistical.def"
|
include "grib2/template.4.localtime_statistical.def"
|
||||||
include "grib2/template.4.localtime.def"
|
include "grib2/template.4.localtime.def"
|
||||||
|
|
|
@ -4,8 +4,10 @@
|
||||||
|
|
||||||
include "grib2/template.4.parameter.def"
|
include "grib2/template.4.parameter.def"
|
||||||
include "grib2/template.4.generating_process.def"
|
include "grib2/template.4.generating_process.def"
|
||||||
|
|
||||||
#include "grib2/template.4.forecast_time.def"
|
#include "grib2/template.4.forecast_time.def"
|
||||||
#include "grib2/template.4.point_in_time.def"
|
#include "grib2/template.4.point_in_time.def"
|
||||||
|
|
||||||
include "grib2/template.4.horizontal.def"
|
include "grib2/template.4.horizontal.def"
|
||||||
include "grib2/template.4.eps.def"
|
include "grib2/template.4.eps.def"
|
||||||
include "grib2/template.4.localtime_statistical.def"
|
include "grib2/template.4.localtime_statistical.def"
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
include "grib2/template.4.parameter.def"
|
include "grib2/template.4.parameter.def"
|
||||||
include "grib2/template.4.postproc.def"
|
include "grib2/template.4.postproc.def"
|
||||||
include "grib2/template.4.generating_process.def"
|
include "grib2/template.4.generating_process.def"
|
||||||
|
|
||||||
#include "grib2/template.4.forecast_time.def"
|
#include "grib2/template.4.forecast_time.def"
|
||||||
#include "grib2/template.4.point_in_time.def"
|
#include "grib2/template.4.point_in_time.def"
|
||||||
|
|
||||||
include "grib2/template.4.horizontal.def"
|
include "grib2/template.4.horizontal.def"
|
||||||
include "grib2/template.4.localtime_statistical.def"
|
include "grib2/template.4.localtime_statistical.def"
|
||||||
include "grib2/template.4.localtime.def"
|
include "grib2/template.4.localtime.def"
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
include "grib2/template.4.parameter.def"
|
include "grib2/template.4.parameter.def"
|
||||||
include "grib2/template.4.postproc.def"
|
include "grib2/template.4.postproc.def"
|
||||||
include "grib2/template.4.generating_process.def"
|
include "grib2/template.4.generating_process.def"
|
||||||
|
|
||||||
#include "grib2/template.4.forecast_time.def"
|
#include "grib2/template.4.forecast_time.def"
|
||||||
#include "grib2/template.4.point_in_time.def"
|
#include "grib2/template.4.point_in_time.def"
|
||||||
|
|
||||||
include "grib2/template.4.horizontal.def"
|
include "grib2/template.4.horizontal.def"
|
||||||
include "grib2/template.4.eps.def"
|
include "grib2/template.4.eps.def"
|
||||||
include "grib2/template.4.localtime_statistical.def"
|
include "grib2/template.4.localtime_statistical.def"
|
||||||
|
|
|
@ -34,14 +34,12 @@ alias NC = numberOfForecastsInTheCluster;
|
||||||
unsigned[1] scaleFactorOfStandardDeviation : edition_specific ;
|
unsigned[1] scaleFactorOfStandardDeviation : edition_specific ;
|
||||||
alias scaleFactorOfStandardDeviationInTheCluster=scaleFactorOfStandardDeviation;
|
alias scaleFactorOfStandardDeviationInTheCluster=scaleFactorOfStandardDeviation;
|
||||||
|
|
||||||
|
|
||||||
# Scaled value of standard deviation in the cluster
|
# Scaled value of standard deviation in the cluster
|
||||||
unsigned[4] scaledValueOfStandardDeviation : dump ;
|
unsigned[4] scaledValueOfStandardDeviation : dump ;
|
||||||
alias scaledValueOfStandardDeviationInTheCluster=scaledValueOfStandardDeviation;
|
alias scaledValueOfStandardDeviationInTheCluster=scaledValueOfStandardDeviation;
|
||||||
|
|
||||||
|
|
||||||
# Scale factor of distance of the cluster from ensemble mean
|
# Scale factor of distance of the cluster from ensemble mean
|
||||||
unsigned[1] scaleFactorOfDistanceFromEnsembleMean : dump;
|
unsigned[1] scaleFactorOfDistanceFromEnsembleMean : dump;
|
||||||
|
|
||||||
# Scaled value of distance of the cluster from ensemble mean
|
# Scaled value of distance of the cluster from ensemble mean
|
||||||
unsigned[4] scaleFactorOfDistanceFromEnsembleMean : dump;
|
unsigned[4] scaledValueOfDistanceFromEnsembleMean : dump;
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
remove is_localtime;
|
remove is_localtime;
|
||||||
transient is_localtime=1;
|
transient is_localtime=1;
|
||||||
|
|
||||||
|
alias defaultStepUnits = one; # 1 means Hour. See code table 4.4
|
||||||
|
template_nofail default_step_units "grib2/localConcepts/[centre:s]/default_step_units.def";
|
||||||
|
codetable[1] stepUnits 'stepUnits.table' = defaultStepUnits : transient,dump,no_copy;
|
||||||
|
alias time.stepUnits = stepUnits;
|
||||||
|
|
||||||
# Method used to calculate the field value at the local time specified in section 1
|
# Method used to calculate the field value at the local time specified in section 1
|
||||||
codetable[1] localTimeMethod ('4.248.table',masterDir,localDir)=255 : dump;
|
codetable[1] localTimeMethod ('4.248.table',masterDir,localDir)=255 : dump;
|
||||||
|
|
||||||
|
@ -45,7 +50,7 @@ localTimeForecastList list(numberOfForecastsUsedInLocalTime)
|
||||||
unsigned[4] timeIncrement=0 : dump;
|
unsigned[4] timeIncrement=0 : dump;
|
||||||
}
|
}
|
||||||
|
|
||||||
alias ls.time=dataTime;
|
alias ls.time = dataTime;
|
||||||
# See ECC-707
|
# See ECC-707
|
||||||
transient lsdate_bug = 1: hidden;
|
transient lsdate_bug = 1: hidden;
|
||||||
transient lstime_bug = 1: hidden;
|
transient lstime_bug = 1: hidden;
|
||||||
|
@ -78,6 +83,10 @@ if (numberOfForecastsUsedInLocalTime == 1) {
|
||||||
alias mars.time = timeOfForecastUsedInLocalTime : dump;
|
alias mars.time = timeOfForecastUsedInLocalTime : dump;
|
||||||
alias mars.step = endStep;
|
alias mars.step = endStep;
|
||||||
|
|
||||||
|
alias time.dataDate = dateOfForecastUsedInLocalTime;
|
||||||
|
alias time.dataTime = timeOfForecastUsedInLocalTime;
|
||||||
|
alias time.endStep = endStep;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (numberOfForecastsUsedInLocalTime > 1) {
|
if (numberOfForecastsUsedInLocalTime > 1) {
|
||||||
meta selectedFcIndex closest_date(dataDate, dataTime,
|
meta selectedFcIndex closest_date(dataDate, dataTime,
|
||||||
|
@ -106,5 +115,10 @@ if (numberOfForecastsUsedInLocalTime > 1) {
|
||||||
alias mars.date = dateOfForecastUsedInLocalTime : dump;
|
alias mars.date = dateOfForecastUsedInLocalTime : dump;
|
||||||
alias mars.time = timeOfForecastUsedInLocalTime : dump;
|
alias mars.time = timeOfForecastUsedInLocalTime : dump;
|
||||||
alias mars.step = endStep;
|
alias mars.step = endStep;
|
||||||
|
|
||||||
|
alias time.dataDate = dateOfForecastUsedInLocalTime;
|
||||||
|
alias time.dataTime = timeOfForecastUsedInLocalTime;
|
||||||
|
alias time.endStep = endStep;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,4 +47,3 @@ unsigned[1] scaleFactorOfDistanceFromEnsembleMean : dump ;
|
||||||
# Scaled value of distance of the cluster from ensemble mean
|
# Scaled value of distance of the cluster from ensemble mean
|
||||||
unsigned[4] scaledValueOfDistanceFromEnsembleMean : dump ;
|
unsigned[4] scaledValueOfDistanceFromEnsembleMean : dump ;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# (C) Copyright 2005- ECMWF.
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
# TEMPLATE 5.53, BiFourier coefficients data - complex packing
|
# TEMPLATE 5.53, BiFourier coefficients data - complex packing
|
||||||
# Spectral data for limited area models \u2013 complex packing
|
# Spectral data for limited area models - complex packing
|
||||||
|
|
||||||
include "grib2/template.5.packing.def";
|
include "grib2/template.5.packing.def";
|
||||||
|
|
||||||
|
|
|
@ -24,5 +24,7 @@ meta values data_apply_bitmap(codedValues,
|
||||||
alias data.packedValues = codedValues;
|
alias data.packedValues = codedValues;
|
||||||
|
|
||||||
template statistics "common/statistics_grid.def";
|
template statistics "common/statistics_grid.def";
|
||||||
template missing_values "common/missing_values_grid.def";
|
|
||||||
|
|
||||||
|
# This template can have undefined values within its Data Section
|
||||||
|
meta numberOfMissing count_missing(bitmap,unusedBitsInBitmap,numberOfDataPoints,one) : dump;
|
||||||
|
alias numberOfMissingValues=numberOfMissing;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# (C) Copyright 2005- ECMWF.
|
# (C) Copyright 2005- ECMWF.
|
||||||
|
|
||||||
# TEMPLATE 7.53, BiFourier coefficients - complex packing
|
# TEMPLATE 7.53, Bi-Fourier: Spectral data for limited area models - complex packing
|
||||||
# Spectral data for limited area models \u2013 complex packing
|
|
||||||
|
|
||||||
constant biFourierCoefficients = 1;
|
constant biFourierCoefficients = 1;
|
||||||
constant complexPacking = 1;
|
constant complexPacking = 1;
|
||||||
|
@ -39,7 +38,8 @@ meta codedValues data_g2bifourier_packing(
|
||||||
numberOfValues
|
numberOfValues
|
||||||
): read_only;
|
): read_only;
|
||||||
|
|
||||||
meta values data_apply_bitmap(codedValues,
|
meta values data_apply_bitmap(
|
||||||
|
codedValues,
|
||||||
bitmap,
|
bitmap,
|
||||||
missingValue,
|
missingValue,
|
||||||
binaryScaleFactor,
|
binaryScaleFactor,
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -43,6 +43,8 @@
|
||||||
42 ef EFAS (European flood awareness system)
|
42 ef EFAS (European flood awareness system)
|
||||||
43 gf GLOFAS (Global flood awareness system)
|
43 gf GLOFAS (Global flood awareness system)
|
||||||
44 gg Greenhouse Gases
|
44 gg Greenhouse Gases
|
||||||
|
45 ml Machine learning
|
||||||
|
46 d1 Destination Earth
|
||||||
99 te Test
|
99 te Test
|
||||||
100 at Austria
|
100 at Austria
|
||||||
101 be Belgium
|
101 be Belgium
|
||||||
|
|
|
@ -53,7 +53,6 @@
|
||||||
#cmakedefine ECCODES_HAVE_REALPATH
|
#cmakedefine ECCODES_HAVE_REALPATH
|
||||||
#cmakedefine ECCODES_HAVE_FSYNC
|
#cmakedefine ECCODES_HAVE_FSYNC
|
||||||
#cmakedefine ECCODES_HAVE_FDATASYNC
|
#cmakedefine ECCODES_HAVE_FDATASYNC
|
||||||
#cmakedefine ECCODES_ON_LINUX_32BIT
|
|
||||||
|
|
||||||
#if defined(EC_HAVE_ASSERT_H) || defined(ECCODES_HAVE_ASSERT_H)
|
#if defined(EC_HAVE_ASSERT_H) || defined(ECCODES_HAVE_ASSERT_H)
|
||||||
#define HAVE_ASSERT_H 1
|
#define HAVE_ASSERT_H 1
|
||||||
|
|
|
@ -148,7 +148,7 @@ foreach( test ${tests_extra} )
|
||||||
TYPE SCRIPT
|
TYPE SCRIPT
|
||||||
CONDITION ENABLE_EXTRA_TESTS
|
CONDITION ENABLE_EXTRA_TESTS
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${test}.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs )
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs eccodes_download_bufr_refs )
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Tests which are conditional
|
# Tests which are conditional
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# (C) Copyright 2005- 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.
|
|
||||||
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
CC=xlc
|
|
||||||
FC=xlf
|
|
||||||
|
|
||||||
jasper_lib="-I/usr/local/lib/metaps/lib/grib_api/jasper/include -L/usr/local/lib/metaps/lib/grib_api/jasper/lib -ljasper"
|
|
||||||
grib_api_lib="-I/usr/local/lib/metaps/lib/grib_api/new/include -L/usr/local/lib/metaps/lib/grib_api/new/lib -lgrib_api"
|
|
||||||
|
|
||||||
$CC -o multi multi.c $jasper_lib $grib_api_lib -lm
|
|
||||||
|
|
||||||
./multi > /dev/null
|
|
||||||
|
|
||||||
$FC -o multi_fortran multi_fortran.F $jasper_lib $grib_api_lib
|
|
||||||
|
|
||||||
./multi_fortran > /dev/null
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
double* values = NULL;
|
float* fvalues = NULL; /* data values as floats */
|
||||||
|
double* dvalues = NULL; /* data values as doubles */
|
||||||
size_t values_len = 0;
|
size_t values_len = 0;
|
||||||
size_t i = 0, len = 0;
|
size_t i = 0, len = 0;
|
||||||
|
|
||||||
|
@ -37,7 +38,8 @@ int main(int argc, char** argv)
|
||||||
long numberOfPointsAlongAParallel;
|
long numberOfPointsAlongAParallel;
|
||||||
long numberOfPointsAlongAMeridian;
|
long numberOfPointsAlongAMeridian;
|
||||||
|
|
||||||
double average = 0;
|
double daverage = 0;
|
||||||
|
float faverage = 0;
|
||||||
char* packingType = NULL;
|
char* packingType = NULL;
|
||||||
|
|
||||||
FILE* in = NULL;
|
FILE* in = NULL;
|
||||||
|
@ -104,20 +106,27 @@ int main(int argc, char** argv)
|
||||||
/* get the size of the values array*/
|
/* get the size of the values array*/
|
||||||
CODES_CHECK(codes_get_size(h, "values", &values_len), 0);
|
CODES_CHECK(codes_get_size(h, "values", &values_len), 0);
|
||||||
|
|
||||||
values = (double*)malloc(values_len * sizeof(double));
|
fvalues = (float*)malloc(values_len * sizeof(float));
|
||||||
|
dvalues = (double*)malloc(values_len * sizeof(double));
|
||||||
|
|
||||||
/* get data values*/
|
/* get data values*/
|
||||||
CODES_CHECK(codes_get_double_array(h, "values", values, &values_len), 0);
|
CODES_CHECK(codes_get_float_array(h, "values", fvalues, &values_len), 0);
|
||||||
|
CODES_CHECK(codes_get_double_array(h, "values", dvalues, &values_len), 0);
|
||||||
|
|
||||||
average = 0;
|
faverage = 0;
|
||||||
for (i = 0; i < values_len; i++)
|
daverage = 0;
|
||||||
average += values[i];
|
for (i = 0; i < values_len; i++) {
|
||||||
|
faverage += fvalues[i];
|
||||||
|
daverage += dvalues[i];
|
||||||
|
}
|
||||||
|
|
||||||
average /= (double)values_len;
|
faverage /= (float)values_len;
|
||||||
|
daverage /= (double)values_len;
|
||||||
|
|
||||||
free(values);
|
free(fvalues);
|
||||||
|
free(dvalues);
|
||||||
printf("There are %d values, average is %g\n", (int)values_len, average);
|
printf("There are %zu values, double average is %g\n", values_len, daverage);
|
||||||
|
printf("There are %zu values, float average is %f\n", values_len, faverage);
|
||||||
|
|
||||||
{
|
{
|
||||||
int eq = 0;
|
int eq = 0;
|
||||||
|
|
|
@ -15,9 +15,11 @@ tempGrib="out_surface_level.grib2"
|
||||||
${examples_dir}/c_grib_set_missing
|
${examples_dir}/c_grib_set_missing
|
||||||
|
|
||||||
# Check the keys have been set to MISSING
|
# Check the keys have been set to MISSING
|
||||||
sf=`${tools_dir}/grib_get -p scaleFactorOfFirstFixedSurface $tempGrib`
|
if [ -f "${tools_dir}/grib_get" ]; then
|
||||||
[ "$sf" = "MISSING" ]
|
sf=`${tools_dir}/grib_get -p scaleFactorOfFirstFixedSurface $tempGrib`
|
||||||
sf=`${tools_dir}/grib_get -p scaledValueOfFirstFixedSurface $tempGrib`
|
[ "$sf" = "MISSING" ]
|
||||||
[ "$sf" = "MISSING" ]
|
sf=`${tools_dir}/grib_get -p scaledValueOfFirstFixedSurface $tempGrib`
|
||||||
|
[ "$sf" = "MISSING" ]
|
||||||
|
fi
|
||||||
|
|
||||||
rm -f $tempGrib
|
rm -f $tempGrib
|
||||||
|
|
|
@ -97,25 +97,25 @@ else()
|
||||||
get_product_kind )
|
get_product_kind )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach( tool ${tests_sanity} )
|
foreach( atest ${tests_sanity} )
|
||||||
ecbuild_add_test( TARGET eccodes_f_${tool}
|
ecbuild_add_test( TARGET eccodes_f_${atest}
|
||||||
SOURCES ${tool}.f90
|
SOURCES ${atest}.f90
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS eccodes_f90 eccodes
|
LIBS eccodes_f90 eccodes
|
||||||
CONDITION HAVE_FORTRAN
|
CONDITION HAVE_FORTRAN
|
||||||
LABELS "sanity"
|
LABELS "sanity"
|
||||||
RESOURCES bufr_read_scatterometer_f.ref
|
RESOURCES bufr_read_scatterometer_f.ref
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh )
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh )
|
||||||
endforeach()
|
endforeach()
|
||||||
foreach( tool ${tests_extra} )
|
foreach( atest ${tests_extra} )
|
||||||
ecbuild_add_test( TARGET eccodes_f_${tool}
|
ecbuild_add_test( TARGET eccodes_f_${atest}
|
||||||
SOURCES ${tool}.f90
|
SOURCES ${atest}.f90
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS eccodes_f90 eccodes
|
LIBS eccodes_f90 eccodes
|
||||||
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
|
CONDITION HAVE_FORTRAN AND ENABLE_EXTRA_TESTS
|
||||||
RESOURCES bufr_read_scatterometer_f.ref
|
RESOURCES bufr_read_scatterometer_f.ref
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${tool}.sh
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${atest}.sh
|
||||||
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs )
|
TEST_DEPENDS eccodes_download_gribs eccodes_download_bufrs eccodes_download_bufr_refs )
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
# Test for CCSDS (AEC) packing
|
# Test for CCSDS (AEC) packing
|
||||||
|
@ -123,7 +123,7 @@ ecbuild_add_test( TARGET eccodes_f_grib_set_packing
|
||||||
SOURCES grib_set_packing.f90
|
SOURCES grib_set_packing.f90
|
||||||
LINKER_LANGUAGE Fortran
|
LINKER_LANGUAGE Fortran
|
||||||
LIBS eccodes_f90 eccodes
|
LIBS eccodes_f90 eccodes
|
||||||
CONDITION HAVE_AEC AND HAVE_FORTRAN
|
CONDITION HAVE_BUILD_TOOLS AND HAVE_AEC AND HAVE_FORTRAN
|
||||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
|
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/grib_set_packing.sh )
|
||||||
|
|
||||||
# Executables without a shell script
|
# Executables without a shell script
|
||||||
|
|
|
@ -16,12 +16,12 @@ program grib_get_pv
|
||||||
integer :: infile
|
integer :: infile
|
||||||
integer :: igrib
|
integer :: igrib
|
||||||
integer :: PVPresent, nb_pv
|
integer :: PVPresent, nb_pv
|
||||||
real, dimension(:), allocatable :: pv
|
real(kind=8), dimension(:), allocatable :: pv
|
||||||
|
|
||||||
call codes_open_file(infile, '../../data/reduced_gaussian_model_level.grib1', 'r')
|
call codes_open_file(infile, '../../data/reduced_gaussian_model_level.grib1', 'r')
|
||||||
|
|
||||||
! A new grib message is loaded from file
|
! A new GRIB message is loaded from file
|
||||||
! igrib is the grib id to be used in subsequent calls
|
! igrib is the message id to be used in subsequent calls
|
||||||
call codes_grib_new_from_file(infile, igrib)
|
call codes_grib_new_from_file(infile, igrib)
|
||||||
|
|
||||||
! Get PVPresent to see if the 'pv' array is there
|
! Get PVPresent to see if the 'pv' array is there
|
||||||
|
|
|
@ -2767,30 +2767,14 @@ int grib_f_get_real4_array_(int* gid, char* key, float *val, int* size, int len
|
||||||
int err = GRIB_SUCCESS;
|
int err = GRIB_SUCCESS;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
size_t lsize = *size;
|
size_t lsize = *size;
|
||||||
double* val8 = NULL;
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
if(!h) return GRIB_INVALID_GRIB;
|
if(!h){
|
||||||
|
return GRIB_INVALID_GRIB;
|
||||||
if(*size)
|
}else{
|
||||||
val8 = (double*)grib_context_malloc(h->context,(*size)*(sizeof(double)));
|
err = grib_get_float_array(h, cast_char(buf,key,len), val, &lsize);
|
||||||
else
|
*size = lsize;
|
||||||
val8 = (double*)grib_context_malloc(h->context,sizeof(double));
|
|
||||||
|
|
||||||
if(!val8) return GRIB_OUT_OF_MEMORY;
|
|
||||||
|
|
||||||
err = grib_get_double_array(h, cast_char(buf,key,len), val8, &lsize);
|
|
||||||
if (err) {
|
|
||||||
grib_context_free(h->context,val8);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i=0;i<lsize;i++)
|
|
||||||
val[i] = val8[i];
|
|
||||||
|
|
||||||
grib_context_free(h->context,val8);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
}
|
||||||
int grib_f_get_real4_array__(int* gid, char* key, float* val, int* size, int len){
|
int grib_f_get_real4_array__(int* gid, char* key, float* val, int* size, int len){
|
||||||
return grib_f_get_real4_array_( gid, key, val, size, len);
|
return grib_f_get_real4_array_( gid, key, val, size, len);
|
||||||
|
@ -2800,7 +2784,7 @@ int grib_f_get_real4_array(int* gid, char* key, float* val, int* size, int len){
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
int grib_f_set_force_real4_array_(int* gid, char* key, float*val, int* size, int len)
|
int grib_f_set_force_real4_array_(int* gid, char* key, float* val, int* size, int len)
|
||||||
{
|
{
|
||||||
grib_handle *h = get_handle(*gid);
|
grib_handle *h = get_handle(*gid);
|
||||||
int err = GRIB_SUCCESS;
|
int err = GRIB_SUCCESS;
|
||||||
|
|
|
@ -4,12 +4,14 @@ static int pack_missing(grib_accessor*);
|
||||||
static int is_missing(grib_accessor*);
|
static int is_missing(grib_accessor*);
|
||||||
static int pack_bytes(grib_accessor*, const unsigned char*, size_t* len);
|
static int pack_bytes(grib_accessor*, const unsigned char*, size_t* len);
|
||||||
static int pack_double(grib_accessor*, const double* val, size_t* len);
|
static int pack_double(grib_accessor*, const double* val, size_t* len);
|
||||||
|
static int pack_float(grib_accessor*, const float* val, size_t* len);
|
||||||
static int pack_long(grib_accessor*, const long* val, size_t* len);
|
static int pack_long(grib_accessor*, const long* val, size_t* len);
|
||||||
static int pack_string(grib_accessor*, const char*, size_t* len);
|
static int pack_string(grib_accessor*, const char*, size_t* len);
|
||||||
static int pack_string_array(grib_accessor*, const char**, size_t* len);
|
static int pack_string_array(grib_accessor*, const char**, size_t* len);
|
||||||
static int pack_expression(grib_accessor*, grib_expression*);
|
static int pack_expression(grib_accessor*, grib_expression*);
|
||||||
static int unpack_bytes(grib_accessor*, unsigned char*, size_t* len);
|
static int unpack_bytes(grib_accessor*, unsigned char*, size_t* len);
|
||||||
static int unpack_double(grib_accessor*, double* val, size_t* len);
|
static int unpack_double(grib_accessor*, double* val, size_t* len);
|
||||||
|
static int unpack_float(grib_accessor*, float* val, size_t* len);
|
||||||
static int unpack_long(grib_accessor*, long* val, size_t* len);
|
static int unpack_long(grib_accessor*, long* val, size_t* len);
|
||||||
static int unpack_string(grib_accessor*, char*, size_t* len);
|
static int unpack_string(grib_accessor*, char*, size_t* len);
|
||||||
static int unpack_string_array(grib_accessor*, char**, size_t* len);
|
static int unpack_string_array(grib_accessor*, char**, size_t* len);
|
||||||
|
@ -31,7 +33,9 @@ static int nearest_smaller_value (grib_accessor*, double, double*);
|
||||||
static grib_accessor* next(grib_accessor*, int);
|
static grib_accessor* next(grib_accessor*, int);
|
||||||
static int compare(grib_accessor*, grib_accessor*);
|
static int compare(grib_accessor*, grib_accessor*);
|
||||||
static int unpack_double_element(grib_accessor*, size_t i, double* val);
|
static int unpack_double_element(grib_accessor*, size_t i, double* val);
|
||||||
|
static int unpack_float_element(grib_accessor*, size_t i, float* val);
|
||||||
static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array);
|
static int unpack_double_element_set(grib_accessor*, const size_t* index_array, size_t len, double* val_array);
|
||||||
|
static int unpack_float_element_set(grib_accessor*, const size_t* index_array, size_t len, float* val_array);
|
||||||
static int unpack_double_subarray(grib_accessor*, double* val, size_t start, size_t len);
|
static int unpack_double_subarray(grib_accessor*, double* val, size_t start, size_t len);
|
||||||
static int clear(grib_accessor*);
|
static int clear(grib_accessor*);
|
||||||
static grib_accessor* make_clone(grib_accessor*, grib_section*, int*);
|
static grib_accessor* make_clone(grib_accessor*, grib_section*, int*);
|
||||||
|
@ -66,7 +70,9 @@ static grib_accessor_class _grib_accessor_class_NAME = {
|
||||||
&pack_long, /* grib_pack procedures long */
|
&pack_long, /* grib_pack procedures long */
|
||||||
&unpack_long, /* grib_unpack procedures long */
|
&unpack_long, /* grib_unpack procedures long */
|
||||||
&pack_double, /* grib_pack procedures double */
|
&pack_double, /* grib_pack procedures double */
|
||||||
|
&pack_float, /* grib_pack procedures float */
|
||||||
&unpack_double, /* grib_unpack procedures double */
|
&unpack_double, /* grib_unpack procedures double */
|
||||||
|
&unpack_float, /* grib_unpack procedures float */
|
||||||
&pack_string, /* grib_pack procedures string */
|
&pack_string, /* grib_pack procedures string */
|
||||||
&unpack_string, /* grib_unpack procedures string */
|
&unpack_string, /* grib_unpack procedures string */
|
||||||
&pack_string_array, /* grib_pack array procedures string */
|
&pack_string_array, /* grib_pack array procedures string */
|
||||||
|
@ -82,7 +88,9 @@ static grib_accessor_class _grib_accessor_class_NAME = {
|
||||||
&next, /* next accessor */
|
&next, /* next accessor */
|
||||||
&compare, /* compare vs. another accessor */
|
&compare, /* compare vs. another accessor */
|
||||||
&unpack_double_element, /* unpack only ith value */
|
&unpack_double_element, /* unpack only ith value */
|
||||||
|
&unpack_float_element, /* unpack only ith value */
|
||||||
&unpack_double_element_set, /* unpack a given set of elements */
|
&unpack_double_element_set, /* unpack a given set of elements */
|
||||||
|
&unpack_float_element_set, /* unpack a given set of elements */
|
||||||
&unpack_double_subarray, /* unpack a subarray */
|
&unpack_double_subarray, /* unpack a subarray */
|
||||||
&clear, /* clear */
|
&clear, /* clear */
|
||||||
&make_clone, /* clone accessor */
|
&make_clone, /* clone accessor */
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Accessor Class Hierarchy.
|
Accessor Class Hierarchy.
|
||||||
Generated by src/make_accessor_class_hierarchy_dirs.sh
|
Generated by src/make_accessor_class_hierarchy_dirs.sh
|
||||||
|
|
||||||
|
|-grib_accessor_class_forward
|
||||||
|-grib_accessor_class_gen
|
|-grib_accessor_class_gen
|
||||||
|---grib_accessor_class_abstract_long_vector
|
|---grib_accessor_class_abstract_long_vector
|
||||||
|-----grib_accessor_class_g1step_range
|
|-----grib_accessor_class_g1step_range
|
||||||
|
@ -17,11 +18,11 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh
|
||||||
|-----grib_accessor_class_mars_param
|
|-----grib_accessor_class_mars_param
|
||||||
|-----grib_accessor_class_mars_step
|
|-----grib_accessor_class_mars_step
|
||||||
|-----grib_accessor_class_sprintf
|
|-----grib_accessor_class_sprintf
|
||||||
|
|-----grib_accessor_class_trim
|
||||||
|---grib_accessor_class_assert
|
|---grib_accessor_class_assert
|
||||||
|---grib_accessor_class_bits
|
|---grib_accessor_class_bits
|
||||||
|---grib_accessor_class_blob
|
|---grib_accessor_class_blob
|
||||||
|---grib_accessor_class_box
|
|---grib_accessor_class_box
|
||||||
|---grib_accessor_class_bufr_data
|
|
||||||
|---grib_accessor_class_bufr_data_array
|
|---grib_accessor_class_bufr_data_array
|
||||||
|---grib_accessor_class_bufr_data_element
|
|---grib_accessor_class_bufr_data_element
|
||||||
|---grib_accessor_class_bufr_elements_table
|
|---grib_accessor_class_bufr_elements_table
|
||||||
|
@ -40,6 +41,7 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh
|
||||||
|-------grib_accessor_class_padtoeven
|
|-------grib_accessor_class_padtoeven
|
||||||
|-------grib_accessor_class_padtomultiple
|
|-------grib_accessor_class_padtomultiple
|
||||||
|-------grib_accessor_class_section_padding
|
|-------grib_accessor_class_section_padding
|
||||||
|
|---grib_accessor_class_change_alternative_row_scanning
|
||||||
|---grib_accessor_class_change_scanning_direction
|
|---grib_accessor_class_change_scanning_direction
|
||||||
|---grib_accessor_class_codetable_title
|
|---grib_accessor_class_codetable_title
|
||||||
|---grib_accessor_class_codetable_units
|
|---grib_accessor_class_codetable_units
|
||||||
|
@ -61,6 +63,7 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh
|
||||||
|-------grib_accessor_class_statistics
|
|-------grib_accessor_class_statistics
|
||||||
|-------grib_accessor_class_statistics_spectral
|
|-------grib_accessor_class_statistics_spectral
|
||||||
|-------grib_accessor_class_vector
|
|-------grib_accessor_class_vector
|
||||||
|
|-----grib_accessor_class_closest_date
|
||||||
|-----grib_accessor_class_divdouble
|
|-----grib_accessor_class_divdouble
|
||||||
|-----grib_accessor_class_from_scale_factor_scaled_value
|
|-----grib_accessor_class_from_scale_factor_scaled_value
|
||||||
|-----grib_accessor_class_g1area
|
|-----grib_accessor_class_g1area
|
||||||
|
@ -170,10 +173,12 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh
|
||||||
|---grib_accessor_class_number_of_values_data_raw_packing
|
|---grib_accessor_class_number_of_values_data_raw_packing
|
||||||
|---grib_accessor_class_pack_bufr_values
|
|---grib_accessor_class_pack_bufr_values
|
||||||
|---grib_accessor_class_position
|
|---grib_accessor_class_position
|
||||||
|
|---grib_accessor_class_proj_string
|
||||||
|---grib_accessor_class_raw
|
|---grib_accessor_class_raw
|
||||||
|---grib_accessor_class_section
|
|---grib_accessor_class_section
|
||||||
|---grib_accessor_class_section_pointer
|
|---grib_accessor_class_section_pointer
|
||||||
|---grib_accessor_class_smart_table_column
|
|---grib_accessor_class_smart_table_column
|
||||||
|
|---grib_accessor_class_step_human_readable
|
||||||
|---grib_accessor_class_to_double
|
|---grib_accessor_class_to_double
|
||||||
|-----grib_accessor_class_sexagesimal2decimal
|
|-----grib_accessor_class_sexagesimal2decimal
|
||||||
|---grib_accessor_class_to_integer
|
|---grib_accessor_class_to_integer
|
||||||
|
@ -193,6 +198,7 @@ Generated by src/make_accessor_class_hierarchy_dirs.sh
|
||||||
|-----grib_accessor_class_data_g22order_packing
|
|-----grib_accessor_class_data_g22order_packing
|
||||||
|-----grib_accessor_class_data_png_packing
|
|-----grib_accessor_class_data_png_packing
|
||||||
|-----grib_accessor_class_data_raw_packing
|
|-----grib_accessor_class_data_raw_packing
|
||||||
|
|-----grib_accessor_class_data_run_length_packing
|
||||||
|-----grib_accessor_class_data_simple_packing
|
|-----grib_accessor_class_data_simple_packing
|
||||||
|-------grib_accessor_class_data_complex_packing
|
|-------grib_accessor_class_data_complex_packing
|
||||||
|---------grib_accessor_class_data_g1complex_packing
|
|---------grib_accessor_class_data_g1complex_packing
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
SUPER = action_class_gen
|
SUPER = action_class_gen
|
||||||
IMPLEMENTS = dump
|
IMPLEMENTS = dump
|
||||||
IMPLEMENTS = destroy
|
IMPLEMENTS = destroy
|
||||||
MEMBERS = grib_concept_value* concept
|
MEMBERS = grib_concept_value* concept_value
|
||||||
MEMBERS = char* basename
|
MEMBERS = char* basename
|
||||||
MEMBERS = char* masterDir
|
MEMBERS = char* masterDir
|
||||||
MEMBERS = char* localDir
|
MEMBERS = char* localDir
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Action Class Hierarchy
|
Action Class Hierarchy
|
||||||
|
|
||||||
|action
|
|action
|
||||||
|-action_class_alias
|
|-action_class_alias
|
||||||
|-action_class_assert
|
|-action_class_assert
|
||||||
|
|
|
@ -211,7 +211,7 @@ static int bufr_decode_rdb_keys(const void* message, long offset_section2, codes
|
||||||
/* The ECMWF BUFR local use section */
|
/* The ECMWF BUFR local use section */
|
||||||
static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2, codes_bufr_header* hdr)
|
static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2, codes_bufr_header* hdr)
|
||||||
{
|
{
|
||||||
int isSatelliteType = 0;
|
bool isSatelliteType = false;
|
||||||
long start = 0;
|
long start = 0;
|
||||||
const long offset_keyData = offset_section2 + 6;
|
const long offset_keyData = offset_section2 + 6;
|
||||||
const long offset_keyMore = offset_section2 + 19; /* 8 bytes long */
|
const long offset_keyMore = offset_section2 + 19; /* 8 bytes long */
|
||||||
|
@ -223,7 +223,7 @@ static int bufr_decode_extra_rdb_keys(const void* message, long offset_section2,
|
||||||
DebugAssert(hdr->ecmwfLocalSectionPresent);
|
DebugAssert(hdr->ecmwfLocalSectionPresent);
|
||||||
|
|
||||||
if (hdr->rdbType == 2 || hdr->rdbType == 3 || hdr->rdbType == 8 || hdr->rdbType == 12) {
|
if (hdr->rdbType == 2 || hdr->rdbType == 3 || hdr->rdbType == 8 || hdr->rdbType == 12) {
|
||||||
isSatelliteType = 1;
|
isSatelliteType = true;
|
||||||
}
|
}
|
||||||
if (isSatelliteType || hdr->numberOfSubsets > 1) {
|
if (isSatelliteType || hdr->numberOfSubsets > 1) {
|
||||||
hdr->isSatellite = 1;
|
hdr->isSatellite = 1;
|
||||||
|
@ -844,7 +844,7 @@ static char* codes_bufr_header_get_centre_name(long edition, long centre_code)
|
||||||
int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* val, size_t* len)
|
int codes_bufr_header_get_string(codes_bufr_header* bh, const char* key, char* val, size_t* len)
|
||||||
{
|
{
|
||||||
static const char* NOT_FOUND = "not_found";
|
static const char* NOT_FOUND = "not_found";
|
||||||
int isEcmwfLocal = 0;
|
bool isEcmwfLocal = false;
|
||||||
Assert(bh);
|
Assert(bh);
|
||||||
Assert(key);
|
Assert(key);
|
||||||
*len = strlen(NOT_FOUND); /*By default*/
|
*len = strlen(NOT_FOUND); /*By default*/
|
||||||
|
|
|
@ -86,44 +86,44 @@ char* codes_getenv(const char* name)
|
||||||
const char* old_name = name;
|
const char* old_name = name;
|
||||||
|
|
||||||
/* Test the most commonly used variables first */
|
/* Test the most commonly used variables first */
|
||||||
if (STR_EQ(name, "ECCODES_SAMPLES_PATH"))
|
if (STR_EQUAL(name, "ECCODES_SAMPLES_PATH"))
|
||||||
old_name = "GRIB_SAMPLES_PATH";
|
old_name = "GRIB_SAMPLES_PATH";
|
||||||
else if (STR_EQ(name, "ECCODES_DEFINITION_PATH"))
|
else if (STR_EQUAL(name, "ECCODES_DEFINITION_PATH"))
|
||||||
old_name = "GRIB_DEFINITION_PATH";
|
old_name = "GRIB_DEFINITION_PATH";
|
||||||
else if (STR_EQ(name, "ECCODES_DEBUG"))
|
else if (STR_EQUAL(name, "ECCODES_DEBUG"))
|
||||||
old_name = "GRIB_API_DEBUG";
|
old_name = "GRIB_API_DEBUG";
|
||||||
|
|
||||||
else if (STR_EQ(name, "ECCODES_FAIL_IF_LOG_MESSAGE"))
|
else if (STR_EQUAL(name, "ECCODES_FAIL_IF_LOG_MESSAGE"))
|
||||||
old_name = "GRIB_API_FAIL_IF_LOG_MESSAGE";
|
old_name = "GRIB_API_FAIL_IF_LOG_MESSAGE";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_WRITE_ON_FAIL"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_WRITE_ON_FAIL"))
|
||||||
old_name = "GRIB_API_WRITE_ON_FAIL";
|
old_name = "GRIB_API_WRITE_ON_FAIL";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_LARGE_CONSTANT_FIELDS"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_LARGE_CONSTANT_FIELDS"))
|
||||||
old_name = "GRIB_API_LARGE_CONSTANT_FIELDS";
|
old_name = "GRIB_API_LARGE_CONSTANT_FIELDS";
|
||||||
else if (STR_EQ(name, "ECCODES_NO_ABORT"))
|
else if (STR_EQUAL(name, "ECCODES_NO_ABORT"))
|
||||||
old_name = "GRIB_API_NO_ABORT";
|
old_name = "GRIB_API_NO_ABORT";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIBEX_MODE_ON"))
|
else if (STR_EQUAL(name, "ECCODES_GRIBEX_MODE_ON"))
|
||||||
old_name = "GRIB_GRIBEX_MODE_ON";
|
old_name = "GRIB_GRIBEX_MODE_ON";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_IEEE_PACKING"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_IEEE_PACKING"))
|
||||||
old_name = "GRIB_IEEE_PACKING";
|
old_name = "GRIB_IEEE_PACKING";
|
||||||
else if (STR_EQ(name, "ECCODES_IO_BUFFER_SIZE"))
|
else if (STR_EQUAL(name, "ECCODES_IO_BUFFER_SIZE"))
|
||||||
old_name = "GRIB_API_IO_BUFFER_SIZE";
|
old_name = "GRIB_API_IO_BUFFER_SIZE";
|
||||||
else if (STR_EQ(name, "ECCODES_LOG_STREAM"))
|
else if (STR_EQUAL(name, "ECCODES_LOG_STREAM"))
|
||||||
old_name = "GRIB_API_LOG_STREAM";
|
old_name = "GRIB_API_LOG_STREAM";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_NO_BIG_GROUP_SPLIT"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_NO_BIG_GROUP_SPLIT"))
|
||||||
old_name = "GRIB_API_NO_BIG_GROUP_SPLIT";
|
old_name = "GRIB_API_NO_BIG_GROUP_SPLIT";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_NO_SPD"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_NO_SPD"))
|
||||||
old_name = "GRIB_API_NO_SPD";
|
old_name = "GRIB_API_NO_SPD";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_KEEP_MATRIX"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_KEEP_MATRIX"))
|
||||||
old_name = "GRIB_API_KEEP_MATRIX";
|
old_name = "GRIB_API_KEEP_MATRIX";
|
||||||
else if (STR_EQ(name, "_ECCODES_ECMWF_TEST_DEFINITION_PATH"))
|
else if (STR_EQUAL(name, "_ECCODES_ECMWF_TEST_DEFINITION_PATH"))
|
||||||
old_name = "_GRIB_API_ECMWF_TEST_DEFINITION_PATH";
|
old_name = "_GRIB_API_ECMWF_TEST_DEFINITION_PATH";
|
||||||
else if (STR_EQ(name, "_ECCODES_ECMWF_TEST_SAMPLES_PATH"))
|
else if (STR_EQUAL(name, "_ECCODES_ECMWF_TEST_SAMPLES_PATH"))
|
||||||
old_name = "_GRIB_API_ECMWF_TEST_SAMPLES_PATH";
|
old_name = "_GRIB_API_ECMWF_TEST_SAMPLES_PATH";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_JPEG"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_JPEG"))
|
||||||
old_name = "GRIB_JPEG";
|
old_name = "GRIB_JPEG";
|
||||||
else if (STR_EQ(name, "ECCODES_GRIB_DUMP_JPG_FILE"))
|
else if (STR_EQUAL(name, "ECCODES_GRIB_DUMP_JPG_FILE"))
|
||||||
old_name = "GRIB_DUMP_JPG_FILE";
|
old_name = "GRIB_DUMP_JPG_FILE";
|
||||||
else if (STR_EQ(name, "ECCODES_PRINT_MISSING"))
|
else if (STR_EQUAL(name, "ECCODES_PRINT_MISSING"))
|
||||||
old_name = "GRIB_PRINT_MISSING";
|
old_name = "GRIB_PRINT_MISSING";
|
||||||
|
|
||||||
result = getenv(old_name);
|
result = getenv(old_name);
|
||||||
|
@ -194,3 +194,23 @@ int codes_flush_sync_close_file(FILE* f)
|
||||||
}
|
}
|
||||||
return GRIB_SUCCESS;
|
return GRIB_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Return 1 if input date is valid. Otherwise 0
|
||||||
|
int is_date_valid(long year, long month, long day, long hour, long minute, double second)
|
||||||
|
{
|
||||||
|
// Convert input date to Julian number
|
||||||
|
double result = 0; // Julian number in units of days
|
||||||
|
long year1, month1, day1, hour1, minute1, lSecond1;
|
||||||
|
|
||||||
|
// For validating the date/time, we specify seconds as an integer
|
||||||
|
long lSecond = (long)second;
|
||||||
|
grib_datetime_to_julian(year, month, day, hour, minute, lSecond, &result);
|
||||||
|
|
||||||
|
// Check conversion worked by going other way
|
||||||
|
grib_julian_to_datetime(result, &year1, &month1, &day1, &hour1, &minute1, &lSecond1);
|
||||||
|
if (year1 != year || month1 != month || day1 != day || minute1 != minute || lSecond1 != lSecond) {
|
||||||
|
return 0; // bad date
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
|
@ -337,6 +337,7 @@ int codes_get_double(const grib_handle* h, const char* key, double* value)
|
||||||
{
|
{
|
||||||
return grib_get_double(h, key, value);
|
return grib_get_double(h, key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
int codes_get_double_element(const 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);
|
return grib_get_double_element(h, key, i, value);
|
||||||
|
@ -345,6 +346,15 @@ int codes_get_double_elements(const grib_handle* h, const char* key, const int*
|
||||||
{
|
{
|
||||||
return grib_get_double_elements(h, key, index_array, size, value);
|
return grib_get_double_elements(h, key, index_array, size, value);
|
||||||
}
|
}
|
||||||
|
int codes_get_float_element(const grib_handle* h, const char* key, int i, float* value)
|
||||||
|
{
|
||||||
|
return grib_get_float_element(h, key, i, value);
|
||||||
|
}
|
||||||
|
int codes_get_float_elements(const grib_handle* h, const char* key, const int* index_array, long size, float* value)
|
||||||
|
{
|
||||||
|
return grib_get_float_elements(h, key, index_array, size, value);
|
||||||
|
}
|
||||||
|
|
||||||
int codes_get_string(const 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);
|
return grib_get_string(h, key, mesg, length);
|
||||||
|
@ -361,6 +371,10 @@ int codes_get_double_array(const grib_handle* h, const char* key, double* vals,
|
||||||
{
|
{
|
||||||
return grib_get_double_array(h, key, vals, length);
|
return grib_get_double_array(h, key, vals, length);
|
||||||
}
|
}
|
||||||
|
int codes_get_float_array(const grib_handle* h, const char* key, float* vals, size_t* length)
|
||||||
|
{
|
||||||
|
return grib_get_float_array(h, key, vals, length);
|
||||||
|
}
|
||||||
int codes_get_long_array(const 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);
|
return grib_get_long_array(h, key, vals, length);
|
||||||
|
@ -385,6 +399,7 @@ int codes_set_bytes(grib_handle* h, const char* key, const unsigned char* bytes,
|
||||||
{
|
{
|
||||||
return grib_set_bytes(h, key, bytes, length);
|
return grib_set_bytes(h, key, bytes, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
int codes_set_double_array(grib_handle* h, const char* key, const double* vals, size_t length)
|
int codes_set_double_array(grib_handle* h, const char* key, const double* vals, size_t length)
|
||||||
{
|
{
|
||||||
return grib_set_double_array(h, key, vals, length);
|
return grib_set_double_array(h, key, vals, length);
|
||||||
|
@ -393,6 +408,15 @@ int codes_set_force_double_array(grib_handle* h, const char* key, const double*
|
||||||
{
|
{
|
||||||
return grib_set_force_double_array(h, key, vals, length);
|
return grib_set_force_double_array(h, key, vals, length);
|
||||||
}
|
}
|
||||||
|
int codes_set_float_array(grib_handle* h, const char* key, const float* vals, size_t length)
|
||||||
|
{
|
||||||
|
return grib_set_float_array(h, key, vals, length);
|
||||||
|
}
|
||||||
|
int codes_set_force_float_array(grib_handle* h, const char* key, const float* vals, size_t length)
|
||||||
|
{
|
||||||
|
return grib_set_force_float_array(h, key, vals, length);
|
||||||
|
}
|
||||||
|
|
||||||
int codes_set_long_array(grib_handle* h, const char* key, const long* vals, size_t length)
|
int codes_set_long_array(grib_handle* h, const char* key, const long* vals, size_t length)
|
||||||
{
|
{
|
||||||
return grib_set_long_array(h, key, vals, length);
|
return grib_set_long_array(h, key, vals, length);
|
||||||
|
@ -468,10 +492,16 @@ int codes_keys_iterator_get_long(const grib_keys_iterator* kiter, long* v, size_
|
||||||
{
|
{
|
||||||
return grib_keys_iterator_get_long(kiter, v, len);
|
return grib_keys_iterator_get_long(kiter, v, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int codes_keys_iterator_get_double(const 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);
|
return grib_keys_iterator_get_double(kiter, v, len);
|
||||||
}
|
}
|
||||||
|
int codes_keys_iterator_get_float(const grib_keys_iterator* kiter, float* v, size_t* len)
|
||||||
|
{
|
||||||
|
return grib_keys_iterator_get_float(kiter, v, len);
|
||||||
|
}
|
||||||
|
|
||||||
int codes_keys_iterator_get_string(const 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);
|
return grib_keys_iterator_get_string(kiter, v, len);
|
||||||
|
|
1135
src/eccodes.h
1135
src/eccodes.h
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#ifdef ECCODES_ON_WINDOWS
|
#ifdef ECCODES_ON_WINDOWS
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* action.cc */
|
/* action.cc */
|
||||||
|
@ -115,6 +117,7 @@ int grib_pack_missing(grib_accessor* a);
|
||||||
int grib_pack_zero(grib_accessor* a);
|
int grib_pack_zero(grib_accessor* a);
|
||||||
int grib_is_missing_internal(grib_accessor* a);
|
int grib_is_missing_internal(grib_accessor* a);
|
||||||
int grib_pack_double(grib_accessor* a, const double* v, size_t* len);
|
int grib_pack_double(grib_accessor* a, const double* v, size_t* len);
|
||||||
|
int grib_pack_float(grib_accessor* a, const float* v, size_t* len);
|
||||||
int grib_pack_expression(grib_accessor* a, grib_expression* e);
|
int grib_pack_expression(grib_accessor* a, grib_expression* e);
|
||||||
int grib_pack_string(grib_accessor* a, const char* v, size_t* len);
|
int grib_pack_string(grib_accessor* a, const char* v, size_t* len);
|
||||||
int grib_pack_string_array(grib_accessor* a, const char** v, size_t* len);
|
int grib_pack_string_array(grib_accessor* a, const char** v, size_t* len);
|
||||||
|
@ -123,12 +126,16 @@ int grib_pack_bytes(grib_accessor* a, const unsigned char* v, size_t* len);
|
||||||
int grib_unpack_bytes(grib_accessor* a, unsigned char* v, size_t* len);
|
int grib_unpack_bytes(grib_accessor* a, unsigned char* v, size_t* len);
|
||||||
int grib_unpack_double_subarray(grib_accessor* a, double* v, size_t start, size_t len);
|
int grib_unpack_double_subarray(grib_accessor* a, double* v, size_t start, size_t len);
|
||||||
int grib_unpack_double(grib_accessor* a, double* v, size_t* len);
|
int grib_unpack_double(grib_accessor* a, double* v, size_t* len);
|
||||||
|
int grib_unpack_float(grib_accessor* a, float* v, size_t* len);
|
||||||
int grib_unpack_double_element(grib_accessor* a, size_t i, double* v);
|
int grib_unpack_double_element(grib_accessor* a, size_t i, double* v);
|
||||||
int grib_unpack_double_element_set(grib_accessor* a, const size_t* index_array, size_t len, double* val_array);
|
int grib_unpack_double_element_set(grib_accessor* a, const size_t* index_array, size_t len, double* val_array);
|
||||||
|
int grib_unpack_float_element(grib_accessor* a, size_t i, float* v);
|
||||||
|
int grib_unpack_float_element_set(grib_accessor* a, const size_t* index_array, size_t len, float* val_array);
|
||||||
int grib_unpack_string(grib_accessor* a, char* v, size_t* len);
|
int grib_unpack_string(grib_accessor* a, char* v, size_t* len);
|
||||||
int grib_unpack_string_array(grib_accessor* a, char** v, size_t* len);
|
int grib_unpack_string_array(grib_accessor* a, char** v, size_t* len);
|
||||||
int grib_accessors_list_unpack_long(grib_accessors_list* al, long* val, size_t* buffer_len);
|
int grib_accessors_list_unpack_long(grib_accessors_list* al, long* val, size_t* buffer_len);
|
||||||
int grib_accessors_list_unpack_double(grib_accessors_list* al, double* val, size_t* buffer_len);
|
int grib_accessors_list_unpack_double(grib_accessors_list* al, double* val, size_t* buffer_len);
|
||||||
|
int grib_accessors_list_unpack_float(grib_accessors_list* al, float* val, size_t* buffer_len);
|
||||||
int grib_accessors_list_unpack_string(grib_accessors_list* al, char** val, size_t* buffer_len);
|
int grib_accessors_list_unpack_string(grib_accessors_list* al, char** val, size_t* buffer_len);
|
||||||
int grib_unpack_long(grib_accessor* a, long* v, size_t* len);
|
int grib_unpack_long(grib_accessor* a, long* v, size_t* len);
|
||||||
long grib_accessor_get_native_type(grib_accessor* a);
|
long grib_accessor_get_native_type(grib_accessor* a);
|
||||||
|
@ -831,7 +838,9 @@ int grib_nearest_smaller_ieee_float(double a, double* ret);
|
||||||
|
|
||||||
unsigned long grib_ieee64_to_long(double x);
|
unsigned long grib_ieee64_to_long(double x);
|
||||||
double grib_long_to_ieee64(unsigned long x);
|
double grib_long_to_ieee64(unsigned long x);
|
||||||
int grib_ieee_decode_array(grib_context* c, unsigned char* buf, size_t nvals, int bytes, double* val);
|
// ECC-1467
|
||||||
|
//int grib_ieee_decode_array(grib_context* c, unsigned char* buf, size_t nvals, int bytes, double* val);
|
||||||
|
//int grib_ieee_decode_array_float(grib_context* c, unsigned char* buf, size_t nvals, int bytes, float* val);
|
||||||
int grib_ieee_encode_array(grib_context* c, double* val, size_t nvals, int bytes, unsigned char* buf);
|
int grib_ieee_encode_array(grib_context* c, double* val, size_t nvals, int bytes, unsigned char* buf);
|
||||||
|
|
||||||
/* grib_accessor_class_reference_value_error.cc*/
|
/* grib_accessor_class_reference_value_error.cc*/
|
||||||
|
@ -1070,12 +1079,11 @@ void grib_multi_support_reset(grib_context* c);
|
||||||
|
|
||||||
/* grib_header_compute.cc*/
|
/* grib_header_compute.cc*/
|
||||||
void print_math(grib_math* m);
|
void print_math(grib_math* m);
|
||||||
grib_math* grib_math_clone(grib_context* c, grib_math* m);
|
|
||||||
void grib_math_delete(grib_context* c, grib_math* m);
|
void grib_math_delete(grib_context* c, grib_math* m);
|
||||||
grib_math* grib_math_new(grib_context* c, const char* formula, int* err);
|
grib_math* grib_math_new(grib_context* c, const char* formula, int* err);
|
||||||
|
|
||||||
/* grib_hash_keys.cc*/
|
/* grib_hash_keys.cc*/
|
||||||
const struct grib_keys_hash* grib_keys_hash_get(const char *str, size_t len);
|
const struct grib_keys_hash* grib_keys_hash_get(const char* str, size_t len);
|
||||||
grib_itrie* grib_hash_keys_new(grib_context* c, int* count);
|
grib_itrie* grib_hash_keys_new(grib_context* c, int* count);
|
||||||
void grib_hash_keys_delete(grib_itrie* t);
|
void grib_hash_keys_delete(grib_itrie* t);
|
||||||
int grib_hash_keys_get_id(grib_itrie* t, const char* key);
|
int grib_hash_keys_get_id(grib_itrie* t, const char* key);
|
||||||
|
@ -1145,6 +1153,7 @@ grib_accessor* grib_keys_iterator_get_accessor(grib_keys_iterator* kiter);
|
||||||
int grib_keys_iterator_delete(grib_keys_iterator* kiter);
|
int grib_keys_iterator_delete(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_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_double(const grib_keys_iterator* kiter, double* v, size_t* len);
|
||||||
|
int grib_keys_iterator_get_float(const grib_keys_iterator* kiter, float* 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_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_bytes(const grib_keys_iterator* kiter, unsigned char* v, size_t* len);
|
||||||
int grib_keys_iterator_get_native_type(const grib_keys_iterator* kiter);
|
int grib_keys_iterator_get_native_type(const grib_keys_iterator* kiter);
|
||||||
|
@ -1226,6 +1235,9 @@ 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_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);
|
int grib_set_force_double_array(grib_handle* h, const char* name, const double* val, size_t length);
|
||||||
int grib_set_double_array(grib_handle* h, const char* name, const double* val, size_t length);
|
int grib_set_double_array(grib_handle* h, const char* name, const double* val, size_t length);
|
||||||
|
int grib_set_float_array_internal(grib_handle* h, const char* name, const float* val, size_t length);
|
||||||
|
int grib_set_force_float_array(grib_handle* h, const char* name, const float* val, size_t length);
|
||||||
|
int grib_set_float_array(grib_handle* h, const char* name, const float* val, size_t length);
|
||||||
int grib_set_long_array_internal(grib_handle* h, const char* name, const long* val, size_t length);
|
int grib_set_long_array_internal(grib_handle* h, const char* name, const long* val, size_t length);
|
||||||
int grib_set_long_array(grib_handle* h, const char* name, const long* val, size_t length);
|
int grib_set_long_array(grib_handle* h, const char* name, const long* val, size_t length);
|
||||||
int grib_get_long_internal(grib_handle* h, const char* name, long* val);
|
int grib_get_long_internal(grib_handle* h, const char* name, long* val);
|
||||||
|
@ -1236,10 +1248,16 @@ int grib_get_double_internal(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(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_internal(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_get_double_element(const grib_handle* h, const char* name, int i, double* val);
|
||||||
|
int grib_get_float_element(const grib_handle* h, const char* name, int i, float* val);
|
||||||
|
|
||||||
int grib_get_double_element_set_internal(grib_handle* h, const char* name, const size_t* index_array, size_t len, double* val_array);
|
int grib_get_double_element_set_internal(grib_handle* h, const char* name, const size_t* index_array, size_t len, double* val_array);
|
||||||
int grib_get_double_element_set(const grib_handle* h, const char* name, const size_t* index_array, size_t len, double* val_array);
|
int grib_get_double_element_set(const grib_handle* h, const char* name, const size_t* index_array, size_t len, double* val_array);
|
||||||
|
int grib_get_float_element_set_internal(grib_handle* h, const char* name, const size_t* index_array, size_t len, float* val_array);
|
||||||
|
int grib_get_float_element_set(const grib_handle* h, const char* name, const size_t* index_array, size_t len, float* val_array);
|
||||||
|
|
||||||
int grib_points_get_values(grib_handle* h, grib_points* points, double* val);
|
int grib_points_get_values(grib_handle* h, grib_points* points, double* val);
|
||||||
int grib_get_double_elements(const grib_handle* h, const char* name, const int* index_array, long len, double* val_array);
|
int grib_get_double_elements(const grib_handle* h, const char* name, const int* index_array, long len, double* val_array);
|
||||||
|
int grib_get_float_elements(const grib_handle* h, const char* name, const int* index_array, long len, float* val_array);
|
||||||
int grib_get_string_internal(grib_handle* h, const char* name, char* val, size_t* length);
|
int grib_get_string_internal(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);
|
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_internal(const grib_handle* h, const char* name, unsigned char* val, size_t* length);
|
||||||
|
@ -1247,8 +1265,12 @@ int grib_get_bytes(const grib_handle* h, const char* name, unsigned char* val, s
|
||||||
int grib_get_native_type(const grib_handle* h, const char* name, int* type);
|
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);
|
const char* grib_get_accessor_class_name(grib_handle* h, const char* name);
|
||||||
int ecc__grib_get_double_array_internal(const grib_handle* h, grib_accessor* a, double* val, size_t buffer_len, size_t* decoded_length);
|
int ecc__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_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_double_array(const grib_handle* h, const char* name, double* val, size_t* length);
|
||||||
|
int grib_get_float_array_internal(const grib_handle* h, const char* name, float* val, size_t* length);
|
||||||
|
int grib_get_float_array(const grib_handle* h, const char* name, float* val, size_t* length);
|
||||||
|
|
||||||
int ecc__grib_get_string_length(grib_accessor* a, size_t* size);
|
int ecc__grib_get_string_length(grib_accessor* a, size_t* size);
|
||||||
int grib_get_string_length(const grib_handle* h, const char* name, size_t* size);
|
int grib_get_string_length(const grib_handle* h, const char* name, size_t* size);
|
||||||
int ecc__grib_get_size(const grib_handle* h, grib_accessor* a, size_t* size);
|
int ecc__grib_get_size(const grib_handle* h, grib_accessor* a, size_t* size);
|
||||||
|
@ -1427,6 +1449,7 @@ int path_is_directory(const char* filename);
|
||||||
char* codes_getenv(const char* name);
|
char* codes_getenv(const char* name);
|
||||||
int codes_check_grib_ieee_packing_value(int value);
|
int codes_check_grib_ieee_packing_value(int value);
|
||||||
int codes_flush_sync_close_file(FILE* f);
|
int codes_flush_sync_close_file(FILE* f);
|
||||||
|
int is_date_valid(long year, long month, long day, long hour, long minute, double second);
|
||||||
|
|
||||||
/* grib_util.cc*/
|
/* grib_util.cc*/
|
||||||
grib_handle* grib_util_sections_copy(grib_handle* hfrom, grib_handle* hto, int what, int* err);
|
grib_handle* grib_util_sections_copy(grib_handle* hfrom, grib_handle* hto, int what, int* err);
|
||||||
|
@ -1434,7 +1457,6 @@ grib_string_list* grib_util_get_param_id(const char* mars_param);
|
||||||
grib_string_list* grib_util_get_mars_param(const char* param_id);
|
grib_string_list* grib_util_get_mars_param(const char* param_id);
|
||||||
grib_handle* grib_util_set_spec(grib_handle* h, const grib_util_grid_spec* spec, const grib_util_packing_spec* packing_spec, int flags, const double* data_values, size_t data_values_count, int* err);
|
grib_handle* grib_util_set_spec(grib_handle* h, const grib_util_grid_spec* spec, const grib_util_packing_spec* packing_spec, int flags, const double* data_values, size_t data_values_count, int* err);
|
||||||
grib_handle* grib_util_set_spec2(grib_handle* h, const grib_util_grid_spec2* spec, const grib_util_packing_spec* packing_spec, int flags, const double* data_values, size_t data_values_count, int* err);
|
grib_handle* grib_util_set_spec2(grib_handle* h, const grib_util_grid_spec2* spec, const grib_util_packing_spec* packing_spec, int flags, const double* data_values, size_t data_values_count, int* err);
|
||||||
int grib_moments(grib_handle* h, double east, double north, double west, double south, int order, double* moments, long* count);
|
|
||||||
int parse_keyval_string(const char* grib_tool, char* arg, int values_required, int default_type, grib_values values[], int* count);
|
int parse_keyval_string(const char* grib_tool, char* arg, int values_required, int default_type, grib_values values[], int* count);
|
||||||
int grib2_is_PDTN_EPS(long productDefinitionTemplateNumber);
|
int grib2_is_PDTN_EPS(long productDefinitionTemplateNumber);
|
||||||
int grib2_is_PDTN_Chemical(long productDefinitionTemplateNumber);
|
int grib2_is_PDTN_Chemical(long productDefinitionTemplateNumber);
|
||||||
|
@ -1468,8 +1490,8 @@ int string_ends_with(const char* str1, const char* str2);
|
||||||
int string_count_char(const char* str, char c);
|
int string_count_char(const char* str, char c);
|
||||||
const char* codes_get_product_name(ProductKind product);
|
const char* codes_get_product_name(ProductKind product);
|
||||||
const char* grib_get_type_name(int type);
|
const char* grib_get_type_name(int type);
|
||||||
char* string_replace_char(char *str, char oldc, char newc);
|
char* string_replace_char(char* str, char oldc, char newc);
|
||||||
void string_remove_char(char * str, char c);
|
void string_remove_char(char* str, char c);
|
||||||
|
|
||||||
/* functions.cc*/
|
/* functions.cc*/
|
||||||
long grib_op_eq(long a, long b);
|
long grib_op_eq(long a, long b);
|
||||||
|
@ -1528,7 +1550,8 @@ int grib_encode_size_tb(unsigned char* p, size_t val, long* bitp, long nb);
|
||||||
|
|
||||||
/* grib_bits_any_endian_simple.cc*/
|
/* grib_bits_any_endian_simple.cc*/
|
||||||
int grib_decode_long_array(const unsigned char* p, long* bitp, long bitsPerValue, size_t n_vals, long* val);
|
int grib_decode_long_array(const unsigned char* p, long* bitp, long bitsPerValue, size_t n_vals, long* val);
|
||||||
int grib_decode_double_array(const unsigned char* p, long* bitp, long bitsPerValue, double reference_value, double s, double d, size_t n_vals, double* val);
|
//int grib_decode_double_array(const unsigned char* p, long* bitp, long bitsPerValue, double reference_value, double s, double d, size_t n_vals, double* val);
|
||||||
|
//int grib_decode_float_array(const unsigned char* p, long* bitp, long bitsPerValue, double reference_value, double s, double d, size_t n_vals, float* val);
|
||||||
int grib_decode_double_array_complex(const unsigned char* p, long* bitp, long nbits, double reference_value, double s, double* d, size_t size, double* val);
|
int grib_decode_double_array_complex(const unsigned char* p, long* bitp, long nbits, double reference_value, double s, double* d, size_t size, double* val);
|
||||||
int grib_encode_long_array(size_t n_vals, const long* val, long bits_per_value, unsigned char* p, long* off);
|
int grib_encode_long_array(size_t n_vals, const long* val, long bits_per_value, unsigned char* p, long* off);
|
||||||
int grib_encode_double_array(size_t n_vals, const double* val, long bits_per_value, double reference_value, double d, double divisor, unsigned char* p, long* off);
|
int grib_encode_double_array(size_t n_vals, const double* val, long bits_per_value, double reference_value, double d, double divisor, unsigned char* p, long* off);
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "grib_api_internal.h"
|
#include "grib_accessor.h"
|
||||||
|
|
||||||
/* Note: A fast cut-down version of strcmp which does NOT return -1 */
|
/* Note: A fast cut-down version of strcmp which does NOT return -1 */
|
||||||
/* 0 means input strings are equal and 1 means not equal */
|
/* 0 means input strings are equal and 1 means not equal */
|
||||||
|
@ -98,6 +98,19 @@ int grib_pack_double(grib_accessor* a, const double* v, size_t* len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int grib_pack_float(grib_accessor* a, const float* v, size_t* len)
|
||||||
|
{
|
||||||
|
grib_accessor_class* c = a->cclass;
|
||||||
|
while (c) {
|
||||||
|
if (c->pack_float) {
|
||||||
|
return c->pack_float(a, v, len);
|
||||||
|
}
|
||||||
|
c = c->super ? *(c->super) : NULL;
|
||||||
|
}
|
||||||
|
DebugAssert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int grib_pack_expression(grib_accessor* a, grib_expression* e)
|
int grib_pack_expression(grib_accessor* a, grib_expression* e)
|
||||||
{
|
{
|
||||||
grib_accessor_class* c = a->cclass;
|
grib_accessor_class* c = a->cclass;
|
||||||
|
@ -209,6 +222,32 @@ int grib_unpack_double(grib_accessor* a, double* v, size_t* len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int grib_unpack_float(grib_accessor* a, float* v, size_t* len)
|
||||||
|
{
|
||||||
|
grib_accessor_class* c = a->cclass;
|
||||||
|
while (c) {
|
||||||
|
/* printf("grib_accessor.c grib_unpack_float:: c->name=%s\n",c->name); */
|
||||||
|
if (c->unpack_float) {
|
||||||
|
return c->unpack_float(a, v, len);
|
||||||
|
}
|
||||||
|
c = c->super ? *(c->super) : NULL;
|
||||||
|
}
|
||||||
|
DebugAssert(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
int grib_unpack<double>(grib_accessor* a, double* v, size_t* len)
|
||||||
|
{
|
||||||
|
return grib_unpack_double(a, v, len);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
int grib_unpack<float>(grib_accessor* a, float* v, size_t* len)
|
||||||
|
{
|
||||||
|
return grib_unpack_float(a, v, len);
|
||||||
|
}
|
||||||
|
|
||||||
int grib_unpack_double_element(grib_accessor* a, size_t i, double* v)
|
int grib_unpack_double_element(grib_accessor* a, size_t i, double* v)
|
||||||
{
|
{
|
||||||
grib_accessor_class* c = a->cclass;
|
grib_accessor_class* c = a->cclass;
|
||||||
|
@ -220,6 +259,18 @@ int grib_unpack_double_element(grib_accessor* a, size_t i, double* v)
|
||||||
}
|
}
|
||||||
return GRIB_NOT_IMPLEMENTED;
|
return GRIB_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
int grib_unpack_float_element(grib_accessor* a, size_t i, float* v)
|
||||||
|
{
|
||||||
|
/* grib_accessor_class* c = a->cclass;
|
||||||
|
* while (c) {
|
||||||
|
* if (c->unpack_float_element) {
|
||||||
|
* return c->unpack_float_element(a, i, v);
|
||||||
|
* }
|
||||||
|
* c = c->super ? *(c->super) : NULL;
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
return GRIB_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get the values for the indices passed in.
|
/* Get the values for the indices passed in.
|
||||||
* The length of the 'index_array' argument should be 'len' and 'val_array' should also contain at least 'len' elements
|
* The length of the 'index_array' argument should be 'len' and 'val_array' should also contain at least 'len' elements
|
||||||
|
@ -236,6 +287,20 @@ int grib_unpack_double_element_set(grib_accessor* a, const size_t* index_array,
|
||||||
}
|
}
|
||||||
return GRIB_NOT_IMPLEMENTED;
|
return GRIB_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
int grib_unpack_float_element_set(grib_accessor* a, const size_t* index_array, size_t len, float* val_array)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
*grib_accessor_class* c = a->cclass;
|
||||||
|
*DebugAssert(len > 0);
|
||||||
|
*while (c) {
|
||||||
|
* if (c->unpack_float_element_set) {
|
||||||
|
* return c->unpack_float_element_set(a, index_array, len, val_array);
|
||||||
|
* }
|
||||||
|
* c = c->super ? *(c->super) : NULL;
|
||||||
|
*}
|
||||||
|
*/
|
||||||
|
return GRIB_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
int grib_unpack_string(grib_accessor* a, char* v, size_t* len)
|
int grib_unpack_string(grib_accessor* a, char* v, size_t* len)
|
||||||
{
|
{
|
||||||
|
@ -298,6 +363,23 @@ int grib_accessors_list_unpack_double(grib_accessors_list* al, double* val, size
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int grib_accessors_list_unpack_float(grib_accessors_list* al, float* val, size_t* buffer_len)
|
||||||
|
{
|
||||||
|
int err = GRIB_SUCCESS;
|
||||||
|
size_t unpacked_len = 0;
|
||||||
|
size_t len = 0;
|
||||||
|
|
||||||
|
while (al && err == GRIB_SUCCESS) {
|
||||||
|
len = *buffer_len - unpacked_len;
|
||||||
|
err = grib_unpack_float(al->accessor, val + unpacked_len, &len);
|
||||||
|
unpacked_len += len;
|
||||||
|
al = al->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
*buffer_len = unpacked_len;
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
int grib_accessors_list_unpack_string(grib_accessors_list* al, char** val, size_t* buffer_len)
|
int grib_accessors_list_unpack_string(grib_accessors_list* al, char** val, size_t* buffer_len)
|
||||||
{
|
{
|
||||||
int err = GRIB_SUCCESS;
|
int err = GRIB_SUCCESS;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
# pragma once
|
||||||
|
|
||||||
|
#include "grib_api_internal.h"
|
||||||
|
|
||||||
|
template <typename T> int grib_unpack(grib_accessor* a, T* v, size_t* len);
|
|
@ -72,7 +72,9 @@ static grib_accessor_class _grib_accessor_class_abstract_long_vector = {
|
||||||
0, /* grib_pack procedures long */
|
0, /* grib_pack procedures long */
|
||||||
0, /* grib_unpack procedures long */
|
0, /* grib_unpack procedures long */
|
||||||
0, /* grib_pack procedures double */
|
0, /* grib_pack procedures double */
|
||||||
|
0, /* grib_pack procedures float */
|
||||||
0, /* grib_unpack procedures double */
|
0, /* grib_unpack procedures double */
|
||||||
|
0, /* grib_unpack procedures float */
|
||||||
0, /* grib_pack procedures string */
|
0, /* grib_pack procedures string */
|
||||||
0, /* grib_unpack procedures string */
|
0, /* grib_unpack procedures string */
|
||||||
0, /* grib_pack array procedures string */
|
0, /* grib_pack array procedures string */
|
||||||
|
@ -88,6 +90,8 @@ static grib_accessor_class _grib_accessor_class_abstract_long_vector = {
|
||||||
0, /* next accessor */
|
0, /* next accessor */
|
||||||
0, /* compare vs. another accessor */
|
0, /* compare vs. another accessor */
|
||||||
0, /* unpack only ith value */
|
0, /* unpack only ith value */
|
||||||
|
0, /* unpack only ith value */
|
||||||
|
0, /* unpack a given set of elements */
|
||||||
0, /* unpack a given set of elements */
|
0, /* unpack a given set of elements */
|
||||||
0, /* unpack a subarray */
|
0, /* unpack a subarray */
|
||||||
0, /* clear */
|
0, /* clear */
|
||||||
|
@ -113,7 +117,9 @@ static void init_class(grib_accessor_class* c)
|
||||||
c->pack_long = (*(c->super))->pack_long;
|
c->pack_long = (*(c->super))->pack_long;
|
||||||
c->unpack_long = (*(c->super))->unpack_long;
|
c->unpack_long = (*(c->super))->unpack_long;
|
||||||
c->pack_double = (*(c->super))->pack_double;
|
c->pack_double = (*(c->super))->pack_double;
|
||||||
|
c->pack_float = (*(c->super))->pack_float;
|
||||||
c->unpack_double = (*(c->super))->unpack_double;
|
c->unpack_double = (*(c->super))->unpack_double;
|
||||||
|
c->unpack_float = (*(c->super))->unpack_float;
|
||||||
c->pack_string = (*(c->super))->pack_string;
|
c->pack_string = (*(c->super))->pack_string;
|
||||||
c->unpack_string = (*(c->super))->unpack_string;
|
c->unpack_string = (*(c->super))->unpack_string;
|
||||||
c->pack_string_array = (*(c->super))->pack_string_array;
|
c->pack_string_array = (*(c->super))->pack_string_array;
|
||||||
|
@ -129,7 +135,9 @@ static void init_class(grib_accessor_class* c)
|
||||||
c->next = (*(c->super))->next;
|
c->next = (*(c->super))->next;
|
||||||
c->compare = (*(c->super))->compare;
|
c->compare = (*(c->super))->compare;
|
||||||
c->unpack_double_element = (*(c->super))->unpack_double_element;
|
c->unpack_double_element = (*(c->super))->unpack_double_element;
|
||||||
|
c->unpack_float_element = (*(c->super))->unpack_float_element;
|
||||||
c->unpack_double_element_set = (*(c->super))->unpack_double_element_set;
|
c->unpack_double_element_set = (*(c->super))->unpack_double_element_set;
|
||||||
|
c->unpack_float_element_set = (*(c->super))->unpack_float_element_set;
|
||||||
c->unpack_double_subarray = (*(c->super))->unpack_double_subarray;
|
c->unpack_double_subarray = (*(c->super))->unpack_double_subarray;
|
||||||
c->clear = (*(c->super))->clear;
|
c->clear = (*(c->super))->clear;
|
||||||
c->make_clone = (*(c->super))->make_clone;
|
c->make_clone = (*(c->super))->make_clone;
|
||||||
|
|
|
@ -71,7 +71,9 @@ static grib_accessor_class _grib_accessor_class_abstract_vector = {
|
||||||
0, /* grib_pack procedures long */
|
0, /* grib_pack procedures long */
|
||||||
0, /* grib_unpack procedures long */
|
0, /* grib_unpack procedures long */
|
||||||
0, /* grib_pack procedures double */
|
0, /* grib_pack procedures double */
|
||||||
|
0, /* grib_pack procedures float */
|
||||||
0, /* grib_unpack procedures double */
|
0, /* grib_unpack procedures double */
|
||||||
|
0, /* grib_unpack procedures float */
|
||||||
0, /* grib_pack procedures string */
|
0, /* grib_pack procedures string */
|
||||||
0, /* grib_unpack procedures string */
|
0, /* grib_unpack procedures string */
|
||||||
0, /* grib_pack array procedures string */
|
0, /* grib_pack array procedures string */
|
||||||
|
@ -87,6 +89,8 @@ static grib_accessor_class _grib_accessor_class_abstract_vector = {
|
||||||
0, /* next accessor */
|
0, /* next accessor */
|
||||||
0, /* compare vs. another accessor */
|
0, /* compare vs. another accessor */
|
||||||
0, /* unpack only ith value */
|
0, /* unpack only ith value */
|
||||||
|
0, /* unpack only ith value */
|
||||||
|
0, /* unpack a given set of elements */
|
||||||
0, /* unpack a given set of elements */
|
0, /* unpack a given set of elements */
|
||||||
0, /* unpack a subarray */
|
0, /* unpack a subarray */
|
||||||
0, /* clear */
|
0, /* clear */
|
||||||
|
@ -112,7 +116,9 @@ static void init_class(grib_accessor_class* c)
|
||||||
c->pack_long = (*(c->super))->pack_long;
|
c->pack_long = (*(c->super))->pack_long;
|
||||||
c->unpack_long = (*(c->super))->unpack_long;
|
c->unpack_long = (*(c->super))->unpack_long;
|
||||||
c->pack_double = (*(c->super))->pack_double;
|
c->pack_double = (*(c->super))->pack_double;
|
||||||
|
c->pack_float = (*(c->super))->pack_float;
|
||||||
c->unpack_double = (*(c->super))->unpack_double;
|
c->unpack_double = (*(c->super))->unpack_double;
|
||||||
|
c->unpack_float = (*(c->super))->unpack_float;
|
||||||
c->pack_string = (*(c->super))->pack_string;
|
c->pack_string = (*(c->super))->pack_string;
|
||||||
c->unpack_string = (*(c->super))->unpack_string;
|
c->unpack_string = (*(c->super))->unpack_string;
|
||||||
c->pack_string_array = (*(c->super))->pack_string_array;
|
c->pack_string_array = (*(c->super))->pack_string_array;
|
||||||
|
@ -128,7 +134,9 @@ static void init_class(grib_accessor_class* c)
|
||||||
c->next = (*(c->super))->next;
|
c->next = (*(c->super))->next;
|
||||||
c->compare = (*(c->super))->compare;
|
c->compare = (*(c->super))->compare;
|
||||||
c->unpack_double_element = (*(c->super))->unpack_double_element;
|
c->unpack_double_element = (*(c->super))->unpack_double_element;
|
||||||
|
c->unpack_float_element = (*(c->super))->unpack_float_element;
|
||||||
c->unpack_double_element_set = (*(c->super))->unpack_double_element_set;
|
c->unpack_double_element_set = (*(c->super))->unpack_double_element_set;
|
||||||
|
c->unpack_float_element_set = (*(c->super))->unpack_float_element_set;
|
||||||
c->unpack_double_subarray = (*(c->super))->unpack_double_subarray;
|
c->unpack_double_subarray = (*(c->super))->unpack_double_subarray;
|
||||||
c->clear = (*(c->super))->clear;
|
c->clear = (*(c->super))->clear;
|
||||||
c->make_clone = (*(c->super))->make_clone;
|
c->make_clone = (*(c->super))->make_clone;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue