SAEON / somisana

SOMISANA-related tooling
MIT License
6 stars 2 forks source link

Algoa Bay Forecast model: Update make-forcings MatLab step to allow for restart file #2

Closed zachsa closed 2 years ago

zachsa commented 2 years ago

Looking at the output of the Github actions workflow here: https://github.com/SAEON/somisana/runs/6964888710?check_suite_focus=true#step:3:40, it seems likely to me that the rst_filename will never exist at the path that it is currently expected.

Please can you confirm this @mattcarr03. Should this be looking in the tmp directory?

mattcarr03 commented 2 years ago

So during the model run the rstfilename is created in the scratch directory which is the "work directory". It is then moved into the forcing directory during the achieving step, line 66 ` mv -f ${SCRATCHDIR}/rst.nc${ENDF} ${FORECASTDIR}/rst${TIME}.nc${ENDF} ` in the script https://github.com/SAEON/somisana/blob/next/models/algoa-bay-forecast/toolkit/run-model/archive_croco.bash.

This was the old setup so it is possible for rst_filename to be moved where fits in best with the new workflow, possibly a folder that is not overwritten as rst_filename needs to be passed from one day to the next. The the path to look for rst_filename needs to be changed accordingly.

zachsa commented 2 years ago

In the old setup the same directory was reused. So for our current setup, I think it's better that the current run look for a restart file in yesterdays directory, and move it to todays forcing directory. To this end: