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

Allow short term archiving to work with MPAS files #1334

Merged
merged 4 commits into from
May 2, 2017

Conversation

rljacob
Copy link
Member

@rljacob rljacob commented Mar 21, 2017

Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131
[BFB]

rljacob added 2 commits March 21, 2017 14:32
Change regex for matching the hist and rst files
for mpaso and mpascice.  Should also do this for
mpasli eventually.
mpas files currently don't include the casename
so add logic to handle that for history and restart.
Later include mpasli.
@rljacob rljacob requested a review from jonbob March 21, 2017 19:59
@rljacob rljacob added the CIME label Mar 21, 2017
@rljacob
Copy link
Member Author

rljacob commented Mar 21, 2017

@jonbob do MPAS land ice model output files start with "mpasli"? I could add that.

@jonbob
Copy link
Contributor

jonbob commented Mar 21, 2017

yes, they should

@rljacob
Copy link
Member Author

rljacob commented Apr 14, 2017

@matthewhoffman do mpas-land ice history files start with "mpasli" ?

@matthewhoffman
Copy link
Contributor

Yes they do.

Add "mpasli" to the files given special handling.
@rljacob
Copy link
Member Author

rljacob commented Apr 19, 2017

Further testing reveals that this works for STOP_N = REST_N. In the case where interim restart files are made (REST_N < STOP_N), this will delete the interim AND final MPAS restart files. More development needed.

@rljacob
Copy link
Member Author

rljacob commented Apr 25, 2017

Pointing @sarich

@rljacob
Copy link
Member Author

rljacob commented Apr 25, 2017

Better summary of current problem is here: ESMCI/cime#1364

@rljacob
Copy link
Member Author

rljacob commented Apr 25, 2017

@sarich, I've been testing this branch in this case dir on blues:
/lcrc/group/earthscience/jacob/ACME/cime/scripts/Wlowrmaster
You can see the archive results in
/lcrc/group/acme/jacob/archive/Wlowrmaster

To set up your own test, build an low res fully coupled case:
./create_newcase -case NAME -compset A_WCYCL1850 -res ne11_oQU240

On anvil, I'm running this with 96 tasks:
./xmlchange NTASKS=96
./xmlchange ESP_NTASKS=1

I was running for 2 years but 4 months should work:
./xmlchange HIST_OPTION=nmonths
./xmlchange STOP_OPTION=nmonths
./xmlchange REST_OPTION=nmonths
./xmlchange STOP_N=4
./xmlchange REST_N=4
./xmlchange HIST_N=4
./xmlchange DOUT_S=TRUE

The above should run for 4 months, output 1 restart set at the end and automatically call the short-term archiver and everything should be moved to the archive correctly.

Now change REST_N:
./xmlchange REST_N=2
and rerun (delete all the old files in the rundir and the archive first or its easy to confuse things).
This should run for 4 months and output 2 sets of restarts. But the short term archiver will delete all the mpas restarts instead of just the ones from the middle of the run.

You can leave DOUT_S as false and invoke the short-term archiver manually from the caseroot.

@rljacob
Copy link
Member Author

rljacob commented Apr 28, 2017

@sarich did my suggested test with nmonths work for you? I'm getting errors about nmonths being an invalid opt_n. I'd hate to go back to doing years.

@sarich
Copy link
Contributor

sarich commented Apr 28, 2017 via email

@rljacob
Copy link
Member Author

rljacob commented May 1, 2017

I did a test with a 2 year run and restarts every year. I also tried RESUBMIT and everything worked!

@rljacob rljacob merged commit 8bbd3c4 into master May 2, 2017
rljacob added a commit that referenced this pull request May 2, 2017
Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131 #close
[BFB]

* rljacob/cime/fix-mpas-starchive:
  fix mpas pattern matching so only interim restart files are deleted
  Add ability to archive MPAS land ice files
  Add ability to handle mpas files
  Change regex for mpaso and mpascice files
@sarich
Copy link
Contributor

sarich commented May 2, 2017

Too late to be relevant for this issue, but for the future --

@sarich did my suggested test with nmonths work for you? I'm getting errors about nmonths being an invalid opt_n. I'd hate to go back to doing years.


./xmlchange HIST_OPTION=nmonths
./xmlchange STOP_OPTION=nmonths
./xmlchange REST_OPTION=nmonths
./xmlchange STOP_N=4
./xmlchange REST_N=4
./xmlchange DOUT_S=TRUE

You also need to set HIST_N

From src/drivers/mct/shr/seq_timemgr_mod.F90:
Line 771:

 call seq_timemgr_alarmInit(SyncClock%ECP(n)%EClock, &
          EAlarm  = SyncClock%EAlarm(n,seq_timemgr_nalarm_history),  &
          option  = history_option,      &
          opt_n   = history_n,           &
          opt_ymd = history_ymd,         &
          RefTime = StartTime,           &
          alarmname = trim(seq_timemgr_alarm_history))

and at Line 1397:

case (seq_timemgr_optNMonths)
       call ESMF_TimeIntervalSet(AlarmInterval, mm=1, rc=rc)
       if (.not.present(opt_n)) call shr_sys_abort(subname//trim(option)//' requires opt_n')
       if (opt_n <= 0)  call shr_sys_abort(subname//trim(option)//' invalid opt_n')

jgfouca pushed a commit that referenced this pull request Jun 2, 2017
Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131 #close
[BFB]

* rljacob/cime/fix-mpas-starchive:
  fix mpas pattern matching so only interim restart files are deleted
  Add ability to archive MPAS land ice files
  Add ability to handle mpas files
  Change regex for mpaso and mpascice files
@rljacob rljacob deleted the rljacob/cime/fix-mpas-starchive branch July 25, 2017 17:05
jgfouca pushed a commit that referenced this pull request Feb 27, 2018
Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131 #close
[BFB]

* rljacob/cime/fix-mpas-starchive:
  fix mpas pattern matching so only interim restart files are deleted
  Add ability to archive MPAS land ice files
  Add ability to handle mpas files
  Change regex for mpaso and mpascice files
jgfouca pushed a commit that referenced this pull request Mar 14, 2018
Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131 #close
[BFB]

* rljacob/cime/fix-mpas-starchive:
  fix mpas pattern matching so only interim restart files are deleted
  Add ability to archive MPAS land ice files
  Add ability to handle mpas files
  Change regex for mpaso and mpascice files
rljacob added a commit that referenced this pull request Apr 16, 2021
Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131 #close
[BFB]

* rljacob/cime/fix-mpas-starchive:
  fix mpas pattern matching so only interim restart files are deleted
  Add ability to archive MPAS land ice files
  Add ability to handle mpas files
  Change regex for mpaso and mpascice files
rljacob added a commit that referenced this pull request May 6, 2021
Allow the case.st_archive script to work with mpaso and mpascice history and restart files.

Also should work with mpasli but not tested.

From the case directory, executing ./case.st_archive should move all history and restart files to the short term archive for all ACME components.

Fixes #1305
S2-131 #close
[BFB]

* rljacob/cime/fix-mpas-starchive:
  fix mpas pattern matching so only interim restart files are deleted
  Add ability to archive MPAS land ice files
  Add ability to handle mpas files
  Change regex for mpaso and mpascice files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants