citibeth / icebin

Regridding Library for GCM / Ice Model Coupling
GNU Lesser General Public License v3.0
2 stars 5 forks source link

Enable PISM Restarts, coupled to GCM #8

Open citibeth opened 10 years ago

citibeth commented 10 years ago

Bob,

Would you mind rephrasing your question so as to make it a bit more specific, please? As it is I don't quite know what it is you would like to know.

Thanks!

PS: I would start by looking at the initialization flow-chart http://www.pism-docs.org/doxy/html/classIceModel.html#a74bc46b66b8383203287417335787c93 and following the path corresponding to "Is -i set? -> yes".

-- Constantine On Wed, May 7, 2014 at 10:45 PM, Fischer, Robert P (GISS-611.0)[COLUMBIA UNIVERSITY] robert.p.fischer-1@nasa.gov wrote:

Constantine,

Could you please give me a quick pointer to where/how restarts are accomplished in PISM? At some point, I will want to couple this to ModelE's restart capabilities. (Currently, I can't do coupled runs involving restarts).

Thanks, -- Bob

citibeth commented 10 years ago

Bob,

  1. To create a "restart" file, call IceModel::dumpToFile(filename). This will save the model state plus some variables that we find helpful to have in all output files. To save a "restart" file containing only the model state, call IceModel::set_output_size("small") before calling IceModel::dumpToFile()
  2. To avoid saving an output file, don't call IceModel::writeFiles(), which processes the "-o" command-line option and calls IceModel::dumpToFile().

(This https://github.com/citibob/glint2/blob/master/sbin/pismr.cpp#L120 is the code I imagine being affected.)

-- Constantine PS: I'm pretty sure the initialization flow-chart is a bit out of date, but it should still give you an idea of what's going on... On Thu, May 8, 2014 at 8:30 AM, Fischer, Robert P (GISS-6110)[COLUMBIA UNIVERSITY] robert.p.fischer-1@nasa.gov wrote:

Constantine,

Thanks that's 1/3 of what I need --- how to start PISM from a restart file. I also need to know:

  1. How to generate a restart file (inbetween calls to run_to()).
  2. How to prevent PISM from generating restart files when I don't want that to happen.

Thanks, -- Bob