Draft: Extending custom reference states to active and passive scalar fields.#586
Draft
cianwilson wants to merge 8 commits intomainfrom
Draft
Draft: Extending custom reference states to active and passive scalar fields.#586cianwilson wants to merge 8 commits intomainfrom
cianwilson wants to merge 8 commits intomainfrom
Conversation
This is done by creating a new input file type, based on the reference state file but for scalar fields alone.
These can be set using `chi_a_custom_reference_file` and `chi_p_custom_reference_file` for active and passive scalar fields
respectively. Other new namelist parameters are:
```
override_chi_a_constant, override_chi_p_constant,
chi_a_constants, chi_p_constants,
with_custom_chi_a_constants, with_custom_chi_p_constants,
with_custom_chi_a_functions, with_custom_chi_p_functions
```
which do the equivalent of their reference state parameters but for active and passive scalar fields.
Currently it is possible to set reference states for:
```
constants = ['dchirefdr_scale', 'kappa_chi_scale', 'source_chi_scale', 'buoy_chi_scale']
functions = ['dchirefdr', 'kappa_chi', 'source_chi', 'd_ln_kappa_chi', 'buoy_chi']
```
The buoyancy constant and function will be ignored for passive scalar fields.
Hooked up the dchiref in the assembly of the scalar fields as well as the source terms.
Also fixed some typos and deprecation warnings.
This is untested and undocumented so far. More to come.
…mented (but untested).
The test currently compares running an augmented source T case with an augmented source chi case with and without advecting a reference state. I haven't been able to get the same answer generated with and without advecting the reference state yet. Implementing this test involved allowing rmin and rmax to be available always to generic input generation (rayleigh_spectral_input.py).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Still in development. No need to review yet.
This is done by creating a new input file type, based on the reference state file but for scalar fields alone.
These can be set using
chi_a_custom_reference_fileandchi_p_custom_reference_filefor active and passive scalar fields respectively. Other new namelist parameters are:which do the equivalent of their reference state parameters but for active and passive scalar fields.
Currently it is possible to set reference states for:
The buoyancy constant and function will be ignored for passive scalar fields.
Hooked up the dchiref in the assembly of the scalar fields as well as the source terms.
Also fixed some typos and deprecation warnings.
This is untested and undocumented so far. More to come.