Neutral diffusion: Diffuse along isopycnal direction #577
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.
In the original implementation, the neutral direction was calculated based on density referenced to the local
pressure. This PR introduces a new capability for the neutral diffusion code tracers can be diffused along isopycnal directions referenced to a specified pressure.
The behavior is toggled by the runtime parameter NDIFF_REF_PRES which specifies a reference pressure in Pascals. If NDIFF_REF_PRES < 0 (the default is set to -1), diffusion is along locally referenced potential density- the original behavior. If NDIFF_REF_PRES >= 0., diffusion is along isopycnals referenced to the specified pressure in Pascals.
This PR was branched off #553.