-
Notifications
You must be signed in to change notification settings - Fork 236
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
Added diagnostics for partial derivatives of density #1142
Merged
marshallward
merged 6 commits into
mom-ocean:dev/gfdl
from
gmacgilchrist:add_dens_deriv_diag
Jul 3, 2020
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
804bf1f
added diagnostics for partial derivative of density wrt temperature a…
2719400
fixes import of dens deriv function
487a33e
Merge branch 'dev/gfdl' into add_dens_deriv_diag
adcroft e9c1f6c
altered OpenMP directive for diagnostic
3951b70
Merge branch 'add_dens_deriv_diag' of github.com:gmacgilchrist/MOM6 i…
dd8d3ab
Merge branch 'dev/gfdl' into add_dens_deriv_diag
marshallward File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to import this function in module specification (L18-19).
(Was this able to build for you?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, this was my error. I forgot to push my latest commit after making that change 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good 🎉
BTW do you think you are able to sort out the OpenMP error as well? If not, then I can look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I have the knowledge to sort that. I'd be happy if you would talk me through it though.
Is it failing because of something in the changes that I've made? Or have I done something wrong in not merging my branch with dev/gfdl correctly in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OpenMP directive preceding the block (line starting with
!$OMP
) has an error because you havedefault(none)
and haven't specified ifwork_3d
is shared across threads or not.The directive could be fixed by adding
work_3d
to the OpenMP directive. But if you did not mean to add it, then it might be simpler to just remove it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not knowing how OpenMP functions, I don't have a sense for whether it is necessary to have
work_3d
shared across threads. I was just copying the convention of the other density calculations in including this line.I think, in fact, that the line as present in my PR was copied from a previous version of MOM_diagnostic.F90, as I see that the OpenMP directives for the other density variables (e.g.
rhoinsitu
) have changed. I wonder if this line should instead just be consistent with that forrhoinsitu
? i.e.!$OMP parallel do default(shared) private(pressure_1d)
I will implement that just now and you can tell me if I'm missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks good, and also looks like it passed. (Just waiting on the ARM tests...)
The regression fail is expected since this is a new diagnostic. I'll push this to Gaea and if it passes then I will merge it.
Thanks for fixing that up!