Skip to content

Commit

Permalink
xtractNotes_from_log: bug-fix in findPureAtomic
Browse files Browse the repository at this point in the history
  • Loading branch information
h-dh committed Feb 5, 2016
1 parent 1cf7e31 commit 1273794
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
20 changes: 17 additions & 3 deletions scripts/xtractNotes_from_log
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ atomise()

atomicParsing_blk()
{
local isSoundBlk=$1

local IFS=${oldIFS}

local words
Expand Down Expand Up @@ -88,6 +90,8 @@ atomicParsing_blk()
| grep 'end:' | awk 'END{print $NF}' )
fi

test $isSoundBlk = t && break

# skip a few lines
for(( i=i+1 ; i < sz ; ++i )) ; do
words=( ${blk[i]} )
Expand All @@ -111,7 +115,7 @@ atomicParsing_blk()
done

if [ ${ix} -gt -1 ] ; then
atomicTags[ix]=${atomicTags[ix]}${atomicTags[ix]:+,}${tag}
atomicTags[ix]=${atomicTags[ix]}${atomicTags[ix]:+,}${tag[0]}
for(( j=1 ; j < ${#tag[*]} ; ++j )) ; do
atomicTags[ix]=${atomicTags[ix]}/${tag[j]}
done
Expand Down Expand Up @@ -342,6 +346,7 @@ findPureAtomic()
declare -a pAT

for(( ix=0 ; ix < ${#atomicBase[*]} ; ++ix )) ; do

tags=( ${atomicTags[ix]//,/ } )
tags0=( ${tags[0]//\// } )

Expand Down Expand Up @@ -1078,14 +1083,20 @@ xtrctAnnotated()
echo "${line}" >> $head
done

local isSound

while read line ; do
if [ "${line:0:8}" = ' - date:' ] ; then
# the end of a block
if findAnnotatedBlock ; then
processBlock
atomicParsing_blk
isSound=t
else
isSound=f
fi

atomicParsing_blk $isSound

unset blk
fi
blk[${#blk[*]}]="$line"
Expand All @@ -1094,8 +1105,11 @@ xtrctAnnotated()
# last block
if findAnnotatedBlock ; then
processBlock
atomicParsing_blk
isSound=t
else
isSound=f
fi
atomicParsing_blk $isSound

atomise

Expand Down
6 changes: 4 additions & 2 deletions src/QA_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1407,7 +1407,7 @@ QA_Data::flush(void)
}

// Test for replicated records.
if( replicated )
else if( replicated )
{
int nRecs=static_cast<int>( pQA->nc->getNumOfRecords() );

Expand Down Expand Up @@ -1870,7 +1870,9 @@ QA_Data::testConst(hdhC::FieldData &fA)
sharedRecordFlag.currFlag += 200;

std::string capt("entire record of constant values, found");
capt += hdhC::tf_val(val) ;
capt += hdhC::tf_val(val);
capt += " in record" ;
capt += hdhC::tf_val(hdhC::itoa(pQA->pIn->currRec));

(void) notes->operate(capt) ;
notes->setCheckDataStr(pQA->fail);
Expand Down
2 changes: 1 addition & 1 deletion tables/projects/CORDEX/CORDEX_check-list.conf
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ Attribute creation_date does not comply with YYYY-MM-DDTHH:MM:SSZ & 7_12

# Consistency Check (8): changes between sub-temporal files/experiments
Could not create a consistency table & 8_1,L3
Could not lock the consistenc<y table & 8_2
Could not lock the consistency table & 8_2
Consistency table is locked for more than 1/2 hour & 8_3,L3
Auxiliary is missing in sub-temporal file & 8_4
Additional auxiliary <name> across sub-temporal file & 8_5
Expand Down

0 comments on commit 1273794

Please sign in to comment.