From 0eff43fb35b5fa480042dbf275c30f0d16207d57 Mon Sep 17 00:00:00 2001 From: Joe Stassi Date: Mon, 22 Aug 2022 15:41:37 -0400 Subject: [PATCH 1/3] Updates to handle local acquire of obs and gaas_obs in the same manner. --- src/Applications/GEOSdas_App/GEOSdas.csm | 106 +++++------------------ src/Applications/GEOSdas_App/fvsetup | 6 +- 2 files changed, 27 insertions(+), 85 deletions(-) diff --git a/src/Applications/GEOSdas_App/GEOSdas.csm b/src/Applications/GEOSdas_App/GEOSdas.csm index bb71b721..e58b1698 100755 --- a/src/Applications/GEOSdas_App/GEOSdas.csm +++ b/src/Applications/GEOSdas_App/GEOSdas.csm @@ -158,7 +158,6 @@ 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 @@ -166,6 +165,12 @@ 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -2477,11 +2461,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`) @@ -2585,11 +2565,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 @@ -2635,7 +2611,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 #--------------------------------------- @@ -2749,17 +2725,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 @@ -2813,7 +2785,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 && ! $REPLAY_ACQ && ("$AOD_OBSCLASS" != "none")) then @ mstep = $nstep * 2 fname2 acquire_obsys -v $acqflags -ssh -drc $AERO_OBSDBRC \\ fname2 " "$bnymd $bnhms 030000 $mstep \\ @@ -2845,7 +2817,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 @@ -4126,11 +4103,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) @@ -4268,22 +4241,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 @@ -4330,12 +4287,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 @@ -4431,13 +4382,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 @@ -4833,11 +4779,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* diff --git a/src/Applications/GEOSdas_App/fvsetup b/src/Applications/GEOSdas_App/fvsetup index 94ccefce..1ec85739 100755 --- a/src/Applications/GEOSdas_App/fvsetup +++ b/src/Applications/GEOSdas_App/fvsetup @@ -7771,8 +7771,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 @@ -7783,7 +7781,9 @@ print SCRIPT <<"EOF"; # 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) + setenv REPLAY_ACQ 1 # for now, replay.acq controls only meteorology (AOD is not yet replayed to) + else + setenv REPLAY_ACQ 0 endif EOF From 90516bdc0af5e97ea0388c4d9ab5517c1e433fe8 Mon Sep 17 00:00:00 2001 From: Joe Stassi Date: Tue, 23 Aug 2022 08:37:43 -0400 Subject: [PATCH 2/3] Include hour marker (_%h2) in template for aeronet_obs data files. --- src/Applications/GAAS_App/ana.rc.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Applications/GAAS_App/ana.rc.tmpl b/src/Applications/GAAS_App/ana.rc.tmpl index ff285eb7..19c33a67 100644 --- a/src/Applications/GAAS_App/ana.rc.tmpl +++ b/src/Applications/GAAS_App/ana.rc.tmpl @@ -38,7 +38,7 @@ ODS_files:: #___MISR___${FVWORK}/misr_F12_0022.bright_tc8.obs.%y4%m2%d2.ods -#___AERONET___${FVWORK}/aeronet.obs.%y4%m2%d2.ods +#___AERONET___${FVWORK}/aeronet.obs.%y4%m2%d2_%h2z.ods # Passive data #/nobackup/3/PARASOL/Level2/ODS/Y%y4/M%m2/PARASOL_L2.aero_tc8.obs.%y4%m2%d2.ods From e6e8fc75328c0e2ceed033a07e375655efb79e84 Mon Sep 17 00:00:00 2001 From: Joe Stassi Date: Tue, 23 Aug 2022 12:18:35 -0400 Subject: [PATCH 3/3] Minor updates regarding how replay is handled; removed unnecessary code. --- src/Applications/GEOSdas_App/GEOSdas.csm | 2 +- src/Applications/GEOSdas_App/fvsetup | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Applications/GEOSdas_App/GEOSdas.csm b/src/Applications/GEOSdas_App/GEOSdas.csm index 2dd6e1d7..c064290a 100755 --- a/src/Applications/GEOSdas_App/GEOSdas.csm +++ b/src/Applications/GEOSdas_App/GEOSdas.csm @@ -2787,7 +2787,7 @@ exit 1 if ( $AOD_OBSCLASS == "" ) setenv AOD_OBSCLASS none if ( $AOD_OBSCLASS == 0 ) setenv AOD_OBSCLASS none - if ($GAAS_ANA && ! $REPLAY_ACQ && ("$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 \\ diff --git a/src/Applications/GEOSdas_App/fvsetup b/src/Applications/GEOSdas_App/fvsetup index 18b82e6e..bb183fcc 100755 --- a/src/Applications/GEOSdas_App/fvsetup +++ b/src/Applications/GEOSdas_App/fvsetup @@ -7785,11 +7785,6 @@ print SCRIPT <<"EOF"; setenv GSI_DIAG2TXT 1 # setenv DO_0HR_IMP 1 - if ( -e \$FVHOME/run/replay.acq ) then - setenv REPLAY_ACQ 1 # for now, replay.acq controls only meteorology (AOD is not yet replayed to) - else - setenv REPLAY_ACQ 0 - endif EOF if ( $merra2 ) {