-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'huiwanpnnl/atm/v3atm_cflx_new_imp' into NGD_v3atm (PR #17)
A revised handling of cflx as a stealth feature This PR adds an optional revision to the numerical process coupling at the tphysbc/tphysac level to couple the surface emissions of tracers more tightly with the turbulent transport. This is done by revising where in the time integration loop the surface fluxes in cam_in%cflx(:,2:) are applied to update the tracer mixing ratios. The revision was motivated by the known issues of overly short dust lifetime in EAMv1 and the very strong sensitivity of the dust lifetime to vertical resolution, see Feng et al., 2022 for the v1 results. The subroutine clubb_surface in clubb_intr.F90 was split into two parts: The calculations of ustar and the Obukhov length remain in clubb_surface. The calculation of tracer mixing ratio tendencies using cam_in%clfx was moved to a new subroutine cflx_tend in a new module in cflx.F90 A new namelist variable cflx_cpl_opt was added. cflx_cpl_opt = 1 (default) gives the original coupling in v2. There, the subroutine cflx_tend is called immediately after clubb_surface followed by a call physics_update(...). This gives the original process coupling in EAMv2 and the results are BFB. cflx_cpl_opt = 2 activates the revised coupling. The call of cflx_tend and the corresponding call physics_update(...) are moved to right before the cloud macro-microphysics sub-cycles in tphysbc, so that the tracers emitted to the lowest model layer can be transported to upper layers by CLUBB or dropmixnuc. Note that cflx_cpl_opt = 2 does not affect water vapor. Neither does it affect tracers whose portion of cam_in%cflx is zero when clubb_surface is called. [BFB] with default cflx_cpl_opt = 1
- Loading branch information
Showing
7 changed files
with
206 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
module cflx | ||
|
||
!----------------------------------------------------------------------------------------------------- | ||
! History: | ||
! Separated from module clubb_intr, subroutine clubb_surface by Hui Wan (PNNL), 2022 | ||
!----------------------------------------------------------------------------------------------------- | ||
|
||
use shr_kind_mod, only: r8=>shr_kind_r8 | ||
|
||
implicit none | ||
public | ||
|
||
contains | ||
|
||
subroutine cflx_tend (state, cam_in, ztodt, ptend) | ||
|
||
use physics_types, only: physics_state, physics_ptend, & | ||
physics_ptend_init, & | ||
set_dry_to_wet, set_wet_to_dry | ||
use physconst, only: gravit | ||
use ppgrid, only: pver, pcols | ||
use constituents, only: pcnst, cnst_get_ind, cnst_type | ||
use co2_cycle, only: co2_cycle_set_cnst_type | ||
use camsrfexch, only: cam_in_t | ||
|
||
implicit none | ||
|
||
! Input Auguments | ||
|
||
type(physics_state), intent(inout) :: state ! Physics state variables | ||
type(cam_in_t), intent(in) :: cam_in ! contains surface fluxes of constituents | ||
real(r8), intent(in) :: ztodt ! 2 delta-t [ s ] | ||
|
||
! Output Auguments | ||
|
||
type(physics_ptend), intent(out) :: ptend ! Individual parameterization tendencies | ||
|
||
! Local Variables | ||
|
||
integer :: i ! indicees | ||
integer :: ncol ! # of atmospheric columns | ||
|
||
real(r8) :: tmp1(pcols) | ||
real(r8) :: rztodt ! 1./ztodt | ||
integer :: m | ||
|
||
logical :: lq(pcnst) | ||
|
||
character(len=3), dimension(pcnst) :: cnst_type_loc ! local override option for constituents cnst_type | ||
|
||
|
||
ncol = state%ncol | ||
|
||
!------------------------------------------------------- | ||
! Assume 'wet' mixing ratios in surface diffusion code. | ||
! don't convert co2 tracers to wet mixing ratios | ||
|
||
cnst_type_loc(:) = cnst_type(:) | ||
call co2_cycle_set_cnst_type(cnst_type_loc, 'wet') | ||
call set_dry_to_wet(state, cnst_type_loc) | ||
|
||
!------------------------------------------------------- | ||
! Initialize ptend | ||
|
||
lq(:) = .TRUE. | ||
call physics_ptend_init(ptend, state%psetcols, 'clubb_srf', lq=lq) | ||
|
||
!------------------------------------------------------- | ||
! Calculate tracer mixing ratio tendencies from cflx | ||
|
||
rztodt = 1._r8/ztodt | ||
ptend%q(:ncol,:pver,:) = state%q(:ncol,:pver,:) | ||
tmp1(:ncol) = ztodt * gravit * state%rpdel(:ncol,pver) | ||
|
||
do m = 2, pcnst | ||
ptend%q(:ncol,pver,m) = ptend%q(:ncol,pver,m) + tmp1(:ncol) * cam_in%cflx(:ncol,m) | ||
enddo | ||
|
||
ptend%q(:ncol,:pver,:) = (ptend%q(:ncol,:pver,:) - state%q(:ncol,:pver,:)) * rztodt | ||
|
||
! Convert tendencies of dry constituents to dry basis. | ||
do m = 1,pcnst | ||
if (cnst_type(m).eq.'dry') then | ||
ptend%q(:ncol,:pver,m) = ptend%q(:ncol,:pver,m)*state%pdel(:ncol,:pver)/state%pdeldry(:ncol,:pver) | ||
endif | ||
end do | ||
|
||
!------------------------------------------------------- | ||
! convert wet mmr back to dry before conservation check | ||
! avoid converting co2 tracers again | ||
|
||
cnst_type_loc(:) = cnst_type(:) | ||
call co2_cycle_set_cnst_type(cnst_type_loc, 'wet') | ||
call set_wet_to_dry(state, cnst_type_loc) | ||
|
||
return | ||
|
||
end subroutine cflx_tend | ||
|
||
end module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.