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

Rainfall velocity is a hacked diagnostic #328

Open
tommbendall opened this issue Jan 20, 2023 · 1 comment
Open

Rainfall velocity is a hacked diagnostic #328

tommbendall opened this issue Jan 20, 2023 · 1 comment
Assignees
Labels
tidying Involves tidying up code

Comments

@tommbendall
Copy link
Contributor

The rainfall velocity is a useful diagnostic when running with a rain variable, but getting it from the physics scheme into the field container is a complete hack and needs fixing! This could easily arise again if we have auxiliary fields in physics schemes that we would like to output.

@tommbendall tommbendall added the tidying Involves tidying up code label Jan 20, 2023
@tommbendall tommbendall self-assigned this May 31, 2023
@tommbendall
Copy link
Contributor Author

I think a good solution to this would be to allow TimeDiscretisation and Physics objects to hold a list of diagnostic fields, which would be default be empty, i.e. in the base class __init__ methods:

self.diagnostic_fields = []

We could then add default diagnostics, such as rainfall velocity or mr_sat to this list. (I wouldn't intend on adding anything by default to the time_discretisation but want to put the capability in there to help with debugging in the future)

We wouldn't want these default diagnostics to be output automatically though -- we want the user to specify them in the normal way as name/objects in the list of diagnostic_fields passed to the IO.

When the time stepper tells the IO to setup_dump, we should then have the IO loop through all physics schemes / time discretisations to check for diagnostic fields. They can then be registered to dumping at the appropriate moment.


I think this is a fair bit of work but wanted to get my thoughts recorded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tidying Involves tidying up code
Projects
None yet
Development

No branches or pull requests

1 participant