Open tlspero opened 1 month ago
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
Updated share/output_wrf.F to reflect comments from @weiwangncar.
@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.
@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
@tlspero Thanks! Next week would be fine.
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
@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.
@weiwangncar, this screenshot from the global attributes shows using WRF_PUT_DOM_TI_LOGICAL to output a logical variable in this PR. The logical variables are indeed converted from T/F to 1/0, as shown with the value of DIRECT_SW_FEEDBACK as 0 in the global attributes for a setting of .FALSE. in the WRF-CMAQ run. (The run is courtesy of my colleague, Jeff Willison, who is the co-sponsor of this PR.)
@tlspero Thanks..
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:
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).