Skip to content

Commit

Permalink
Merge branch 'steveghan/atm/iediagnostics' into next (PR #1400)
Browse files Browse the repository at this point in the history
Add aerosol and cloud history for diagnosing aerosol effects on cloud
radiative forcing.

Add aerosol and cloud history for diagnosing relationships that drive
aerosol effects on cloud radiative forcing. The additional fields are
calculated if namelist option do_aerocom_ind3 =.true. and written
every 3 hours if atm_in contains:

mfilt          = 1,8
nhtfrq         = 0,-3
fincl2 = 'AODVIS:A', 'angstrm:A','cod:A', 'cdr:A', 'cdnc:A', 'cdnum:A', 'icnum:A',  'clt:A', 'lcc:A', 'lwp:A', 'iwp:A', 'icc:A', 'icnc:A', 'icr:A', 'LHFLX:A', 'SHFLX:A', 'OMEGA500:A', 'rh700:A', 'colrv:A', 'ccn:A', 'ccn.1bl:A', 'ccn.3bl:A', 'ptop:A', 'ttop:A', 'rwp:A', 'lwp2:A', 'iwp2:A', 'autoconv:A','accretn:A', 'FSUTOA_d1:A', 'FSUTOAC_d1:A', 'FSUTOA:A', 'FSUTOAC:A', 'FLUT:A', 'FLUTC:A','TH7001000', 'PRECL:A'
rad_diag_1             = 'A:Q:H2O', 'N:O2:O2', 'N:CO2:CO2', 'A:O3:O3', 'N:N2O:N2O', 'N:CH4:CH4', 'N:CFC11:CFC11', 'N:CFC12:CFC12'

[BFB]
  • Loading branch information
susburrows committed Apr 21, 2017
2 parents 5982c83 + 701e3fb commit 4abe4ba
Show file tree
Hide file tree
Showing 10 changed files with 835 additions and 4 deletions.
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 @@ -2686,6 +2686,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 @@ -1540,6 +1543,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 @@ -1713,6 +1719,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 @@ -2830,6 +2849,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

0 comments on commit 4abe4ba

Please sign in to comment.