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 diagnostic module #2064

Merged
merged 66 commits into from
Sep 25, 2023
Merged

Add diagnostic module #2064

merged 66 commits into from
Sep 25, 2023

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Sep 6, 2023

This PR adds a new diagnostic module that roughly follows what described in #2043.

@Sbozzolo Sbozzolo added do-not-merge-yet Block from bors draft labels Sep 6, 2023
@Sbozzolo Sbozzolo changed the title [WORK IN PROGRESS] Add diagnostic module Add diagnostic module Sep 6, 2023
@Sbozzolo Sbozzolo force-pushed the gb/diagnostics_ready branch 19 times, most recently from 0e25fb3 to 68b6890 Compare September 8, 2023 19:03
docs/src/diagnostics.md Outdated Show resolved Hide resolved
docs/src/diagnostics.md Outdated Show resolved Hide resolved
src/diagnostics/core_diagnostics.jl Outdated Show resolved Hide resolved
src/diagnostics/core_diagnostics.jl Outdated Show resolved Hide resolved
src/diagnostics/Diagnostics.jl Outdated Show resolved Hide resolved
src/diagnostics/Diagnostics.jl Outdated Show resolved Hide resolved
src/diagnostics/Diagnostics.jl Outdated Show resolved Hide resolved
src/diagnostics/defaults/moisture_model.jl Outdated Show resolved Hide resolved
src/diagnostics/default_diagnostics.jl Outdated Show resolved Hide resolved
src/diagnostics/default_diagnostics.jl Outdated Show resolved Hide resolved
@Sbozzolo Sbozzolo force-pushed the gb/diagnostics_ready branch 2 times, most recently from 101a32b to 275488c Compare September 11, 2023 17:32
@Sbozzolo Sbozzolo force-pushed the gb/diagnostics_ready branch from 069d1b8 to 78a98f8 Compare September 11, 2023 23:43
Sbozzolo and others added 24 commits September 25, 2023 08:45
We want to use `abbreviations.jl` in submodules too. Therefore, we have
to avoid any definition like the one had before this commit (otherwise,
we get a redefinition).
Prior to this commit, the error message printed out the computed
output/computed iterations as opposed to seconds, which made the error
message confusing
Currently, the diagnostic variables are stored in a dictionary. We might
want to be able to change the internal representation in the future. For
that, we provide an interface to the database of known diagnostic
variables through `set_diagnostic_variable!` and
`get_diagnostic_variable`. If we want to change the internal
representation in the future, we will be able to do so easily.
If we a Vector Field, `eltype` will return `Vector`, not float. So, we
have to be more creative with how to get the float_type for general
cases.
.= does not work with Vector Fields, but parent() returns the underlying
data, so we can directly fill the array with the desired value
The generic constructor for SciMLBase.CallbackSet has to split callbacks
into discrete and continuous. This is not hard, but can introduce
significant latency. However, all the callbacks in ClimaAtmos are
discrete_callbacks, so we directly pass this information to the
constructor
The current design leads to exploding compile times. The reason is
currently unknown. To avoid these problems, this new design adds one
single callback called every time step that calls the diagnostic
functions when it is their turn.
@Sbozzolo Sbozzolo force-pushed the gb/diagnostics_ready branch from 9727046 to b78910f Compare September 25, 2023 15:45
@Sbozzolo
Copy link
Member Author

bors r+

@szy21 szy21 added this to the O3.2.2 Add a diagnostic module milestone Sep 25, 2023
@bors
Copy link
Contributor

bors bot commented Sep 25, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 69ce863 into main Sep 25, 2023
6 checks passed
@bors bors bot deleted the gb/diagnostics_ready branch September 25, 2023 18:07
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.

7 participants