Skip to content

Commit

Permalink
Merge branch 'b4b-dev' into fix_hh_vector_units
Browse files Browse the repository at this point in the history
  • Loading branch information
slevis-lmwg committed Apr 16, 2024
2 parents cad8d42 + 074b4df commit 08a8468
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
2 changes: 2 additions & 0 deletions cime_config/usermods_dirs/NEON/defaults/shell_commands
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ TEST=`./xmlquery TEST --value`

# For a transient case run the whole length and don't cycle
if [[ $compset =~ ^HIST ]]; then
./xmlchange CALENDAR=GREGORIAN
./xmlchange DATM_YR_END=2022
./xmlchange RUN_STARTDATE=2018-01-01
# Number of months that can be run for the full transient case
Expand All @@ -29,6 +30,7 @@ if [[ $compset =~ ^HIST ]]; then
./xmlchange CLM_NML_USE_CASE="2018-PD_transient"
else
./xmlchange CLM_NML_USE_CASE="2018_control"
./xmlchange CALENDAR=NO_LEAP
fi

# If needed for SP simulations: & set history file variables
Expand Down
3 changes: 0 additions & 3 deletions cime_config/usermods_dirs/NEON/defaults/user_nl_clm
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
! Set glc_do_dynglacier with GLC_TWO_WAY_COUPLING env variable
!----------------------------------------------------------------------------------

flanduse_timeseries = ' ' ! This isn't needed for a non transient case, but will be once we start using transient compsets
fsurdat = "$DIN_LOC_ROOT/lnd/clm2/surfdata_map/NEON/surfdata_1x1_NEON_${NEONSITE}_hist_78pfts_CMIP6_simyr2000_c230601.nc"

! h1 output stream
hist_fincl2 = 'AR','ELAI','FCEV','FCTR','FGEV','FIRA','FSA','FSH','GPP','H2OSOI',
'HR','SNOW_DEPTH','TBOT','TSOI','SOILC_vr','FV','NET_NMIN_vr'
Expand Down
16 changes: 13 additions & 3 deletions python/ctsm/site_and_regional/neon_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def build_base_case(
user_mods_dirs = [
os.path.join(self.cesmroot, "cime_config", "usermods_dirs", "NEON", self.name)
]
print("in neonsite adding usermodsdirs")
print("usermodsdirs: {}".format(user_mods_dirs))
case_path = super().build_base_case(cesmroot, output_root, res, compset, user_mods_dirs)

return case_path
Expand Down Expand Up @@ -99,8 +97,20 @@ def run_case(
os.path.join(self.cesmroot, "cime_config", "usermods_dirs", "NEON", self.name)
]
tower_type = "NEON"

super().run_case(
base_case_root, run_type, prism, run_length, user_version, tower_type, user_mods_dirs
base_case_root,
run_type,
prism,
run_length,
user_version,
tower_type,
user_mods_dirs,
overwrite,
setup_only,
no_batch,
rerun,
experiment,
)

def modify_user_nl(self, case_root, run_type, rundir, site_lines=None):
Expand Down
11 changes: 6 additions & 5 deletions python/ctsm/site_and_regional/run_neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,16 @@ def main(description):
)
logger.info("-----------------------------------")
logger.info("Running CTSM for neon site : %s", neon_site.name)

neon_site.run_case(
base_case_root,
run_type,
prism,
run_length,
user_version,
overwrite,
setup_only,
no_batch,
rerun,
experiment,
overwrite=overwrite,
setup_only=setup_only,
no_batch=no_batch,
rerun=rerun,
experiment=experiment,
)
14 changes: 8 additions & 6 deletions python/ctsm/site_and_regional/tower_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ def run_case(
user_version,
tower_type,
user_mods_dirs,
overwrite=False,
setup_only=False,
no_batch=False,
rerun=False,
experiment=False,
overwrite,
setup_only,
no_batch,
rerun,
experiment,
):
"""
Run case.
Expand Down Expand Up @@ -301,7 +301,7 @@ def run_case(

print("using this version:", version)

if experiment is not False:
if (experiment is not False) and (experiment is not None):
self.name = self.name + "." + experiment
case_root = os.path.abspath(os.path.join(base_case_root, "..", self.name + "." + run_type))

Expand Down Expand Up @@ -391,11 +391,13 @@ def run_case(
case.set_value("RUN_TYPE", "hybrid")

if run_type == "postad":
case.case_setup()
self.set_ref_case(case)
case.set_value("STOP_N", run_length)

# For transient cases STOP will be set in the user_mod_directory
if run_type == "transient":
case.case_setup()
if self.finidat:
case.set_value("RUN_TYPE", "startup")
else:
Expand Down

0 comments on commit 08a8468

Please sign in to comment.