diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index d72a07614f..134c707247 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -122,7 +122,7 @@ rCDUMP=$CDUMP [[ $CDUMP = "gfs" ]] && export rCDUMP="gdas" # Forecast length for GFS forecast -if [ $CDUMP = "gfs" ]; then +if [ $CDUMP = "gfs" ] || [ $CDUMP = "gefs" ]; then export FHMAX=$FHMAX_GFS export FHOUT=$FHOUT_GFS export FHMAX_HF=$FHMAX_HF_GFS diff --git a/jobs/rocoto/fcst.sh b/jobs/rocoto/fcst.sh index e142fcce79..90402efb9f 100755 --- a/jobs/rocoto/fcst.sh +++ b/jobs/rocoto/fcst.sh @@ -7,6 +7,9 @@ status=$? [[ $status -ne 0 ]] && exit $status if [[ $CDUMP == "gefs" ]]; then export MEMBER=`echo ${RUNMEM:-"c00"}|cut -c2-3` + if [[ $RUNMEM != "c00" ]]; then + export PREFIX_ATMINC="r" + fi fi ############################################################### # Execute the JJOB diff --git a/parm/config/config.fcst b/parm/config/config.fcst index e73c35d15d..3041906a8e 100755 --- a/parm/config/config.fcst +++ b/parm/config/config.fcst @@ -358,6 +358,85 @@ elif [[ "$CDUMP" == "gfs" ]] ; then # GFS cycle specific parameters export io_layout="1,1" fi +elif [[ "$CDUMP" == "gefs" ]] ; then # GEFS cycle specific parameters + + if [[ $RUNMEM == "c00" ]]; then + # Write more variables to output + if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table" + else + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_orig" + fi + + # Write gfs restart files to rerun fcst from any break point + export restart_interval_gfs=${restart_interval_gfs:-0} + if [ $restart_interval_gfs -le 0 ]; then + export restart_interval="$FHMAX_GFS" + else + rst_list="" + IAU_OFFSET=${IAU_OFFSET:-0} + [[ $DOIAU = "NO" ]] && export IAU_OFFSET=0 + xfh=$((restart_interval_gfs+(IAU_OFFSET/2))) + while [ $xfh -le $FHMAX_GFS ]; do + rst_list="$rst_list $xfh" + xfh=$((xfh+restart_interval_gfs)) + done + export restart_interval="$rst_list" + fi + + if [ $DO_AERO = "YES" ]; then + # Make sure a restart file is written at the cadence time + if [[ ! "${restart_interval[*]}" =~ "$STEP_GFS" ]]; then + export restart_interval="$STEP_GFS $restart_interval" + fi + fi + + # Choose coupling with wave + if [ $DO_WAVE = "YES" -a "$WAVE_CDUMP" != "gdas" ]; then + export cplwav=".true." + fi + + # Turn off dry mass adjustment in GFS + export adjust_dry_mass=".false." + + # Write each restart file in 16 small files to save time + if [ $CASE = C768 ]; then + export io_layout="4,4" + else + export io_layout="1,1" + fi + + else + # Variables used in DA cycling + if [ $QUILTING = ".true." -a $OUTPUT_GRID = "gaussian_grid" ]; then + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_da" + else + export DIAG_TABLE="$HOMEgfs/parm/parm_fv3diag/diag_table_da_orig" + fi + + # Write restart files, where $number is current model start time. + # restart_interval: $number + # number=0, writes out restart files at the end of forecast. + # number>0, writes out restart files at the frequency of $number and at the end of forecast. + # restart_interval: "$number -1" + # writes out restart files only once at $number forecast hour. + # restart_interval: "$number1 $number2 $number3 ..." + # writes out restart file at the specified forecast hours + export restart_interval=${restart_interval:-6} + + # For IAU, write restarts at beginning of window also + if [ $DOIAU = "YES" ]; then + export restart_interval="3 6" + fi + + # Choose coupling with wave + if [ $DO_WAVE = "YES" ]; then export cplwav=".true." ; fi + + # Turn on dry mass adjustment in GDAS + export adjust_dry_mass=".true." + + fi + fi if [[ $DO_COUPLED = "YES" ]] ; then # coupled model diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index a67e6f4df6..85b502f453 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -618,6 +618,8 @@ data_out_GFS() { fi elif [ $CDUMP = "gfs" ]; then $NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/atmos/ + elif [ $CDUMP = "gefs" ]; then + $NCP $DATA/input.nml $ROTDIR/${CDUMP}.${PDY}/${cyc}/$RUNMEM/atmos/ fi fi diff --git a/ush/forecast_predet.sh b/ush/forecast_predet.sh index 3ebd360579..833b5c89a9 100755 --- a/ush/forecast_predet.sh +++ b/ush/forecast_predet.sh @@ -127,7 +127,11 @@ FV3_GFS_predet(){ if [ $MEMBER -lt 0 ]; then NTASKS_TOT=${NTASKS_TOT:-$npe_fcst_gfs} else - NTASKS_TOT=${NTASKS_TOT:-$npe_efcs} + if [[ $CDUMP == gefs ]]; then + NTASKS_TOT=${NTASKS_TOT:-$npe_fcst_gfs} + else + NTASKS_TOT=${NTASKS_TOT:-$npe_efcs} + fi fi TYPE=${TYPE:-"nh"} # choices: nh, hydro @@ -241,6 +245,29 @@ FV3_GFS_predet(){ for file in $files; do $NLN $RSTDIR_ATM/$file $RSTDIR_ATM/${vPDY}.${vcyc}0000.$file done + elif [ $CDUMP = "gefs" -a $rst_invt1 -gt 0 ]; then + if [ $MEMBER -eq 0 ]; then + memchar=c$(printf %02i $MEMBER) + else + memchar=p$(printf %02i $MEMBER) + fi + RSTDIR_ATM=${RSTDIR:-$ROTDIR}/${CDUMP}.${PDY}/${cyc}/${memchar}/atmos/RERUN_RESTART + 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 + # Create links that keep the same name pattern for these files + VDATE=$($NDATE +$FHMAX_GFS $CDATE) + vPDY=$(echo $VDATE | cut -c1-8) + vcyc=$(echo $VDATE | cut -c9-10) + files="coupler.res fv_core.res.nc" + for tile in {1..6}; do + for base in ca_data fv_core.res fv_srf_wnd.res fv_tracer.res phy_data sfc_data; do + files="${files} ${base}.tile${tile}.nc" + done + done + for file in $files; do + $NLN $RSTDIR_ATM/$file $RSTDIR_ATM/${vPDY}.${vcyc}0000.$file + done else mkdir -p $DATA/RESTART fi