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 support for regional simulations #710

Merged
merged 5 commits into from
Aug 16, 2024
Merged

Add support for regional simulations #710

merged 5 commits into from
Aug 16, 2024

Conversation

Sbozzolo
Copy link
Member

@Sbozzolo Sbozzolo commented Jul 31, 2024

This PR adds support for regional simulations, box simulations centered around a specific long/lat. Regional simulations are useful for all sorts of reasons, including debugging. Here, I use the fact that there is no later information exchange and set up a box domain.

Closes #709

@Sbozzolo Sbozzolo marked this pull request as draft July 31, 2024 10:45
@Sbozzolo Sbozzolo force-pushed the gb/regional branch 19 times, most recently from 37b71f3 to 886fd85 Compare August 1, 2024 17:54
@Sbozzolo Sbozzolo marked this pull request as ready for review August 1, 2024 17:55
Copy link
Member

@AlexisRenchon AlexisRenchon left a comment

Choose a reason for hiding this comment

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

Is this PR ready for merge, or do want to add some docs first?

This is also relevant enough to add content to the README.md I believe. We should mention that ClimaLand can be run:

  • Standalone of integrated
  • At single site/pixel or regionally or globally

@@ -1,7 +1,7 @@
# # Global bucket run using spatial map albedo
Copy link
Member

Choose a reason for hiding this comment

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

Should we make a different file for a regional experiment?
Since this file is called "global_ ..."

(or rename this file)

Copy link
Member Author

Choose a reason for hiding this comment

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

I renamed this to bucket_era5 because staticmap was misleading

@Sbozzolo
Copy link
Member Author

Sbozzolo commented Aug 1, 2024

Note that PR hardcodes the radius of the Earth in same places, which is not ideal.

@Sbozzolo Sbozzolo added the Run benchmarks Add this label to run benchmarks on clima label Aug 2, 2024
docs/make.jl Show resolved Hide resolved
@@ -184,7 +184,9 @@ end
A struct holding the necessary information
to construct a domain, a mesh, a 2d spectral
element space, and the resulting coordinate field.
Note that only periodic domains are currently supported.
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to keep this - because in principle, if we turned on lateral flow, we would be using periodic BC

Alternatively we can state that only independent columns are supported currently (no need for BC in the horizontal)

Copy link
Member

Choose a reason for hiding this comment

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

(ClimaCore does not support non-periodic BC, I believe, even for boxes)

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a note saying that only "no lateral flow is supported"

"Number of elements to discretize interval, (nx, ny)"
nelements::Tuple{Int, Int}
"Flags for periodic boundaries; only true is supported"
Copy link
Member

Choose a reason for hiding this comment

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

likewise here

Copy link
Member Author

Choose a reason for hiding this comment

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

I added a note saying that only "no lateral flow is supported"

Copy link
Member

@kmdeck kmdeck left a comment

Choose a reason for hiding this comment

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

To avoid the hardcoding of R_earth, my only thought would be that we could adjust Plane as you have it, but instead make a RegionalDomain type (akin to HybridBox, which we would then leave untouched - except with longlat=nothing passed to Plane in the constructor) which takes the same arguments as HybridBox except additional R_earth and longlat

@Sbozzolo
Copy link
Member Author

To avoid the hardcoding of R_earth, my only thought would be that we could adjust Plane as you have it, but instead make a RegionalDomain type (akin to HybridBox, which we would then leave untouched - except with longlat=nothing passed to Plane in the constructor) which takes the same arguments as HybridBox except additional R_earth and longlat

I made R_earth a parameter of Plane. It is used only when the latlong is not nothing.

@Sbozzolo Sbozzolo force-pushed the gb/regional branch 2 times, most recently from dbb3ab2 to 3e5683d Compare August 15, 2024 21:54
kmdeck
kmdeck approved these changes Aug 16, 2024
@Sbozzolo Sbozzolo merged commit 7c9bc04 into main Aug 16, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Run benchmarks Add this label to run benchmarks on clima
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for regional simulations
3 participants