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

Add output for debugging TC in CA #816

Merged
merged 1 commit into from
Sep 13, 2022
Merged

Add output for debugging TC in CA #816

merged 1 commit into from
Sep 13, 2022

Conversation

trontrytel
Copy link
Member

@trontrytel trontrytel commented Sep 7, 2022

PULL REQUEST

Purpose and Content

This PR adds output of most of TC aux state from cache. This is done to help with debugging TC simulations in CA. It also adds plots of some TC variables to the buildkite CI

In order to switch on the TC output set the --debugging_tc true and choose the output frequency --dt_save_to_disk 5mins. By default the first flag is set to false so it should not negatively affect any performance tests or long simulations.

I'm using the existing infrastructure of saving to HDF5 files and just extending it with our cached TC variables. HTH with integrating TC in CA.

lmk if we want to add it to buildkite or if anything should be added/removed from the output list.

Fixes #817

Benefits and Risks

We will know more about what is happening inside TC in CA

PR Checklist

  • This PR has a corresponding issue OR is linked to an SDI.
  • I have followed CliMA's codebase contribution and style guidelines OR N/A.
  • I have followed CliMA's documentation policy.
  • I have checked all issues and PRs and I certify that this PR does not duplicate an open PR.
  • I linted my code on my local machine prior to submission OR N/A.
  • Unit tests are included OR N/A.
  • Code used in an integration test OR N/A.
  • All tests ran successfully on my local machine OR N/A.
  • All classes, modules, and function contain docstrings OR N/A.
  • Documentation has been added/updated OR N/A.

Copy link
Member

@yairchn yairchn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bors bot added a commit that referenced this pull request Sep 8, 2022
829: fix allocations for snow and rain output r=trontrytel a=trontrytel

# PULL REQUEST

This PR fixes some allocations related to outputting rain and snow. See the discussion here: #816

`@charleskawczynski` - Is that what you had in mind?

## Purpose and Content
(Clearly and concisely state the purpose of this PR)

## Benefits and Risks
(State concisely the benefits to be derived from and the risks associated with this PR)

## Linked Issues
(Provide references to any link issues. Use closes #issuenum to automatically close an open issue)
- Fixes #
- Closes #

## PR Checklist
- [ ] This PR has a corresponding issue OR is linked to an SDI.
- [ ] I have followed CliMA's codebase [contribution](https://clima.github.io/ClimateMachine.jl/latest/Contributing/) and [style](https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/) guidelines OR N/A.
- [ ] I have followed CliMA's [documentation policy](https://github.com/CliMA/policies/wiki/Documentation-Policy).
- [ ] I have checked all issues and PRs and I certify that this PR does not duplicate an open PR.
- [ ] I linted my code on my local machine prior to submission OR N/A.
- [ ] Unit tests are included OR N/A.
- [ ] Code used in an integration test OR N/A.
- [ ] All tests ran successfully on my local machine OR N/A.
- [ ] All classes, modules, and function contain docstrings OR N/A.
- [ ] Documentation has been added/updated OR N/A.


Co-authored-by: Anna Jaruga <[email protected]>
bors bot added a commit that referenced this pull request Sep 8, 2022
829: fix allocations for snow and rain output r=trontrytel a=trontrytel

# PULL REQUEST

This PR fixes some allocations related to outputting rain and snow. See the discussion here: #816

`@charleskawczynski` - Is that what you had in mind?

## Purpose and Content
(Clearly and concisely state the purpose of this PR)

## Benefits and Risks
(State concisely the benefits to be derived from and the risks associated with this PR)

## Linked Issues
(Provide references to any link issues. Use closes #issuenum to automatically close an open issue)
- Fixes #
- Closes #

## PR Checklist
- [ ] This PR has a corresponding issue OR is linked to an SDI.
- [ ] I have followed CliMA's codebase [contribution](https://clima.github.io/ClimateMachine.jl/latest/Contributing/) and [style](https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/) guidelines OR N/A.
- [ ] I have followed CliMA's [documentation policy](https://github.com/CliMA/policies/wiki/Documentation-Policy).
- [ ] I have checked all issues and PRs and I certify that this PR does not duplicate an open PR.
- [ ] I linted my code on my local machine prior to submission OR N/A.
- [ ] Unit tests are included OR N/A.
- [ ] Code used in an integration test OR N/A.
- [ ] All tests ran successfully on my local machine OR N/A.
- [ ] All classes, modules, and function contain docstrings OR N/A.
- [ ] Documentation has been added/updated OR N/A.


Co-authored-by: Anna Jaruga <[email protected]>
@trontrytel
Copy link
Member Author

@charleskawczynski , @yairchn - I added a script that plots the final profiles, something akin to the profile plots we had in OG TC. Lets see if it works in the CI, but on my local machine it generates output like this:

final_profiles

Lmk what else can be fixed or how to make it more general :)

@trontrytel
Copy link
Member Author

Looks like it worked :0 You can check the additional artifact plots for Bomex (compressible and not) in the CI

@trontrytel trontrytel force-pushed the aj/tc_diagnostics branch 2 times, most recently from a3849d1 to b1c1c6a Compare September 11, 2022 04:00
@trontrytel
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Sep 13, 2022

Build succeeded:

@bors bors bot merged commit 5252b5f into main Sep 13, 2022
@bors bors bot deleted the aj/tc_diagnostics branch September 13, 2022 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more TC output
3 participants