UU-Hydro / PCR-GLOBWB_model

PCR-GLOBWB (PCRaster Global Water Balance) is a large-scale hydrological model intended for global to regional studies and developed at the Department of Physical Geography, Utrecht University (Netherlands). Contact: Edwin Sutanudjaja (E.H.Sutanudjaja@uu.nl).
GNU General Public License v3.0
116 stars 79 forks source link

Continue previously unfinished runs #36

Closed BramDr closed 4 months ago

BramDr commented 6 months ago

When running long high-resolution PCR-GLOBWB simulations, it is often the case the the simulation time exceeds the time allowed by the slurm manager on external servers. Or, it may be that there is some other error that causes (longer) simulations to stop. It would be nice if we could continue previously unfinished runs, using the same output directory.

Currently, PCR-GLOBWB appends its outputs to the output NetCDFs per timestep and stores its states to the state pcraster maps per year. An argument should be added to the PCR-GLOBWB runner (e.g. --continue), where the model does not clean up the output directory. Rather it checks:

  1. If the output files already exist
  2. If the state files already exist
  3. The latest available state file

And than continues the previous run from the latest available state file, appending to the output files when necessary.

BramDr commented 4 months ago

Added by pull request #41