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

Online Diagnostics Module #206

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Online Diagnostics Module #206

merged 1 commit into from
Jan 13, 2023

Conversation

LenkaNovak
Copy link
Collaborator

@LenkaNovak LenkaNovak commented Jan 4, 2023

Purpose

Modularize the diagnostics utility.

To-do

  • Tasks:
    • move functions to src
    • allow instantaneous save
    • add tests
    • add docs
    • update Utlilities
    • wrap into module after testing
    • update TimeManager with with trigger_callback (for better tracking of callback types) and Monthly()

Note

Review checklist


  • I have read and checked the items on the review checklist.

@LenkaNovak LenkaNovak mentioned this pull request Jan 4, 2023
13 tasks
@LenkaNovak LenkaNovak marked this pull request as ready for review January 4, 2023 23:21
@LenkaNovak LenkaNovak force-pushed the ln/interface-diagnostics branch 8 times, most recently from 6d60409 to 2bbfe9a Compare January 12, 2023 01:45
Copy link
Member

@juliasloan25 juliasloan25 left a comment

Choose a reason for hiding this comment

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

looks good! just minor comments :)

@@ -71,7 +72,7 @@ if isinteractive()
parsed_args["vert_diff"] = true #hide
parsed_args["rad"] = "gray" #hide
parsed_args["microphy"] = "0M" #hide
parsed_args["energy_check"] = true
parsed_args["energy_check"] = false
Copy link
Member

Choose a reason for hiding this comment

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

Do we need #hide here?

# Arguments
- `cs`: [CoupledSimulation] containing info about the simulation
"""
trigger_callback(cs::CoupledSimulation, ::Monthly) = cs.dates.date[1] >= cs.dates.date1[1] ? true : false
Copy link
Member

Choose a reason for hiding this comment

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

why does this need the ::Monthly param?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Right now it's more like a label for clarity. But in the future, we may want to have callbacks for Daily or EveryTimestep. This callback interface will probably change though once we start thinking about more complex timestepping.

# Atmos diagnostics

"""
get_var(cs, ::Val{:T})
Copy link
Member

Choose a reason for hiding this comment

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

add type to function definition in comment (for all get_var functions)

@@ -0,0 +1,215 @@
#=
Copy link
Member

Choose a reason for hiding this comment

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

change #=, =# to """ per Valeria's recent docstring updates



"""
pre_save(::TimeMean, cs::CoupledSimulation, dg::DiagnosticsGroup
Copy link
Member

Choose a reason for hiding this comment

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

missing closing ) (and in line 196)

save_time_format


FT = Float64
Copy link
Member

Choose a reason for hiding this comment

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

could add loop for FT in (Float32, Float64) over all testsets to test both FTs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I thought about it too, but then saw that it's not really testing any fundamental dependencies on the FT, so I figured Float64 suffices. Trying to cut down on unnecessary CI ;)

tests

cleanup

test fix

check in test Manifest

check in test Manifest

temp

temp

dep

temp

clean

temp fix

dep fix

dep fix

dep fix

test

try

format

rebase fixes

mpi test rebase

clean

amip data name fix

rev fix

dep fix

dep fix

dep fix
@LenkaNovak
Copy link
Collaborator Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 13, 2023

@bors bors bot merged commit 2111169 into main Jan 13, 2023
@bors bors bot deleted the ln/interface-diagnostics branch January 13, 2023 19:37
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.

None yet

2 participants