-
Notifications
You must be signed in to change notification settings - Fork 13
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
Issue669 coupler fluxes #790
Open
einola
wants to merge
13
commits into
develop
Choose a base branch
from
issue669_coupler_fluxes
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
In particular, these are: the non-solar heat flux (Q_NO_SUN), the short-wave flux (Q_SW_OCN), the fresh-water flux (FWFLUX), and the salt flux (SFLUX), all at the ocean surface. I also defined the short wave flux through the base of the ice, but it's zero for now. This is an initial commit. It compiles, but is untested and still a bit messy.
We now need to define Q_SW_OW and Q_SW_BASE as HFields before starting.
Is that a good idea or not? Time will tell.
It's not very nice anyway, and the old nextim code can be reproduced using fwFlux alone.
I moved the namespace CouplingFields to the ModelComponent scope, added some definitions IOceanBoundary's m_couplingArrays store, passed this to SlabOcean and used them in the calculations. This makes life easier, because the Shared and Protected namespaces are already overflowing.
This is radiation at the ocean surface, so these variables belong there, not in IAtmosphereBoundary.
Adds a calculation for atmosphere-ocean stress in open water and the (linear) combination of atmosphere-ocean and ice-ocean stresses at the ocean surface.
It's all semantics, really, but it's nice to group the fluxes in one place, and IAtmosphereBoundary.hpp makes more sense for that than IOceanBoundary.hpp.
Get the test running, test the return of OW_STRESS_X/Y, and fix a bug in the open water stress calculation (tests are good!).
Because I misunderstood how clampBelow works (or was maybe a bit too quick).
Ready for review @timspainNERSC |
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.
Ocean fluxes for the coupler
Fixes #669
Task List
Change Description
Populate IOceanBoundary::m_couplingArrays with references to the arrays needed for coupling and make sure the sending arrays contain physical data.
The sending arrays are
The sending arrays contain averaged values from both ice and open-water contributions, calculated in a new function in IOceanBoundary::mergeFluxes. This uses the standard weighted average between ocean and atmosphere for the fluxes. We could imagine doing it differently, but that's still an active area of research.
The recieving arrays are:
All the recieving arrays are already in use and the m_coupingArrays reference points to the already existing arrays registered in the central ModelArrayReferenceStore. All the arrays named here are owned by IOceanBoundary.
To get this working, I moved the CouplingFields namespace to the ModelComponent scope.
I rewrote slabOcean to use mergeFluxes and m_couplingArrays.
Future ocean coupling code should rely on m_couplingArrays for all its functionality.
Test Description
All existing test work. I added additional tests to test the computation of ocean stress in open water.
Documentation Impact
N/A
Other Details
None
Pre-Request Checklist