Skip to content

Commit

Permalink
Updates example
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonb5 committed Oct 17, 2024
1 parent a4d7f2a commit f494afd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doc/source/users_guide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ Note; this is a toy example, no scientific usage.
import os
from CIME.SystemTests.mvk import EVV_LIB_DIR
from CIME.namelist import Namelist
from CIME.utils import safe_copy
from CIME.utils import run_cmd

component "eam"
Expand All @@ -437,15 +438,18 @@ Note; this is a toy example, no scientific usage.
if component in ["eam", "clm"]:
with namelist(filename) as nml:
if component == "eam":
nml.set_variable_value("eam_specific", f"perturn-{i}")
# arguments group, key, value
nml.set_variable_value("", "eam_specific", f"perturn-{i}")
elif component == "clm":
if i % 2 == 0:
nml.set_variable_value("clm_specific", "even")
nml.set_variable_value("", "clm_specific", "even")
else:
nml.set_variable_value("clm_specific", "odd")
nml.set_variable_value("", "clm_specific", "odd")
else:
stat, output, err = run_cmd(f"atmchange initial_conditions::perturbation_random_seed = {i*32}")

safe_copy("namelist_scream.xml", f"namelist_scream_{i:04}.xml")


========================
Test progress and output
Expand Down

0 comments on commit f494afd

Please sign in to comment.