Skip to content

Commit bc61862

Browse files
Use stochastic restart patterns on rerun (#3077)
The stochastic pattern restart files were not being copied into the input directory when restarting the model after a segment/failure. These files are now copied in and the stochini flag set to `.true.` in the namelist on a rerun. The files are NOT copied in for non-rerun warm starts. Also removes the restriction that stochastic physics cannot be run on member 0, as this is desired down the line. Additional settings are added to the fcst and efcs configs to retain the current behavior. A bug was also discovered and corrected during this work. The stage, forecast, and archive job all assumed that `ca_data` tile files are always present, but these are only created when cellular automata is on. Now `ca_data` files are handled if CA is on. To implement this change, the `DO_CA` setting had to be moved from the forecast configs to base so it is available to the stage_ic and archive jobs. Resolves #2937
1 parent b22d61e commit bc61862

16 files changed

+122
-73
lines changed

.gitmodules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[submodule "sorc/ufs_model.fd"]
22
path = sorc/ufs_model.fd
33
url = https://github.com/ufs-community/ufs-weather-model
4-
ignore = dirty
54
[submodule "sorc/wxflow"]
65
path = sorc/wxflow
76
url = https://github.com/NOAA-EMC/wxflow

parm/archive/enkf_restartb_grp.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ enkf_restartb_grp:
2727
{% set r_dt = current_cycle | add_to_datetime(r_timedelta) %}
2828
{% set r_prefix = r_dt | to_YMD + "." + r_dt | strftime("%H") + "0000" %}
2929
{% for itile in range(1, 7) %}
30-
{% for datatype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
30+
{% for datatype in ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
3131
- "{{ COMIN_ATMOS_RESTART_MEM | relpath(ROTDIR) }}/{{ r_prefix }}.{{datatype}}.tile{{ itile }}.nc"
32+
{% if DO_CA %}
33+
- "{{ COMIN_ATMOS_RESTART_MEM | relpath(ROTDIR) }}/{{ r_prefix }}.ca_data.tile{{ itile }}.nc"
34+
{% endif %}
3235
{% endfor %}
3336
{% endfor %}
3437
- "{{ COMIN_ATMOS_RESTART_MEM | relpath(ROTDIR) }}/{{ r_prefix }}.coupler.res"

parm/archive/gdas_restartb.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ gdas_restartb:
3030
{% set r_HH = r_dt | strftime("%H") %}
3131
{% set r_prefix = r_YMD + "." + r_HH + "0000" %}
3232
{% for itile in range(1, 7) %}
33-
{% for datatype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
33+
{% for datatype in ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
3434
- "{{ COMIN_ATMOS_RESTART | relpath(ROTDIR) }}/{{ r_prefix }}.{{datatype}}.tile{{ itile }}.nc"
35+
{% if DO_CA %}
36+
- "{{ COMIN_ATMOS_RESTART | relpath(ROTDIR) }}/{{ r_prefix }}.ca_data.tile{{ itile }}.nc"
37+
{% endif %}
3538
{% endfor %}
3639
{% endfor %}
3740
- "{{ COMIN_ATMOS_RESTART | relpath(ROTDIR) }}/{{ r_prefix }}.coupler.res"

parm/config/gefs/config.base

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,17 @@ export DO_MERGENSST="NO"
287287
export NMEM_ENS=@NMEM_ENS@
288288

289289
# set default member number memdir for control
290-
# this will be overwritten for the perturbed members
290+
# this will be overwridden for the perturbed members
291291
export ENSMEM=${ENSMEM:-"000"}
292292
export MEMDIR="mem${ENSMEM}"
293293

294+
# cellular automata
295+
if (( ENSMEM == 0 )); then
296+
export DO_CA="YES"
297+
else
298+
export DO_CA="YES"
299+
fi
300+
294301
export DOIAU="NO" # While we are not doing IAU, we may want to warm start w/ IAU in the future
295302

296303
# Check if cycle is warm starting with IAU

parm/config/gefs/config.efcs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,18 @@ export SPPT_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
4444
export SPPT_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"
4545
export SPPT_LOGIT=".true."
4646
export SPPT_SFCLIMIT=".true."
47-
export DO_CA="YES"
4847
# OCN options
49-
export DO_OCN_SPPT="YES"
50-
export OCNSPPT="0.8,0.4,0.2,0.08,0.04"
51-
export OCNSPPT_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
52-
export OCNSPPT_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"
53-
export DO_OCN_PERT_EPBL="YES"
54-
export EPBL="0.8,0.4,0.2,0.08,0.04"
55-
export EPBL_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
56-
export EPBL_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"
48+
if (( OCNRES <= 100 )); then
49+
# Ocean stochastic options not supported at 5p00
50+
export DO_OCN_SPPT="YES"
51+
export OCNSPPT="0.8,0.4,0.2,0.08,0.04"
52+
export OCNSPPT_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
53+
export OCNSPPT_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"
54+
export DO_OCN_PERT_EPBL="YES"
55+
export EPBL="0.8,0.4,0.2,0.08,0.04"
56+
export EPBL_TAU="2.16E4,2.592E5,2.592E6,7.776E6,3.1536E7"
57+
export EPBL_LSCALE="500.E3,1000.E3,2000.E3,2000.E3,2000.E3"
58+
fi
5759

5860
if [[ "${REPLAY_ICS:-NO}" == "YES" ]]; then
5961
export ODA_INCUPD="True"

parm/config/gefs/config.fcst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,12 @@ case ${imp_physics} in
225225
esac
226226

227227
# Stochastic physics
228-
export DO_SPPT=${DO_SPPT:-"NO"}
229-
export DO_SKEB=${DO_SKEB:-"NO"}
230-
export DO_SHUM=${DO_SHUM:-"NO"}
231-
export DO_LAND_PERT=${DO_LAND_PERT:-"NO"}
232-
export DO_CA=${DO_CA:-"YES"}
228+
export DO_SPPT="NO"
229+
export DO_SKEB="NO"
230+
export DO_SHUM="NO"
231+
export DO_LAND_PERT="NO"
232+
export DO_OCN_SPPT="NO"
233+
export DO_OCN_PERT_EPBL="NO"
233234

234235
#coupling settings
235236
export cplmode="ufs.frac"

parm/config/gfs/config.base

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,9 @@ export INCVARS_EFOLD="5"
460460
export netcdf_diag=".true."
461461
export binary_diag=".false."
462462

463+
# Cellular automata
464+
export DO_CA="YES"
465+
463466
# Verification options
464467
export DO_METP="@DO_METP@" # Run METPLUS jobs - set METPLUS settings in config.metp
465468
export DO_FIT2OBS="YES" # Run fit to observations package

parm/config/gfs/config.fcst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,12 @@ case ${imp_physics} in
245245
esac
246246

247247
# Stochastic physics
248-
export DO_SPPT=${DO_SPPT:-"NO"}
249-
export DO_SKEB=${DO_SKEB:-"NO"}
250-
export DO_SHUM=${DO_SHUM:-"NO"}
251-
export DO_LAND_PERT=${DO_LAND_PERT:-"NO"}
252-
export DO_CA=${DO_CA:-"YES"}
253-
if [[ "${DO_NEST:-NO}" == "YES" ]] ; then
254-
export DO_CA="NO" # CA does not work with nesting.
255-
fi
248+
export DO_SPPT="NO"
249+
export DO_SKEB="NO"
250+
export DO_SHUM="NO"
251+
export DO_LAND_PERT="NO"
252+
export DO_OCN_SPPT="NO"
253+
export DO_OCN_PERT_EPBL="NO"
256254

257255
#coupling settings
258256
export cplmode="ufs.frac"

parm/stage/atmosphere_nest.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ atmosphere_nest:
1111
{% for mem in range(first_mem, last_mem + 1) %}
1212
{% set imem = mem - first_mem %}
1313
{% set COMOUT_ATMOS_RESTART_PREV_MEM = COMOUT_ATMOS_RESTART_PREV_MEM_list[imem] %}
14-
{% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
14+
{% for ftype in ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
1515
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}/{{ m_prefix }}.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"]
16+
{% if DO_CA %}
17+
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.ca_data.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}/{{ m_prefix }}.ca_data.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"]
18+
{% endif %}
1619
{% endfor %}
1720
{% endfor %} # mem loop
1821
{% else %} # cold start

parm/stage/atmosphere_warm.yaml.j2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ atmosphere_warm:
1515
{% for ftype in ["coupler.res", "fv_core.res.nc"] %}
1616
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"]
1717
{% endfor %}
18-
{% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
18+
{% for ftype in ["fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
1919
{% for ntile in range(1, ntiles + 1) %}
2020
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"]
21+
{% if DO_CA %}
22+
- ["{{ ICSDIR }}/{{ COMOUT_ATMOS_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.ca_data.tile{{ ntile }}.nc", "{{ COMOUT_ATMOS_RESTART_PREV_MEM }}"]
23+
{% endif %}
2124
{% endfor %} # ntile
2225
{% endfor %} # ftype
2326
{% for ntile in range(1, ntiles + 1) %}

0 commit comments

Comments
 (0)