Skip to content

Commit

Permalink
Merge branch 'master' into use_pio_env
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b authored Jun 1, 2022
2 parents c57f829 + 3aae649 commit 2b321d5
Show file tree
Hide file tree
Showing 20 changed files with 804 additions and 206 deletions.
2 changes: 1 addition & 1 deletion cime_config/buildlib
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import sys, os, time
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
sys.path.append(os.path.join(_CIMEROOT, "scripts", "Tools"))
sys.path.append(os.path.join(_CIMEROOT, "CIME", "Tools"))

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "lib")
sys.path.append(_LIBDIR)
Expand Down
2 changes: 1 addition & 1 deletion cime_config/buildlib_comps
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import sys, os
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
sys.path.append(os.path.join(_CIMEROOT, "scripts", "Tools"))
sys.path.append(os.path.join(_CIMEROOT, "CIME", "Tools"))

_LIBDIR = os.path.join(_CIMEROOT, "scripts", "lib")
sys.path.append(_LIBDIR)
Expand Down
2 changes: 1 addition & 1 deletion cime_config/stream_cdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def create_stream_xml(self, stream_names, case, streams_xml_file, data_list_file

for line in lines_input_new:
# read in a single line in user_nl_xxx_streams and parse it if it is not a comment
stream_mods = [x.strip() for x in line.strip().split(":") if x]
stream_mods = [x.strip() for x in line.strip().split(":",maxsplit=1) if x]
expect(len(stream_mods) == 2,
"input stream mod can only be of the form streamname:var=value(s)")
stream,varmod = stream_mods
Expand Down
12 changes: 8 additions & 4 deletions datm/atm_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ module cdeps_datm_comp
character(CL) :: 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

! linked lists
type(fldList_type) , pointer :: fldsImport => null()
Expand Down Expand Up @@ -227,7 +228,8 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
namelist / datm_nml / datamode, &
model_meshfile, model_maskfile, &
nx_global, ny_global, restfilm, iradsw, factorFn_data, factorFn_mesh, &
flds_presaero, flds_co2, flds_wiso, bias_correct, anomaly_forcing
flds_presaero, flds_co2, flds_wiso, bias_correct, anomaly_forcing, &
skip_restart_read

rc = ESMF_SUCCESS

Expand Down Expand Up @@ -268,6 +270,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
call shr_mpi_bcast(flds_presaero , mpicom, 'flds_presaero')
call shr_mpi_bcast(flds_co2 , mpicom, 'flds_co2')
call shr_mpi_bcast(flds_wiso , mpicom, 'flds_wiso')
call shr_mpi_bcast(skip_restart_read , mpicom, 'skip_restart_read')

! write namelist input to standard out
if (my_task == main_task) then
Expand All @@ -284,6 +287,7 @@ subroutine InitializeAdvertise(gcomp, importState, exportState, clock, rc)
write(logunit,F02)' flds_presaero = ',flds_presaero
write(logunit,F02)' flds_co2 = ',flds_co2
write(logunit,F02)' flds_wiso = ',flds_wiso
write(logunit,F02)' skip_restart_read = ',skip_restart_read
end if

! Validate sdat datamode
Expand Down Expand Up @@ -403,7 +407,7 @@ subroutine InitializeRealize(gcomp, importState, exportState, clock, rc)
! Initialize and update orbital values
call dshr_orbital_init(gcomp, logunit, my_task == main_task, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call dshr_orbital_update(clock, logunit, my_task == main_task, &
call dshr_orbital_update(currTime, logunit, my_task == main_task, &
orbEccen, orbObliqr, orbLambm0, orbMvelpp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

Expand Down Expand Up @@ -481,7 +485,7 @@ subroutine ModelAdvance(gcomp, rc)
call shr_cal_ymd2date(yr, mon, day, next_ymd)

! Update the orbital values
call dshr_orbital_update(clock, logunit, my_task == main_task, &
call dshr_orbital_update(nextTime, logunit, my_task == main_task, &
orbEccen, orbObliqr, orbLambm0, orbMvelpp, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

Expand Down Expand Up @@ -573,7 +577,7 @@ subroutine datm_comp_run(importState, exportState, target_ymd, target_tod, targe
end select

! Read restart if needed
if (restart_read) then
if (restart_read .and. .not. skip_restart_read) then
select case (trim(datamode))
case('CORE2_NYF','CORE2_IAF')
call datm_datamode_core2_restart_read(restfilm, inst_suffix, logunit, my_task, mpicom, sdat)
Expand Down
2 changes: 1 addition & 1 deletion datm/cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _CDEPS_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pard
_CIMEROOT = os.environ.get("CIMEROOT")
if _CIMEROOT is None:
raise SystemExit("ERROR: must set CIMEROOT environment variable")
_LIBDIR = os.path.join(_CIMEROOT, "scripts", "Tools")
_LIBDIR = os.path.join(_CIMEROOT, "CIME", "Tools")
sys.path.append(_LIBDIR)
sys.path.append(_CDEPS_CONFIG)

Expand Down
16 changes: 15 additions & 1 deletion datm/cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
This file may have atm desc entries.
-->
<description modifier_mode="1">
<desc atm="DATM[%QIA][%WISOQIA][%CRU][%CRUv7][%GSWP3v1][%NLDAS2][%CPLHIST][%1PT][%NYF][%IAF][%JRA][%JRA-1p4-2018][%ERA5]"> Data driven ATM </desc>
<desc atm="DATM[%QIA][%WISOQIA][%CRU][%CRUv7][%GSWP3v1][%MOSARTTEST][%NLDAS2][%CPLHIST][%1PT][%NYF][%IAF][%JRA][%JRA-1p4-2018][%JRA-RYF8485][%JRA-RYF9091][%JRA-RYF0304]"> Data driven ATM </desc>
<desc option="QIA"> QIAN data set </desc>
<desc option="WISOQIA">QIAN with water isotopes</desc>
<desc option="CRU"> CRUNCEP data set </desc>
Expand All @@ -23,6 +23,9 @@
<desc option="IAF">COREv2 interannual forcing</desc>
<desc option="JRA">interannual JRA55 forcing</desc>
<desc option="JRA-1p4-2018">interannual JRA55 forcing, v1.4, through 2018</desc>
<desc option="JRA-RYF8485"> JRA55 Repeat Year Forcing v1.3 1984-1985</desc>
<desc option="JRA-RYF9091"> JRA55 Repeat Year Forcing v1.3 1990-1991</desc>
<desc option="JRA-RYF0304"> JRA55 Repeat Year Forcing v1.3 2003-2004</desc>
<desc option="ERA5">ERA5 interannual forcing</desc>
</description>

Expand Down Expand Up @@ -292,6 +295,17 @@
<desc>ending year to loop data over</desc>
</entry>

<entry id="DATM_SKIP_RESTART_READ">
<type>logical</type>
<valid_values>TRUE,FALSE</valid_values>
<default_value>FALSE</default_value>
<group>run_component_datm</group>
<file>env_run.xml</file>
<desc> If set to true, than datm restarts will not be read on a continuation run.
This capability is used, for example, in CTSM spinup runs.
</desc>
</entry>

<help>
=========================================
DATM naming conventions in compset name
Expand Down
24 changes: 23 additions & 1 deletion datm/cime_config/namelist_definition_datm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@
CORE2_IAF.GCGCS.PREC,CORE2_IAF.GISS.LWDN,CORE2_IAF.GISS.SWDN,CORE2_IAF.GISS.SWUP,CORE2_IAF.NCEP.DN10,CORE2_IAF.NCEP.Q_10,CORE2_IAF.NCEP.SLP_,CORE2_IAF.NCEP.T_10,CORE2_IAF.NCEP.U_10,CORE2_IAF.NCEP.V_10,CORE2_IAF.CORE2.ArcFactor
</value>
<value datm_mode="CORE_IAF_JRA_1p4_2018" >
CORE_IAF_JRA_1p4_2018.GCGCS.PREC,CORE_IAF_JRA_1p4_2018.GISS.LWDN,CORE_IAF_JRA_1p4_2018.GISS.SWDN,CORE_IAF_JRA_1p4_2018.NCEP.Q_10,CORE_IAF_JRA_1p4_2018.NCEP.SLP_,CORE_IAF_JRA_1p4_2018.NCEP.T_10,CORE_IAF_JRA_1p4_2018.NCEP.U_10,CORE_IAF_JRA_1p4_2018.NCEP.V_10
CORE_IAF_JRA_1p4_2018.GCGCS.PREC,CORE_IAF_JRA_1p4_2018.GISS.LWDN,CORE_IAF_JRA_1p4_2018.GISS.SWDN,CORE_IAF_JRA_1p4_2018.NCEP.Q_10,CORE_IAF_JRA_1p4_2018.NCEP.SLP_,CORE_IAF_JRA_1p4_2018.NCEP.T_10,CORE_IAF_JRA_1p4_2018.NCEP.U_10,CORE_IAF_JRA_1p4_2018.NCEP.V_10
</value>
<value datm_mode="CORE_RYF8485_JRA">
CORE_RYF8485_JRA.GISS.LWDN,CORE_RYF8485_JRA.GISS.SWDN,CORE_RYF8485_JRA.GCGCS,CORE_RYF8485_JRA.NCEP
</value>
<value datm_mode="CORE_RYF9091_JRA">
CORE_RYF9091_JRA.GISS.LWDN,CORE_RYF9091_JRA.GISS.SWDN,CORE_RYF9091_JRA.GCGCS,CORE_RYF9091_JRA.NCEP
</value>
<value datm_mode="CORE_RYF0304_JRA">
CORE_RYF0304_JRA.GISS.LWDN,CORE_RYF0304_JRA.GISS.SWDN,CORE_RYF0304_JRA.GCGCS,CORE_RYF0304_JRA.NCEP
</value>
<value datm_mode="CORE_IAF_JRA" >
CORE_IAF_JRA.PREC,CORE_IAF_JRA.LWDN,CORE_IAF_JRA.SWDN,CORE_IAF_JRA.Q_10,CORE_IAF_JRA.SLP_,CORE_IAF_JRA.T_10,CORE_IAF_JRA.U_10,CORE_IAF_JRA.V_10
Expand Down Expand Up @@ -316,4 +325,17 @@
</values>
</entry>

<entry id="skip_restart_read" modify_via_xml="DATM_SKIP_RESTART_READ">
<type>logical</type>
<category>datm</category>
<group>datm_nml</group>
<desc>
If set to true, than datm restarts will not be read on a continuation run.
This capability is used, for example, in CTSM spinup runs.
</desc>
<values>
<value>$DATM_SKIP_RESTART_READ</value>
</values>
</entry>

</entry_id>
Loading

0 comments on commit 2b321d5

Please sign in to comment.