The Users Guide to CAM 5.3 includes these instructions
Example 5.1. Modify a radiatively active gas
Suppose that we wish to modify the distribution of water vapor that is seen by the radiation calculations. More specifically, consider modifying just the stratospheric part of the water vapor distribution while leaving the troposheric distribution unchanged. To modify a radiatively active gas two things must be done.
- Change the name (and possibly the type) of the constituent which is providing the mass mixing ratios to the radiation code. This is a simple modification to the rad_climate value.
- Make the necessary modifications to CAM to provide the new constituent mixing ratios. A likely scenario for this example would be to create a new module which is responsible for adding the modified water vapor field to the physics buffer. This module could leverage the existing tropopause module to determine the vertical levels where changes need to be made. It could also leverage existing modules for reading and interpolating prescribed constituents, for example the prescribed_ozone module. Details of how to make this type of source code modification won't be covered here.
Now suppose the source code modifications have been made and the new water vapor constituent is in the physics buffer with the name Q_fixstrat. The best way to modify the rad_climate variable is to start from a value that was generated by
build-namelist for the configuration of interest but with the default water vapor, and then to modify that version of rad_climate and add the modified version to the
build-namelist command in our run script. Note that the entire value of rad_climate must be specified. There is no way to just modify one individual string in the array of string values. If we are running with a default cam5 configuration then the customized namelist would be generated by the following command.
$camcfg/build-namelist ... \
-namelist "&cam ...
rad_climate =
'N:Q_fixstrat:H2O', 'N:O2:O2', 'N:CO2:CO2', 'N

zone:O3',
'N:N2O:N2O', 'N:CH4:CH4', 'N:CFC11:CFC11', 'N:CFC12:CFC12',
'M:mam3_mode1:/CSMDATA/atm/cam/physprops/mam3_mode1_rrtmg_c110318.nc',
'M:mam3_mode2:/CSMDATA/atm/cam/physprops/mam3_mode2_rrtmg_c110318.nc',
'M:mam3_mode3:/CSMDATA/atm/cam/physprops/mam3_mode3_rrtmg_c110318.nc' /"
The only difference between this version of rad_climate and the default is that the string for water vapor:
'A:Q:H2O'
has been replaced by
'N:Q_fixstrat:H2O'
In addition to specifying the new name for the constituent (Q_fixstrat), it was necessary to replace the A by an N since the new constituent is not advected, even though it is derived in part for the constituent Q which is advected.