Skip to content

Commit

Permalink
Merge pull request #184 from GEOS-ESM/feature/msienkie/pre-qc_transition
Browse files Browse the repository at this point in the history
Modify prepqc script to check for pre-qc data and skip if no data is present
  • Loading branch information
rtodling authored Jul 25, 2022
2 parents 3efd8a3 + ba8a7b7 commit b648de9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
44 changes: 27 additions & 17 deletions src/Applications/GEOSdas_App/GEOSdas.csm
Original file line number Diff line number Diff line change
Expand Up @@ -1969,9 +1969,11 @@ exit 1
endif
endif

set ars_list = ( satbias satbang )
set ars_list = ( satbias )
if ($NEWRADBC || $ANGLEBC) then
set ars_list = ( $ars_list satbiaspc )
else if ( ! $ANGLEBC ) then
set ars_list = ( $ars_list satbang )
endif
if ($ACFTBIAS) then
set ars_list = ( $ars_list acftbias )
Expand Down Expand Up @@ -2972,27 +2974,35 @@ endif
/bin/rm -f input_combfr.txt
touch input_combfr.txt
foreach qcpat ( `cat pre-qc.acq | sort | uniq`)
echorc.x -template dummy $nymdb $nhmsb -fill $qcpat >> input_combfr.txt
# echorc.x -template dummy $nymdb $nhmsb -fill $qcpat >> input_combfr.txt
set fn = `echorc.x -template dummy $nymdb $nhmsb -fill $qcpat`
if ( -e $fn && ! -z $fn ) echo $fn >> input_combfr.txt
end
combfrd.x -d $pbdtg $pbname < input_combfr.txt
scanbuf0.x $pbname >! data_types.log

if ( `grep PROFLR data_types.log | wc -l `) then
setenv PROFQC 1
if ( -z input_combfr.txt) then
# if no files to combine then no input for prepqc, so try setting prepqc 0
if ($PREPQC) setenv PREPQC 0
else
setenv PROFQC 0
endif
combfrd.x -d $pbdtg $pbname < input_combfr.txt
scanbuf0.x $pbname >! data_types.log

if ( `grep AIRCFT data_types.log | wc -l`) then
setenv ACFTQC 1
else
setenv ACFTQC 0
endif
if ( `grep PROFLR data_types.log | wc -l `) then
setenv PROFQC 1
else
setenv PROFQC 0
endif

if ( `grep AIRCAR data_types.log | wc -l`) then
setenv ACARSQC 1
else
setenv ACARSQC 0
if ( `grep AIRCFT data_types.log | wc -l`) then
setenv ACFTQC 1
else
setenv ACFTQC 0
endif

if ( `grep AIRCAR data_types.log | wc -l`) then
setenv ACARSQC 1
else
setenv ACARSQC 0
endif
endif
endif
endif
Expand Down
7 changes: 6 additions & 1 deletion src/Applications/NCEP_Paqc/oiqc/prepqc_daemon.pl
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@
open(FH1,"+>input_combfr.txt") || die "prepqc: could not open input_combfr.txt";
foreach $qcpat ( `cat pre-qc.acq | sort | uniq`) {
$pat = `echorc.x -template dummy $nymd $nhms -fill $qcpat`;
print FH1 ("$pat");
print FH1 ("$pat") if ( -e $pat && ! -z $pat ) ;
}
close(FH1);
if ( -z "input_combfr.txt "{
print"No pre-qc files present, skipping PREPQC\n";
system("touch prepqc.$nymd.$nhms.done");
return
}
`combfrd.x -d $pbdtg $pbname < input_combfr.txt`;
open(FH1,"+>data_types.log") || die "prepqc: could not open data_types.log";
@types = `scanbuf0.x $pbname`;
Expand Down

0 comments on commit b648de9

Please sign in to comment.