payu-org / payu

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

Output numbering #322

Open julia-neme opened 2 years ago

julia-neme commented 2 years ago

I noticed that when running mom6-panan starting from a previous restart stored in a different directory from where the output is going to be, the output name is output000, regardless of what number the restart was from. This is using restart: path line in config.yaml

So for example, continuing an existing experiment in ik11 using restart039, will save the output in my output directory as output000. I then have to rename it manually to output040.

Not super important, but good to know

aidanheerdegen commented 2 years ago

Just a comment for future reference, this is sort of by design. The code block where this is checked is here:

https://github.com/payu-org/payu/blob/a83d60b09f8ff93432cde302d36904edc4b79f16/payu/experiment.py#L348-L352

and it checks that no prior restarts are found by checking the current run counter is zero. This means a

restart: /path/to/restart/directory

can stay in the config.yaml and not affect subsequent runs, which is a nice bit of run documentation.

If you want to continue an existing run then it doesn't work as nicely because the run counter is reset. Nor, potentially, if you want to fork a perturbation experiment at a point and have the numbering match that of the control.

The logic could probably be rearranged, but quite a lot depends implicitly on the current run counter, so it would need to be done quite carefully. It would probably need to be added here:

https://github.com/payu-org/payu/blob/a83d60b09f8ff93432cde302d36904edc4b79f16/payu/experiment.py#L180-L212

aidanheerdegen commented 2 years ago

Note that #324 is related, because it fixes a logic error that could lead to buggy behaviour.