Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Output Wet-Bulb Temperature and Wet-Bulb Specific Humidity

Hello,

I am attempting to get Wet-Bulb and Wet-Bulb specific humidity as output variables from CESM1 and CAM4/5. I have added the variable names (see below) to the cam_diagnostics.F90 and history_scam.F90 and placed them into the SourceMods directory. After running the simulation, the variables show up in the ncdump -h, but they are empty (fill value 0).

I have found calculations for wet-bulb in 3 files: cldwat.F90 cldwat2m_macro.F90 uwshcu.F90 .

and I have found 4 variables within those files called wet-bulb and wet-bulb specific humidity.

real(r8) tw0_in(mix,mkx) ! Wet bulb temperature [ K ]
real(r8) qw0_in(mix,mkx) ! Wet-bulb specific humidity [ kg/kg ]
real(r8) Twb_aw(pcols,pver) ! Wet-bulb temperature [K]
real(r8) qvwb_aw(pcols,pver) ! Wet-bulb water vapor specific humidity [kg/kg]

I am not sure how to proceed from here. Any leads?

-Jonathan Buzan
PhD Student, Earth and Atmospheric Sciences
Purdue University
jbuzan@purdue.edu
 

eaton

CSEG and Liaisons
There are a few steps involved in getting data into an output history file. The first step is to identify what data is to be output. The first question I have is what wet-bulb T and Q are you interested in? The physics package is incrementally updating the state to incorporate the effects of individual parameterizations. The wet-bulb T/Q values that are local to the prognostic cloud water or shallow cumulus schemes will not be consistent with the T and Q variables that are output to the history files. Of course the values from the cloud water or shallow cumulus, as well as any other spot in the physics parameterization, can be output if that's what you're interested in.

Once the variable to be output has been identified, the cam_history module provides the subroutines that need to be called to make that happen. To be specific I'll assume that wet-bulb quantities that are consistent with the output state are required. Since the output state is written to the history buffers from subroutine diag_phys_writeout (in the cam_diagnostics module), that would be best place to add the required outfld call. subroutine diag_init is where the addfld call would be made. In order for the new variable to be written by default to the history file, an add_default call would also be made. Otherwise the variable won't appear in a history file unless the appropriate fincl* namelist variable is used. Wet-bulb quantities are not currently computed in diag_phys_writeout, so a calculation of those quantities needs to be added there. The findsp subroutine that is used in other physics parameterizations for this purpose is not a public subroutine in any of those modules. So the easiest hack is just to copy it into the cam_diagnostics module.
 
Top