-
Notifications
You must be signed in to change notification settings - Fork 4
Skeleton ideas for radiation interfaces #31
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
base: main
Are you sure you want to change the base?
Conversation
|
Another idea is to add an extension for |
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 probably belongs in test/ directory
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.
we can also create a validation directory for user-like scripts that are not formal tests but just for sandboxing stuff
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.
Yes. This belongs into test.
src/Radiation/rrtmgp_interface.jl
Outdated
| grid::RectilinearGrid; | ||
| temperature::Field, | ||
| pressure::Field, | ||
| lat::Field, |
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.
Can you explain how we have both a grid argument as well as a lat argument (eg latitude?) In the case of any curvilinear grid, we can extract the latitudes from the grid itself so would not need an independent input. But I might be misunderstanding how this should work. I could also imagine that radiation works only with column grids (eg RectilinearGrid with (Flat, Flat, Bounded) topology)
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.
Yep, we'll have to extract the latitude from the grid.
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.
Basically, you have to supply for each column where it is located in latitude. This could be derived from the grid.
src/Radiation/rrtmgp_interface.jl
Outdated
| grid::RectilinearGrid; | ||
| temperature::Field, | ||
| pressure::Field, | ||
| lat::Field, |
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.
Can you explain how we have both a grid argument as well as a lat argument (eg latitude?) In the case of any curvilinear grid, we can extract the latitudes from the grid itself so would not need an independent input. But I might be misunderstanding how this should work. I could also imagine that radiation works only with column grids (eg RectilinearGrid with (Flat, Flat, Bounded) topology)
Can you elaborate? |
an "extension" is a feature of the package manager that allows conditional code loading. There is some documentation here: by convention, we implement extensions in a directory There are several examples in Oceananigans, eg: https://github.com/CliMA/Oceananigans.jl/tree/main/ext For example, we have extended Oceananigans architecture/device interface to support CUDA, AMDGPU, intel oneAPI, and Metal. All of the methods / functionality necessary to use these devices is contained in corresponding extensions, eg: https://github.com/CliMA/Oceananigans.jl/blob/main/ext/OceananigansMetalExt.jl The extension packages become on the user side, they will invoke RRTMGP by writing using Breeze
using RRTMGP
# etcin other words This design enforces modularity --- if we wanted to discontinue support for |
89e141e to
7a2d2b2
Compare
| """ | ||
| context_from_arch(arch) | ||
|
|
||
| Return a `ClimaComms` execution context compatible with the provided |
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.
what's an "execution context"?
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.
I'm not sure. It might be the ClimaComms equivalent of what we call "architecture" in Oceananigans.
I think we should move all of this into an extension so that we don't pollute the source code with ClimaComms stuff, but this will be easy.
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.
@bischtob do you understand the distinction between "context" and "architecture"?
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.
I believe they are equivalent, but I am not 100% certain in all cases (e.g., distributed).
Ideas for an RRTMGP.jl interface. WIP.