diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 13fa1fc9e6..f0aae80c59 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -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 @@ -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 @@ -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 @@ -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, & @@ -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 @@ -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, & @@ -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 diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index fa00dab4b4..ad170bc015 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -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 diff --git a/ccpp/driver/GFS_diagnostics.F90 b/ccpp/driver/GFS_diagnostics.F90 index dd8eaed801..206dc01d0c 100644 --- a/ccpp/driver/GFS_diagnostics.F90 +++ b/ccpp/driver/GFS_diagnostics.F90 @@ -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 diff --git a/ccpp/physics b/ccpp/physics index 7b02d419cf..9c1943cbb9 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit 7b02d419cf8d2319576d1fd37ee48a7e92409739 +Subproject commit 9c1943cbb9176c435bd7eda83868e381a5a82e49