Skip to content
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

use_restart_time and runtype = 'continue' #527

Closed
dabail10 opened this issue Oct 29, 2020 · 7 comments · Fixed by #610
Closed

use_restart_time and runtype = 'continue' #527

dabail10 opened this issue Oct 29, 2020 · 7 comments · Fixed by #610
Assignees

Comments

@dabail10
Copy link
Contributor

This is not working as it should in the CESM driver for CICE6. I'm not sure where there is a conditional to make sure that the restart time from the file should be used on a continue run?

@apcraig
Copy link
Contributor

apcraig commented Oct 29, 2020

I assume this is in the nuopc cap? I think it's working fine in the mct/cesm1 cap with RASM, although maybe I should review that again. It does restart exactly. Could the issue be in the cap?

@dabail10
Copy link
Contributor Author

I agree that it is likely in the cap, but I can't find where these flags interact if at all. In io_pio2/ice_restart.F90, it checks only the use_restart_time flag and not the runtype string. I was thinking there would be a line like:

if (trim(runtype) == 'continue') use_restart_time = .true.

However, I cannot find this anywhere.

@dabail10
Copy link
Contributor Author

It appears that the scripts change the ice_in namelist on a continue run. So, the scripts appear to change the restart and use_restart_time flags. I think we need this to happen in the code.

@eclare108213
Copy link
Contributor

When you say "we need this to happen in the code" do you mean in the NUOPC code or in the main sea ice code?

@apcraig
Copy link
Contributor

apcraig commented Nov 12, 2020

I think this will probably be in the cap used by CESM. It sounds like the CESM scripts were modifying the CICE namelist to make this happen, and Dave is proposing this be inside the code in the future. Do I understand that correctly?

With standalone testing, we modify the namelist and change runtype='iniitial' and use_restart_time=.false. to "continue" and .true.. We also set restart=.true. on restart as it might have been true or false at initialization depending how the model was initialized.

I guess a question we should ask is when runtype is continue, should use_restart_time or any other namelist be changed internally. I think we try to avoid those sorts of things as a matter of policy because it can really confuse users. But I think it's fine to do this in a cap for a particular application if it's useful.

@apcraig apcraig removed their assignment Nov 12, 2020
@dabail10
Copy link
Contributor Author

I could certainly do this in the CAP, but I still think that runtype = 'continue' should override settings to use_restart_time and restart. My understanding of use_restart_time and restart is only meant to be there for runtype = 'initial'. For the tracers we have restart_* flags, which have this in the standalone CAP:

if (trim(runtype) == 'continue') restart_FY = .true.

This logic is also in the standalone driver:

  if (trim(runtype) == 'continue') then 
     ! start from core restart file
     call restartfile()           ! given by pointer in ice_in
     call calendar(time)          ! update time parameters
     if (kdyn == 2) call read_restart_eap ! EAP
  else if (restart) then          ! ice_ic = core restart file
     call restartfile (ice_ic)    !  or 'default' or 'none'
     !!! uncomment to create netcdf
     ! call restartfile_v4 (ice_ic)  ! CICE v4.1 binary restart file
     !!! uncomment if EAP restart data exists
     ! if (kdyn == 2) call read_restart_eap
  endif         

@eclare108213
Copy link
Contributor

The table explaining the restart and runtype combinations in the online documentation is missing a header... I've attached a screenshot from the old pdf docs below. It says that if runtype is 'continue', then restart will be set to 'true' if it isn't already. There are a couple other resets noted in the table. It's possible that we lost these when we cleaned up the namelist conflict checking a while back - I remember that we tried to minimize resetting things in favor of aborting the code. In this case, I think it makes sense to reset restart from false to true when runtype=continue.
restart_table
I implemented these options for maximum flexibility (so that I could start from a variety of different file/date/variable combinations), but it's probably overly complicated at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants