mirror of https://github.com/ecmwf/eccodes.git
ECC-223
This commit is contained in:
parent
261e3f6809
commit
3344302874
|
@ -137,3 +137,4 @@ new.bufr
|
|||
tropical_cyclone.bufr
|
||||
uegabe.bufr
|
||||
PraticaTemp.bufr
|
||||
profiler_european.bufr
|
||||
|
|
|
@ -221,10 +221,11 @@ typedef int (*codec_replication_proc) (grib_context* c,grib_accessor_bufr_data_a
|
|||
|
||||
static int create_keys(grib_accessor* a,long onlySubset,long startSubset,long endSubset);
|
||||
|
||||
static int can_be_missing(int descriptor)
|
||||
static int can_be_missing(int descriptor,int width)
|
||||
{
|
||||
int ret=1;
|
||||
if (descriptor==31031) ret=0;
|
||||
if (descriptor==31031 || descriptor==999999 ) ret=0;
|
||||
if (width == 1) ret=0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -400,7 +401,7 @@ static int get_descriptors(grib_accessor* a)
|
|||
numberOfDescriptors=grib_bufr_descriptors_array_used_size(self->expanded);
|
||||
self->canBeMissing=(int*)grib_context_malloc_clear(c,numberOfDescriptors*sizeof(int));
|
||||
for (i=0;i<numberOfDescriptors;i++)
|
||||
self->canBeMissing[i]=can_be_missing(self->expanded->v[i]->code);
|
||||
self->canBeMissing[i]=can_be_missing(self->expanded->v[i]->code,self->expanded->v[i]->width);
|
||||
|
||||
ret=grib_get_long(h,self->numberOfSubsetsName,&(self->numberOfSubsets));
|
||||
ret=grib_get_long(h,self->compressedDataName,&(self->compressedData));
|
||||
|
|
|
@ -444,7 +444,7 @@ nos8_208.bufr ocea_131.bufr ocea_132.bufr ocea_133.bufr ocea_21.bufr pgps_110.bu
|
|||
s4kn_165.bufr sb19_206.bufr sbu8_206.bufr ship_11.bufr ship_12.bufr ship_13.bufr ship_14.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 ssbt_127.bufr stuk_7.bufr syno_1.bufr syno_2.bufr syno_3.bufr
|
||||
syno_4.bufr syno_multi.bufr synop_multi_subset.bufr temp_101.bufr temp_102.bufr temp_106.bufr tmr7_129.bufr tropical_cyclone.bufr
|
||||
tros_31.bufr uegabe.bufr wavb_134.bufr"
|
||||
tros_31.bufr wavb_134.bufr"
|
||||
|
||||
|
||||
for f in $files
|
||||
|
@ -963,3 +963,29 @@ diff ${fOut}.log.ref ${fOut}.log
|
|||
rm -f ${fOut}.log ${fOut}.log.ref
|
||||
rm -f $fLog $fRules ${fOut}
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Test: associatedField
|
||||
#-----------------------------------------------------------
|
||||
cat > $fRules <<EOF
|
||||
set unpack=1;
|
||||
|
||||
print "/height=918/windDirection->associatedField=[/height=918/windDirection->associatedField]";
|
||||
print "/height=918/windDirection->associatedField->associatedFieldSignificance=[/height=918/windDirection->associatedField->associatedFieldSignificance]";
|
||||
EOF
|
||||
|
||||
f="profiler_european.bufr"
|
||||
|
||||
echo "Test: associatedField" >> $fLog
|
||||
echo "file: $f" >> $fLog
|
||||
${tools_dir}bufr_filter $fRules $f > ${f}.log
|
||||
|
||||
cat > ${f}.log.ref <<EOF
|
||||
/height=918/windDirection->associatedField=1
|
||||
/height=918/windDirection->associatedField->associatedFieldSignificance=21
|
||||
EOF
|
||||
|
||||
diff ${f}.log.ref ${f}.log
|
||||
|
||||
rm -f ${f}.log ${f}.log.ref
|
||||
rm -f $fLog $fRules
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ cat > bufrdc_num_ref.filter<<EOF
|
|||
print "[numericValues!1%23.14e]";
|
||||
EOF
|
||||
|
||||
bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt`
|
||||
bufr_files=`cat ${data_dir}/bufr/bufr_data_files.txt | sed -e 's:uegabe.bufr::' `
|
||||
for bf in ${bufr_files}
|
||||
do
|
||||
file=${data_dir}/bufr/$bf
|
||||
|
|
Loading…
Reference in New Issue