Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/jstassi/#198/local acquire gaas obs #199

Merged
merged 5 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 24 additions & 82 deletions src/Applications/GEOSdas_App/GEOSdas.csm
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,19 @@
if ( !($?STRICT) ) setenv STRICT 0
if ( !($?TIMEINC) ) setenv TIMEINC 360
if ( !($?USE_ASCAT) ) setenv USE_ASCAT 0
if ( !($?USE_MODIS_STAGE) ) setenv USE_MODIS_STAGE 0
if ( !($?VAROFFSET) ) setenv VAROFFSET 180
if ( !($?VTRACK) ) setenv VTRACK 1
if ( !($?VTRKFRQA ) ) setenv VTRKFRQA 0
if ( !($?VTRKFRQF ) ) setenv VTRKFRQF 0
if ( !($?VTXRELOC ) ) setenv VTXRELOC 1
if ( !($?WCONSTRAINT) ) setenv WCONSTRAINT 0

if ( $BATCH_SUBCMD == "sbatch" ) then
setenv blockflag "-W"
else
setenv blockflag "-W block=true"
endif

if ( !($?doPLOTS) ) setenv doPLOTS 0
if ( !($?doFSENS) ) then
if ( -e stage4fsens.arc ) then
Expand Down Expand Up @@ -613,15 +618,6 @@ exit 1
cp -f AGCM.BOOTSTRAP.rc.tmpl AGCM.rc.tmpl
endif

# Turn off aerosol data sets for local acquire and replay
# -------------------------------------------------------
if ( $LOCAL_ACQUIRE ) then
set aerosol_acquire = 0
setenv USE_MODIS_STAGE 1
else
set aerosol_acquire = 1
endif

# If 4DVAR then link to adjoint nml file
# --------------------------------------
if (-e fvcorepert_layout_4dvar.rc) then
Expand Down Expand Up @@ -1557,11 +1553,7 @@ exit 1
fname2 " acquire -v -rc blend.acq -s $spool -d . -strict $nymd $nhms 060000 1 "
fname2 "exit"

if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W -o $acqlog $fname
else
qsub -W block=true -o $acqlog $fname
endif
$BATCH_SUBCMD $blockflag -o $acqlog $fname

endif

Expand Down Expand Up @@ -1699,11 +1691,7 @@ exit 1
endif
fname2 "exit"

if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W -o $acqlog $fname
else
qsub -W block=true -o $acqlog $fname
endif
$BATCH_SUBCMD $blockflag -o $acqlog $fname

endif

Expand Down Expand Up @@ -1897,11 +1885,7 @@ exit 1
fname2 " acquire -v -rc aod4fcst.acq -s $spool -d . -strict $initref[1] $initref[2] 030000 2 "
fname2 "exit"

if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W -o $acqlog $fname
else
qsub -W block=true -o $acqlog $fname
endif
$BATCH_SUBCMD $blockflag -o $acqlog $fname

endif

Expand Down Expand Up @@ -2479,11 +2463,7 @@ exit 1
fname2 ""
fname2 "exit"

if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W -o $acqlog $fname
else
qsub -W block=true -o $acqlog $fname
endif
$BATCH_SUBCMD $blockflag -o $acqlog $fname
sleep 2
@ cyc_sec = $TIMEINC * 60
set next_cycle = (`tick $rpl_nymdb $rpl_nhmsb $cyc_sec`)
Expand Down Expand Up @@ -2587,11 +2567,7 @@ exit 1
fname2 "acquire -v -rc obsys.acq -s $spool -d $FVWORK -ssh $strict $bnymd $bnhms $inhms 4"
fname2 "exit"

if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W -o $acqlog $fname
else
qsub -W block=true -o $acqlog $fname
endif
$BATCH_SUBCMD $blockflag -o $acqlog $fname
sleep 2
set bnymd=`tick $bnymd`
end
Expand Down Expand Up @@ -2637,7 +2613,7 @@ exit 1

# Acquire data for obsys on cmd line
# ----------------------------------
if ( (`uname -n` !~ borg*) || ( $LOCAL_ACQUIRE ) ) then
if ( `uname -n` !~ borg* ) then

# acquire tcvitals; ignore status return
#---------------------------------------
Expand Down Expand Up @@ -2751,17 +2727,13 @@ exit 1
set obsflag = 2
set acqflags = "-d $spool -s $spool -e 999"
set acqflags1 = "$acqflags"
set blockflag = ""
set qblock = ""
else
if ( !($?strict) ) set strict = ""
set obsflag = 1
set acqflags = "-d $FVWORK -s $spool -strict"
set acqflags1 = "-d $FVWORK -s $spool $strict"
if ( $BATCH_SUBCMD == "sbatch" ) then
set blockflag = "-W"
else
set blockflag = "-W block=true"
endif
set qblock = $blockflag
endif

# Check for available AOD obs classes
Expand Down Expand Up @@ -2815,7 +2787,7 @@ exit 1
if ( $AOD_OBSCLASS == "" ) setenv AOD_OBSCLASS none
if ( $AOD_OBSCLASS == 0 ) setenv AOD_OBSCLASS none

if ($GAAS_ANA && $aerosol_acquire && ("$AOD_OBSCLASS" != "none")) then
if ($GAAS_ANA && ("$AOD_OBSCLASS" != "none")) then
@ mstep = $nstep * 2
fname2 acquire_obsys -v $acqflags -ssh -drc $AERO_OBSDBRC \\
fname2 " "$bnymd $bnhms 030000 $mstep \\
Expand Down Expand Up @@ -2847,7 +2819,12 @@ exit 1

# submit job script
#------------------
$BATCH_SUBCMD $blockflag -o $acqlog $fname # acquire observations; ignore status return
if ( $LOCAL_ACQUIRE ) then
chmod 744 $fname
$fname |& tee $acqlog
else
$BATCH_SUBCMD $qblock -o $acqlog $fname # acquire observations; ignore status return
endif
sleep 2
if ($obsflag == 1 && ( -e obsys.acq )) then
cat obsys.acq >>! obsys.acq.all
Expand Down Expand Up @@ -4136,11 +4113,7 @@ endif
"Central AGCM Failed "

if ( -e agcm_central.j ) then
if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W agcm_central.j
else
qsub -W block=true agcm_central.j
endif
$BATCH_SUBCMD $blockflag agcm_central.j
else
echo " ${MYNAME}: AGCM Failed to generate PBS jobs for Central, Aborting ... "
exit(1)
Expand Down Expand Up @@ -4278,22 +4251,6 @@ endif
/bin/cp $FVHOME/run/gaas/avhrr_l2a.pcf $AODWORK
/bin/cp $FVHOME/run/gaas/modis_l2a.pcf $AODWORK

# Reset value of MODIS_L2A_L2_DIR to $MODIS_STAGE_DIR?
# ---------------------------------------------------
if ($GAAS_ANA && $USE_MODIS_STAGE) then
if ( ! $?MODIS_STAGE_DIR ) then
echo "Error. MODIS_STAGE_DIR not defined"
echo "Aborting ... "
Call AbnormalExit_( 5 )
endif
if ( ! -d $MODIS_STAGE_DIR ) then
echo "Error. MODIS_STAGE_DIR directory not found: $MODIS_STAGE_DIR"
echo "Aborting ... "
Call AbnormalExit_( 5 )
endif
vED -i -vv MODIS_L2A_L2_DIR=$MODIS_STAGE_DIR $AODWORK/modis_l2a.pcf
endif

# Prepare ana.rc from template
# ----------------------------
set ana_rc_tmpl = $FVHOME/run/gaas/ana.rc.tmpl
Expand Down Expand Up @@ -4340,12 +4297,6 @@ endif
endif
end

# if ($USE_MODIS_STAGE) then
# setenv MODIS_L2_HDF 1
# sed -i "s/#___AQUA_NRT___//" $ana_rc
# sed -i "s/#___TERRA_NRT___//" $ana_rc
# endif

echo "cat $ana_rc"
cat $ana_rc

Expand Down Expand Up @@ -4441,13 +4392,8 @@ endif

# submit job and save job ID
#---------------------------
if ( $BATCH_SUBCMD == "sbatch" ) then
set qblock = "-W"
else
set qblock = "-W block=true"
endif
if ( $AODBLOCKJOB ) then
set jobIDline = (`$PBS_BIN/$BATCH_SUBCMD $qblock -o $gaasLOG $jobf`)
set jobIDline = (`$PBS_BIN/$BATCH_SUBCMD $blockflag -o $gaasLOG $jobf`)
else
set jobIDline = (`$PBS_BIN/$BATCH_SUBCMD -o $gaasLOG $jobf`)
endif
Expand Down Expand Up @@ -4843,11 +4789,7 @@ endif
fname2 " acquire_obsys -v -d $FVWORK $strict $anadate[1] $anadate[2] 060000 1 $tcvitals_class"
fname2 "exit"

if ( $BATCH_SUBCMD == "sbatch" ) then
sbatch -W -o $acqlog $fname
else
qsub -W block=true -o $acqlog $fname
endif
$BATCH_SUBCMD $blockflag -o $acqlog $fname

endif
ls -lrt *vtx.prs* *vtx.mix*
Expand Down
5 changes: 0 additions & 5 deletions src/Applications/GEOSdas_App/fvsetup
Original file line number Diff line number Diff line change
Expand Up @@ -7776,8 +7776,6 @@ print SCRIPT <<"EOF";
setenv LDHOME4ENS $ldashome4ens # land analysis home dir for atm_ens
setenv IGNORE_0 1 # 1 = ignore 0 length obs files in acquire
setenv ACFTBIAS $acftbias
setenv USE_MODIS_STAGE 0 # 1 = use MODIS data from MODIS_STAGE_DIR; 0 = don't
setenv MODIS_STAGE_DIR /discover/nobackup/projects/gmao/input/dao_ops/ops/flk/modis # L2a non-archive data dir
setenv FCSTIMES "$fcstimes"
setenv FCSTATS "21"
setenv FHOURS $fhours21
Expand All @@ -7787,9 +7785,6 @@ print SCRIPT <<"EOF";
setenv GSI_DIAG2TXT 1
# setenv DO_0HR_IMP 1

if ( -e \$FVHOME/run/replay.acq ) then
setenv USE_MODIS_STAGE 1 # for now, replay.acq controls only meteorology (AOD is not yet replayed to)
endif
EOF

if ( $merra2 ) {
Expand Down