Skip to content

Commit

Permalink
Combine setup_workflows scripts (#859)
Browse files Browse the repository at this point in the history
`setup_workflow.py` and `setup_workflow_fcstonly.py` are used for setting up the XML for cycled and forecast only configurations.
They share large parts of the tasks and dependencies.

This PR unifies the ones listed above and makes room for extending for incoming applications.
The above two scripts are being replaced by `setup_xml.py`.
The usage is:

```
$> setup_xml.py /path/to/experiment_directory
```

This PR also removes the handicap of defining hundreds of entities for task resources.  Instead the task resources are placed with the task itself.

This PR also does the following:
- moves the declaration of `DOBNDPNT_WAVE="NO"` from `config.wave` to `config.base`
- reduces timestep at `C48` from `1200s` to `450s` in `config.fv3`.  Several ensemble members failed.  Inspecting `config.fv3.nco.static`, the value there is `450s`
- `eobs` job times out with a wallclock time of `15m`.  It is increased to `45m` to play it safe.
  • Loading branch information
aerorahul committed Jul 18, 2022
1 parent 13385d9 commit e8361cc
Show file tree
Hide file tree
Showing 23 changed files with 2,303 additions and 3,051 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ __pycache__
*.[aox]
*.mod
*.sw[a-p]
.idea/

# Ignore folders
#-------------------
Expand Down
3 changes: 2 additions & 1 deletion parm/config/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export DO_ICE="NO"
export DO_AERO="NO"
export CCPP_SUITE="FV3_GFS_v17_p8"
export WAVE_CDUMP="" # When to include wave suite: gdas, gfs, or both
export DOBNDPNT_WAVE="NO"
export cplwav2atm=".false."

case "${APP}" in
Expand Down Expand Up @@ -190,7 +191,7 @@ case "${APP}" in

if [[ "$APP" =~ ^S2SW ]]; then
export DO_WAVE="YES"
export WAVE_CDUMP="both"
export WAVE_CDUMP="both"
export cplwav2atm=".true."
export confignamevarfornems="${confignamevarfornems}_wave"
fi
Expand Down
3 changes: 2 additions & 1 deletion parm/config/config.base.nco.static
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export FHMAX_HF_GFS=120
export FHOUT_HF_GFS=1
export ILPOST=1 # gempak output frequency up to F120

# frequency for saving restart files. set to 6,12,24,48 etc
# frequency for saving restart files. set to 6,12,24,48 etc
export restart_interval_gfs=12

# I/O QUILTING, true--use Write Component; false--use GFDL FMS
Expand Down Expand Up @@ -209,6 +209,7 @@ export gldas_cyc=00
# run wave component
export DO_WAVE=YES
export WAVE_CDUMP="both"
export DOBNDPNT_WAVE="YES"

# Microphysics Options: 99-ZhaoCarr, 8-Thompson; 6-WSM6, 10-MG, 11-GFDL
export imp_physics=8
Expand Down
2 changes: 1 addition & 1 deletion parm/config/config.fv3
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ fi
# (Standard) Model resolution dependent variables
case $case_in in
"C48")
export DELTIM=1200
export DELTIM=450
export layout_x=3
export layout_y=2
export layout_x_gfs=3
Expand Down
34 changes: 20 additions & 14 deletions parm/config/config.resources
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ elif [ $step = "sfcanl" ]; then
elif [ $step = "gldas" ]; then

export wtime_gldas="00:10:00"
export npe_gldas=96
export nth_gldas=1
export npe_gldas=96
export nth_gldas=1
export npe_node_gldas=$npe_node_max
export npe_gaussian=96
export nth_gaussian=1
export npe_node_gaussian=24
export npe_gaussian=96
export nth_gaussian=1
export npe_node_gaussian=24
if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export npe_gldas=112 ; fi
if [[ "$machine" == "WCOSS_C" ]]; then export memory_gldas="3072M"; fi

Expand Down Expand Up @@ -360,13 +360,13 @@ elif [ $step = "vrfy" ]; then
export npe_vrfy_gfs=1
export npe_node_vrfy_gfs=1
if [[ "$machine" == "WCOSS_C" ]]; then
export memory_vrfy="3072M"
export memory_vrfy="3072M"
elif [[ "$machine" == "HERA" ]]; then
export memory_vrfy="16384M"
export memory_vrfy="16384M"
fi

elif [ $step = "metp" ]; then

export nth_metp=1
export wtime_metp="03:00:00"
export npe_metp=4
Expand All @@ -375,9 +375,9 @@ elif [ $step = "metp" ]; then
export npe_metp_gfs=4
export npe_node_metp_gfs=4
if [[ "$machine" == "WCOSS_C" ]]; then
export memory_metp="3072M"
export memory_metp="3072M"
elif [[ "$machine" == "THEIA" ]]; then
export memory_metp="16384M"
export memory_metp="16384M"
fi

elif [ $step = "echgres" ]; then
Expand All @@ -394,9 +394,9 @@ elif [ $step = "init" ]; then
export nth_init=1
export npe_node_init=6
if [ $machine = "WCOSS_DELL_P3" ]; then
export memory_init="10G"
export memory_init="10G"
else
export memory_init="70G"
export memory_init="70G"
fi

elif [ $step = "init_chem" ]; then
Expand Down Expand Up @@ -428,7 +428,7 @@ elif [ $step = "coupled_ic" ]; then

elif [ $step = "eobs" -o $step = "eomg" ]; then

export wtime_eobs="00:15:00"
export wtime_eobs="00:45:00"
export wtime_eomg="01:00:00"
if [ $CASE = "C768" ]; then
export npe_eobs=200
Expand All @@ -439,10 +439,16 @@ elif [ $step = "eobs" -o $step = "eomg" ]; then
elif [ $CASE = "C96" -o $CASE = "C48" ]; then
export npe_eobs=20
fi
export npe_eomg=$npe_eobs
export nth_eobs=2
if [[ "$machine" = "WCOSS_DELL_P3" ]]; then export nth_eobs=7; fi
export nth_eomg=$nth_eobs
export npe_node_eobs=$(echo "$npe_node_max / $nth_eobs" | bc)
if [[ "$machine" == "WCOSS_C" ]]; then export memory_eobs="3072M"; fi
export npe_node_eomg=$npe_node_eobs
if [[ "$machine" == "WCOSS_C" ]]; then
export memory_eobs="3072M"
export memory_eomg=$memory_eobs
fi

elif [ $step = "ediag" ]; then

Expand Down
11 changes: 5 additions & 6 deletions parm/config/config.wave
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export waveGRD=${waveGRD:-'gnh_10m aoc_9km gsh_15m'}
export waveGRDN=${waveGRDN:-'1 2 3'} # gridnumber for ww3_multi
export waveGRDG=${waveGRDG:-'10 20 30'} # gridgroup for ww3_multi
export USE_WAV_RMP=${USE_WAV_RMP:-'YES'} #yes/no rmp grid remapping pre-processed coefficients
export DOBNDPNT_WAVE=${DOBNDPNT_WAVE:-'YES'}
export waveMULTIGRID=${waveMULTIGRID:-'.true.'}
export MESH_WAV=${MESH_WAV:-'mesh.gwes_30m.nc'}

Expand Down Expand Up @@ -84,20 +83,20 @@ fi
# Restart timing business

export RSTTYPE_WAV='T' # generate second tier of restart files
if [ "${CDUMP}" != gfs ]; then # Setting is valid for GDAS and GEFS
if [ "${CDUMP}" != gfs ]; then # Setting is valid for GDAS and GEFS
export DT_1_RST_WAV=10800 # time between restart files, set to DTRST=1 for a single restart file
export DT_2_RST_WAV=43200 # restart stride for checkpointing restart
export RSTIOFF_WAV=0 # first restart file offset relative to model start
else # This is a GFS run
rst_dt_gfs=$(( restart_interval_gfs * 3600 ))
if [ $rst_dt_gfs -gt 0 ]; then
if [ $rst_dt_gfs -gt 0 ]; then
export DT_1_RST_WAV=${rst_dt_gfs:-0} # time between restart files, set to DTRST=1 for a single restart file
export DT_2_RST_WAV=${rst_dt_gfs:-0} # restart stride for checkpointing restart
else
else
rst_dt_fhmax=$(( FHMAX_WAV * 3600 ))
export DT_1_RST_WAV=0 # time between restart files, set to DTRST=1 for a single restart file
export DT_2_RST_WAV=${rst_dt_fhmax:-0} # use checkpoint restart file name for creating restart at end of run
fi
export DT_2_RST_WAV=${rst_dt_fhmax:-0} # use checkpoint restart file name for creating restart at end of run
fi
export RSTIOFF_WAV=0 # first restart file offset relative to model start
fi
#
Expand Down
Loading

0 comments on commit e8361cc

Please sign in to comment.