Skip to content
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

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

mnlevy1981
Copy link
Collaborator

@mnlevy1981 mnlevy1981 commented Oct 10, 2024

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:

  • Have you followed the guidelines in our Contributor's Guide (including the pre-commit check)?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change? Other pull requests that create the same changes do not exist; however, this is dependent upon generate ADF config file #142

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you lint your code locally prior to submission?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully tested your changes locally?

@TeaganKing TeaganKing mentioned this pull request Nov 4, 2024
4 tasks
mnlevy1981 and others added 6 commits November 8, 2024 13:35
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)
@TeaganKing
Copy link
Collaborator

TeaganKing commented Nov 8, 2024

The last thing we have to do here is to add a flag if ADF exists in build.py (Done week of 11/11)

@@ -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"]
Copy link
Collaborator

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.

@TeaganKing
Copy link
Collaborator

TeaganKing commented Nov 12, 2024

We should also add documentation on how to run ADF until #105 is resolved (Done 11/13)

TeaganKing and others added 4 commits November 13, 2024 10:51
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'
Copy link
Collaborator

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?

@TeaganKing
Copy link
Collaborator

We may want to remove the dependency on CESM (rather than just CUPiD and ADF)-- see note in #142.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants