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

adding atmospheric heating

I am using CAM5 to study the influence of the diabatic heating on the precipitation and I want to add a heating source in the atmosphere.I wonder if I can modify the ptend%s at the end of tphysac.F90 to add atmospheric heating or I should modify the parameters in the thermodynamic equation in the dynamical core.If I should modify the dynamic core,would you please give me some detail information and suggestions?Thank you very much!
 

santos

Member
My recommendation would be to modify tphysac rather than the dycore. It sounds like you are working with CESM 1.0.5. If you use a newer release, note that tphysac has been moved inside the "physpkg" module, and there are changes to how ptend objects work. For any given code version, you can get an idea of how to use ptend by looking at one of the simpler CAM interfaces, such as the one in tracers.F90.
 
Could we have a bit more explanations about how physics_ptend_init works?do ls,lu,lv,lq decide what to be updated and prevent updating fields if .false.?what's the use of psetcols?
Thank you! subroutine physics_ptend_init(ptend, psetcols, name, ls, lu, lv, lq)
!-----------------------------------------------------------------------
! Allocate the fields in the structure which are specified.
! Initialize the parameterization tendency structure to "empty"
!-----------------------------------------------------------------------
!------------------------------Arguments--------------------------------
    type(physics_ptend), intent(out)    :: ptend    ! Parameterization tendencies
    integer, intent(in)                 :: psetcols ! maximum number of columns
    character(len=*)                    :: name     ! optional name of parameterization which produced tendencies.
    logical, optional                   :: ls       ! if true, then fields to support dsdt are allocated
    logical, optional                   :: lu       ! if true, then fields to support dudt are allocated
    logical, optional                   :: lv       ! if true, then fields to support dvdt are allocated
    logical, dimension(pcnst),optional  :: lq       ! if true, then fields to support dqdt are allocated 
 

eaton

CSEG and Liaisons
Yes, the logical flags are set by the programmer to specify which tendencies will be set.  The physics_update method only applies tendencies to state variables when the logical flag is .true.psetcols is a generalization of the pcols parameter which allows us to treat subcolumns in the same way that grid columns are treated.  The subcolumn functionality is just starting to be implemented in CAM.  The parameter pcols is still the maximum number of grid columns in a chunk, and the new parameter, psubcols, is the maximum number of subcolumns in a grid column.  psetcols is pcols*psubcols.  The cesm1_2_x release only contains some minimal infrastructure changes which will be used to support parameterizations making use of subcolumns, but in it's current state it's not really a useable new feature.  So unless psubcols is changed from it's default of 1 via the configure commandline, psetcols will equal pcols.  The way to set this calling parameter in code (there are lots of examples of this) is to use state%psetcols.  What that insures is that the tendency arrays in the ptend object are the same size as the variables in the state object which they are intended to modify. 
 
Hello! I'm trying to add diabatic heating to tphysac.F90 in CAM5.1(CESM1.0.3) . I wonder that where the ptend%s should be changed? Just before "Energy budget checks" or anytime before calling physics_update? I would appreciate your kind help! Thanks!
 
Hi,   I am new to CESM. I need to add heating in the atmospheric column in particular horizontal locations (lat,lon). For that, Do I need to modify the physpkg.F90 module (in the last part of tphysac subroutine by modifying ptend%s and call physics_update thereafter)? Can you suggest me how to apply those changes in heating in particular lat,lon points?
 
Top