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. |
|
|
||
| !---------------- | ||
| ! Restart alarm | ||
| ! Stop alarm |
There was a problem hiding this comment.
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.
anton-seaice
left a comment
There was a problem hiding this comment.
This builds and runs
| 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.
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.
No. That adds the inst_suffix which allows for single executable ensembles. This adds a date stamp.
There was a problem hiding this comment.
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.
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.
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.
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.
Because that ends up repeating the timestamp if you are starting from a restart.
There was a problem hiding this comment.
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. |
DeniseWorthen
left a comment
There was a problem hiding this comment.
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? |
anton-seaice
left a comment
There was a problem hiding this comment.
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