NOAA-GFDL / fre-cli

Python-based command line interface for FRE (FMS Runtime Environment) to compile and run FMS-based models and post-process their output.
GNU Lesser General Public License v3.0
3 stars 7 forks source link

Wrapper logic: fre pp run #177

Open cwhitlock-NOAA opened 1 week ago

cwhitlock-NOAA commented 1 week ago

The thing-currently-named-wrapper (wrapper.py) works for testing fre-cli, when we have all history files already available at the time of running. However, when we get to running production jobs, the models will be sending over bundles of history files and post-processing them in parallel. This breaks some of the logic currently in the wrapper flow - in particular, the assumptions that there's not already a pre-existing experiment belonging to the same user that the current set of history files is being added to, and the assumption that there's not already an experiment with that name running.

The logic we need is encapsulated in a flowchart at the end of this issue; this breaks it down by tool.

The tool: Fre pp run has the most complicated logic update of the 4 tools touched by the wrapper production logic. It needs to check for prior installed experiments (not just checked out) and perform different cylc commands depending on the status of the installed experiments.

fre pp run:

[ ] Is the -e -p -t workflow installed? If not, install. (current behavior)

Note: I'm not sure how to do the tests for this section - we need a lot of experiments running, with very specific behavior that is tied to how long an experiment has been running (i.e. whether it has completed) or what the user has been doing (overriding a previous configuration). I'd like to divide this up into smaller chunks, but I'm not sure how.

image