Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
d73aa12
Add Anomaly.Forcing.cmip5.rcp45.
samsrabin May 8, 2024
2be3338
Fix 'anomoly_forcing' typo.
samsrabin May 9, 2024
a4d87b3
Update meshfile used for Anomaly.Forcing.*.
samsrabin Aug 8, 2024
5323a11
Fix more typos of "anomaly."
samsrabin Aug 8, 2024
ba85ec4
Add Anomaly.Forcing.cmip6.ssp126.
samsrabin Aug 8, 2024
9b0f714
Add Anomaly.Forcing.cmip6.245, 370, 585.
samsrabin Aug 9, 2024
d921931
anomaly_forcing now automatically set based on compset (ISSP*).
samsrabin Sep 4, 2024
0389799
Now actually sets anomaly_forcing based on compset.
samsrabin Sep 5, 2024
c191e5e
SSP compsets now automatically get anomaly_forcing in datm_in.
samsrabin Sep 5, 2024
b02f0cd
Remove Anomaly.Forcing.Precip, Anomaly.Forcing.Temperature, etc.
samsrabin Sep 5, 2024
074d90d
Set anomaly_forcing = 'none' to not use anomalies in an SSP compset.
samsrabin Sep 5, 2024
0a61422
Only set anomaly_forcing for DATM SSP compsets.
samsrabin Sep 5, 2024
4715267
Provide hint in error message if namelist variable invalid due to sur…
samsrabin Sep 5, 2024
a11abf7
Make datm buildnml more robust.
samsrabin Sep 5, 2024
cd97dea
Bugfix to future-proofing of datm buildnml.
samsrabin Sep 5, 2024
94dcdb0
Add aux_cdeps tests for SSPs other than 585.
samsrabin Sep 6, 2024
a911685
Simplify removal of quotes.
samsrabin Feb 19, 2025
93e59c0
Fix indentation.
samsrabin Feb 19, 2025
196957f
buildnml now errors on mismatch between anomaly forcing and DATM_MODE.
samsrabin Mar 14, 2025
4107fc3
Merge tag 'cdeps1.0.61' into ssp-fix-202503
samsrabin Mar 14, 2025
9b35f06
Merge branch 'ssp-fix-202503' into ssp-fix
samsrabin Mar 14, 2025
b56f0b7
Add comments about new tests in testlist_datm.xml.
samsrabin Mar 18, 2025
8aab1ae
Remove DATM_MODE_ANOMALY_FORCING_MISMATCH option.
samsrabin Mar 19, 2025
e71aa9a
Merge branch 'main' into ssp-fix
samsrabin Mar 19, 2025
cde4ac6
Merge pull request #292 from samsrabin/ssp-fix
jedwards4b Mar 19, 2025
877024e
needed to be added to CMakeLists.txt
jedwards4b Mar 21, 2025
cd6209f
Merge pull request #330 from jedwards4b/add_is_restart_fh_mod_to_shar…
jedwards4b Mar 21, 2025
48691af
Fix 3 paths in stream_definition_datm.xml.
samsrabin Mar 28, 2025
466d20e
Merge branch 'main' into fix-crujra20241231-paths
jedwards4b Mar 28, 2025
9e57b27
Merge pull request #331 from samsrabin/fix-crujra20241231-paths
jedwards4b Mar 31, 2025
65289cb
fix st_archive of rpointer files
jedwards4b Apr 14, 2025
3be58e8
Merge branch 'main' into st_archive_fix
jedwards4b Apr 30, 2025
69f9f3b
make 1st timestep same as cam7
mvdebolskiy May 20, 2025
24e8b48
Merge pull request #338 from mvdebolskiy/cam7-nextsw-0step
billsacks May 28, 2025
0a59658
Allow anomaly forcings w/ any DATM. Add CRUJRA2024 test.
samsrabin Jun 1, 2025
472264c
Merge pull request #340 from samsrabin/ssp-anomalies-any-datm
jedwards4b Jun 2, 2025
077c953
Merge branch 'main' into st_archive_fix
jedwards4b Jun 23, 2025
fb4909b
update fox external
jedwards4b Jun 23, 2025
b133317
Merge pull request #342 from jedwards4b/update_cmake_min_to_3.5
jedwards4b Jun 23, 2025
debc545
update fox external
jedwards4b Jun 27, 2025
7724090
lnd_comp_nuopc.F90: Use CX-length filenames.
samsrabin Jul 1, 2025
304d112
Use CX-length filenames for all *_comp_nuopc.F90.
samsrabin Jul 1, 2025
732abf3
Merge tag 'cdeps1.0.77' into cx-length-filenames
samsrabin Jul 7, 2025
786ccc3
Delete DATAMODELTEST test.
samsrabin Jul 7, 2025
3baaa5c
Actually change restfilm to CX in datm/atm_comp_nuopc.F90.
samsrabin Jul 7, 2025
0595593
More CX-length nlfilename and streamfilename.
samsrabin Jul 7, 2025
2544107
Merge pull request #343 from samsrabin/cx-length-filenames
jedwards4b Jul 9, 2025
615e93d
Merge branch 'main' into st_archive_fix
jedwards4b Jul 9, 2025
b65f283
Merge pull request #335 from jedwards4b/st_archive_fix
jedwards4b Jul 9, 2025
2400bd5
add log feature for restart_fh
DeniseWorthen Aug 12, 2025
692150f
Merge pull request #348 from DeniseWorthen/feature/add_restartfh_log
jedwards4b Aug 12, 2025
45b1e84
Fix rDateIn >= rDategvd error messages in dshr_stream_mod.F90
aekiss Sep 15, 2025
0e5c955
Use '>=' rather than 'ge'
billsacks Sep 19, 2025
95e0bac
Merge pull request #353 from aekiss/patch-1
billsacks Sep 19, 2025
d55ac35
DGLC grid updates for new gris4 mesh
Katetc Oct 15, 2025
a5f4aad
Merge pull request #355 from Katetc/katetc/dglc_gris4_update
billsacks Oct 16, 2025
d2c211f
update fox external
jedwards4b Nov 3, 2025
2937746
Merge pull request #356 from jedwards4b/fox_update
jedwards4b Nov 3, 2025
f8afeed
Merge tag 'cdeps1.0.83' into feature/update_to_cdeps1.0.83
mvertens Nov 8, 2025
75c38f3
Merge branch 'noresm' into feature/update_to_cdeps1.0.83
mvertens Nov 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[submodule "fox"]
path = fox
url = https://github.com/ESMCI/fox.git
fxtag = 4.1.2.1
fxtag = 4.1.2.4
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESMCI/fox.git

Expand Down
5 changes: 5 additions & 0 deletions cime_config/stream_cdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ def create_stream_xml(
),
)
if var_key in valid_values:

# # Handle, e.g., 'bilinear' in namelist instead of bilinear (no quotes)
mod_dict[var_key] = re.sub(r"[\"\']", "", mod_dict[var_key])

# Check that key is valid
expect(
mod_dict[var_key] in valid_values[var_key],
"{} can only have values of {} for stream {} in file {}".format(
Expand Down
17 changes: 9 additions & 8 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module cdeps_datm_comp
use NUOPC_Model , only : model_label_Finalize => label_Finalize
use NUOPC_Model , only : NUOPC_ModelGet, setVM
use shr_kind_mod , only : r8=>shr_kind_r8, i8=>shr_kind_i8, cl=>shr_kind_cl, cs=>shr_kind_cs
use shr_kind_mod , only : cx=>shr_kind_cx
use shr_const_mod , only : shr_const_cday
use shr_cal_mod , only : shr_cal_ymd2date
use shr_log_mod , only : shr_log_setLogUnit, shr_log_error
Expand Down Expand Up @@ -100,11 +101,11 @@ module cdeps_datm_comp
character(len=*) , parameter :: nullstr = 'null'

! datm_in namelist input
character(CL) :: nlfilename = nullstr ! filename to obtain namelist info from
character(CL) :: streamfilename = nullstr ! filename to obtain stream info from
character(CX) :: nlfilename = nullstr ! filename to obtain namelist info from
character(CX) :: streamfilename = nullstr ! filename to obtain stream info from
character(CL) :: dataMode = nullstr ! flags physics options wrt input data
character(CL) :: model_meshfile = nullstr ! full pathname to model meshfile
character(CL) :: model_maskfile = nullstr ! full pathname to obtain mask from
character(CX) :: model_meshfile = nullstr ! full pathname to model meshfile
character(CX) :: model_maskfile = nullstr ! full pathname to obtain mask from
integer :: iradsw = 0 ! radiation interval (input namelist)
logical :: nextsw_cday_calc_cam7 ! true => use logic appropriate to cam7 (and later) for calculating nextsw_cday
character(CL) :: factorFn_mesh = 'null' ! file containing correction factors mesh
Expand All @@ -118,7 +119,7 @@ module cdeps_datm_comp
character(CL) :: bias_correct = nullstr ! send bias correction fields to coupler
character(CL) :: anomaly_forcing(8) = nullstr ! send anomaly forcing fields to coupler

character(CL) :: restfilm = nullstr ! model restart file namelist
character(CX) :: restfilm = nullstr ! model restart file namelist
integer :: nx_global ! global nx
integer :: ny_global ! global ny
logical :: skip_restart_read = .false. ! true => skip restart read in continuation run
Expand Down Expand Up @@ -294,15 +295,15 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, anomaly_forcing, CL*8, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, model_meshfile, CL, main_task, rc=rc)
call ESMF_VMBroadcast(vm, model_meshfile, CX, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, model_maskfile, CL, main_task, rc=rc)
call ESMF_VMBroadcast(vm, model_maskfile, CX, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, factorFn_data, CL, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, factorFn_mesh, CL, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, restfilm, CL, main_task, rc=rc)
call ESMF_VMBroadcast(vm, restfilm, CX, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call ESMF_VMBroadcast(vm, nextsw_cday_calc, CL, main_task, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
Expand Down
19 changes: 18 additions & 1 deletion datm/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-position

import os, sys
import re

_CDEPS_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir,os.pardir,"cime_config")
_CIMEROOT = os.environ.get("CIMEROOT")
Expand Down Expand Up @@ -88,6 +89,7 @@ def _get_neon_data_availability(case, neonsite):
expect(newestdate, "No tower data found on server for NEON site {}".format(neonsite))
return None


# pylint: disable=too-many-arguments,too-many-locals,too-many-branches,too-many-statements
####################################################################################
def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path):
Expand Down Expand Up @@ -115,6 +117,7 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
atm_grid = case.get_value("ATM_GRID")
model_grid = case.get_value("GRID")
comp_lnd = case.get_value("COMP_LND")
compset = case.get_value("COMPSET")

# Check for incompatible options.
if "CLM" in datm_mode and comp_lnd == "clm":
Expand All @@ -135,6 +138,7 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
logger.debug("DATM preso3 mode is {}".format(datm_preso3))
logger.debug("DATM topo mode is {}".format(datm_topo))
logger.debug("CLM_USRDAT_NAME is {}".format(clm_usrdat_name))
logger.debug("COMPSET is {}".format(compset))

# Initialize namelist defaults
config = {}
Expand Down Expand Up @@ -177,6 +181,17 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path

nmlgen.init_defaults(infile, config)

# Get anomaly forcing
# First, look in namelist
anomaly_forcing = nmlgen.get_value("anomaly_forcing")
if not anomaly_forcing or anomaly_forcing[0] is None:
# If not in namelist, check whether it's an SSP compset
ssp = re.search(r"^SSP\d+_DATM", compset)
if ssp:
ssp = ssp.group().replace("_DATM", "")
anomaly_forcing = ["Anomaly.Forcing.cmip6." + ssp.lower()]
nmlgen.set_value("anomaly_forcing", anomaly_forcing)

# Generate datm_in
namelist_file = os.path.join(confdir, "datm_in")
nmlgen.write_output_file(namelist_file, data_list_path, groups=['datm_nml','const_forcing_nml'])
Expand Down Expand Up @@ -205,8 +220,10 @@ def _create_namelists(case, confdir, inst_string, infile, nmlgen, data_list_path
bias_correct = nmlgen.get_value("bias_correct")
if bias_correct is not None:
streamlist.append(bias_correct)

# Set anomaly forcing in datm.streams.xml
anomaly_forcing = nmlgen.get_value("anomaly_forcing")
if anomaly_forcing[0] is not None:
if anomaly_forcing[0] is not None and anomaly_forcing[0] != "none":
streamlist += anomaly_forcing

# Generate datm.streams.xml
Expand Down
2 changes: 1 addition & 1 deletion datm/cime_config/config_archive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<rest_file_extension>rs1</rest_file_extension>
<rest_history_varname>unset</rest_history_varname>
<rpointer>
<rpointer_file>rpointer.atm$NINST_STRING</rpointer_file>
<rpointer_file>rpointer.atm$NINST_STRING.$DATENAME</rpointer_file>
<rpointer_content >$CASE.datm$NINST_STRING.r.$DATENAME.nc,$CASE.datm$NINST_STRING.rs1.$DATENAME.bin</rpointer_content>
</rpointer>
</comp_archive_spec>
Expand Down
2 changes: 1 addition & 1 deletion datm/cime_config/namelist_definition_datm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
<type>char(10)</type>
<category>datm</category>
<group>datm_nml</group>
<valid_values>Anomaly.Forcing.Precip,Anomaly.Forcing.Temperature,Anomaly.Forcing.Pressure,Anomaly.Forcing.Humidity,Anomaly.Forcing.Uwind,Anomaly.Forcing.Vwind,Anomaly.Forcing.Shortwave,Anomaly.Forcing.Longwave</valid_values>
<valid_values>none,Anomaly.Forcing.cmip5.rcp45,Anomaly.Forcing.cmip6.ssp126,Anomaly.Forcing.cmip6.ssp245,Anomaly.Forcing.cmip6.ssp370,Anomaly.Forcing.cmip6.ssp585</valid_values>
<desc>
If set, include anomaly forcing streams in namelist.
</desc>
Expand Down
Loading