Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions cesm/driver/esm_time_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ subroutine esm_time_clockinit(ensemble_driver, instance_driver, logunit, maintas
write(logunit,*) " read rpointer file = "//trim(restart_pfile)
inquire( file=trim(restart_pfile), exist=exists)
if (.not. exists) then
write(logunit,*) " drv_restart_pointer file does NOT exist, correct this and rerun = "//trim(restart_pfile)
call shr_log_error( trim(subname)//' ERROR rpointer file '//trim(restart_pfile)//' not found',&
line=__LINE__, file=__FILE__)
rc = ESMF_FAILURE
Expand All @@ -150,13 +151,15 @@ subroutine esm_time_clockinit(ensemble_driver, instance_driver, logunit, maintas
ESMF_LOGMSG_INFO)
open(newunit=unitn, file=restart_pfile, form='FORMATTED', status='old',iostat=ierr)
if (ierr < 0) then
write(logunit,*) " error opening rpointer file "
call shr_log_error( trim(subname)//' ERROR rpointer file open returns error', &
line=__LINE__, file=__FILE__)
rc = ESMF_FAILURE
return
end if
read(unitn,'(a)', iostat=ierr) restart_file
if (ierr < 0) then
write(logunit,*) " error in read of rpointer file "
call shr_log_error( trim(subname)//' ERROR rpointer file read returns error', &
line=__LINE__, file=__FILE__)
rc = ESMF_FAILURE
Expand Down
4 changes: 3 additions & 1 deletion cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ def _create_drv_namelists(case, infile, confdir, nmlgen, files):
# Write namelist file drv_in and initial input dataset list.
# --------------------------------
namelist_file = os.path.join(confdir, "drv_in")
drv_namelist_groups = ["papi_inparm", "prof_inparm", "debug_inparm"]
drv_namelist_groups = ["debug_inparm"]
# Add optional namelista that the GPTL library can read (from CIME or ESMF)
drv_namelist_groups.extend( ["prof_inparm", "papi_inparm"] )
nmlgen.write_output_file(
namelist_file, data_list_path=data_list_path, groups=drv_namelist_groups
)
Expand Down
5 changes: 4 additions & 1 deletion cime_config/config_component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,16 @@

<entry id="DRV_RESTART_POINTER">
<type>char</type>
<default_value>rpointer.cpl</default_value>
<default_value>rpointer.cpl.${RUN_STARTDATE}-${RUN_REFTOD}</default_value>
<group>run_begin_stop_restart</group>
<file>env_run.xml</file>
<desc>
Name of the restart pointer file, this can be used to restart from an
intermediate restart by appending the restart date and time in format YYYY-MM-DD-SSSSS
</desc>
<values>
<value>rpointer.cpl.${RUN_STARTDATE}-${RUN_REFTOD}</value>
</values>
Comment on lines +414 to +416
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setting of the value seems redundant with the default_value above. Do you actually need both?

</entry>

<entry id="PAUSE_OPTION">
Expand Down
31 changes: 30 additions & 1 deletion cime_config/namelist_definition_drv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,26 @@
</values>
</entry>

<entry id="rundir" modify_via_xml="RUNDIR">
<type>char</type>
<category>nuopc</category>
<!-- NOTE: This won't be output only used as an attribute in this file -->
<group>default_settings</group>
<values>
<value>$RUNDIR</value>
</values>
</entry>

<entry id="continue_run" modify_via_xml="CONTINUE_RUN">
<type>logical</type>
<category>nuopc</category>
<!-- NOTE: This won't be output only used as an attribute in this file -->
<group>default_settings</group>
<values>
<value>$CONTINUE_RUN</value>
</values>
</entry>
Comment on lines +21 to +39
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super-familiar with this, but I'm thinking that you can accomplish this by setting rundir and continue_run in the config settings in buildnml, similarly to what's currently done for many other variables in _create_drv_namelists.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I'm pretty sure you are right, and that this bit could probably be removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for my own tracking of remaining to-dos... this one is still a to-do.


<entry id="pio_asyncio_ntasks" modify_via_xml="PIO_ASYNCIO_NTASKS">
<type>integer</type>
<category>pio</category>
Expand Down Expand Up @@ -165,12 +185,17 @@
<entry id="drv_restart_pointer" modify_via_xml="DRV_RESTART_POINTER">
<type>char</type>
<category>expdef</category>
<default_value>UNSET</default_value>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This default_value seems redundant with the value settings below and can probably be removed.

<!-- IMPORTANT NOTE: The relative path option MUST be used with a version of cime that allows it cime PR#4739 allows this -->
<input_pathname>rel:rundir</input_pathname>
<group>DRIVER_attributes</group>
<desc>
Driver restart pointer file to initialize time info
</desc>
<values>
<value>$DRV_RESTART_POINTER</value>
<value>UNSET</value>
<value run_type="branch">$DRV_RESTART_POINTER</value>
<value continue_run=".true.">$DRV_RESTART_POINTER</value>
</values>
</entry>

Expand Down Expand Up @@ -3394,6 +3419,8 @@
<!-- =========================== -->
<!-- group prof_inparm -->
<!-- in perf_mod.F90 -->
<!-- (perf_mod is in CIME) -->
<!-- (can also be in ESMF) -->
<!-- =========================== -->

<entry id="profile_global_stats">
Expand Down Expand Up @@ -3528,6 +3555,8 @@
<!-- =========================== -->
<!-- namelist group papi_inparm -->
<!-- in file drv_in (used in perf_mod.F90) -->
<!-- (perf_mod is currently in CIME) -->
<!-- (can also be in ESMF) -->
<!-- =========================== -->

<entry id="papi_ctr1_str">
Expand Down
Loading