Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aerosol and cloud history for diagnosing aerosol effects on cloud radiative forcing #1400

Merged
merged 4 commits into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/cam/bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -3491,6 +3491,10 @@ if ($clubb_sgs =~ /$TRUE/io) {
add_default($nl, 'relvar_fix');
}

add_default($nl, 'do_aerocom_ind3');
my $aerocom_ind3 = $nl->get_value('do_aerocom_ind3');


#in-cloud scav tuning for cloud-borne aerosol
if ($chem =~ /_mam/) {
add_default($nl, 'sol_facti_cloud_borne');
Expand Down
3 changes: 3 additions & 0 deletions components/cam/bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,9 @@
<clubb_rad_history > .false. </clubb_rad_history>


<do_aerocom_ind3 > .false. </do_aerocom_ind3>
<do_aerocom_ind3 aerocom_ind3="1" > .true. </do_aerocom_ind3>

<!-- Microphysics scheme -->
<microp_scheme microphys="rk"> RK</microp_scheme>
<microp_scheme microphys="mg1"> MG</microp_scheme>
Expand Down
6 changes: 6 additions & 0 deletions components/cam/bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2674,6 +2674,12 @@ Switch for CLUBB_SGS
Default: FALSE
</entry>

<entry id="do_aerocom_ind3" type="logical" category="conv"
group="phys_ctl_nl" valid_values="" >
Switch for AeroCom diagnostics
Default: FALSE
</entry>

<entry id="shallow_scheme" type="char*16" category="conv"
group="phys_ctl_nl" valid_values="Hack,UW,CLUBB_SGS,UNICON" >
Type of shallow convection scheme employed. 'Hack' for Hack shallow convection;
Expand Down
31 changes: 31 additions & 0 deletions components/cam/src/physics/cam/micro_mg_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,9 @@ subroutine micro_mg_cam_tend(state, ptend, dtime, pbuf)
use physics_buffer, only: pbuf_col_type_index
use subcol, only: subcol_field_avg

use output_aerocom_aie, only: do_aerocom_ind3


type(physics_state), intent(in) :: state
type(physics_ptend), intent(out) :: ptend
real(r8), intent(in) :: dtime
Expand Down Expand Up @@ -1536,6 +1539,9 @@ subroutine micro_mg_cam_tend(state, ptend, dtime, pbuf)

real(r8), pointer :: pckdptr(:,:)

integer :: autocl_idx, accretl_idx ! Aerocom IND3
integer :: cldliqbf_idx, cldicebf_idx, numliqbf_idx, numicebf_idx

!-------------------------------------------------------------------------------

call t_startf('micro_mg_cam_tend_init')
Expand Down Expand Up @@ -1709,6 +1715,19 @@ subroutine micro_mg_cam_tend(state, ptend, dtime, pbuf)
alst_mic => ast
aist_mic => ast

if(do_aerocom_ind3) then
cldliqbf_idx = pbuf_get_index('cldliqbf')
cldicebf_idx = pbuf_get_index('cldicebf')
numliqbf_idx = pbuf_get_index('numliqbf')
numicebf_idx = pbuf_get_index('numicebf')

call pbuf_set_field(pbuf, cldliqbf_idx, state%q(:, :, ixcldliq))
call pbuf_set_field(pbuf, cldicebf_idx, state%q(:, :, ixcldice))
call pbuf_set_field(pbuf, numliqbf_idx, state%q(:, :, ixnumliq))
call pbuf_set_field(pbuf, numicebf_idx, state%q(:, :, ixnumice))
end if


! Output initial in-cloud LWP (before microphysics)

iclwpi = 0._r8
Expand Down Expand Up @@ -2793,6 +2812,18 @@ subroutine micro_mg_cam_tend(state, ptend, dtime, pbuf)

racau_grid = min(racau_grid, 1.e10_r8)

if(do_aerocom_ind3) then
autocl_idx = pbuf_get_index('autocl')
accretl_idx = pbuf_get_index('accretl')
! call pbuf_set_field(pbuf, autocl_idx, prao)
! call pbuf_set_field(pbuf, accretl_idx, prco)
! VPRAO and VPRCO are incorreclty defined in CAM5.3
! Here prco is autoconverion, and prao is accrection.
call pbuf_set_field(pbuf, autocl_idx, prco_grid)
call pbuf_set_field(pbuf, accretl_idx, prao_grid)
end if


! --------------------- !
! History Output Fields !
! --------------------- !
Expand Down
50 changes: 50 additions & 0 deletions components/cam/src/physics/cam/ndrop.F90
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ subroutine dropmixnuc( &
! assume cloud presence controlled by cloud fraction
! doesn't distinguish between warm, cold clouds

use output_aerocom_aie , only: do_aerocom_ind3

! arguments
type(physics_state), target, intent(in) :: state
type(physics_ptend), intent(out) :: ptend
Expand Down Expand Up @@ -421,6 +423,16 @@ subroutine dropmixnuc( &
real(r8), allocatable :: coltend(:,:) ! column tendency for diagnostic output
real(r8), allocatable :: coltend_cw(:,:) ! column tendency
real(r8) :: ccn(pcols,pver,psat) ! number conc of aerosols activated at supersat
integer :: ccn3d_idx
real(r8), pointer :: ccn3d(:, :)

!+++ AeroCOM IND3 output
real(r8) :: ccn3col(pcols), ccn4col(pcols)
real(r8) :: ccn3bl(pcols), ccn4bl(pcols)
real(r8) :: zi2(pver+1), zm2(pver)
integer :: idx1000
logical :: zmflag


!-------------------------------------------------------------------------------

Expand All @@ -440,6 +452,10 @@ subroutine dropmixnuc( &

call pbuf_get_field(pbuf, kvh_idx, kvh)

if(do_aerocom_ind3) then
ccn3d_idx = pbuf_get_index('ccn3d')
call pbuf_get_field(pbuf, ccn3d_idx, ccn3d)
end if


arg = 1.0_r8
Expand Down Expand Up @@ -1077,6 +1093,40 @@ subroutine dropmixnuc( &
call outfld(ccn_name(l), ccn(1,1,l), pcols, lchnk)
enddo

if(do_aerocom_ind3) then
ccn3d(:ncol, :) = ccn(:ncol, :, 4)
ccn3col = 0.0_r8; ccn4col = 0.0_r8
do i=1, ncol
do k=1, pver
ccn3col(i) = ccn3col(i) + ccn(i,k,3) * 1.0e6* &
pdel(i,k)/gravit/(pmid(i,k)/(temp(i,k)*rair)) !#/cm3 --> #/m2
ccn4col(i) = ccn4col(i) + ccn(i,k,4) * 1.0e6* &
pdel(i,k)/gravit/(pmid(i,k)/(temp(i,k)*rair)) !#/cm3 --> #/m2
enddo

! calculate CCN at 1km
zi2 = 0.0
zm2 = 0.0
zmflag = .true.
do k=pver, 1, -1
zi2(k) = zi2(k+1) + pdel(i,k)/gravit/(pmid(i,k)/(temp(i,k)*rair)) !
zm2(k) = (zi2(k+1)+zi2(k))/2._r8
if(zm2(k).gt.1000. .and. zmflag) then
idx1000 = min(k, pver-1)
zmflag = .false.
end if
end do
ccn3bl(i) = (ccn(i,idx1000,3)*(1000.-zm2(idx1000+1))+ccn(i,idx1000+1,3) * (zm2(idx1000)-1000.)) &
/(zm2(idx1000)-zm2(idx1000+1)) * 1.0e6 ! #/cm3 -->#/m3
ccn4bl(i) = (ccn(i,idx1000,4)*(1000.-zm2(idx1000+1))+ccn(i,idx1000+1,4) * (zm2(idx1000)-1000.)) &
/(zm2(idx1000)-zm2(idx1000+1)) *1.0e6 ! #/cm3 -->#/m3
enddo
call outfld('colccn.1', ccn3col, pcols, lchnk)
call outfld('colccn.3', ccn4col, pcols, lchnk)
call outfld('ccn.1bl', ccn3bl, pcols, lchnk)
call outfld('ccn.3bl', ccn4bl, pcols, lchnk)
end if

! do column tendencies
if (prog_modal_aero) then
do m = 1, ntot_amode
Expand Down
Loading