mirror of https://github.com/ecmwf/eccodes.git
Merge branch 'develop' into feature/ECC-917-MemfsSplit
This commit is contained in:
commit
eacbe611d0
|
@ -24,6 +24,7 @@
|
|||
22 22 Version implemented on 7 November 2018
|
||||
23 23 Version implemented on 15 May 2019
|
||||
24 24 Version implemented on 6 November 2019
|
||||
25 25 Pre-operational to be implemented by next amendment
|
||||
# 25-254 Future versions
|
||||
25 25 Version implemented on 6 May 2020
|
||||
26 26 Pre-operational to be implemented by next amendment
|
||||
# 27-254 Future versions
|
||||
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
|
||||
|
|
|
@ -4,7 +4,10 @@
|
|||
2 2 Land surface products
|
||||
3 3 Satellite remote sensing products (formerly Space products)
|
||||
4 4 Space weather products
|
||||
# 5-9 Reserved
|
||||
10 10 Oceanographic products
|
||||
# 11-19 Reserved
|
||||
20 20 Health and socioeconomic impacts
|
||||
# 21-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
||||
|
|
|
@ -24,5 +24,6 @@
|
|||
22 22 Version implemented on 7 November 2018
|
||||
23 23 Version implemented on 15 May 2019
|
||||
24 24 Version implemented on 6 November 2019
|
||||
# 25-254 Future versions
|
||||
25 25 Version implemented on 6 May 2020
|
||||
# 26-254 Future versions
|
||||
255 255 Master tables not used. Local table entries and local templates may use the entire range of the table, not just those sections marked Reserved for local used.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Code table 3.2 - Shape of the Earth
|
||||
# Code table 3.2 - Shape of the reference system
|
||||
0 0 Earth assumed spherical with radius = 6 367 470.0 m
|
||||
1 1 Earth assumed spherical with radius specified (in m) by data producer
|
||||
2 2 Earth assumed oblate spheroid with size as determined by IAU in 1965 (major axis = 6 378 160.0 m, minor axis = 6 356 775.0 m, f = 1/297.0)
|
||||
|
@ -9,6 +9,8 @@
|
|||
7 7 Earth assumed oblate spheroid with major or minor axes specified (in m) by data producer
|
||||
8 8 Earth model assumed spherical with radius of 6 371 200 m, but the horizontal datum of the resulting latitude/longitude field is the WGS-84 reference frame
|
||||
9 9 Earth represented by the Ordnance Survey Great Britain 1936 Datum, using the Airy 1830 Spheroid, the Greenwich meridian as 0 longitude, and the Newlyn datum as mean sea level, 0 height
|
||||
# 10-191 Reserved
|
||||
10 10 Earth model assumed WGS84 with corrected geomagnetic coordinates (latitude and longitude) defined by Gustafsson et al., 1992
|
||||
11 11 Sun assumed spherical with radius = 695,990,000 m (Allen, C.W., 1976 Astrophysical Quantities (3rd Ed.; London: Athlone) and Stonyhurst latitude and longitude system with origin at the intersection of the solar central meridian (as seen from Earth) and the solar equator (Thompson, W, Coordinate systems for solar image data, A&A 449, 791–803 (2006))
|
||||
# 12-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
# Code table 4.1 - Parameter category by product discipline
|
||||
0 0 Temperature
|
||||
1 1 Momentum
|
||||
2 2 Charged particle mass and number
|
||||
3 3 Electric and magnetic fields
|
||||
4 4 Energetic particles
|
||||
5 5 Waves
|
||||
6 6 Solar electromagnetic emissions
|
||||
7 7 Terrestrial electromagnetic emissions
|
||||
8 8 Imagery
|
||||
9 9 Ion-neutral coupling
|
||||
10 10 Space weather indices
|
||||
# 11-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -36,6 +36,7 @@
|
|||
34 34 Visibility through ice fog (m)
|
||||
35 35 Visibility through blowing snow (m)
|
||||
36 36 Presence of snow squalls (Code table 4.222)
|
||||
# 37-191 Reserved
|
||||
37 37 Icing severity (Code table 4.228)
|
||||
# 38-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
25 25 Snow depth at elevation bands (kg m-2)
|
||||
26 26 Soil heat flux (W m-2)
|
||||
27 27 Soil depth (m)
|
||||
# 28-191 Reserved
|
||||
28 28 Snow temperature (K)
|
||||
# 29-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
2 2 Haines index (Numeric)
|
||||
3 3 Fire burned area (%)
|
||||
4 4 Fosberg index (Numeric)
|
||||
5 5 Forest Fire Weather Index (Canadian Forest Service) (Numeric)
|
||||
6 6 Fine Fuel Moisture Code (Canadian Forest Service) (Numeric)
|
||||
7 7 Duff Moisture Code (Canadian Forest Service) (Numeric)
|
||||
8 8 Drought Code (Canadian Forest Service) (Numeric)
|
||||
9 9 Initial Fire Spread Index (Canadian Forest Service) (Numeric)
|
||||
10 10 Fire Buildup Index (Canadian Forest Service) (Numeric)
|
||||
11 11 Fire Daily Severity Rating (Canadian Forest Service) (Numeric)
|
||||
5 5 Forest Fire Weather Index (as defined by the Canadian Forest Service) (Numeric)
|
||||
6 6 Fine Fuel Moisture Code (as defined by the Canadian Forest Service) (Numeric)
|
||||
7 7 Duff Moisture Code (as defined by the Canadian Forest Service) (Numeric)
|
||||
8 8 Drought Code (as defined by the Canadian Forest Service) (Numeric)
|
||||
9 9 Initial Fire Spread Index (as defined by the Canadian Forest Service) (Numeric)
|
||||
10 10 Fire Buildup Index (as defined by the Canadian Forest Service) (Numeric)
|
||||
11 11 Fire Daily Severity Rating (as defined by the Canadian Forest Service) (Numeric)
|
||||
# 12-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
||||
|
|
|
@ -1,2 +1,6 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Glacier cover (Proportion)
|
||||
1 1 Glacier temperature (K)
|
||||
# 2-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Temperature (K)
|
||||
1 1 Electron temperature (K)
|
||||
2 2 Proton temperature (K)
|
||||
3 3 Ion temperature (K)
|
||||
4 4 Parallel temperature (K)
|
||||
5 5 Perpendicular temperature (K)
|
||||
# 6-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,8 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Velocity magnitude (speed) (m s-1)
|
||||
1 1 1st vector component of velocity (coordinate system dependent) (m s-1)
|
||||
2 2 2nd vector component of velocity (coordinate system dependent) (m s-1)
|
||||
3 3 3rd vector component of velocity (coordinate system dependent) (m s-1)
|
||||
# 4-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,12 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Scintillation index (sigma phi) (rad)
|
||||
1 1 Scintillation index S4 (Numeric)
|
||||
2 2 Rate of Change of TEC Index (ROTI) (TECU/min)
|
||||
3 3 Disturbance Ionosphere Index Spatial Gradient (DIXSG) (Numeric)
|
||||
4 4 Along Arc TEC Rate (AATR) (TECU/min)
|
||||
5 5 Kp (Numeric)
|
||||
6 6 Equatorial disturbance storm time index (Dst) (nT)
|
||||
7 7 Auroral Electrojet (AE) (nT)
|
||||
# 8-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,18 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Particle number density (m-3)
|
||||
1 1 Electron density (m-3)
|
||||
2 2 Proton density (m-3)
|
||||
3 3 Ion density (m-3)
|
||||
4 4 Vertical total electron content (TECU)
|
||||
5 5 HF absorption frequency (Hz)
|
||||
6 6 HF absorption (dB)
|
||||
7 7 Spread F (m)
|
||||
8 8 h’ (m)
|
||||
9 9 Critical frequency (Hz)
|
||||
10 10 Maximal usable frequency (MUF) (Hz)
|
||||
11 11 Peak height (hm) (m)
|
||||
12 12 Peak density (Nm) (m-3)
|
||||
13 13 Equivalent slab thickness (tau) (km)
|
||||
# 14-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,12 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Magnetic field magnitude (T)
|
||||
1 1 1st vector component of magnetic field (T)
|
||||
2 2 2nd vector component of magnetic field (T)
|
||||
3 3 3rd vector component of magnetic field (T)
|
||||
4 4 Electric field magnitude (V m-1)
|
||||
5 5 1st vector component of electric field (V m-1)
|
||||
6 6 2nd vector component of electric field (V m-1)
|
||||
7 7 3rd vector component of electric field (V m-1)
|
||||
# 8-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,11 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Proton flux (differential) ((m2 s sr eV)-1)
|
||||
1 1 Proton flux (integral) ((m2 s sr )-1)
|
||||
2 2 Electron flux (differential) ((m2 s sr eV)-1)
|
||||
3 3 Electron flux (integral) ((m2 s sr)-1)
|
||||
4 4 Heavy ion flux (differential) ((m2 s sr eV/nuc)-1)
|
||||
5 5 Heavy ion flux (integral) ((m2 s sr)-1)
|
||||
6 6 Cosmic ray neutron flux (/h)
|
||||
# 7-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,8 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Amplitude (dB)
|
||||
1 1 Phase (rad)
|
||||
2 2 Frequency (Hz)
|
||||
3 3 Wave length (m)
|
||||
# 4-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,11 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Integrated solar irradiance (W m-2)
|
||||
1 1 Solar X-ray flux (XRS long) (W m-2)
|
||||
2 2 Solar X-ray flux (XRS short) (W m-2)
|
||||
3 3 Solar EUV irradiance (W m-2)
|
||||
4 4 Solar spectral irradiance (W m-2 nm-1)
|
||||
5 5 F10.7 (W m-2 Hz-1)
|
||||
6 6 Solar radio emissions (W m-2 Hz-1)
|
||||
# 7-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,8 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Limb intensity (J m-2 s-1)
|
||||
1 1 Disk intensity (J m-2 s-1)
|
||||
2 2 Disk intensity day (J m-2 s-1)
|
||||
3 3 Disk intensity night (J m-2 s-1)
|
||||
# 4-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,12 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 X-ray radiance (W sr-1 m-2)
|
||||
1 1 EUV radiance (W sr-1 m-2)
|
||||
2 2 H-alpha radiance (W sr-1 m-2)
|
||||
3 3 White light radiance (W sr-1 m-2)
|
||||
4 4 CaII-K radiance (W sr-1 m-2)
|
||||
5 5 White light coronagraph radiance (W sr-1 m-2)
|
||||
6 6 Heliospheric radiance (W sr-1 m-2)
|
||||
7 7 Thematic mask (Numeric)
|
||||
# 8-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,7 @@
|
|||
# Code table 4.2 - Parameter number by product discipline and parameter category
|
||||
0 0 Pedersen conductivity (S m-1)
|
||||
1 1 Hall conductivity (S m-1)
|
||||
2 2 Parallel conductivity (S m-1)
|
||||
# 3-191 Reserved
|
||||
# 192-254 Reserved for local use
|
||||
255 255 Missing
|
|
@ -0,0 +1,8 @@
|
|||
# Code table 4.228 - Icing severity
|
||||
0 0 None
|
||||
1 1 Trace
|
||||
2 2 Light
|
||||
3 3 Moderate
|
||||
4 4 Severe
|
||||
# 5-254 Reserved
|
||||
255 255 Missing value
|
|
@ -23,7 +23,14 @@
|
|||
23 23 Lowest level where air concentration exceeds the specified value (base for a given threshold of air concentration) (Bq m-3)
|
||||
24 24 Highest level where air concentration exceeds the specified value (top for a given threshold of air concentration) (Bq m-3)
|
||||
25 25 Highest level where radar reflectivity exceeds the specified value (echo top for a given threshold of reflectivity) (dBZ)
|
||||
# 26-99 Reserved
|
||||
# 26-29 Reserved
|
||||
30 30 Specified radius from the center of the Sun (m)
|
||||
31 31 Solar photosphere
|
||||
32 32 Ionospheric D-region level
|
||||
33 33 Ionospheric E-region level
|
||||
34 34 Ionospheric F1-region level
|
||||
35 35 Ionospheric F2-region level
|
||||
# 36-99 Reserved
|
||||
100 pl Isobaric surface (Pa)
|
||||
101 sfc Mean sea level
|
||||
102 102 Specific altitude above mean sea level (m)
|
||||
|
@ -47,7 +54,8 @@
|
|||
# 120-149 Reserved
|
||||
150 150 Generalized vertical height coordinate
|
||||
151 sol Soil level (Numeric)
|
||||
# 152-159 Reserved
|
||||
152 152 Sea ice level (Numeric)
|
||||
# 153-159 Reserved
|
||||
160 160 Depth below sea level (m)
|
||||
161 161 Depth below water surface (m)
|
||||
162 162 Lake or river bottom (-)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
# 201-49151 Reserved
|
||||
# 49152-65534 Reserved for local use
|
||||
40000 40000 JPEG2000 Packing
|
||||
40010 40010 PNG pacling
|
||||
40010 40010 PNG packing
|
||||
50000 50000 Sperical harmonics ieee packing
|
||||
50001 50001 Second order packing
|
||||
50002 50002 Second order packing
|
||||
|
|
|
@ -2450,7 +2450,7 @@ static int create_keys(grib_accessor* a, long onlySubset, long startSubset, long
|
|||
grib_sarray_delete(c, self->tempStrings);
|
||||
self->tempStrings = NULL;
|
||||
}
|
||||
self->tempStrings = grib_sarray_new(c, self->numberOfSubsets, 500);
|
||||
self->tempStrings = self->numberOfSubsets? grib_sarray_new(c, self->numberOfSubsets, 500) : NULL;
|
||||
|
||||
end = self->compressedData ? 1 : self->numberOfSubsets;
|
||||
groupNumber = 1;
|
||||
|
|
|
@ -384,6 +384,7 @@ static int unpack_string(grib_accessor* a, char* val, size_t* len)
|
|||
}
|
||||
|
||||
if (str == 0 || strlen(str) == 0) {
|
||||
grib_context_free(c, str);
|
||||
*len = 0;
|
||||
*val = 0;
|
||||
return ret;
|
||||
|
|
|
@ -191,6 +191,7 @@ static grib_trie* load_bufr_elements_table(grib_accessor* a, int* err)
|
|||
char dictName[1024] = {0,};
|
||||
char* localFilename = 0;
|
||||
char** list = 0;
|
||||
char** cached_list = 0;
|
||||
size_t len = 1024;
|
||||
grib_trie* dictionary = NULL;
|
||||
FILE* f = NULL;
|
||||
|
@ -261,6 +262,8 @@ static grib_trie* load_bufr_elements_table(grib_accessor* a, int* err)
|
|||
dictionary = grib_trie_new(c);
|
||||
|
||||
while (fgets(line, sizeof(line) - 1, f)) {
|
||||
DebugAssert( strlen(line) > 0 );
|
||||
if (line[0] == '#') continue; /* Ignore first line with column titles */
|
||||
list = string_split(line, "|");
|
||||
grib_trie_insert(dictionary, list[0], list);
|
||||
}
|
||||
|
@ -276,7 +279,16 @@ static grib_trie* load_bufr_elements_table(grib_accessor* a, int* err)
|
|||
}
|
||||
|
||||
while (fgets(line, sizeof(line) - 1, f)) {
|
||||
DebugAssert( strlen(line) > 0 );
|
||||
if (line[0] == '#') continue; /* Ignore first line with column titles */
|
||||
list = string_split(line, "|");
|
||||
/* Look for the descriptor code in the trie. It might be there from before */
|
||||
cached_list = (char**)grib_trie_get(dictionary, list[0]);
|
||||
if (cached_list) { /* If found, we are about to overwrite it. So free memory */
|
||||
int i;
|
||||
for (i = 0; cached_list[i] != NULL; ++i) free(cached_list[i]);
|
||||
free(cached_list);
|
||||
}
|
||||
grib_trie_insert(dictionary, list[0], list);
|
||||
}
|
||||
|
||||
|
|
|
@ -482,8 +482,8 @@ static void dump_double(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comment)
|
||||
{
|
||||
grib_dumper_bufr_decode_C* self = (grib_dumper_bufr_decode_C*)d;
|
||||
char** values = NULL;
|
||||
size_t size = 0;
|
||||
char** values;
|
||||
size_t size = 0, i = 0;
|
||||
grib_context* c = NULL;
|
||||
int err = 0;
|
||||
long count = 0;
|
||||
|
@ -542,6 +542,7 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
depth -= 2;
|
||||
}
|
||||
|
||||
for (i = 0; i < size; i++) grib_context_free(c, values[i]);
|
||||
grib_context_free(c, values);
|
||||
(void)err; /* TODO */
|
||||
}
|
||||
|
@ -574,8 +575,10 @@ static void dump_string(grib_dumper* d, grib_accessor* a, const char* comment)
|
|||
err = grib_unpack_string(a, value, &size);
|
||||
p = value;
|
||||
r = compute_bufr_key_rank(h, self->keys, a->name);
|
||||
if (grib_is_missing_string(a, (unsigned char*)value, size))
|
||||
if (grib_is_missing_string(a, (unsigned char*)value, size)) {
|
||||
grib_context_free(c, value);
|
||||
return;
|
||||
}
|
||||
|
||||
while (*p) {
|
||||
if (!isprint(*p))
|
||||
|
|
|
@ -665,6 +665,7 @@ static void dump_string_array(grib_dumper* d, grib_accessor* a, const char* comm
|
|||
depth -= 2;
|
||||
}
|
||||
|
||||
for (i = 0; i < size; i++) grib_context_free(c, values[i]);
|
||||
grib_context_free(c, values);
|
||||
(void)err; /* TODO */
|
||||
}
|
||||
|
|
|
@ -1776,8 +1776,11 @@ int grib_index_dump_file(FILE* fout, const char* filename)
|
|||
return err;
|
||||
f = file;
|
||||
while (f) {
|
||||
grib_file *prev = f;
|
||||
fprintf(fout, "GRIB File: %s\n", f->name);
|
||||
grib_context_free(c, f->name);
|
||||
f = f->next;
|
||||
grib_context_free(c, prev);
|
||||
}
|
||||
fclose(fh);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ fRules=${label}.filter
|
|||
#-----------------------------------------------------------
|
||||
files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
||||
|
||||
# Exclude BUFR files for various reasosn:
|
||||
# Exclude BUFR files for various reasons:
|
||||
# ias1_240.bufr: Too large. The filter rules file generated is too big for the parser!
|
||||
# tropical_cyclone.bufr: multi-message
|
||||
# syno_multi.bufr: multi-message
|
||||
|
|
|
@ -27,197 +27,32 @@ fi
|
|||
# tools_dir so we reset it to its original
|
||||
tools_dir=$build_dir/bin
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Test 1: Set of BUFR files which have zero leaks.
|
||||
# Over time this list should increase
|
||||
# ---------------------------------------------------------
|
||||
bufr_files_zero_leaks="
|
||||
207003.bufr
|
||||
PraticaTemp.bufr
|
||||
aaen_55.bufr
|
||||
aben_55.bufr
|
||||
aeolus_wmo_26.bufr
|
||||
delayed_repl_01.bufr
|
||||
goes16_nm.bufr
|
||||
israel_observations_2017041010.bufr
|
||||
mhen_55.bufr
|
||||
modw_87.bufr
|
||||
sentinel1.bufr
|
||||
synop_multi_subset.bufr
|
||||
tropical_cyclone.bufr
|
||||
uegabe.bufr
|
||||
"
|
||||
|
||||
files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
||||
VALGRIND_OPTIONS="--error-exitcode=1 --leak-check=full --log-file=$tempLog"
|
||||
|
||||
# bufr_filter has a small leak to do with parsing and action files not related to BUFR decoding,
|
||||
# So instead we use bufr_ls to do the unpacking
|
||||
for bf in $bufr_files_zero_leaks; do
|
||||
for bf in $files; do
|
||||
valgrind $VALGRIND_OPTIONS ${tools_dir}/bufr_ls -s unpack=1 ${data_dir}/bufr/$bf >/dev/null
|
||||
done
|
||||
|
||||
|
||||
# ---------------------------------------------------------
|
||||
# Test 2: Set of BUFR files which have a small known leak.
|
||||
# Over time this list should decrease
|
||||
# ---------------------------------------------------------
|
||||
bufr_files_known_leaks="
|
||||
ahws_139.bufr
|
||||
airc_142.bufr
|
||||
airc_144.bufr
|
||||
airs_57.bufr
|
||||
alws_139.bufr
|
||||
amda_144.bufr
|
||||
amsa_55.bufr
|
||||
amsb_55.bufr
|
||||
amse_55.bufr
|
||||
amsu_55.bufr
|
||||
amv2_87.bufr
|
||||
amv3_87.bufr
|
||||
asbh_139.bufr
|
||||
asbl_139.bufr
|
||||
asca_139.bufr
|
||||
asch_139.bufr
|
||||
ascs_139.bufr
|
||||
aseh_139.bufr
|
||||
asel_139.bufr
|
||||
ashs_139.bufr
|
||||
atap_55.bufr
|
||||
ateu_155.bufr
|
||||
atms_201.bufr
|
||||
atov_55.bufr
|
||||
avhm_87.bufr
|
||||
avhn_87.bufr
|
||||
avhr_58.bufr
|
||||
b002_95.bufr
|
||||
b002_96.bufr
|
||||
b003_56.bufr
|
||||
b004_145.bufr
|
||||
b005_87.bufr
|
||||
b005_89.bufr
|
||||
b006_96.bufr
|
||||
b007_31.bufr
|
||||
bssh_170.bufr
|
||||
bssh_176.bufr
|
||||
bssh_178.bufr
|
||||
bssh_180.bufr
|
||||
btem_109.bufr
|
||||
buoy_27.bufr
|
||||
cmwi_87.bufr
|
||||
cmwn_87.bufr
|
||||
cnow_28.bufr
|
||||
cori_156.bufr
|
||||
crit_202.bufr
|
||||
csrh_189.bufr
|
||||
emsg_189.bufr
|
||||
emsg_87.bufr
|
||||
eum_iasi_twt.bufr
|
||||
eumetsat_iasi_co.bufr
|
||||
euwv_87.bufr
|
||||
fy3a_154.bufr
|
||||
fy3b_154.bufr
|
||||
g2nd_208.bufr
|
||||
g2to_206.bufr
|
||||
go15_87.bufr
|
||||
goee_87.bufr
|
||||
goes_87.bufr
|
||||
goga_89.bufr
|
||||
gosat.bufr
|
||||
grst_26.bufr
|
||||
gsd1_208.bufr
|
||||
gsd2_208.bufr
|
||||
gsd3_208.bufr
|
||||
gst4_26.bufr
|
||||
hirb_55.bufr
|
||||
hirs_55.bufr
|
||||
ias1_240.bufr
|
||||
iasi_241.bufr
|
||||
ifco_208.bufr
|
||||
ikco_217.bufr
|
||||
imssnow.bufr
|
||||
itrg_208.bufr
|
||||
itwt_233.bufr
|
||||
j2eo_216.bufr
|
||||
j2nb_216.bufr
|
||||
jaso_214.bufr
|
||||
kond_209.bufr
|
||||
maer_207.bufr
|
||||
meta_140.bufr
|
||||
metar_with_2_bias.bufr
|
||||
mhsa_55.bufr
|
||||
mhsb_55.bufr
|
||||
mhse_55.bufr
|
||||
mloz_206.bufr
|
||||
modi_87.bufr
|
||||
monw_87.bufr
|
||||
new.bufr
|
||||
nomi_206.bufr
|
||||
nos1_208.bufr
|
||||
nos2_208.bufr
|
||||
nos3_208.bufr
|
||||
nos4_208.bufr
|
||||
nos5_208.bufr
|
||||
nos6_208.bufr
|
||||
nos7_208.bufr
|
||||
nos8_208.bufr
|
||||
ocea_131.bufr
|
||||
ocea_132.bufr
|
||||
ocea_133.bufr
|
||||
ocea_21.bufr
|
||||
pgps_110.bufr
|
||||
pilo_91.bufr
|
||||
profiler_european.bufr
|
||||
rada_250.bufr
|
||||
rado_250.bufr
|
||||
s4kn_165.bufr
|
||||
sb19_206.bufr
|
||||
sbu8_206.bufr
|
||||
ship_13.bufr
|
||||
ship_19.bufr
|
||||
ship_9.bufr
|
||||
smin_49.bufr
|
||||
smis_49.bufr
|
||||
smiu_49.bufr
|
||||
smos_203.bufr
|
||||
sn4k_165.bufr
|
||||
soil_7.bufr
|
||||
srals3_ecmwf4.bufr
|
||||
srals3_eumetsat.bufr
|
||||
ssbt_127.bufr
|
||||
stuk_7.bufr
|
||||
syno_1.bufr
|
||||
syno_3.bufr
|
||||
syno_4.bufr
|
||||
syno_multi.bufr
|
||||
temp-land-with-substituted-values.bufr
|
||||
temp_101.bufr
|
||||
temp_102.bufr
|
||||
temp_106.bufr
|
||||
tmr7_129.bufr
|
||||
tros_31.bufr
|
||||
wavb_134.bufr
|
||||
"
|
||||
|
||||
cat > $tempSupp << EOF
|
||||
{
|
||||
eccodes_string_split_suppression
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:string_split
|
||||
fun:load_bufr_elements_table*
|
||||
fun:bufr_get_from_table
|
||||
fun:accessor_bufr_elements_table_get_descriptor
|
||||
fun:grib_bufr_descriptor_new
|
||||
}
|
||||
EOF
|
||||
VALGRIND_OPTIONS="--error-exitcode=1 --leak-check=full --log-file=$tempLog --suppressions=$tempSupp"
|
||||
|
||||
# bufr_filter has a small leak to do with parsing and action files not related to BUFR decoding,
|
||||
# So instead we use bufr_ls to do the unpacking
|
||||
for bf in $bufr_files_known_leaks; do
|
||||
valgrind $VALGRIND_OPTIONS ${tools_dir}/bufr_ls -s unpack=1 ${data_dir}/bufr/$bf >/dev/null
|
||||
done
|
||||
# Suppressions file
|
||||
# ------------------
|
||||
#cat > $tempSupp << EOF
|
||||
#{
|
||||
# eccodes_string_split_suppression
|
||||
# Memcheck:Leak
|
||||
# match-leak-kinds: definite
|
||||
# fun:malloc
|
||||
# fun:string_split
|
||||
# fun:load_bufr_elements_table*
|
||||
# fun:bufr_get_from_table
|
||||
# fun:accessor_bufr_elements_table_get_descriptor
|
||||
# fun:grib_bufr_descriptor_new
|
||||
#}
|
||||
#EOF
|
||||
#VALGRIND_OPTIONS="--error-exitcode=1 --leak-check=full --log-file=$tempLog --suppressions=$tempSupp "
|
||||
|
||||
|
||||
# Clean up
|
||||
|
|
|
@ -80,6 +80,8 @@ if [ -x "${tools_dir}/grib_check_gaussian_grid" ]; then
|
|||
${tools_dir}/grib_check_gaussian_grid $input $output
|
||||
fi
|
||||
|
||||
rm -f $output
|
||||
|
||||
#sed "s:toolsdir:${tools_dir}/:" ${tools_dir}/grib1to2.txt > ${tools_dir}/grib1to2.test
|
||||
#chmod +x ${tools_dir}/grib1to2.test
|
||||
#${tools_dir}/grib1to2.test -f ${data_dir}/test.grib1 ${data_dir}/test.grib2
|
||||
|
|
|
@ -30,7 +30,7 @@ rm -f out.gribidx $temp
|
|||
tempIndex=temp.$label.$$.idx
|
||||
tempOut=temp.$label.$$.out
|
||||
tempRef=temp.$label.$$.ref
|
||||
${tools_dir}/grib_index_build -o $tempIndex ${infile} >/dev/null
|
||||
${tools_dir}/grib_index_build -N -o $tempIndex ${infile} >/dev/null
|
||||
|
||||
# Must remove first two lines and the last (filename specifics)
|
||||
${tools_dir}/grib_dump -D ${tempIndex} | sed '1,2d' | sed '$d' > $tempOut
|
||||
|
@ -38,23 +38,63 @@ cat $tempOut
|
|||
|
||||
cat > $tempRef <<EOF
|
||||
Index keys:
|
||||
key name = mars.date
|
||||
values = 20090129
|
||||
key name = mars.time
|
||||
values = 0
|
||||
key name = mars.expver
|
||||
values = 0001
|
||||
key name = mars.stream
|
||||
values = enfo
|
||||
key name = mars.class
|
||||
values = od
|
||||
key name = mars.type
|
||||
values = pf
|
||||
key name = mars.step
|
||||
values = 12, 24, 48, 60
|
||||
key name = mars.param
|
||||
values = 130.128, 129.128
|
||||
key name = mars.levtype
|
||||
values = pl
|
||||
key name = mars.levelist
|
||||
values = 10, 50, 100, 200, 250, 300, 400, 500, 700, 850, 925, 1000
|
||||
key name = mars.number
|
||||
values = 1, 2, 3, 4
|
||||
key name = mars.iteration
|
||||
values = undef
|
||||
key name = mars.domain
|
||||
values = g
|
||||
key name = mars.fcmonth
|
||||
values = undef
|
||||
key name = mars.fcperiod
|
||||
values = undef
|
||||
key name = mars.hdate
|
||||
values = undef
|
||||
key name = mars.method
|
||||
values = undef
|
||||
key name = mars.model
|
||||
values = undef
|
||||
key name = mars.origin
|
||||
values = undef
|
||||
key name = mars.quantile
|
||||
values = undef
|
||||
key name = mars.range
|
||||
values = undef
|
||||
key name = mars.refdate
|
||||
values = undef
|
||||
key name = mars.direction
|
||||
values = undef
|
||||
key name = mars.frequency
|
||||
values = undef
|
||||
Index count = 384
|
||||
EOF
|
||||
|
||||
diff $tempRef $tempOut
|
||||
|
||||
${tools_dir}/grib_index_build -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
${tools_dir}/grib_index_build -N -k mars.levtype -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
grep -q "mars.levtype = { sfc, pl, pv, pt }"
|
||||
|
||||
${tools_dir}/grib_index_build -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
${tools_dir}/grib_index_build -N -k mars.levtype:i -o $tempIndex ${data_dir}/tigge_cf_ecmwf.grib2 |\
|
||||
grep -q "mars.levtype = { 103, 1, 106, 100, 101, 8, 109, 107 }"
|
||||
|
||||
# grib_compare with index files
|
||||
|
@ -66,8 +106,8 @@ tempGribFile2=temp.$label.$$.file2.grib
|
|||
cat ${data_dir}/high_level_api.grib2 ${data_dir}/sample.grib2 > $tempGribFile1
|
||||
cat ${data_dir}/sample.grib2 ${data_dir}/high_level_api.grib2 > $tempGribFile2
|
||||
|
||||
${tools_dir}/grib_index_build -o $tempIndex1 $tempGribFile1
|
||||
${tools_dir}/grib_index_build -o $tempIndex2 $tempGribFile2
|
||||
${tools_dir}/grib_index_build -N -o $tempIndex1 $tempGribFile1
|
||||
${tools_dir}/grib_index_build -N -o $tempIndex2 $tempGribFile2
|
||||
${tools_dir}/grib_compare $tempIndex1 $tempIndex2
|
||||
rm -f $tempIndex1 $tempIndex2 $tempGribFile1 $tempGribFile2
|
||||
|
||||
|
|
|
@ -104,3 +104,4 @@ ${tools_dir}/grib_get_data $outfile > /dev/null
|
|||
|
||||
### Clean up
|
||||
rm -f $outfile $tempOut
|
||||
rm -f error.data
|
||||
|
|
|
@ -86,4 +86,4 @@ grep -q "'E', 'C', 'M', 'W', 'F', ' '" $tempTxt
|
|||
|
||||
|
||||
# Clean up
|
||||
rm -f $tempOut $tempRef
|
||||
rm -f $tempOut $tempRef $tempTxt
|
||||
|
|
|
@ -559,7 +559,9 @@ static int grib_tool_index(grib_runtime_options* options)
|
|||
}
|
||||
|
||||
navigate(options->index2->fields, options);
|
||||
|
||||
/* TODO(masn): memleak
|
||||
* grib_context_free(c, options->index2->current);
|
||||
*/
|
||||
grib_tool_finalise_action(options);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue