diff --git a/.gitmodules b/.gitmodules index afe6f27dd..6f63ea294 100644 --- a/.gitmodules +++ b/.gitmodules @@ -8,5 +8,5 @@ branch = main [submodule "ccpp/physics"] path = ccpp/physics - url = https://github.com/NCAR/ccpp-physics - branch = main + url = https://github.com/RuiyuSun/ccpp-physics + branch = innerloop diff --git a/ccpp/data/GFS_typedefs.F90 b/ccpp/data/GFS_typedefs.F90 index 1e4f4c082..021c3030a 100644 --- a/ccpp/data/GFS_typedefs.F90 +++ b/ccpp/data/GFS_typedefs.F90 @@ -785,6 +785,7 @@ module GFS_typedefs 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 + real(kind=kind_phys) :: dt_inner !< time step for the inner loop in s !--- GFDL microphysical paramters logical :: lgfdlmprad !< flag for GFDL mp scheme and radiation consistency @@ -3155,6 +3156,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & 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 + real(kind=kind_phys) :: dt_inner = 600. !< time step for the inner loop !--- GFDL microphysical parameters logical :: lgfdlmprad = .false. !< flag for GFDLMP radiation interaction @@ -3503,7 +3505,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & mg_ncnst, mg_ninst, mg_ngnst, sed_supersat, do_sb_physics, & mg_alf, mg_qcmin, mg_do_ice_gmao, mg_do_liq_liu, & ltaerosol, lradar, nsradar_reset, lrefres, ttendlim, & - lgfdlmprad, & + lgfdlmprad, dt_inner, & !--- max hourly avg_max_length, & !--- land/surface model control @@ -3930,6 +3932,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%lradar = lradar Model%nsradar_reset = nsradar_reset Model%ttendlim = ttendlim + Model%dt_inner = dt_inner !--- F-A MP parameters Model%rhgrd = rhgrd Model%spec_adv = spec_adv @@ -4795,6 +4798,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & if (Model%me == Model%master) print *,' Using Thompson double moment microphysics', & ' ltaerosol = ',Model%ltaerosol, & ' ttendlim =',Model%ttendlim, & + ' dt_inner =',Model%dt_inner, & ' effr_in =',Model%effr_in, & ' lradar =',Model%lradar, & ' nsradar_reset =',Model%nsradar_reset, & @@ -5104,6 +5108,7 @@ subroutine control_print(Model) print *, ' nsradar_reset : ', Model%nsradar_reset print *, ' lrefres : ', Model%lrefres print *, ' ttendlim : ', Model%ttendlim + print *, ' dt_inner : ', Model%dt_inner print *, ' ' endif if (Model%imp_physics == Model%imp_physics_mg) then diff --git a/ccpp/data/GFS_typedefs.meta b/ccpp/data/GFS_typedefs.meta index 5e73ea1ec..308136cc4 100644 --- a/ccpp/data/GFS_typedefs.meta +++ b/ccpp/data/GFS_typedefs.meta @@ -3426,6 +3426,13 @@ dimensions = () type = real kind = kind_phys +[dt_inner] + standard_name = time_step_for_inner_loop + long_name = time step for inner loop + units = s + dimensions = () + type = real + kind = kind_phys [lgfdlmprad] standard_name = flag_for_GFDL_microphysics_radiation_interaction long_name = flag for GFDL microphysics-radiation interaction diff --git a/ccpp/physics b/ccpp/physics index f6b19b587..dd04dc3e6 160000 --- a/ccpp/physics +++ b/ccpp/physics @@ -1 +1 @@ -Subproject commit f6b19b587850b7f2f1af93a4819b5342ac09c015 +Subproject commit dd04dc3e689854661f460c759bd4efe5991b723e diff --git a/io/post_gfs.F90 b/io/post_gfs.F90 index 0907d7d76..105172a86 100644 --- a/io/post_gfs.F90 +++ b/io/post_gfs.F90 @@ -22,6 +22,7 @@ subroutine post_run_gfs(wrt_int_state,mypei,mpicomp,lead_write, & ! ! revision history: ! Jul 2019 J. Wang create interface to run inline post for FV3 +! Apr 2021 R. Sun Added variables for Thomspon MP ! !----------------------------------------------------------------------- !*** run post on write grid comp @@ -342,7 +343,7 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & use vrbls3d, only: t, q, uh, vh, wh, alpint, dpres, zint, zmid, o3, & qqr, qqs, cwm, qqi, qqw, qqg, omga, cfr, pmid, & q2, rlwtt, rswtt, tcucn, tcucns, train, el_pbl, & - pint, exch_h, ref_10cm + pint, exch_h, ref_10cm, qqni,qqnr,qqnwfa,qqnifa use vrbls2d, only: f, pd, sigt4, fis, pblh, ustar, z0, ths, qs, twbs,& qwbs, avgcprate, cprate, avgprec, prec, lspa, sno,& cldefi, th10, q10, tshltr, pshltr, tshltr, albase,& @@ -2182,8 +2183,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo endif -! for GFDL MP - if (imp_physics == 11) then +! for GFDL MP or Thompson MP + if (imp_physics == 11 .or. imp_physics == 8) then ! model level cloud water mixing ratio if(trim(fieldname)=='clwmr') then !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqw,arrayr43d) @@ -2243,6 +2244,56 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo endif + + if(imp_physics == 8) then + ! model level rain number + if(trim(fieldname)=='ncrain') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnr,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnr(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + + ! model level rain number + if(trim(fieldname)=='ncice') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqni,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqni(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + + ! model level rain number + if(trim(fieldname)=='nwfa') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnwfa,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnwfa(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + + ! model level rain number + if(trim(fieldname)=='nifa') then + !$omp parallel do default(none) private(i,j,l) shared(lm,jsta,jend,ista,iend,qqnifa,arrayr43d) + do l=1,lm + do j=jsta,jend + do i=ista, iend + qqnifa(i,j,l)=arrayr43d(i,j,l) + enddo + enddo + enddo + endif + endif !if(imp_physics == 8) then !gfdlmp endif @@ -2400,8 +2451,8 @@ subroutine set_postvars_gfs(wrt_int_state,mpicomp,setvar_atmfile, & enddo enddo -! compute cwm for gfdlmp - if( imp_physics == 11 ) then +! compute cwm for gfdlmp or Thompson + if( imp_physics == 11 .or. imp_physics == 8) then do l=1,lm !$omp parallel do default(none) private(i,j) shared(l,jsta,jend,ista,iend,cwm,qqg,qqs,qqr,qqi,qqw) do j=jsta,jend