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

Overriding RT in CAM


Code:
We are interested in doing some experiments with CAM (and possibly WACCM_SC) where we override the WV values being fed to the radiation code in the model.

Ideally we'd like to use a version of CAM that uses RRTMG (I believe CAM5 and later), so that we can run RRTMG offline as well. I know how to do this with O3, as there is a "prescribed ozone file" variable in the user_nl_cam.<br /><br />But it seems as though the process is different for WV. Is there a straightforward way to do this?
 

santos

Member
Water vapor is a pretty special case in CAM; I really doubt that it's possible to prescribe it completely (nor would that really make sense for many processes in CAM5). It might be possible to intercept the value for H2O output by rad_constituents, to change the value as seen by RRTMG alone, but I don't know of a really "straightforward" change to do this. It might also be a bit weird; the radiation would see, for instance, cloud liquid that's consistent with the rest of CAM, but some prescribed water vapor that has no direct causal relationship with that state.
 
To be a bit more clear on what we want to do... We are looking to override the stratospheric water vapor field, so clouds shouldn't be an issue. And we are only interested in overriding it in the radiation scheme.
 

andrew

Member
Yes, I do not think this is supported or straightforward. IN principle the mechanism for ozone could be repeated...
 

eaton

CSEG and Liaisons
The radiation code knows where to get the water vapor field from (and all other gas/aerosol fields) by looking at the information in the namelist variable rad_climate.  The default rad_climate setting israd_climate  = 'A:Q:H2O', 'N:O2:O2', 'N:CO2:CO2', ...The first string says get water vapor (known by the radiation code as H2O) from field Q in the constituent array (which is designated by the A).  The A stands for advected species, and all the model's advected species live in the constituent array.  To create a new water vapor field (call it WV) that is comprised of Q in the troposphere and some specified values in the stratosphere the approach would be to write a module that adds the field WV to the physics buffer, and constructs the field at each timestep based on combining Q with specified values as appropriate.  To use this field in the radiation calculations you would simply replace the default string for water vapor as follows:rad_climate  = 'N:WV:H2O', 'N:O2:O2', 'N:CO2:CO2', ...The new string says to get the water vapor from the field WV in the physics buffer (which is denoted by the initial N).  The N stands for non-advected and tells the code to look for the field in the physics buffer rather than in the constituent array.The hard part of this exercise is putting together a module that creates the WV field, but once you've done that then applying it to the radiation calculation is straightforward. 
 

eaton

CSEG and Liaisons
I think the prescribed_ozone module would make an ideal template.  I'd start by making a copy of that file to something like prescribed_wv.F90 and just edit to make it specific to the new dataset.  You can search the source code to see where the ozone methods are called and imitate that for the new water vapor methods.  The advance method (prescribed_ozone_adv) already has state being passed as an arg which is where you'll find Q.
 
Top