-
Notifications
You must be signed in to change notification settings - Fork 18
Print globally averaged surface temperature for one-degree example #540
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
Perhaps a plot of zonally-averaged fluxes and SST would be nice too? To show seasonality? |
start_date = DateTime(1993, 6, 1) | ||
stop_date = DateTime(1994, 5, 1) |
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.
why?
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.
because then the solution won't be biased to heat up as much at the beginning (eg starting during northern hemisphere winter)
examples/one_degree_simulation.jl
Outdated
@@ -117,15 +117,15 @@ function progress(sim) | |||
u, v, w = ocean.model.velocities | |||
T = ocean.model.tracers.T | |||
e = ocean.model.tracers.e | |||
Tmin, Tmax = minimum(T), maximum(T) | |||
Tmin, Tmax, Tavg = minimum(T), maximum(T), mean(T) |
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.
does the mean
ignore land? or do we need to do compute!(Field(Average(T)))[1, 1, 1]
?
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, all reductions of Field
will ignore immersed cells
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.
following CUDA definition if you call mean
with no other arguments, it computes an average over all dimensions and returns the result as a scalar without any need to index further. If you specify dimensions
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.
A lot of code has previously used various workarounds, including using interior
, because conditional reductions often did not compile on the GPU. But since our revamp of conditional operations, I have found that we can use simple clean syntax now.
We may also want something like mean(view(T, :, :, Nz))
which would compute the surface average
docs didn't build, I guess i need another commit |
you need to add the label before you create the PR if you want the docs to built from the first commit |
I ran the 1-degree simulation for 5 years and changed the color range on the SST to go up to 38. Here's a movie: https://clima.github.io/ClimaOceanDocumentation/previews/PR540/literated/one_degree_simulation/ Seems like the very big SSTs are just in the Java sea? |
one_degree_global_ocean_surface-3.mp4 |
Do you mean you wanna work on these additional diags in this PR @glwagner? |
For what it's worth, I ran the code with the This may be a secondary issue, or may point us to what is causing this (milder) warm up. I thought I would flag it though. |
@simone-silvestri are these you think related to why z-star is behaving differently (or wrong)?
? |
This PR adds printing of the globally-averaged surface temperature in the one-degree example. I'd also like to add a few time-series. I'm thinking: