NCAR / wrfcloud

WRF Cloud Framework
Apache License 2.0
15 stars 6 forks source link

Initial runscript framework #20

Closed mkavulich closed 2 years ago

mkavulich commented 2 years ago

Expected Differences

This PR is the initial "skeleton" framework for the eventual run scripts for creating, running, and monitoring an end-to-end NWP workflow for the wrfcloud framework. An initial plan was outlined in the design document; here is a summary of this initial version:

Initial framework summary

./run.py is the main runtime script. This python script takes as input a single command-line argument, which is the "name" of the run. This should be unique; it could be of the format run_{user/group}_{unix_datetime} or something similar. The ./run.py script will take this argument, and use it to read in an experiment configuration file, {name}.yml. The configuration file will contain all the user-specified information needed for a particular run.

If no name is provided, the script will run a test case, named "test" and using the provided example config file test.yml.

As the run goes on, all work will be done in a working directory, which for now is simply a subdirectory named {name}, the name of the run as described above.

Inside of ./run.py, the main function does very little directly, except to set up the RunInfo object that contains all the run-specific information, much of which is read directly from the run configuration .yml file. Other than that it mostly just calls other functions to get the job done.

Finally, there are two subdirectories:

Other resources

A .yml environment file for building a conda environment containing all the packages necessary for this initial version has been added in wrfcloud/python/src/wrfcloud/resources. This includes pylint, which is recommended to be used to check the python code meets all best practices/standards as we move forward building the system.

Pull Request Testing

Pull Request Checklist

mkavulich commented 2 years ago

@hahnd Thanks again for your input, and thanks for running the changes through pylint since I forgot to on the last few commits! All the changes look good, and now I know about type and return hints for future use :)