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

Updated global attributes for auxiliary output as well as runs with WRF-CMAQ #2044

Open
wants to merge 2 commits into
base: release-v4.6.1
Choose a base branch
from

Conversation

tlspero
Copy link

@tlspero tlspero commented May 10, 2024

Updates global attributes in auxiliary history files and separately for WRF-CMAQ

TYPE: bug fix

KEYWORDS: metadata, global attributes, auxiliary output, auxiliary history, WRF-CMAQ

SOURCE: Tanya Spero and Jeff Willison (U.S. EPA)

DESCRIPTION OF CHANGES:
Problem:
The suite of global attributes is incomplete in auxiliary history files. Notably, the precipitation tipping bucket is among the fields not included. Separately, there is no metadata in the header to indicate when WRF-CMAQ is used.

Solution:
Changes are introduced in share/output_wrf.F to expand the use cases to write the full suite of global attributes to the metadata of auxiliary output files. In addition, two global attributes are added to the output only when the WRF-CMAQ model is invoked (WRF_CMAQ_OPTION and DIRECT_SW_FEEDBACK).

ISSUE: Fixes #1476

LIST OF MODIFIED FILES: share/output_wrf.F

TESTS CONDUCTED:

  1. Tests were conducted using the WRF model both with and without compiling with CMAQ. The base code was pulled from the branch "release-v4.6.0" on 8 May 2024. In both sets of tests on the EPA supercomputing system, an auxiliary output file was created in auxhist7. The global attributes were properly expanded to include the full suite of attributes in the auxiliary output file. The two new WRF-CMAQ coupled model attributes appeared when the WRF-CMAQ model was invoked.
  2. Did not conduct Jenkins testing.

RELEASE NOTE: Expanded global attributes to the full suite for auxiliary history files. Also added two global attributes when the WRF-CMAQ model is invoked (WRF_CMAQ_OPTION and DIRECT_SW_FEEDBACK).

@tlspero tlspero requested review from a team as code owners May 10, 2024 14:37
@islas islas changed the base branch from release-v4.6.0 to release-v4.6.1 May 16, 2024 20:09
@tlspero
Copy link
Author

tlspero commented Jun 13, 2024

Hi @islas!

I submitted this PR with the intent of moving into WRFv4.6, but I did not realize that you were prepping for release at the time that I put this forth. This PR has been idle, other than you reassigned it to WRFv4.6.1 and some regression tests are allegedly still "running". Please let me know how you'd like me to proceed on this. There are no reviewers assigned, and I think someone at NCAR needs to intervene to make that happen. This PR addresses an Issue that I opened three years ago but did not complete with Dave Gill.

--Tanya

!!! Expanded to include auxiliary history files. TLS 20 Jan 2021
!!! IF ( ( switch .EQ. input_only ) .OR. &
!!! ( switch .EQ. history_only ) .OR. &
!!! ( switch .EQ. restart_only ) ) THEN
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd suggest to remove these commented lines. One can retrieve old code fairly easily with git.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you, @weiwangncar!

Would you like me to remove my comments that include the nature of the change, e.g., L839 in the example above?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@tlspero I'd say we can remove that too. Making the purpose of your change clear in the commit message is sufficient. Thanks!

@tlspero
Copy link
Author

tlspero commented Jun 13, 2024

Updated share/output_wrf.F to reflect comments from @weiwangncar.

@weiwangncar
Copy link
Collaborator

@tlspero Does adding lbuf allow logical values to write out to the global attributes? Can you show an example? The reason I'm asking is that writing a logical namelist variable had not been an option in the past. If what you did here adds that function, that would be very helpful. We could potentially add more to the global attributes.

@tlspero
Copy link
Author

tlspero commented Jun 13, 2024

@weiwangncar --

We used the existing function, WRF_PUT_DOM_TI_LOGICAL, to add the logical variable to the global attributes. We had to create the local variable, LBUF, which we patterned after IBUF and RBUF. I believe the translation to the global attributes flipped the logical T/F to integer 1/0, but I would need to go back to recreate those output files to double-check. I think that we could continue using that function.

If you want me to recreate the output, I'll do that and add the output from "ncdump -h " here. It will be next week, though, due to schedule conflict this weekend.

@weiwangncar
Copy link
Collaborator

@tlspero Thanks! Next week would be fine.

@weiwangncar
Copy link
Collaborator

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None

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.

None yet

2 participants