Skip to content
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

Address compliance issues towards NCO HPC implementation standards for AQMv7 operational implementation #132

Merged
merged 3 commits into from
Nov 29, 2023

Conversation

rmontuoro
Copy link

This PR includes changes to allow AQMv7 to run on WCOSS2 after the code is built using the -check all compiler flag.

This is a requirement for the operational implementation of AQMv7.

NOTE: The proposed changes are limited to the AQMv7 operational configuration. Additional changes may be required for full compliance

Copy link
Collaborator

@JongilHan66 JongilHan66 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with "pointer" declaration in Fortran. Why are some variables declared as "pointer" while others are not?

@rmontuoro
Copy link
Author

I am not familiar with "pointer" declaration in Fortran. Why are some variables declared as "pointer" while others are not?

The pointer attribute for dummy arguments is used when unallocated actual pointer arguments are passed to subroutines.
For example, the pointer array dtend is only allocated if Model%ldiag3d is .true. https://github.com/NOAA-EMC/fv3atm/blob/23bbfcd6013447e248be5e64e834b5b98dc075cf/ccpp/data/GFS_typedefs.F90#L6908-L6909.

@JongilHan66
Copy link
Collaborator

I am not familiar with "pointer" declaration in Fortran. Why are some variables declared as "pointer" while others are not?

The pointer attribute for dummy arguments is used when unallocated actual pointer arguments are passed to subroutines. For example, the pointer array dtend is only allocated if Model%ldiag3d is .true. https://github.com/NOAA-EMC/fv3atm/blob/23bbfcd6013447e248be5e64e834b5b98dc075cf/ccpp/data/GFS_typedefs.F90#L6908-L6909.

Thanks!!

@BrianCurtis-NOAA
Copy link

@JongilHan66 is there a reason this was closed?

@RuiyuSun
Copy link
Collaborator

@JongilHan66 is there a reason this was closed?

I believe it was closed by a mistake. @JongilHan66 @BrianCurtis-NOAA

@climbfuji
Copy link

This PR needs a thorough discussion, there are many changes that are not really CCPP compliant ...

@climbfuji
Copy link

@rmontuoro Why are some conditionally allocated arrays declared as "pointer" while others are declared as "allocatable"? If I remember correctly, there is no difference between how these arrays are declared in the UFS. Does every variable that gets modified to be "pointer" or "allocatable" in this PR have the correct active attribute in the metadata?

@JongilHan66
Copy link
Collaborator

@JongilHan66 is there a reason this was closed?

I believe it was closed by a mistake. @JongilHan66 @BrianCurtis-NOAA

Sorry, it was a mistake.

@yangfanglin
Copy link
Collaborator

@rmontuoro Raffaele, More discussion among the parties involved including NCO is required to make UFS/CCPP code comply with both CCPP and NCO EE2 standards. It will take some time to coordinate and find a solution. Committing your modifications back to CCPP authoritative repo is questionable at the moment. Since the submission of AQMv7 code to NCO is imminent, I'd recommend we use a branch or fork of the CCPP with your modifications included for AQMv7 code handoff. Of course, this may not be the best solution. Other suggestions are welcome (@climbfuji @grantfirl @dustinswales @ligiabernardet @junwang-noaa )

@BrianCurtis-NOAA
Copy link

I'd recommend we use a branch or fork of the CCPP with your modifications included for AQMv7 code handoff.

@yangfanglin This PR is requesting a merge into ufs-community:production/AQM.v7 is this sufficient?

@climbfuji
Copy link

@BrianCurtis-NOAA I'll reopen the PR, it got closed yesterday by mistake.

@climbfuji climbfuji reopened this Nov 22, 2023
@junwang-noaa
Copy link

As @rmontuoro The code changes are limited to AQMv7 configuration, it might be good to list some sample warning message for further discussion. From code commit point of view, I think it is safe to commit to production/AQMv7 branch, which has a revision from Jan 2023. I was told HAFSv2 needs to freeze the code in Jan 2024, so we may need to discuss a solution to fix the warning message with "-check all" compile option in the develop branch.

@climbfuji
Copy link

@grantfirl @mkavulich @dustinswales I noticed the CI tests are failing, but at first glance this doesn't look like being related to the changes in this PR?

@rmontuoro
Copy link
Author

@yangfanglin, @climbfuji - This PR is intended to introduce changes to the production/AQM.v7 branch only. Such changes are required for EE2 compliance and are limited to the AQMv7 configuration only. I agree and look forward to a conversation with CCPP developers to find a way forward for future operational implementations including CCPP.

@yangfanglin
Copy link
Collaborator

@rmontuoro, agreed with the temporary solution for AQMv7. Ligia has set up a meeting to discuss for a future solution. I have asked for a few EMC developers and Steven Earle to be included in the discussion.

@gold2718
Copy link

I would also like to see the warning messages that prompted this approach.
I am having trouble creating a test that reproduces this problem so that we can explore the solution space.

@grantfirl
Copy link
Collaborator

@rmontuoro Could you start an issue in this repository that details exactly the problem that is showing up with -check all on WCOSS2?

I agree with the temporary solution of isolating these changes to the production/AQM.v7 branch for now.

@mkavulich
Copy link
Collaborator

@grantfirl @mkavulich @dustinswales I noticed the CI tests are failing, but at first glance this doesn't look like being related to the changes in this PR?

That's correct, it appears this failure occurs in the main branch as well:

https://github.com/ufs-community/ccpp-physics/actions/runs/6935248044/job/18865022199

@grantfirl
Copy link
Collaborator

@grantfirl @mkavulich @dustinswales I noticed the CI tests are failing, but at first glance this doesn't look like being related to the changes in this PR?

That's correct, it appears this failure occurs in the main branch as well:

https://github.com/ufs-community/ccpp-physics/actions/runs/6935248044/job/18865022199

Yes, this is a known failure. I have started a branch to fix this. It looks like we can probably use the new (in 3.7) str.isascii() in the check_encoding.py script to fix this as long as GitHub CI can use python 3.7 or later.

@grantfirl
Copy link
Collaborator

grantfirl commented Nov 27, 2023

@mkavulich @climbfuji FYI: #133

This appears to fix the CI failure, although I need to test it by injecting a non-ASCII character into a scheme and see if the script successfully detects it.

@JianpingHuang-NOAA
Copy link

@yangfanglin Here is the error message when the ufs-weateher-model was compiled with the flag of " -check noarg_temp_created" in the CCPP physics that Brian created.

https://ftp.emc.ncep.noaa.gov/mmb/aq/aqm.v7/errfile

Jianping

@grantfirl
Copy link
Collaborator

@yangfanglin Here is the error message when the ufs-weateher-model was compiled with the flag of " -check noarg_temp_created" in the CCPP physics that Brian created.

https://ftp.emc.ncep.noaa.gov/mmb/aq/aqm.v7/errfile

Jianping

@JianpingHuang-NOAA I don't see anything pointing to a CCPP problem in that logfile, although if I try to reproduce an error on Hera using ufs-community/ufs-weather-model#2007, NOAA-EMC/fv3atm#725, and the top of the ufs-community:production/AQM.v7 branch, I get the following runtime error:
err.txt

@yangfanglin
Copy link
Collaborator

@JianpingHuang-NOAA I thought there are also runtime Warnings in the forecast log file related to CCPP Raffaele (@rmontuoro ) pointed out. Can you find them and copy a few lines to this PR ?

@rmontuoro
Copy link
Author

@yangfanglin - Issue #134 includes one of the runtime error messages occurring in AQMv7.

@grantfirl
Copy link
Collaborator

@yangfanglin - Issue #134 includes one of the runtime error messages occurring in AQMv7.

Thanks. That is the same error that I can reproduce on Hera.

Copy link

@climbfuji climbfuji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on today's conversation. For the record, we are going to work on a separate PR for develop that addresses NCO compliancy and CCPP requirements.

Copy link
Collaborator

@grantfirl grantfirl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rmontuoro @BrianCurtis-NOAA @dustinswales @JianpingHuang-NOAA @junwang-noaa @aerorahul @climbfuji @mkavulich @scrasmussen and I all met offline to discuss this PR. We all agreed that it is fine for this PR to go into the production/AQM.v7 branch and that we'll introduce PRs into fv3atm and ccpp-physics that should be able to pass the -check all compilation flag in the near future for the develop and ufs/dev branches, respectively.

@yangfanglin
Copy link
Collaborator

Sorry I missed the meeting due to a conflict. The solution you reached at the meeting makes a lot of sense.

@grantfirl
Copy link
Collaborator

@rmontuoro Let me know when you're ready to merge. If you have permissions, you can feel free to do so too.

@rmontuoro
Copy link
Author

@rmontuoro Let me know when you're ready to merge. If you have permissions, you can feel free to do so too.

@grantfirl - we are ready to merge.

@climbfuji
Copy link

I'll do it.

@climbfuji climbfuji merged commit f039816 into ufs-community:production/AQM.v7 Nov 29, 2023
4 of 6 checks passed
@Qingfu-Liu Qingfu-Liu assigned Qingfu-Liu and unassigned Qingfu-Liu Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.