-
Notifications
You must be signed in to change notification settings - Fork 269
DEV-EMC-20250813 (convert missing value to zero in Stokes drift) #1675
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
DEV-EMC-20250813 (convert missing value to zero in Stokes drift) #1675
Conversation
* in order to do clean test for GFDL-20250423 PR
* revert ISO feature in MOM_sum_output.F90
…0250527 update MOM6 to its main repo. 20250527 commit.
…0250801 update MOM6 to its main repo. 20250801 commit
…rted Stokes drift components * The mom_cap_methods.F90 file is revised to convert imported Stokes drift components from a missing value (9.99e20) to zero. This update doesn't have any impacts on global applications.These updates are only needed when the ocean model domain is greater than the wave model domain and the wave model cannot provide Stokes drift components for the entire ocean model domain.
|
We apologize for some extra commits in this PR. What happened is we had an internal updating on ISO code which happened right before GFDL's 20250423 PR (#1664). In GFDL's PR one variable was removed and unfortunately that variable was being used/modified in EMC's ISO code. During the test and merging time we found there is no simply way to solve the code conflict. As a consequence we had to manually changed back (git revert is not allowed in UFS as it will have big negative impact for all UFS developers' onging work) our ISO code in order to merge GFDL's PR. We added ISO code updating back after GFDL's PR was merged in dev/emc. we had an internal discussion on this extra commits issue but found there is no simply way to handle it, so please treat this case as an exception and we will make sure to follow "one updating, one hash" style as close as possible. |
mathomp4
left a comment
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.
GEOS does not even compile these files, so easy approval from GMAO.
abozec
left a comment
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.
We do not use these routines either at COAPS so we approve.
kshedstrom
left a comment
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'm not using these files either. Approve!
Hallberg-NOAA
left a comment
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.
These changes will not impact GFDL, and they look to me like they are properly implemented.
I would note that the comparison with a missing value of 9.99e20 on line 546 of mom_cap_methods.F90 to within a tolerance of 0.01 is effectively an '==' because the least bit in a change from 9.99e20 for a real*8 number is about 1e5. However, this construct might be a deliberate attempt to avoid complier warnings about checking for exact equality between real numbers.
There are also several points where these proposed change deviate from the style set out in the MOM style guide at https://github.com/mom-ocean/MOM6/wiki/Code-style-guide, which discourages the use of if( ...) in favor of if (...), and encourages the use of enddo and endif instead of end do and end if. If we were following the style guide, the continuation lines at lines 551 and 553 would use at least a 4 point indent, rather than the 2 point indent used here.
|
@Hallberg-NOAA Thanks for the code stlye catching, just modified them |
dougiesquire
left a comment
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.
ACCESS-NRI do use these routines, but we retain previous behaviour by default (set_missing_stks_to_zero = .false.)
Hallberg-NOAA
left a comment
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.
GFDL does not use the NUOPC driver, but from visual inspection these changes look like they should be work as intended.
|
@alperaltuntas can you review it ? |
|
thanks for everybody's time to review this PR. |
|
There is no problem merging this commit. We often have to make revisions to the PRs which are not part of our development branches. EMC will pick up d6d211f when you merge |
|
thanks @marshallward just merged |
The nuopc_cap and mom_cap_methods.F90 are revised to convert imported Stokes drift
components from a missing value (9.99e20) to zero. This update doesn't have any impacts on
global applications and are only needed when the ocean model domain is greater
than the wave model domain while the wave model cannot provide Stokes drift components
for the entire ocean model domain.
Thanks for @alperaltuntas to do a pre-test for this PR.