Open glwagner opened 2 weeks ago
What's the point of turning off advection, closure, coriolis? These won't be used anyways, right? It's distracting / confusing why this shows up in the surface flux example:
- Why do we interpolate the prescribed atmosphere, when we basically never recommend actually doing this? I think we should have useful examples that are similar to real world usage...
- Why do we have to pass
grid.underlying_grid
for interpolation, that's silly. https://github.com/CliMA/ClimaOcean.jl/blob/dd9148a8f702699ddf2947d3a1a094adddbd9bb1/examples/generate_surface_fluxes.jl#L60Putting together useful examples shouldn't be this hard...
We can avoid passing the grid indeed.
Passing nothing
everywhere is done to make the examples faster since we do not need to compute those tendencies, we can put them back in, probably we should not even construct an ocean simulation but just manually construct fluxes.
Why do we compute tendencies at all?
The tendencies are computed in the update_state!
at the end of HydrostaticFreeSurfaceModel
. Indeed, we could avoid doing that at construction since it is done in the time-stepping.
I am not sure why we call update_state!
at construction since the model is not set!
ted yet so there is probably also no reason to fill halo regions or to mask immersed fields.
We could remove the update_state!
from the construction. Then we would need to compute the fluxes explicitly in the example after the construction of OceanSeaIceModel
, which has the advantage of showing that we are computing the fluxes
The user can pass velocities and tracers into the constructor, producing a non-trivial state. Also, the biogeochemical state and auxiliary fields are computed. Certainly, we don't need to compute tendencies...
The halos can also be non-trivial if there are non-trivial boundary conditions... imagine for example a problem starting from rest with a moving wall via ValueBoundaryCondition(1)
.
Ok, agreed, we can remove the computation of the tendencies at model construction. I will open a PR in Oceanigans to remove the tendency computation at model construction
Do you know why they were included in the first place? Was it just an oversight when the tendency computation was added to update_state!
? I recommend reviewing all calls to update_state!
to see whether we need to compute tendencies during any of them except during time-stepping.
grid.underlying_grid
for interpolation, that's silly. https://github.com/CliMA/ClimaOcean.jl/blob/dd9148a8f702699ddf2947d3a1a094adddbd9bb1/examples/generate_surface_fluxes.jl#L60Putting together useful examples shouldn't be this hard...