diff --git a/doc/ChangeLog b/doc/ChangeLog
index 22edc3e0..3f7a758e 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,61 @@
===============================================================
+Tag name: atmos_phys0_04_000
+Originator(s): jet
+Date: May 3, 2024
+One-line Summary: dadadj CCPP mods
+Github PR URL: https://github.com/ESCOMP/atmospheric_physics/pull/91
+
+This PR fixes the following NCAR/atmospheric_physics Github issues:
+ - Creates the CCPP interface for the dadadj routine
+ - dadadj.F90 routine was slightly refactored to update the logic and syntax
+
+Additionally it was discovered that the temporary variable for cappa interface was
+ not set properly each time through the loop that makes the dry adiabatic adjustment.
+ This bug was fixed as part of this PR with the following line.
+
+ cappaint = 0.5_kind_phys*(cappa(i,k+1) + cappa(i,k))
+
+Code reviewed by: nusbaume, cacraigucar
+
+List all existing files that have been added (A), modified (M), or deleted (D),
+and describe the changes:
+
+A dry_adiabatic_adjust/dadadj_apply_qv_tendency.F90 - temp file to update constituent tendency
+A dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta - SIMA meta file for F90 routine
+A dry_adiabatic_adjust/dadadj.F90 - minor refactor to the cam routine - CCPP'ize
+A dry_adiabatic_adjust/dadadj.meta - SIMA meta file for F90 routine
+A dry_adiabatic_adjust/dadadj_namelist.xml
+M doc/ChangeLog
+A test/test_sdfs/suite_dry_adiabatic_adjust.xml - CCPP suite file for testing
+M suite_cam7.xml - added dry adiabatic adjust to cam7 CCPP suite file
+M NamesNotInDictionary.txt - updated with current set of names
+
+List and Describe any test failures:
+ - Tested in CAM
+ Because dadadj doesn't normally get tripped I modified the Temp
+ profile to create an instability where the code would be exercised.
+ The snapshot files contain this instability. The modification adds
+ 60 degrees to the layer 2 temperature.
+
+ --- /project/amp/jet/collections/cam6_3_160_dryadj.042924.1856/src/dynamics/se/dyn_comp.F90
+ 2024-05-02 16:56:49.746341064 -0600
+ +++ SourceMods/src.cam/dyn_comp.F90 2024-05-02 16:37:13.171433366 -0600
+ @@ -1429,6 +1429,7 @@
+ do j = 1, np
+ do i = 1, np
+ elem(ie)%state%T(i,j,:,1) = dbuf3(indx,:,ie)
++ elem(ie)%state%T(i,j,2,1) = dbuf3(indx,2,ie) + 60._r8
+ indx = indx + 1
+ end do
+ end do
+
+Summarize any changes to answers:
+ - none: base code includes the same mod above to exercise code.
+
+===============================================================
+===============================================================
+
Tag name: atmos_phys0_03_00
Originator(s): mwaxmonsky
Date: June 18, 2024
@@ -61,6 +117,7 @@ water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
********** End Physics Check Data Results **********
+===============================================================
===============================================================
Tag name: atmos_phys0_02_006
diff --git a/doc/NamesNotInDictionary.txt b/doc/NamesNotInDictionary.txt
index 4ea45472..bcb6f51d 100644
--- a/doc/NamesNotInDictionary.txt
+++ b/doc/NamesNotInDictionary.txt
@@ -1,21 +1,43 @@
#######################
Date/time of when script was run:
-2024-06-20 11:25:12.714233
+2024-07-12 11:08:18.467654
#######################
Non-dictionary standard names found in the following metadata files:
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/utilities/geopotential_temp.meta
+atmospheric_physics.jt.062024/utilities/geopotential_temp.meta
- air_pressure_at_interface
- ln_air_pressure_at_interface
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/zhang_mcfarlane/zm_conv_momtran.meta
+atmospheric_physics.jt.062024/zhang_mcfarlane/zm_conv_convtran.meta
+
+ - atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns
+ - atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns
+ - atmosphere_downdraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns
+ - atmosphere_updraft_convective_mass_flux_for_deep_convection_for_convective_columns
+ - atmosphere_updraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns
+ - current_timestep_number
+ - flag_for_zhang_mcfarlane_deep_convective_transport?
+ - fraction_of_water_insoluble_convectively_transported_species
+ - horizontal_index_of_convective_columns_for_deep_convection_for_convective_columns
+ - maximum_number_of_grid_cells_with_deep_convection?
+ - minimum_number_of_grid_cells_with_deep_convection?
+ - pressure_thickness_for_deep_convection_for_convective_columns
+ - pressure_thickness_for_subcloud_layer_for_deep_convection_for_convective_columns
+ - pressure_thickness_of_dry_air_for_deep_convection_for_convective_columns?
+ - tendency_of_ccpp_constituents?
+ - vertical_index_at_top_of_deep_convection_for_convective_columns
+ - vertical_index_of_deep_conveciton_launch_level_for_convective_columns
+
+--------------------------
+
+atmospheric_physics.jt.062024/zhang_mcfarlane/zm_conv_momtran.meta
- atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns
- atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns
@@ -42,7 +64,33 @@ Non-dictionary standard names found in the following metadata files:
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/zhang_mcfarlane/zm_convr.meta
+atmospheric_physics.jt.062024/zhang_mcfarlane/zm_conv_evap.meta
+
+ -
+ - cloud_area_fraction
+ - flag_for_zhang_mcfarlane_convective_organization_parameterization?
+ - freezing_point_of_water?
+ - frozen_precipitation_mass_flux_at_interface_due_to_deep_convection?
+ - heating_rate
+ - latent_heat_of_fusion_of_water_at_0c?
+ - latent_heat_of_vaporization_of_water_at_0c?
+ - lwe_frozen_precipitation_rate_at_surface_due_to_deep_convection
+ - lwe_precipitation_rate_at_surface_due_to_deep_convection
+ - precipitation_mass_flux_at_interface_due_to_deep_convection?
+ - pressure_thickness
+ - specific_heat_of_dry_air_at_constant_pressure?
+ - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_melt?
+ - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_production_in_deep_convection?
+ - tendency_of_frozen_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection?
+ - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection?
+ - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection_excluding_subcloud_evaporation
+ - tendency_of_water_vapor_mixing_ratio_wrt_moist_air and_condensed_water?
+ - tunable_evaporation_efficiency_for_land_in_zhang_mcfarlane_deep_convection_scheme?
+ - tunable_evaporation_efficiency_in_zhang_mcfarlane_deep_convection_scheme?
+
+--------------------------
+
+atmospheric_physics.jt.062024/zhang_mcfarlane/zm_convr.meta
- air_pressure_at_interface
- atmosphere_convective_mass_flux_due_to all_convection?
@@ -98,55 +146,23 @@ Non-dictionary standard names found in the following metadata files:
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/zhang_mcfarlane/zm_conv_convtran.meta
+atmospheric_physics.jt.062024/dry_adiabatic_adjust/dadadj.meta
- - atmosphere_detrainment_convective_mass_flux_for_deep_convection_for_convective_columns
- - atmosphere_downdraft_convective_mass_flux_for_deep_convection_for_convective_columns
- - atmosphere_downdraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns
- - atmosphere_updraft_convective_mass_flux_for_deep_convection_for_convective_columns
- - atmosphere_updraft_entrainment_convective_mass_flux_for_deep_convection_for_convective_columns
- - current_timestep_number
- - flag_for_zhang_mcfarlane_deep_convective_transport?
- - fraction_of_water_insoluble_convectively_transported_species
- - horizontal_index_of_convective_columns_for_deep_convection_for_convective_columns
- - maximum_number_of_grid_cells_with_deep_convection?
- - minimum_number_of_grid_cells_with_deep_convection?
- - pressure_thickness_for_deep_convection_for_convective_columns
- - pressure_thickness_for_subcloud_layer_for_deep_convection_for_convective_columns
- - pressure_thickness_of_dry_air_for_deep_convection_for_convective_columns?
- - tendency_of_ccpp_constituents?
- - vertical_index_at_top_of_deep_convection_for_convective_columns
- - vertical_index_of_deep_conveciton_launch_level_for_convective_columns
+ - air_pressure_at_interface
+ - binary_indicator_for_dry_adiabatic_adjusted_grid_cell
+ - number_of_iterations_for_dry_adiabatic_adjustment_algorithm_convergence
+ - number_of_vertical_levels_from_model_top_where_dry_adiabatic_adjustment_occurs
+ - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/zhang_mcfarlane/zm_conv_evap.meta
+atmospheric_physics.jt.062024/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta
- -
- - cloud_area_fraction
- - flag_for_zhang_mcfarlane_convective_organization_parameterization?
- - freezing_point_of_water?
- - frozen_precipitation_mass_flux_at_interface_due_to_deep_convection?
- - heating_rate
- - latent_heat_of_fusion_of_water_at_0c?
- - latent_heat_of_vaporization_of_water_at_0c?
- - lwe_frozen_precipitation_rate_at_surface_due_to_deep_convection
- - lwe_precipitation_rate_at_surface_due_to_deep_convection
- - precipitation_mass_flux_at_interface_due_to_deep_convection?
- - pressure_thickness
- - specific_heat_of_dry_air_at_constant_pressure?
- - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_melt?
- - tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_frozen_precipitation_production_in_deep_convection?
- - tendency_of_frozen_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection?
- - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection?
- - tendency_of_precipitation_wrt_moist_air_and_condensed_water_due_to_deep_convection_excluding_subcloud_evaporation
- - tendency_of_water_vapor_mixing_ratio_wrt_moist_air and_condensed_water?
- - tunable_evaporation_efficiency_for_land_in_zhang_mcfarlane_deep_convection_scheme?
- - tunable_evaporation_efficiency_in_zhang_mcfarlane_deep_convection_scheme?
+ - tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/tj2016/tj2016_precip.meta
+atmospheric_physics.jt.062024/tj2016/tj2016_precip.meta
- gas_constant_of_water_vapor
- lwe_large_scale_precipitation_rate_at_surface
@@ -155,7 +171,7 @@ Non-dictionary standard names found in the following metadata files:
--------------------------
-/home/mwaxmonsky/source/atmospheric_physics-mwaxmonsky/tj2016/tj2016_sfc_pbl_hs.meta
+atmospheric_physics.jt.062024/tj2016/tj2016_sfc_pbl_hs.meta
- air_pressure_at_interface
- eddy_heat_diffusivity
diff --git a/dry_adiabatic_adjust/dadadj.F90 b/dry_adiabatic_adjust/dadadj.F90
new file mode 100644
index 00000000..18d0a0a3
--- /dev/null
+++ b/dry_adiabatic_adjust/dadadj.F90
@@ -0,0 +1,218 @@
+module dadadj
+ !=======================================================================
+ ! GFDL style dry adiabatic adjustment
+ !
+ ! Method:
+ ! if stratification is unstable, adjustment to the dry adiabatic lapse
+ ! rate is forced subject to the condition that enthalpy is conserved.
+ !=======================================================================
+
+ use ccpp_kinds, only: kind_phys
+
+ implicit none
+ private
+ save
+
+ public :: dadadj_init ! init routine
+ public :: dadadj_run ! main routine
+
+ integer :: nlvdry ! number of layers from top of model to apply the adjustment
+ integer :: niter ! number of iterations for convergence
+
+CONTAINS
+
+ !> \section arg_table_dadadj_init Argument Table
+ !! \htmlinclude dadadj_init.html
+ subroutine dadadj_init(dadadj_nlvdry, dadadj_niter, nz, errmsg, errflg)
+ !------------------------------------------------
+ ! Input / output parameters
+ !------------------------------------------------
+ integer, intent(in) :: dadadj_nlvdry
+ integer, intent(in) :: dadadj_niter
+ integer, intent(in) :: nz
+ character(len=512), intent(out) :: errmsg
+ integer, intent(out) :: errflg
+
+ errmsg = ''
+ errflg = 0
+
+ if (dadadj_nlvdry >= nz .or. dadadj_nlvdry < 0) then
+ errflg = 1
+ write(errmsg,*) 'dadadj_init: dadadj_nlvdry=',dadadj_nlvdry,' but must be less than the number of vertical levels ',&
+ '(',nz,'), and must be a positive integer.'
+ end if
+
+ nlvdry = dadadj_nlvdry
+ niter = dadadj_niter
+
+ end subroutine dadadj_init
+
+ !> \section arg_table_dadadj_run Argument Table
+ !! \htmlinclude dadadj_run.html
+ subroutine dadadj_run( &
+ ncol, nz, dt, pmid, pint, pdel, state_t, state_q, cappa, cpair, s_tend, &
+ q_tend, dadpdf, scheme_name, errmsg, errflg)
+
+ !------------------------------------------------
+ ! Input / output parameters
+ !------------------------------------------------
+ integer, intent(in) :: ncol ! number of atmospheric columns
+ integer, intent(in) :: nz ! number of atmospheric levels
+ real(kind_phys), intent(in) :: dt ! physics timestep
+ real(kind_phys), intent(in) :: pmid(:,:) ! pressure at model levels
+ real(kind_phys), intent(in) :: pint(:,:) ! pressure at model interfaces
+ real(kind_phys), intent(in) :: pdel(:,:) ! vertical delta-p
+ real(kind_phys), intent(in) :: cappa(:,:) ! variable Kappa
+ real(kind_phys), intent(in) :: cpair(:,:) ! heat capacity of air
+ real(kind_phys), intent(in) :: state_t(:,:) ! temperature (K)
+ real(kind_phys), intent(in) :: state_q(:,:) ! specific humidity
+ real(kind_phys), intent(out) :: s_tend(:,:) ! dry air enthalpy tendency
+ real(kind_phys), intent(out) :: q_tend(:,:) ! specific humidity tendency
+ real(kind_phys), intent(out) :: dadpdf(:,:) ! PDF of where adjustments happened
+
+ character(len=64), intent(out) :: scheme_name
+ character(len=512), intent(out) :: errmsg
+ integer, intent(out) :: errflg
+
+ !------------------------------------------------
+ ! Local variables
+ !------------------------------------------------
+
+ integer :: i,k ! longitude, level indices
+ integer :: jiter ! iteration index
+ real(kind_phys), allocatable :: c1dad(:) ! intermediate constant
+ real(kind_phys), allocatable :: c2dad(:) ! intermediate constant
+ real(kind_phys), allocatable :: c3dad(:) ! intermediate constant
+ real(kind_phys), allocatable :: c4dad(:) ! intermediate constant
+ real(kind_phys) :: gammad ! dry adiabatic lapse rate (deg/Pa)
+ real(kind_phys) :: zeps ! convergence criterion (deg/Pa)
+ real(kind_phys) :: rdenom ! reciprocal of denominator of expression
+ real(kind_phys) :: dtdp ! delta-t/delta-p
+ real(kind_phys) :: zepsdp ! zeps*delta-p
+ real(kind_phys) :: zgamma ! intermediate constant
+ real(kind_phys) :: qave ! mean q between levels
+ real(kind_phys) :: cappaint ! Kappa at level intefaces
+ real(kind_phys) :: t(ncol,nz)
+ real(kind_phys) :: q(ncol,nz)
+
+ logical :: ilconv ! .TRUE. ==> convergence was attained
+ logical :: dodad(ncol) ! .TRUE. ==> do dry adjustment
+
+ !-----------------------------------------------------------------------
+
+ zeps = 2.0e-5_kind_phys ! set convergence criteria
+ errmsg = ''
+ errflg = 0
+ scheme_name = 'DADADJ'
+
+ allocate(c1dad(nlvdry), stat=errflg)
+ if (errflg /= 0) then
+ errmsg = trim(scheme_name)//': Allocate of c1dad(nlvdry) failed'
+ return
+ end if
+ allocate(c2dad(nlvdry), stat=errflg)
+ if (errflg /= 0) then
+ errmsg = trim(scheme_name)//': Allocate of c2dad(nlvdry) failed'
+ return
+ end if
+ allocate(c3dad(nlvdry), stat=errflg)
+ if (errflg /= 0) then
+ errmsg = trim(scheme_name)//': Allocate of c3dad(nlvdry) failed'
+ return
+ end if
+ allocate(c4dad(nlvdry), stat=errflg)
+ if (errflg /= 0) then
+ errmsg = trim(scheme_name)//': Allocate of c4dad(nlvdry) failed'
+ return
+ end if
+
+ t = state_t
+ q = state_q
+
+ ! Find gridpoints with unstable stratification
+
+ do i = 1, ncol
+ cappaint = 0.5_kind_phys*(cappa(i,2) + cappa(i,1))
+ gammad = cappaint*0.5_kind_phys*(t(i,2) + t(i,1))/pint(i,2)
+ dtdp = (t(i,2) - t(i,1))/(pmid(i,2) - pmid(i,1))
+ dodad(i) = (dtdp + zeps) > gammad
+ end do
+
+ dadpdf(:ncol,:) = 0._kind_phys
+ do k= 2, nlvdry
+ do i = 1, ncol
+ cappaint = 0.5_kind_phys*(cappa(i,k+1) + cappa(i,k))
+ gammad = cappaint*0.5_kind_phys*(t(i,k+1) + t(i,k))/pint(i,k+1)
+ dtdp = (t(i,k+1) - t(i,k))/(pmid(i,k+1) - pmid(i,k))
+ dodad(i) = dodad(i) .or. (dtdp + zeps) > gammad
+ if ((dtdp + zeps) > gammad) then
+ dadpdf(i,k) = 1._kind_phys
+ end if
+ end do
+ end do
+
+ ! Make a dry adiabatic adjustment
+ ! Note: nlvdry ****MUST**** be < pver
+
+ COL: do i = 1, ncol
+
+ if (dodad(i)) then
+
+ zeps = 2.0e-5_kind_phys
+
+ do k = 1, nlvdry
+ cappaint = 0.5_kind_phys*(cappa(i,k+1) + cappa(i,k))
+ c1dad(k) = cappaint*0.5_kind_phys*(pmid(i,k+1)-pmid(i,k))/pint(i,k+1)
+ c2dad(k) = (1._kind_phys - c1dad(k))/(1._kind_phys + c1dad(k))
+ rdenom = 1._kind_phys/(pdel(i,k)*c2dad(k) + pdel(i,k+1))
+ c3dad(k) = rdenom*pdel(i,k)
+ c4dad(k) = rdenom*pdel(i,k+1)
+ end do
+
+ ilconv = .false.
+
+ DBLZEP: do while (.not. ilconv)
+
+ do jiter = 1, niter
+ ilconv = .true.
+
+ do k = 1, nlvdry
+ zepsdp = zeps*(pmid(i,k+1) - pmid(i,k))
+ zgamma = c1dad(k)*(t(i,k) + t(i,k+1))
+
+ if ((t(i,k+1)-t(i,k)) >= (zgamma+zepsdp)) then
+ ilconv = .false.
+ t(i,k+1) = t(i,k)*c3dad(k) + t(i,k+1)*c4dad(k)
+ t(i,k) = c2dad(k)*t(i,k+1)
+ qave = (pdel(i,k+1)*q(i,k+1) + pdel(i,k)*q(i,k))/(pdel(i,k+1)+ pdel(i,k))
+ q(i,k+1) = qave
+ q(i,k) = qave
+ end if
+
+ end do
+
+ if (ilconv) cycle COL ! convergence => next longitude
+
+ end do
+
+ zeps = zeps + zeps
+ if (zeps > 1.e-4_kind_phys) then
+ errflg = i
+ write(errmsg,*) trim(scheme_name)//': Convergence failure at column ',i,' zeps > 1.e-4 '// &
+ '(errflg set to failing column index)'
+ return ! error return
+ end if
+ end do DBLZEP
+
+ end if
+
+ end do COL
+
+ s_tend = (t - state_t)/dt*cpair
+ q_tend = (q - state_q)/dt
+
+ deallocate(c1dad, c2dad, c3dad, c4dad)
+
+ end subroutine dadadj_run
+
+end module dadadj
diff --git a/dry_adiabatic_adjust/dadadj.meta b/dry_adiabatic_adjust/dadadj.meta
new file mode 100644
index 00000000..ee423db0
--- /dev/null
+++ b/dry_adiabatic_adjust/dadadj.meta
@@ -0,0 +1,147 @@
+[ccpp-table-properties]
+ name = dadadj
+ type = scheme
+[ccpp-arg-table]
+ name = dadadj_init
+ type = scheme
+[ dadadj_nlvdry ]
+ standard_name = number_of_vertical_levels_from_model_top_where_dry_adiabatic_adjustment_occurs
+ units = count
+ type = integer
+ dimensions = ()
+ intent = in
+[ dadadj_niter ]
+ standard_name = number_of_iterations_for_dry_adiabatic_adjustment_algorithm_convergence
+ units = count
+ type = integer
+ dimensions = ()
+ intent = in
+[ nz ]
+ standard_name = vertical_layer_dimension
+ long_name = number of vertical layers
+ units = count
+ dimensions = ()
+ type = integer
+ intent = in
+[ errmsg ]
+ standard_name = ccpp_error_message
+ long_name = Error message for error handling in CCPP
+ units = none
+ type = character | kind = len=512
+ dimensions = ()
+ intent = out
+[ errflg ]
+ standard_name = ccpp_error_code
+ long_name = Error code for error handling in CCPP
+ units = 1
+ type = integer
+ dimensions = ()
+ intent = out
+
+#########################################################
+[ccpp-arg-table]
+ name = dadadj_run
+ type = scheme
+[ ncol ]
+ standard_name = horizontal_loop_extent
+ long_name = number of columns
+ units = count
+ dimensions = ()
+ type = integer
+ intent = in
+[ nz ]
+ standard_name = vertical_layer_dimension
+ long_name = number of vertical layers
+ units = count
+ dimensions = ()
+ type = integer
+ intent = in
+[ dt ]
+ standard_name = timestep_for_physics
+ long_name = time step
+ units = s
+ dimensions = ()
+ type = real | kind = kind_phys
+ intent = in
+[ pmid ]
+ standard_name = air_pressure
+ units = Pa
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent,vertical_layer_dimension)
+ intent = in
+[ pint ]
+ standard_name = air_pressure_at_interface
+ units = Pa
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent,vertical_interface_dimension)
+ intent = in
+[ pdel ]
+ standard_name = air_pressure_thickness
+ units = Pa
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent,vertical_layer_dimension)
+ intent = in
+[ state_t ]
+ standard_name = air_temperature
+ type = real | kind = kind_phys
+ units = K
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ intent = in
+[ state_q ]
+ standard_name = water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
+ long_name = mass mixing ratio of water vapor / dry air
+ advected = True
+ units = kg kg-1
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ type = real | kind = kind_phys
+ intent = in
+[ cappa ]
+ standard_name = composition_dependent_ratio_of_dry_air_gas_constant_to_specific_heat_of_dry_air_at_constant_pressure
+ units = 1
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ type = real | kind = kind_phys
+ intent = in
+[ cpair ]
+ standard_name = composition_dependent_specific_heat_of_dry_air_at_constant_pressure
+ units = J kg-1 K-1
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ type = real | kind = kind_phys
+ intent = in
+[ s_tend ]
+ standard_name = tendency_of_dry_air_enthalpy_at_constant_pressure
+ units = J kg-1 s-1
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent,vertical_layer_dimension)
+ intent = out
+[ q_tend ]
+ standard_name = tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
+ units = kg kg-1 s-1
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ intent = out
+[ dadpdf ]
+ standard_name = binary_indicator_for_dry_adiabatic_adjusted_grid_cell
+ units = fraction
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ intent = out
+[ scheme_name ]
+ standard_name = scheme_name
+ units = none
+ type = character | kind = len=64
+ dimensions = ()
+ intent = out
+[ errmsg ]
+ standard_name = ccpp_error_message
+ long_name = Error message for error handling in CCPP
+ units = none
+ type = character | kind = len=512
+ dimensions = ()
+ intent = out
+[ errflg ]
+ standard_name = ccpp_error_code
+ long_name = Error code for error handling in CCPP
+ units = 1
+ type = integer
+ dimensions = ()
+ intent = out
diff --git a/dry_adiabatic_adjust/dadadj_apply_qv_tendency.F90 b/dry_adiabatic_adjust/dadadj_apply_qv_tendency.F90
new file mode 100644
index 00000000..5987e313
--- /dev/null
+++ b/dry_adiabatic_adjust/dadadj_apply_qv_tendency.F90
@@ -0,0 +1,33 @@
+module dadadj_apply_qv_tendency
+
+ use ccpp_kinds, only: kind_phys
+
+ implicit none
+ private
+
+ public :: dadadj_apply_qv_tendency_run
+
+CONTAINS
+
+ !> \section arg_table_dadadj_apply_qv_tendency_run Argument Table
+ !! \htmlinclude dadadj_apply_qv_tendency_run.html
+ subroutine dadadj_apply_qv_tendency_run(q_tend, state_q, dt, errmsg, errcode)
+
+ ! update the constituent state.
+ ! Replace this with standard constitutent update function.
+
+ ! Dummy arguments
+ real(kind_phys), intent(in) :: q_tend(:,:) ! water vapor tendency
+ real(kind_phys), intent(inout) :: state_q(:,:) ! water vapor
+ real(kind_phys), intent(in) :: dt ! physics time step
+ character(len=512), intent(out) :: errmsg
+ integer, intent(out) :: errcode
+
+ errcode = 0
+ errmsg = ''
+
+ state_q = state_q + (q_tend * dt)
+
+ end subroutine dadadj_apply_qv_tendency_run
+
+end module dadadj_apply_qv_tendency
diff --git a/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta b/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta
new file mode 100644
index 00000000..7b2b2f59
--- /dev/null
+++ b/dry_adiabatic_adjust/dadadj_apply_qv_tendency.meta
@@ -0,0 +1,42 @@
+[ccpp-table-properties]
+ name = dadadj_apply_qv_tendency
+ type = scheme
+#########################################################
+[ccpp-arg-table]
+ name = dadadj_apply_qv_tendency_run
+ type = scheme
+[ q_tend ]
+ standard_name = tendency_of_water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
+ units = kg kg-1 s-1
+ type = real | kind = kind_phys
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ intent = in
+[ state_q ]
+ standard_name = water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
+ long_name = mass mixing ratio of water vapor / moist air and condensed water
+ advected = True
+ units = kg kg-1
+ dimensions = (horizontal_loop_extent, vertical_layer_dimension)
+ type = real | kind = kind_phys
+ intent = inout
+[ dt ]
+ standard_name = timestep_for_physics
+ long_name = time step
+ units = s
+ dimensions = ()
+ type = real | kind = kind_phys
+ intent = in
+[ errmsg ]
+ standard_name = ccpp_error_message
+ long_name = Error message for error handling in CCPP
+ units = none
+ type = character | kind = len=512
+ dimensions = ()
+ intent = out
+[ errcode ]
+ standard_name = ccpp_error_code
+ long_name = Error flag for error handling in CCPP
+ units = 1
+ type = integer
+ dimensions = ()
+ intent = out
diff --git a/dry_adiabatic_adjust/dadadj_namelist.xml b/dry_adiabatic_adjust/dadadj_namelist.xml
new file mode 100644
index 00000000..27504b75
--- /dev/null
+++ b/dry_adiabatic_adjust/dadadj_namelist.xml
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+
+
+ integer
+ dry_conv_adj
+ dadadj_nl
+ number_of_vertical_levels_from_model_top_where_dry_adiabatic_adjustment_occurs
+ count
+
+ Number of layers from the top of the model over which to do dry adiabatic adjustment.
+ Must be less than plev (the number of vertical levels).
+
+
+ 3
+
+
+
+ integer
+ dry_conv_adj
+ dadadj_nl
+ number_of_iterations_for_dry_adiabatic_adjustment_algorithm_convergence
+ count
+
+ The maximum number of iterations to achieve convergence in dry adiabatic adjustment.
+ For WACCM-X it can be advantageous to use a number which is much higher than the default CAM value.
+
+
+ 15
+
+
+
diff --git a/suite_cam7.xml b/suite_cam7.xml
new file mode 100644
index 00000000..1cb64eb3
--- /dev/null
+++ b/suite_cam7.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+ dadadj
+ dadadj_apply_qv_tendency
+ apply_heating_rate
+ qneg
+ geopotential_temp
+
+
diff --git a/test/test_sdfs/suite_dry_adiabatic_adjust.xml b/test/test_sdfs/suite_dry_adiabatic_adjust.xml
new file mode 100644
index 00000000..5bcb11a2
--- /dev/null
+++ b/test/test_sdfs/suite_dry_adiabatic_adjust.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+ dadadj
+ dadadj_apply_qv_tendency
+ apply_heating_rate
+ qneg
+ geopotential_temp
+
+