payu-org / payu

A workflow management tool for numerical models on the NCI computing systems
Apache License 2.0
18 stars 25 forks source link

Payu date-based restart issue with MITgcm #422

Closed claireyung closed 3 months ago

claireyung commented 3 months ago

Hi, I've been running MITgcm on gadi with payu. This repo contains my model config directory. As mentioned in this post, the model runs with the gadi analysis3-23.07 conda environment but not analysis3-23.10: in that case I get the error message in https://github.com/claireyung/mitgcm-pig/blob/main/mitgcmice2.e110118980, relating to restart date counting, copied below:

Traceback (most recent call last):
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/bin/payu-run", line 10, in <module>
    sys.exit(runscript())
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/payu/subcommands/run_cmd.py", line 133, in runscript
    expt.setup()
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/payu/experiment.py", line 454, in setup
    self.get_restarts_to_prune()
  File "/g/data/hh5/public/apps/miniconda3/envs/analysis3-23.10/lib/python3.10/site-packages/payu/experiment.py", line 1056, in get_restarts_to_prune
    index_bound = max_index - restart_history
TypeError: unsupported operand type(s) for -: 'NoneType' and 'int'

This was surprising to me because I am not using restarts, since startTime in my data input file (see &PARM03 for time stepping parameters) is zero.

jo-basevi commented 3 months ago

Hi, thank you for creating this issue. I was able to get the same error when using restart_history, with an archive directory that exists but that contains no restarts - is that the case for you?

If that is the case, in the meantime to get past this bug until a fix is deployed:

claireyung commented 3 months ago

Thanks for this Jo! I was able to use both the workarounds.

Thank you