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

Need plan for implementing process and time-split physics in capgen #467

Open
nusbaume opened this issue May 8, 2023 · 0 comments
Open

Comments

@nusbaume
Copy link
Collaborator

nusbaume commented May 8, 2023

Description

It is still a little unclear how capgen should formally manage process-split versus time-split physics in a way that is relatively seamless for the user (i.e. doesn't require a large number of manually-added interstitial schemes). The hope is that this issue can be a place to discuss what an agreed-upon solution should be.

Solution

The current plan, as suggested by @gold2718, is:

Post processing for scheme in time split sequence:
For every output variable (intent(out) or intent(inout)) variable with the name, tendency_of_X, look to see if the scheme has an input-only variable, X.
For each such X, update it with tendency_of_X.

Post processing for scheme in process split sequence:
(Note, this might not work because to set up a process-split sequence, we need to create temporaries for all "state variables" that are modified by schemes in the sequence.
We also need to create a total_tendency_of_X variable for the sequence.
One way to interpret a "state variable" is any variable that does not begin with "tendency_of_". If that works, I think the scheme below works. Can you think of any counter examples?)
For every output variable, X, add the difference between X and its initial value to the total_tendency_of_X for the sequence unless the scheme also produces a tendency_of_X output variable.
Reset X to its initial value.

Alternatives (optional)

We could instead have new meta-data properties, such as state_variable, which specify how/when fields should be updated for a given physics scheme.

Related to (optional)

ESCOMP/atmospheric_physics#36
ESCOMP/atmospheric_physics#12

Also pinging @peverwhee

@mkavulich mkavulich changed the title Need plan for implementing proccess and time-split physics in capgen Need plan for implementing process and time-split physics in capgen May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant