pylag.restart module
Restart module that provides the following functionality:
Writing of model restart files
The reading of restart files is implemented in particle_initialisation.py.
- class pylag.restart.RestartFileCreator(config)[source]
Bases:
object
Restart file creator
Objects of type RestartFileCreator manage the creation of model restart files.
- Parameters
config (ConfigParser) – Configuration obect.
- create(filename_stem, n_particles, datetime, particle_data)[source]
Create a restart file
Restart files will be created in the directory restart_dir. The following file naming convention is used:
<restart_dir>/<filename_stem>_YYYYMMDD-HHMMSS.nc
The time stamp is obtained from the supplied datetime parameter.
All the particle data that is required to restart the model should be provided in the dictionary particle_data. This allows for a completely generic structure.