-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new example that will run full ADF package (not from notebook) #141
Conversation
This notebook should inject a link to the actual ADF output webpage into the jupyter book
cleaned up a couple files that were triggering pre-commit fails
hide input and output for imports, and input for cell that will eventually have plots as output
Notebook was linking to adf_root before updating the value from config.yml; config.yml should set the default to where we expect ADF to write webpage (which is in the same directory tree that CUPiD writes webpage)
The last thing we have to do here is to add a flag if ADF exists in build.py (Done week of 11/11) |
cupid/build.py
Outdated
@@ -45,6 +46,14 @@ def build(config_path): | |||
subprocess.run( | |||
["jupyter-book", "build", f"{run_dir}/computed_notebooks/{sname}", "--all"], | |||
) | |||
adf_run = control["compute_notebooks"]["atm"]["link_to_ADF"]["parameter_groups"][ | |||
"none" | |||
]["adf_run"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could generalize for all components. Also use .get() to set default run_external_pkg
value.
We should also add documentation on how to run ADF until #105 is resolved (Done 11/13) |
instead of adf_run: True adf_vars: ['...', '...'] Introduced external_tool: tool_name: 'ADF' vars: ['...', '...'] I also moved this out of parameter_group since it's not needed by the link_to_ADF.ipynb notebook (and added plotting_scripts: ['...', '...'] as an extra option to set in config.yml)
adf_run: True | ||
adf_vars: ['PRECT', 'SST'] | ||
external_tool: | ||
tool_name: 'ADF' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! One thought-- if we eventually want to loop through multiple tools, should the ADF-specific parameters be a subset of the ADF tool?
We may want to remove the dependency on CESM (rather than just CUPiD and ADF)-- see note in #142. |
ADF will write output to ${CUPiD}/examples/{example}/ADF_output; if external_tool == "ADF" then that directory will be copied into _build/html/ADF
This runs for me with
(assumes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example can be generalized to other outside diagnostic packages as well (e.g. ILAMB). The goal is to have the JupyterBook-generated web site link to the ADF website from the side bar.
All Submissions:
pre-commit
check)?New Feature Submissions:
Changes to Core Features: