-
Notifications
You must be signed in to change notification settings - Fork 34
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
Issue 1984 fix: reduce warnings for ccpp-physics #149
Issue 1984 fix: reduce warnings for ccpp-physics #149
Conversation
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.
@scrasmussen Thanks for making these changes.
Looks good, just wondering if we should remove the unused arguments in GFS_surface_generic_pre, or fix their intent?
…bles not given an explicit value" warning. The following table provides justification for setting the variable to 0, it is how they are treated in other places. | file | line | description | |--------------------+------+-----------------------------| | ugwpv1_gsldrag.F90 | 521 | zlwb(:)= 0. ; zogw(:)=0. | | ugwp_driver_v0.F | 206 | zmtb(i) = 0.0 | | cires_ugwp.F90 | 297 | if (do_ugwp) zlwb(:) = 0. |
… drain_cpl and dsnow_cpl vars are changed from intent(out) to intent(in) variables. This is to replicate the rain_cpl and snow_cpl variables.
…out) variables. Variable err_message will report any errors in open and read statements
9ccda89
to
ba7c627
Compare
@scrasmussen Regarding your comment about |
@scrasmussen @dustinswales Regarding the |
@grantfirl When I refactored I didn't add any error handling, and there wasn't any to start. You're 100% correct that there should be something here, at least to return an error if the file can't be found in load_o3prog. |
It would be nice to fix this compiler error:
which occurs when compiling code with flag that enforces implicit none (for the gnu compiler |
@scrasmussen I talked to @Qingfu-Liu, and he has a few more things to add to this PR before we're ready to merge. @Qingfu-Liu Let us know how this progresses. I'd like to combine this with #150 and #168 if possible, and those are ready to merge. If we need more time for this one, we can just merge #150 and #168 together and do this one separately. |
@grantfirl I am not sure if I should create a new PR or wait for @scrasmussen to update this PR? I think we can't update the code changes for this PR (I remember you try to update my PR, and can't do it). |
@Qingfu-Liu You can create a branch from this one, put your changes on top of it, and then put a pull request into this one for @scrasmussen to approve/merge.
Soren and I can review your changes. Once approved/merged, your changes will show up in this PR. |
@grantfirl <https://github.com/grantfirl> Thank you very much. I will do it.
…On Fri, Feb 9, 2024 at 11:02 AM Grant Firl ***@***.***> wrote:
@scrasmussen <https://github.com/scrasmussen> I talked to @Qingfu-Liu
<https://github.com/Qingfu-Liu>, and he has a few more things to add to
this PR before we're ready to merge. @Qingfu-Liu
<https://github.com/Qingfu-Liu> Let us know how this progresses. I'd like
to combine this with #150
<#150> and #168
<#168> if possible, and
those are ready to merge. If we need more time for this one, we can just
merge #150 <#150> and
#168 <#168> together
and do this one separately.
@grantfirl <https://github.com/grantfirl> I am not sure if I should
create a new PR or wait for @scrasmussen <https://github.com/scrasmussen>
to update this PR? I think we can't update the code changes for this PR (I
remember you try to update my PR, and can't do it).
@Qingfu-Liu <https://github.com/Qingfu-Liu> You can create a branch from
this one, put your changes on top of it, and then put a pull request into
this one for @scrasmussen <https://github.com/scrasmussen> to
approve/merge.
git remote add soren-fork https://github.com/scrasmussen/ccpp-physics
git fetch soren-fork
git checkout ufs/issue-1984-fix-warnings
git checkout -b qingfus_changes
Make your changes
git add [your changes]
git commit -m [your changes]
git push [to your fork]
Use the GitHub interface to start a PR from qingfus_changes branch into
@scrasmussen <https://github.com/scrasmussen>'s fork targeting the
ufs/issue-1984-fix-warnings branch.
Soren and I can review your changes. Once approved/merged, your changes
will show up in this PR.
—
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGTS6UQ2JIUVMJFZOETB3DTYSZCBHAVCNFSM6AAAAABBDTZ7HGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWGE4DMNRZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@Qingfu-Liu @scrasmussen This morning, @DusanJovic-NOAA mentioned that he is removing the compiler flag this is hiding all warnings, so, for getting rid of all warnings in the future, we shouldn't have to compile manually without the |
|
Closed in favor of #169 |
Description of Changes:
Changes to get rid of all the warnings, as pointed out in ufs-weather-model Issue#1984. The fixes for the second and third bullet points were intuited from how similar variables are treated in the code base, if different behavior is preferred please let me know!
warning #5462: Global name too long, shortened from
warnings: this issue may be already fixed by the Intel compiler, per their message board. I haven't had access to the newer Intel 2024.0.1 or 2024.0.2 versions to test.zmtb, zlwb, zogw
the warning was "unified_ugwp.F90(256): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value." This fix here is they are initialized to 0.0. The following table provides justification for setting the variable to 0, it's how they are always initialized.The
drain_cpl
anddsnow_cpl
warnings were "explicit INTENT(OUT) declaration is not given an explicit value". These variables are changed from intent(out) to intent(in) variables. This is to replicate the rain_cpl and snow_cpl variables.The
err_message
return value of two functions were not defined. The error message is defined as "" and if an error occurs in theopen
andwrite
statements it will return the error message. Note: this doesn't have the additionalerrflg
, as stated in the coding rules, figure that would be an issue for a different PR if we want it fixed?The last remaining warning message still needs to be fixed. It is
FV3/ccpp/physics/physics/dcyc2t3.f(184): warning #6843: A dummy argument with an explicit INTENT(OUT) declaration is not given an explicit value. [ADJSFCULW]
. This is only used in a print statement, so a possible fix is to change it from andintent(out)
variable to anintent(inout)
variable or remove it? I wasn't sure how to treat this one so would like input if possible, thanks!Tests Conducted:
Testing on Derecho with Intel Fortran 2023.2.1. Result of testing is as follows:
Dependencies:
None
Documentation:
No changes.
Issue (optional):
Fixes most issues mentioned in ufs-weather-model Issue#1984.