Main menu


adding atmospheric heating

7 posts / 0 new
Last post
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!



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.

Sean Patrick Santos

CESM Software Engineering Group


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"
    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


Rosa, D. LBNL


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!



   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?


Dear LX

I am using CAM5 too, and I'm interested in the same queation as you, Did you get any answer about it or handle it by yourself?


Carlos Enciso



Log in or register to post comments

Who's new

  • rory
  • dangcheng111@...
  • yuxisuo2020@...
  • bryn.ronalds@...
  • brookeadams@...