ECC-183 concept with one entry only. Added test

This commit is contained in:
Enrico Fucile 2015-11-10 16:00:20 +00:00
parent 5d58da9af0
commit 57708931e0
5 changed files with 32 additions and 2 deletions

View File

@ -382,3 +382,4 @@ new_wavb_134.bufr.ref
set_unexpandedDescriptors.filter
311001.bufr.ref
uegabe.bufr.num.ref
syno.bufr.out.ref

View File

@ -12,6 +12,13 @@ constant tablesMasterDir="bufr/tables/[masterTableNumber]/wmo/[masterTablesVersi
constant tablesLocalDir="bufr/tables/[masterTableNumber]/local/[localTablesVersionNumber]/[bufrHeaderCentre:l]/[bufrHeaderSubCentre]" : hidden;
constant rootTablesDir="bufr/tables" : hidden;
# we should implement some table version dependency
#constant templatesMasterDir="bufr/templates/[masterTableNumber]/[masterTablesVersionNumber]";
#constant templatesLocalDir="bufr/templates/local/[masterTableNumber]/[bufrHeaderCentre:l]/[localTablesVersionNumber]";
constant templatesMasterDir="bufr/templates/";
constant templatesLocalDir="bufr/templates/";
transient tableNumber=0;
#codetable[4] codeTablesMaster '[tablesMasterDir]/codetables/[tableNumber].table' : string_type,transient;
#codetable[4] codeTablesLocal '[tablesLocalDir]/codetables/[tableNumber].table' : string_type,transient;
@ -69,6 +76,8 @@ transient createNewData=1;
meta numberOfUnexpandedDescriptors evaluate( (section3Length - 7) / 2 ) ;
meta unexpandedDescriptors unexpanded_descriptors(numberOfUnexpandedDescriptors,createNewData) :dump;
concept_nofail BUFRTemplate (unknown,"BUFRTemplate.def",templatesMasterDir,templatesLocalDir) : no_copy;
meta elementsTable bufr_elements_table("element.table",tablesMasterDir,tablesLocalDir) : hidden;

View File

@ -0,0 +1 @@
"synopLand" = { unexpandedDescriptors = 307080; }

View File

@ -189,8 +189,8 @@ static int unpack_long (grib_accessor* a, long* val, size_t *len)
if(*len < rlen)
{
grib_context_log(a->context, GRIB_LOG_ERROR,
" wrong size (%ld) for %s it contains %d values ",*len, a->name , rlen);
/* grib_context_log(a->context, GRIB_LOG_ERROR, */
/* " wrong size (%ld) for %s it contains %d values ",*len, a->name , rlen); */
*len = 0;
return GRIB_ARRAY_TOO_SMALL;
}

View File

@ -908,6 +908,25 @@ ${tools_dir}bufr_compare ${f}.out $f 2>> $fLog 1>> $fLog
rm -f ${f}.out
#-----------------------------------------------------------
# Test: set BUFRTemplate
#-----------------------------------------------------------
f="temp_101.bufr"
fOut="syno.bufr.out"
fRef="syno.bufr.out.ref"
echo "Test: set BUFRTemplate" >> $fLog
echo "file: $f" >> $fLog
cat >$fRules <<EOF
set BUFRTemplate="synopLand";
write;
EOF
${tools_dir}bufr_filter -o $fOut $fRules $f 2>> $fLog 1>> $fLog
${tools_dir}bufr_compare $fOut $fRef 2>> $fLog 1>> $fLog
rm -f $fOut
#-----------------------------------------------------------
# Test: set keys in data section
#-----------------------------------------------------------