Payu and MITgcm crashes with restart_history counting error

Hi, I’m trying to run MITgcm with payu on gadi with the latest conda analysis environment. I start the run at time zero (though there are forcing files with actual dates), and I get the payu error:

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

I am not using restarts at this stage so this error was surprising. If it is useful, here is my config.yaml . Also note that with a more idealised setup I have had no issues with payu (including the latest conda environment), and for this model run the issue also went away when I used an older environment (e.g. analysis3-23.07). This means I can just use the older version, but ideally it should work for the new environment too. Happy to provide more config files if it’s helpful!


Thanks for the report @claireyung.

This is a bug with the recently added date based restart pruning feature.

Can you create an issue on the payu repo and we’ll try and get that fixed.