-
Notifications
You must be signed in to change notification settings - Fork 235
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
3D Thickness multiplied momentum diagnostics #1397
Conversation
- I had a "*" in place of a "/" for calculating a non-dimensional quantity that led to OOB numbers.
- I'd previously made the NW2 tracers mandatory in the restart field which prohibits adding tracers on a restart. This commit allows a restart without tracers to be used.
- I noticed an unnecessary function call which is now removed.
- An inverted do/if loop was using uninitialized variables and was overwriting restart data.
…-2021-02-19 Dev gfdl main candidate 2021 02 19
- The number of tracers was hard coded via an integer parameter which is unnecessarily restrictive.
- The first interation of NW2 tracers implemented 20 tracesr with 10 different spatial structures and 2 different restoration time scales. This has been replaced with 9 tracers with 3 spatial, corresponding to sin(2x), y, z, and 3 time scales. - Number of tracer groups and time scales are now run-time configurable.
@hmkhatri, thank you very much for this PR. I see many commits from Alistair that are related to "NW2 tracers updates". However, I do not see the corresponding code changes being added here. In any case, I suggest that you create a new branch with a single commit adding only the 3D thickness multiplied momentum diagnostics. This would greatly simplify the process of tracking code changes and also of propagating this PR to the other MOM6 forks. Please let me know if you need help with this. |
@gustavo-marques Not sure why all commits by Alistair are appearing here. Could be that I used |
@hmkhatri I know this issue is closd, but I would suggest not using stack for the 3D arrays. They are large enough where it could start to cause stack overflows. I'd suggset we allocate any 3D arrays until we have a better strategy for handling scratch arrays for diagnostics. |
In this PR, 3D thickness multiplied momentum equation diagnostics have been implemented. @NoraLoose @gustavo-marques are using these diagnostics for thickness-weighted analysis in the Ocean-CPT work.
Following suggestions made by @marshallward in PR #1343 for 2D diagnostics, 3D diagnostic arrays are also declared as stack arrays. These arrays should consume memory only if the relevant diagnostics are called.
Also, it would be useful to discuss which layer thicknesses are appropriate to be used in these diagnostics. In the current implementation, the layer thicknesses at u/v points (
diag_hu
/diag_hv
) are returned in thebtstep
call as part of theADp
control structure. There may be better ways for choosing layer thicknesses consistent with numerics.https://github.com/NOAA-GFDL/MOM6/blob/2912058b17b5e8636c8687ed236ac68aba36f609/src/core/MOM_dynamics_split_RK2.F90#L761-L764
I have already put a separate issue #1391 on this topic.