Skip to content

Commit

Permalink
Improve to run fcst (atm only)
Browse files Browse the repository at this point in the history
 On branch feature/gefs_v13_822_add_atm_fcst
	modified:   jobs/rocoto/fcst.sh
	modified:   ush/forecast_det.sh
	modified:   ush/forecast_postdet.sh
	modified:   ush/forecast_predet.sh

Refs: NOAA-EMC#822
  • Loading branch information
XianwuXue-NOAA committed Jun 10, 2022
1 parent 027eab9 commit 1b5827c
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 6 deletions.
4 changes: 3 additions & 1 deletion jobs/rocoto/fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
. $HOMEgfs/ush/load_fv3gfs_modules.sh
status=$?
[[ $status -ne 0 ]] && exit $status

if [[ $CDUMP == "gefs" ]]; then
export MEMBER=`echo ${RUNMEM:-"c00"}|cut -c2-3`
fi
###############################################################
# Execute the JJOB
$HOMEgfs/jobs/JGLOBAL_FORECAST
Expand Down
1 change: 1 addition & 0 deletions ush/forecast_det.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ FV3_GFS_det(){

FV3_GEFS_det(){
echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GEFS"
FV3_GFS_det
}

WW3_det(){
Expand Down
19 changes: 19 additions & 0 deletions ush/forecast_postdet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
FV3_GEFS_postdet(){
echo SUB ${FUNCNAME[0]}: Linking input data for FV3 $RUN
# soft link commands insert here
FV3_GFS_postdet
}

DATM_postdet(){
Expand Down Expand Up @@ -558,6 +559,20 @@ FV3_GFS_nml(){
echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created
}

FV3_GEFS_nml(){
# namelist output for a certain component
echo SUB ${FUNCNAME[0]}: Creating name lists and model configure file for FV3
if [ $machine = 'sandbox' ]; then
cd $SCRIPTDIR
echo "MAIN: !!!Sandbox mode, writing to current directory!!!"
fi
# Call child scripts in current script directory
source $SCRIPTDIR/parsing_namelists_FV3.sh
FV3_namelists
echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created
}


DATM_nml(){
source $SCRIPTDIR/parsing_namelists_DATM.sh
DATM_namelists
Expand Down Expand Up @@ -609,6 +624,10 @@ data_out_GFS() {
echo "SUB ${FUNCNAME[0]}: Output data for FV3 copied"
}

data_out_GEFS() {
data_out_GFS
}

WW3_postdet() {
echo "SUB ${FUNCNAME[0]}: Linking input data for WW3"
COMPONENTwave=${COMPONENTwave:-${RUN}wave}
Expand Down
36 changes: 31 additions & 5 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,35 @@ FV3_GFS_predet(){
rprefix=$rCDUMP
memchar=""
else
prefix=enkf$CDUMP
rprefix=enkf$rCDUMP
memchar=mem$(printf %03i $MEMBER)
if [[ $CDUMP == "gefs" ]]; then
prefix=$CDUMP
rprefix=$rCDUMP
if [ $MEMBER -eq 0 ]; then
memchar=c$(printf %02i $MEMBER)
else
memchar=p$(printf %02i $MEMBER)
fi
else
prefix=enkf$CDUMP
rprefix=enkf$rCDUMP
memchar=mem$(printf %03i $MEMBER)
fi
fi
if [[ $CDUMP == "gefs" ]]; then
memdir=$ROTDIR/${prefix}.$PDY/$cyc/$memchar/atmos
else
memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar
fi
memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar
if [ ! -d $memdir ]; then mkdir -p $memdir; fi

GDATE=$($NDATE -$assim_freq $CDATE)
gPDY=$(echo $GDATE | cut -c1-8)
gcyc=$(echo $GDATE | cut -c9-10)
gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar
if [[ $CDUMP == "gefs" ]]; then
gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/$memchar/atmos
else
gmemdir=$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar
fi
sCDATE=$($NDATE -3 $CDATE)

if [[ "$DOIAU" = "YES" ]]; then
Expand All @@ -282,6 +300,14 @@ FV3_GFS_predet(){
echo "SUB ${FUNCNAME[0]}: pre-determination variables set"
}

FV3_GEFS_predet(){
echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GFS"

FV3_GFS_predet

echo "SUB ${FUNCNAME[0]}: pre-determination variables set"
}

WW3_predet(){
echo "SUB ${FUNCNAME[0]}: Defining variables for WW3"
if [ $CDUMP = "gdas" ]; then
Expand Down

0 comments on commit 1b5827c

Please sign in to comment.