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

Why does CenterField contain no data for BoxModelGrid? #165

Closed
glwagner opened this issue Jan 5, 2024 · 8 comments
Closed

Why does CenterField contain no data for BoxModelGrid? #165

glwagner opened this issue Jan 5, 2024 · 8 comments
Labels
question Further information is requested

Comments

@glwagner
Copy link
Collaborator

glwagner commented Jan 5, 2024

I noticed that CenterField is defined as nothing on BoxModelGrid:

CenterField(::BoxModelGrid, args...; kwargs...) = nothing

But if I understand this correctly, a box model grid is effectively 0-dimensional. That means that any field would actually have 1 point (not 0 points). Otherwise, what is the prognostic state of a BoxModel?

I'm asking because I think the concept of a 0D grid could be possibly useful in Oceananigans (but right now we use a triply-Flat grid for the same purpose when we need it).

@glwagner glwagner added the question Further information is requested label Jan 5, 2024
@iuryt
Copy link
Collaborator

iuryt commented Jan 5, 2024

I am curious about the utility of having 0D grid. Can you explain that?

@glwagner
Copy link
Collaborator Author

glwagner commented Jan 5, 2024

There are non-trivial dynamics on a 0D grid --- inertial oscillations, chemical and biological reactions, etc

@jagoosw
Copy link
Collaborator

jagoosw commented Jan 9, 2024

This is a good question, I think at the time of writing it was just a workaround to allow models to be constructed (through the default setup of the BGC models light attenuation models get constructed which setup fields I think). I'll have a look at how it's used.

Tbh all of the box model code could do with some rethinking to be better aligned with the rest of the code. No one's used it much so it's not had a lot of testing or thought.

@glwagner
Copy link
Collaborator Author

glwagner commented Jan 9, 2024

How is the prognostic state of a BoxModel stored?

@jagoosw
Copy link
Collaborator

jagoosw commented Jan 10, 2024

Just as a Tuple of Floats (vs a tuple of fields in Oceananigans)

@glwagner
Copy link
Collaborator Author

Ah, I realize that you are not using an Oceananigans model in this case. So the question is really why / where CenterField gets called at all.

@navidcy
Copy link
Collaborator

navidcy commented Feb 1, 2024

@jagoosw this was resolved with #164, right?

@jagoosw
Copy link
Collaborator

jagoosw commented Feb 1, 2024

yeah, sorry should have said!

@jagoosw jagoosw closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants