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

Make needed updates to run forecast from GEFS #1203

Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1b5827c
Improve to run fcst (atm only)
XianwuXue-NOAA Jun 10, 2022
38f5dce
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jul 8, 2022
fe5e830
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jul 18, 2022
4812945
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jul 18, 2022
01f344b
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jul 19, 2022
9865bf9
Improve the script to run fcst for GEFS
XianwuXue-NOAA Jul 21, 2022
46a87cb
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Aug 4, 2022
3f03cdd
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Nov 29, 2022
39c641e
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Dec 10, 2022
9f57a1f
Modify to run atm fcst for GEFS
XianwuXue-NOAA Dec 11, 2022
c905b74
Fix bugs for condition statements
XianwuXue-NOAA Dec 12, 2022
fe82706
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Dec 15, 2022
a49956c
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Dec 15, 2022
d0924ab
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Dec 23, 2022
af7dc51
Introduce FHOUT_ENKF_GFS for gfsefcs jobs
XianwuXue-NOAA Dec 23, 2022
052ad49
Add FHOUT_ENKF_GFS to calculate epos group
XianwuXue-NOAA Dec 30, 2022
f0aaaf0
Add GEFS functions with new COM to fcst ush scripts
XianwuXue-NOAA Dec 30, 2022
a56b707
Remove unused statements for gefs
XianwuXue-NOAA Jan 2, 2023
61f44aa
Add FLTFILEGFS[F00] & POSTGRB2TBL to pass values
XianwuXue-NOAA Jan 2, 2023
4ef0d93
Add braces around variables to fix the lint warning
XianwuXue-NOAA Jan 4, 2023
bf053c1
Remove FV3_GEFS_nml and use FV3_GFS_nml for GEFS
XianwuXue-NOAA Jan 4, 2023
4346c8c
Remove the new COM dirs
XianwuXue-NOAA Jan 4, 2023
e1f8305
Correct a typo
XianwuXue-NOAA Jan 4, 2023
bfcd22f
Merge branch 'feature/gefs_v13_822_add_atm_fcst' of github.com:Xianwu…
XianwuXue-NOAA Jan 4, 2023
ec701f5
Delete the unused statements
XianwuXue-NOAA Jan 4, 2023
4299561
Modify to save RESTART files for both gfs and gefs
XianwuXue-NOAA Jan 7, 2023
43555a0
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jan 9, 2023
dd70d8d
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jan 11, 2023
fd325ac
Make RERUN receive value from out of the script
XianwuXue-NOAA Jan 11, 2023
33b4d90
Delete the GEFS functions to reuse GFS functions
XianwuXue-NOAA Jan 12, 2023
c95d4a6
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jan 12, 2023
119e5b7
Add { } to variables
XianwuXue-NOAA Jan 17, 2023
5c95d7a
Remove unused RSTDIR
XianwuXue-NOAA Jan 19, 2023
eb9d39c
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jan 19, 2023
1be0572
Create links for final restart written files only
XianwuXue-NOAA Jan 22, 2023
7ee08e2
Change memdir/INPUT using ICSDIR to use dif ICSDIR
XianwuXue-NOAA Jan 24, 2023
b686fe7
Remove unused function
XianwuXue-NOAA Jan 24, 2023
3d99c50
Merge branch 'develop' into feature/gefs_v13_822_add_atm_fcst
XianwuXue-NOAA Jan 24, 2023
1ac2957
Remove the ICSDIR in the forecast_postdef.sh
XianwuXue-NOAA Jan 25, 2023
c6e082c
Optimize case statements in the script
XianwuXue-NOAA Jan 25, 2023
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
1 change: 1 addition & 0 deletions parm/config/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ if [ $DOHYBVAR = "YES" ]; then
export FHMIN_ENKF=3
export FHMAX_ENKF=9
export FHMAX_ENKF_GFS=120
export FHOUT_ENKF_GFS=3
if [ $l4densvar = ".true." ]; then
export FHOUT=1
export FHOUT_ENKF=1
Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ elif [ ${step} = "esfc" ]; then
elif [ ${step} = "efcs" ]; then

if [ ${CASE} = "C768" ]; then
export wtime_efcs="01:20:00"
export wtime_efcs="06:00:00"
XianwuXue-NOAA marked this conversation as resolved.
Show resolved Hide resolved
else
export wtime_efcs="00:40:00"
fi
Expand Down
4 changes: 3 additions & 1 deletion scripts/exgdas_enkf_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export LEVS=${LEVS_ENKF:-${LEVS:-64}}

# nggps_diag_nml
export FHOUT=${FHOUT_ENKF:-3}

if [[ $CDUMP == "gfs" ]]; then
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
export FHOUT=${FHOUT_ENKF_GFS:-${FHOUT_ENKF:${FHOUT:-3}}}
fi
Copy link
Contributor

@aerorahul aerorahul Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead, how about this on the line above?

Suggested change
if [[ $CDUMP == "gfs" ]]; then
export FHOUT=${FHOUT_ENKF_GFS:-${FHOUT_ENKF:${FHOUT:-3}}}
fi
export FHOUT=${FHOUT_ENKF_${CDUMP}:-${FHOUT_ENKF:-${FHOUT:-3}}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$CDUMP should be "gfs", not "GFS", should I change FHOUT_ENKF_GFS to FHOUT_ENKF_gfs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent, I think using FHOUT_ENKF_GFS is better than FHOUT_ENKF_gfs, because we don't have FHOUT_ENKF_GDAS variable. So I think I don't need to change it.

# model_configure
export DELTIM=${DELTIM_ENKF:-${DELTIM:-225}}
export FHMAX=${FHMAX_ENKF:-9}
Expand Down
3 changes: 2 additions & 1 deletion ush/forecast_det.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ FV3_GFS_det(){
# determine if restart IC exists to continue from a previous forecast
RERUN="NO"
filecount=$(find "${RSTDIR_ATM:-/dev/null}" -type f | wc -l)
if [ ${CDUMP} = "gfs" -a ${rst_invt1} -gt 0 -a ${FHMAX} -gt ${rst_invt1} -a ${filecount} -gt 10 ]; then
if [[ ( ${CDUMP} = "gfs" || ( $RUN = "gefs" && $CDATE_RST = "" )) && ${rst_invt1} -gt 0 && ${FHMAX} -gt ${rst_invt1} && ${filecount} -gt 10 ]]; then
Fixed Show fixed Hide fixed
Fixed Show fixed Hide fixed
reverse=$(echo "${restart_interval[@]} " | tac -s ' ')
for xfh in ${reverse} ; do
yfh=$((xfh-(IAU_OFFSET/2)))
Expand Down Expand Up @@ -76,6 +76,7 @@ FV3_GFS_det(){

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

WW3_det(){
Expand Down
69 changes: 54 additions & 15 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 @@ -307,9 +308,9 @@ EOF
# inline post fix files
if [ $WRITE_DOPOST = ".true." ]; then
$NLN $PARM_POST/post_tag_gfs${LEVS} $DATA/itag
$NLN $PARM_POST/postxconfig-NT-GFS-TWO.txt $DATA/postxconfig-NT.txt
$NLN $PARM_POST/postxconfig-NT-GFS-F00-TWO.txt $DATA/postxconfig-NT_FH00.txt
$NLN $PARM_POST/params_grib2_tbl_new $DATA/params_grib2_tbl_new
$NLN ${FLTFILEGFS:-$PARM_POST/postxconfig-NT-GFS-TWO.txt} $DATA/postxconfig-NT.txt
$NLN ${FLTFILEGFSF00:-$PARM_POST/postxconfig-NT-GFS-F00-TWO.txt} $DATA/postxconfig-NT_FH00.txt
$NLN ${POSTGRB2TBL:-$PARM_POST/params_grib2_tbl_new} $DATA/params_grib2_tbl_new
fi

#------------------------------------------------------------------
Expand Down Expand Up @@ -519,11 +520,19 @@ EOF
logi=logf${FH3}
pgbi=GFSPRS.GrbF${FH2}
flxi=GFSFLX.GrbF${FH2}
atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix
sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix
logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt
pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3}
flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2
if [[ $RUN == "gefs" ]]; then
XianwuXue-NOAA marked this conversation as resolved.
Show resolved Hide resolved
atmo=$memdir/history/${CDUMP}.t${cyc}z.atmf${FH3}.$affix
sfco=$memdir/history/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix
logo=$memdir/history/${CDUMP}.t${cyc}z.logf${FH3}.txt
pgbo=$memdir/master/${CDUMP}.t${cyc}z.master.grb2f${FH3}
flxo=$memdir/master/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2
else
atmo=$memdir/${CDUMP}.t${cyc}z.atmf${FH3}.$affix
sfco=$memdir/${CDUMP}.t${cyc}z.sfcf${FH3}.$affix
logo=$memdir/${CDUMP}.t${cyc}z.logf${FH3}.txt
pgbo=$memdir/${CDUMP}.t${cyc}z.master.grb2f${FH3}
flxo=$memdir/${CDUMP}.t${cyc}z.sfluxgrbf${FH3}.grib2
fi
eval $NLN $atmo $atmi
eval $NLN $sfco $sfci
eval $NLN $logo $logi
Expand All @@ -534,11 +543,19 @@ EOF
done
else
for n in $(seq 1 $ntiles); do
eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc
eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc
eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc
eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc
eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc
if [[ $RUN == "gefs" ]]; then
XianwuXue-NOAA marked this conversation as resolved.
Show resolved Hide resolved
eval $NLN nggps2d.tile${n}.nc $memdir/history/nggps2d.tile${n}.nc
eval $NLN nggps3d.tile${n}.nc $memdir/history/nggps3d.tile${n}.nc
eval $NLN grid_spec.tile${n}.nc $memdir/history/grid_spec.tile${n}.nc
eval $NLN atmos_static.tile${n}.nc $memdir/history/atmos_static.tile${n}.nc
eval $NLN atmos_4xdaily.tile${n}.nc $memdir/history/atmos_4xdaily.tile${n}.nc
else
eval $NLN nggps2d.tile${n}.nc $memdir/nggps2d.tile${n}.nc
eval $NLN nggps3d.tile${n}.nc $memdir/nggps3d.tile${n}.nc
eval $NLN grid_spec.tile${n}.nc $memdir/grid_spec.tile${n}.nc
eval $NLN atmos_static.tile${n}.nc $memdir/atmos_static.tile${n}.nc
eval $NLN atmos_4xdaily.tile${n}.nc $memdir/atmos_4xdaily.tile${n}.nc
fi
done
fi
}
Expand All @@ -556,6 +573,20 @@ FV3_GFS_nml(){
echo SUB ${FUNCNAME[0]}: FV3 name lists and model configure file created
}

FV3_GEFS_nml(){
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
# 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 @@ -599,14 +630,22 @@ data_out_GFS() {
$NCP $file $memdir/RESTART/$file
done
fi
elif [ $CDUMP = "gfs" ]; then
$NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/
elif [ $CDUMP = "gfs" ] || [ ${RUN} = "gefs" ]; then
XianwuXue-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if [ ${RUN} = "gefs" ]; then
$NCP $DATA/input.nml ${ROTDIR}/${RUN}.${PDY}/$cyc/${mem}/atmos/history/
else
$NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/
fi
fi
fi

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
24 changes: 19 additions & 5 deletions ush/forecast_predet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ FV3_GFS_predet(){
print_freq=${print_freq:-6}

#-------------------------------------------------------
if [ $CDUMP = "gfs" ] && [ $rst_invt1 -gt 0 ] && [ $MEMBER -lt 0 ]; then
RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART
if [[ $CDUMP = "gfs" || $RUN = "gefs" ]] && [ $rst_invt1 -gt 0 ] && [ $MEMBER -lt 0 ]; then
RSTDIR_ATM=${RSTDIR_ATM:-${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/atmos/RERUN_RESTART}
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if [ ! -d $RSTDIR_ATM ]; then mkdir -p $RSTDIR_ATM ; fi
$NLN $RSTDIR_ATM RESTART
# The final restart written at the end doesn't include the valid date
Expand All @@ -232,7 +232,7 @@ FV3_GFS_predet(){

#-------------------------------------------------------
# member directory
if [ $MEMBER -lt 0 ]; then
if [[ $MEMBER -lt 0 || $RUN = "gefs" ]]; then
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
prefix=$CDUMP
rprefix=$rCDUMP
memchar=""
Expand All @@ -241,13 +241,19 @@ FV3_GFS_predet(){
rprefix=enkf$rCDUMP
memchar=mem$(printf %03i $MEMBER)
fi
memdir=$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar
memdir=${memdir:-$ROTDIR/${prefix}.$PDY/$cyc/atmos/$memchar}
if [ ! -d $memdir ]; then mkdir -p $memdir; fi
if [[ $RUN == "gefs" ]]; then
if [ ! -d ${memdir}/history ]; then mkdir -p ${memdir}/history; fi
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved
if [ $WRITE_DOPOST = ".true." ]; then
if [ ! -d ${memdir}/master ]; then mkdir -p ${memdir}/master; fi
fi
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
gmemdir=${gmemdir:-$ROTDIR/${rprefix}.$gPDY/$gcyc/atmos/$memchar}

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

FV3_GEFS_predet(){
echo "SUB ${FUNCNAME[0]}: Defining variables for FV3GFS"
WalterKolczynski-NOAA marked this conversation as resolved.
Show resolved Hide resolved

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
3 changes: 2 additions & 1 deletion workflow/rocoto/workflow_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,10 @@ def epos(self):
def _get_eposgroups(epos):
fhmin = epos['FHMIN_ENKF']
fhmax = epos['FHMAX_ENKF']
fhout = epos['FHOUT_ENKF']
if self.cdump == "gfs":
fhmax = epos['FHMAX_ENKF_GFS']
fhout = epos['FHOUT_ENKF']
fhout = epos['FHOUT_ENKF_GFS']
aerorahul marked this conversation as resolved.
Show resolved Hide resolved
fhrs = range(fhmin, fhmax + fhout, fhout)

neposgrp = epos['NEPOSGRP']
Expand Down