Skip to content

Commit

Permalink
Coupling Merra2 aerosol climatology and GOCART forecasted aerosols wi…
Browse files Browse the repository at this point in the history
…th the Thompson microphysics scheme (ufs-community#588)

* version worked for producing nifa and nwfa

* added mraerosol in typedef

* use ltaersol=.true. and merra2

* Add consistency check for Thompson aerosol options to GFS_typedefs.F90

* using field table instead of code change for mraerosol

* Updates and bug fixes for Thompson-Merra2

Co-authored-by: anning.cheng <anning.cheng@noaa.gov>
Co-authored-by: Dom Heinzeller <climbfuji@ymail.com>
Co-authored-by: AnningCheng-NOAA <48297505+AnningCheng-NOAA@users.noreply.github.com>
  • Loading branch information
4 people authored Sep 30, 2022
1 parent dab7d71 commit 39fca1c
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 43 deletions.
13 changes: 11 additions & 2 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ module GFS_typedefs

!--- Thompson's microphysical parameters
logical :: ltaerosol !< flag for aerosol version
logical :: mraerosol !< flag for merra2_aerosol_aware
logical :: lradar !< flag for radar reflectivity
real(kind=kind_phys) :: nsradar_reset !< seconds between resetting radar reflectivity calculation
real(kind=kind_phys) :: ttendlim !< temperature tendency limiter per time step in K/s
Expand Down Expand Up @@ -2787,7 +2788,7 @@ subroutine coupling_create (Coupling, IM, Model)
endif

!--- needed for Thompson's aerosol option
if(Model%imp_physics == Model%imp_physics_thompson .and. Model%ltaerosol) then
if(Model%imp_physics == Model%imp_physics_thompson .and. (Model%ltaerosol .or. Model%mraerosol)) then
allocate (Coupling%nwfa2d (IM))
allocate (Coupling%nifa2d (IM))
Coupling%nwfa2d = clear_val
Expand Down Expand Up @@ -3075,6 +3076,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- Thompson microphysical parameters
logical :: ltaerosol = .false. !< flag for aerosol version
logical :: mraerosol = .false. !< flag for merra2_aerosol_aware
logical :: lradar = .false. !< flag for radar reflectivity
real(kind=kind_phys) :: nsradar_reset = -999.0 !< seconds between resetting radar reflectivity calculation, set to <0 for every time step
real(kind=kind_phys) :: ttendlim = -999.0 !< temperature tendency limiter, set to <0 to deactivate
Expand Down Expand Up @@ -3476,7 +3478,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
use_LW_jacobian, doGP_lwscat, damp_LW_fluxadj, lfnc_k, &
lfnc_p0, iovr_convcld, doGP_sgs_cnv, doGP_sgs_mynn, &
! IN CCN forcing
iccn, &
iccn, mraerosol, &
!--- microphysical parameterizations
imp_physics, psautco, prautco, evpco, wminco, &
fprcp, pdfflag, mg_dcs, mg_qcvar, mg_ts_auto_ice, mg_rhmini, &
Expand Down Expand Up @@ -4018,6 +4020,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

!--- Thompson MP parameters
Model%ltaerosol = ltaerosol
Model%mraerosol = mraerosol
if (Model%ltaerosol .and. Model%mraerosol) then
write(0,*) 'Logic error: Only one Thompson aerosol option can be true, either ltaerosol or mraerosol)'
stop
end if
Model%lradar = lradar
Model%nsradar_reset = nsradar_reset
Model%ttendlim = ttendlim
Expand Down Expand Up @@ -5304,6 +5311,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
end if
if (Model%me == Model%master) print *,' Using Thompson double moment microphysics', &
' ltaerosol = ',Model%ltaerosol, &
' mraerosol = ',Model%mraerosol, &
' ttendlim =',Model%ttendlim, &
' ext_diag_thompson =',Model%ext_diag_thompson, &
' dt_inner =',Model%dt_inner, &
Expand Down Expand Up @@ -5808,6 +5816,7 @@ subroutine control_print(Model)
if (Model%imp_physics == Model%imp_physics_wsm6 .or. Model%imp_physics == Model%imp_physics_thompson) then
print *, ' Thompson microphysical parameters'
print *, ' ltaerosol : ', Model%ltaerosol
print *, ' mraerosol : ', Model%mraerosol
print *, ' lradar : ', Model%lradar
print *, ' nsradar_reset : ', Model%nsradar_reset
print *, ' lrefres : ', Model%lrefres
Expand Down
6 changes: 6 additions & 0 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -4042,6 +4042,12 @@
units = flag
dimensions = ()
type = logical
[mraerosol]
standard_name = do_merra2_aerosol_awareness
long_name = flag for merra2 aerosol-aware physics for example the thompson microphysics
units = flag
dimensions = ()
type = logical
[lradar]
standard_name = flag_for_radar_reflectivity
long_name = flag for radar reflectivity
Expand Down
106 changes: 66 additions & 40 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3472,51 +3472,77 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop

!--------------------------aerosols
if (Model%ntwa>0) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'nwfa'
ExtDiag(idx)%desc = 'number concentration of water-friendly aerosols'
ExtDiag(idx)%unit = 'kg-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Statein(nb)%qgrs(:,:,Model%ntwa)
enddo
if (Model%ltaerosol) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'nwfa'
ExtDiag(idx)%desc = 'number concentration of water-friendly aerosols'
ExtDiag(idx)%unit = 'kg-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Statein(nb)%qgrs(:,:,Model%ntwa)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'nwfa2d'
ExtDiag(idx)%desc = 'water-friendly surface aerosol source'
ExtDiag(idx)%unit = 'kg-1 s-1'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nwfa2d
enddo
idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'nwfa2d'
ExtDiag(idx)%desc = 'water-friendly surface aerosol source'
ExtDiag(idx)%unit = 'kg-1 s-1'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nwfa2d
enddo
elseif (Model%mraerosol) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'nwfa'
ExtDiag(idx)%desc = 'number concentration of water-friendly aerosols'
ExtDiag(idx)%unit = 'kg-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Stateout(nb)%gq0(:,:,Model%ntwa)
enddo
endif
endif

if (Model%ntia>0) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'nifa'
ExtDiag(idx)%desc = 'number concentration of ice-friendly aerosols'
ExtDiag(idx)%unit = 'kg-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Statein(nb)%qgrs(:,:,Model%ntia)
enddo
if (Model%ltaerosol) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'nifa'
ExtDiag(idx)%desc = 'number concentration of ice-friendly aerosols'
ExtDiag(idx)%unit = 'kg-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Statein(nb)%qgrs(:,:,Model%ntia)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'nifa2d'
ExtDiag(idx)%desc = 'ice-friendly surface aerosol source'
ExtDiag(idx)%unit = 'kg-1 s-1'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nifa2d
enddo
idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'nifa2d'
ExtDiag(idx)%desc = 'ice-friendly surface aerosol source'
ExtDiag(idx)%unit = 'kg-1 s-1'
ExtDiag(idx)%mod_name = 'gfs_sfc'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => Coupling(nb)%nifa2d
enddo
else if (Model%mraerosol) then
idx = idx + 1
ExtDiag(idx)%axes = 3
ExtDiag(idx)%name = 'nifa'
ExtDiag(idx)%desc = 'number concentration of ice-friendly aerosols'
ExtDiag(idx)%unit = 'kg-1'
ExtDiag(idx)%mod_name = 'gfs_phys'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var3 => Stateout(nb)%gq0(:,:,Model%ntia)
enddo
end if
endif

! Extended diagnostics from Thompson MP
Expand Down

0 comments on commit 39fca1c

Please sign in to comment.