-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This adds additional write restart at end of run functionality. #984
Conversation
There was already a "write_restart_at_endofrun" option added to the nuopc driver : - https://github.com/CICE-Consortium/CICE/pull/969/files Is this doing the same thing ? |
Just making it functional with cesm. |
@@ -1331,51 +1329,51 @@ subroutine ModelSetRunClock(gcomp, rc) | |||
call ESMF_LogWrite(subname//'setting alarms for ' // trim(name), ESMF_LOGMSG_INFO) | |||
|
|||
!---------------- | |||
! Restart alarm | |||
! Stop alarm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No - the reason they are reordered is so that a REST_OPTION=end can be initialized using the stop alarm. If you do the rest alarm first you can not initialize this option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This builds and runs
character(len=*), parameter :: subname = '(init_restart_read)' | ||
|
||
if (present(ice_ic)) then | ||
filename = trim(ice_ic) | ||
else | ||
if (my_task == master_task) then | ||
#ifdef CESMCOUPLED | ||
write(pointer_file,'(a,i4.4,a,i2.2,a,i2.2,a,i5.5)') & | ||
'rpointer.ice'//trim(inst_suffix)//'.',myear,'-',mmonth,'-',mday,'-',msec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this duplicate https://github.com/ESCOMP/CICE/blob/6d8c7f68c2ef80da9973f27c0077e54018bdbbfe/cicecore/cicedyn/general/ice_init.F90#L1202
?
which says:
#ifdef CESMCOUPLED
pointer_file = trim(pointer_file) // trim(inst_suffix)
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. That adds the inst_suffix which allows for single executable ensembles. This adds a date stamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ice_init it uses pointer_file
from the ice_in namelist but here it's hardcoded to 'rpointer.ice', I dont think we need both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think either:
- in ice_init you can abort with "'pointer_file' namelist not used in CESMCOUPLED,
- use 'pointer_file' in ice_restart.F90 and remove the three lines in ice_init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, our thought here is to add lpointer_file for the purposes of the multiple instances. When not in CESM:
lpointer_file = pointer_file
Does this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just this ?:
The inst_suffix was already added in ice_init
#ifdef CESMCOUPLED
write(pointer_file,'(a,i4.4,a,i2.2,a,i2.2,a,i5.5)') &
pointer_file//'.',myear,'-',mmonth,'-',mday,'-',msec
inquire(file=pointer_file, exist=file_exist)
if (.not. file_exist) pointer_file = 'rpointer.ice'//trim(inst_suffix)
#endif
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because that ends up repeating the timestamp if you are starting from a restart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh got it - thanks both, adding lpointer_file sounds good.
@dabail10 What is the current functionality (ie, why is it there?) of the CICE/cicecore/drivers/nuopc/cmeps/ice_comp_nuopc.F90 Lines 1242 to 1261 in 87c7bfa
|
Is there a reason that
are not in the ice_finalize routine? I also think that turning off the alarm at line 1248 may be problematic - why do you need to turn off a stop alarm anyway? |
I'm not sure. |
|
@anton-seaice @dabail10 @DeniseWorthen I will merge after you review and approve. This is all CMEPS driver stuff. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine for UFS.
There's a couple of minor review comments from me which are still open |
Co-authored-by: Anton Steketee <79179784+anton-seaice@users.noreply.github.com>
@anton-seaice , have we addressed all of your comments? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good ! - Thanks
For detailed information about submitting Pull Requests (PRs) to the CICE-Consortium,
please refer to: https://github.com/CICE-Consortium/About-Us/wiki/Resource-Index#information-for-developers
PR checklist
This checks for REST_OPTION = 'end' in the NUOPC/CMEPS driver and also a case where stop_ymd is not the same interval as the restarts.
It also fixes some pointer file naming when multiple instances are turned on.
@jedwards4b
This was tested using the nuopc/cmeps driver.
io_pio2/ice_restart.F90 has been modified to handle the multiple instances
nuopc/cmeps driver is modified