Closed mkavulich closed 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 :)
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 formatrun_{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
, themain
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.logging.LEVEL('Message')
, whereLEVEL
is one of the logging levels as defined in the documentation. All messages of leveldebug
or higher will be printed to a log file nameddebug.log
in the experiment directoryungrib.py
and responsible for running the ungrib task. This is built out a little, and currently creates a namelist and links in some input files; I will continue to work on this part of the run going forward.metgrid.py
and responsible for running the metgrid task. This is currently mostly a placeholder, though it does call the same function to create the namelist.real.py
and responsible for running the real.exe task. This is currently a placeholder.wrf.py
and responsible for running the wrf task. This is currently a placeholder.postproc.py
and responsible for running the postprocessing tasks. This is currently a placeholder; may need to be renamed and/or broken down into multiple modules in the future depending on design choices.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 includespylint
, 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
[x] Describe testing already performed for these changes:
[ ] Recommend testing for the reviewer(s) to perform, including the location of input datasets, and any additional instructions:
[ ] Do these changes include sufficient documentation updates, ensuring that no errors or warnings exist in the build of the documentation? Yes
[ ] Do these changes include sufficient testing updates? ??
[ ] Will this PR result in changes to the test suite? ??
[ ] Please complete this pull request review by 2022-07-21
Pull Request Checklist