diff --git a/GFS_layer/GFS_driver.F90 b/GFS_layer/GFS_driver.F90 index f914c511..ba3f02fa 100644 --- a/GFS_layer/GFS_driver.F90 +++ b/GFS_layer/GFS_driver.F90 @@ -156,7 +156,10 @@ subroutine GFS_initialize (Model, Statein, Stateout, Sfcprop, & Init_parm%tracer_names, & Init_parm%input_nml_file, Init_parm%tile_num, & Init_parm%blksz, Init_parm%hydro, & - Init_parm%do_inline_mp, Init_parm%do_cosp) + Init_parm%do_inline_mp, & + Init_parm%do_inline_pbl, & + Init_parm%do_inline_cnv, & + Init_parm%do_inline_gwd, Init_parm%do_cosp) call read_o3data (Model%ntoz, Model%me, Model%master) diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index 97c8cc38..ebbf71f1 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -620,6 +620,22 @@ subroutine GFS_physics_driver_down & ! ! --- ... frain=factor for centered difference scheme correction of rain amount. + if (Model%do_inline_pbl) then + + do i=1,im + ! from dycore (because ocean and sea ice are off) + Sfcprop%slmsk(i) = statein%lsm(i) + !Sfcprop%tsfc(i) = statein%tsfc(i) + Sfcprop%vfrac(i) = statein%vfrac(i) + Sfcprop%vtype(i) = statein%vtype(i) + Sfcprop%hice(i) = statein%hice(i) + Sfcprop%fice(i) = statein%fice(i) + Sfcprop%tisfc(i) = statein%tice(i) + Sfcprop%stc(i,:) = statein%stc(i,:) + enddo + + endif + Statemid%stored_frain = dtf / dtp do i= 1, im @@ -946,7 +962,29 @@ subroutine GFS_physics_driver_down & Diag%smcwlt2(:) = 0.0 Diag%smcref2(:) = 0.0 + if (Model%do_inline_pbl) then + + do i=1,im + ! from dycore (because ocean and sea ice are off) + Statemid%stored_hflx(i) = statein%hflx(i) + Statemid%stored_evap(i) = statein%evap(i) + ep1d(i) = statein%ep(i) + Statemid%stored_qss(i) = statein%qsurf(i) + gflx(i) = statein%gflux(i) + Sfcprop%ffmm(i) = statein%ffmm(i) + Sfcprop%ffhh(i) = statein%ffhh(i) + Sfcprop%snowd(i) = statein%snowd(i) + Sfcprop%zorl(i) = statein%zorl(i) + Sfcprop%uustar(i) = statein%uustar(i) + Sfcprop%shdmax(i) = statein%shdmax(i) + !Sfcprop%srflag(i) = statein%srflag(i) + Sfcprop%weasd(i) = statein%weasd(i) + Sfcprop%tprcp(i) = statein%tprcp(i) + Diag%cmm(i) = statein%cmm(i) + Diag%chh(i) = statein%chh(i) + enddo + endif ! check the definition from atmos_model.F90 ! 2: all ocean and land fluxes from full coupler ! 1: ocean fluxes only @@ -1216,6 +1254,8 @@ subroutine GFS_physics_driver_down & else + if (.not. Model%do_inline_pbl) then + ! --- ... surface energy balance over ocean if (Model%sfc_coupled==1) then @@ -1243,6 +1283,7 @@ subroutine GFS_physics_driver_down & ! --- outputs: Statemid%stored_qss, Diag%cmm, Diag%chh, gflx, Statemid%stored_evap, Statemid%stored_hflx, ep1d) endif + endif endif ! if ( nstf_name(1) > 0 ) then @@ -1336,6 +1377,8 @@ subroutine GFS_physics_driver_down & enddo endif + if (.not. Model%do_inline_pbl) then + call sfc_sice & ! --- inputs: (im, Model%lsoil, Statein%pgr, Statein%ugrs, Statein%vgrs, & @@ -1351,6 +1394,8 @@ subroutine GFS_physics_driver_down & Sfcprop%snowd, Statemid%stored_qss, snowmt, gflx, Diag%cmm, Diag%chh, Statemid%stored_evap, & Statemid%stored_hflx) + endif + if (Model%cplflx) then do i = 1, im if (Statemid%stored_flag_cice(i)) then @@ -1871,7 +1916,55 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr ! dtsfc1(:) = 0. ! dqsfc1(:) = 0. - if (Model%do_shoc) then + if (Model%do_inline_pbl) then ! Need to double check the transition from _down XX + + do i=1,im + ! from dycore (because PBL is off) + Diag%hpbl(i) = Statein%hpbl(i) + Statemid%stored_kpbl(i) = Statein%kpbl(i) + Statemid%stored_dtsfc1(i) = Statein%dtsfc(i) + Statemid%stored_dqsfc1(i) = Statein%dqsfc(i) + Statemid%stored_dusfc1(i) = Statein%dusfc(i) + Statemid%stored_dvsfc1(i) = Statein%dvsfc(i) + ! to dycore (for inline PBL) + stateout%lsm(i) = Statemid%stored_islmsk(i) + Stateout%radh(i,:) = Radtend%htrsw(i,:)*Statemid%stored_xmu(i)+Radtend%htrlw(i,:) + stateout%hflx(i) = Statemid%stored_hflx(i) + stateout%evap(i) = Statemid%stored_evap(i) + stateout%tsfc(i) = Sfcprop%tsfc(i) + stateout%ffmm(i) = Sfcprop%ffmm(i) + stateout%ffhh(i) = Sfcprop%ffhh(i) + stateout%zorl(i) = Sfcprop%zorl(i) + ! to dycore (for inline surface) + stateout%vfrac(i) = Sfcprop%vfrac(i) + stateout%vtype(i) = Sfcprop%vtype(i) + stateout%snowd(i) = Sfcprop%snowd(i) + stateout%uustar(i) = Sfcprop%uustar(i) + stateout%shdmax(i) = Sfcprop%shdmax(i) + stateout%sfcemis(i) = Radtend%semis(i) + !stateout%dlwflx(i) = gabsbdlw(i) + stateout%sfcnsw(i) = Statemid%stored_adjsfcnsw(i) + stateout%sfcdsw(i) = Statemid%stored_adjsfcdsw(i) + stateout%srflag(i) = Sfcprop%srflag(i) + if (Statemid%stored_islmsk(i) == 2) then + stateout%hice(i) = Statemid%stored_zice(i) + stateout%fice(i) = Statemid%stored_cice(i) + stateout%tice(i) = Statemid%stored_tice(i) + else + stateout%hice(i) = 0.0 + stateout%fice(i) = 0.0 + stateout%tice(i) = Sfcprop%tsfc(i) + endif + stateout%weasd(i) = Sfcprop%weasd(i) + stateout%tprcp(i) = Sfcprop%tprcp(i) + stateout%stc(i,:) = Sfcprop%stc(i,:) + stateout%qsurf(i) = Statemid%stored_qss(i) + stateout%cmm(i) = Diag%cmm(i) + stateout%chh(i) = Diag%chh(i) + !stateout%gflux(i) = gflx(i) + !stateout%ep(i) = ep1d(i) + enddo + elseif (Model%do_shoc) then call moninshoc(ix, im, levs, ntrac, Model%ntcw, Statemid%stored_dvdt, Statemid%stored_dudt, Statemid%stored_dtdt, Statemid%stored_dqdt, & Statein%ugrs, Statein%vgrs, Statein%tgrs, Statein%qgrs, & Statemid%phy_f3d(1,1,Model%ntot3d-1), prnum, Model%ntke, & @@ -2733,7 +2826,20 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr ! if (.not. Model%ras .and. .not. Model%cscnv) then - if (Model%do_deep) then + if (Model%do_inline_cnv) then + + cld1d = 0. + rain1 = Statein%prec(:) + ud_mf = 0. + dd_mf = 0. + dt_mf = 0. + cnvw = 0. + cnvc = 0. + ktop = Statein%ktop(:) + kbot = Statein%kbot(:) + Statemid%stored_kcnv(:) = Statein%kcnv(:) + + elseif (Model%do_deep) then if (Model%do_ca) then do k=1,levs @@ -3018,6 +3124,12 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr ! --- ... calculate maximum convective heating rate ! cuhr = temperature change due to deep convection + if (Model%do_inline_cnv) then + + cumabs(:) = Statein%cumabs(:) + + else + cumabs(:) = 0.0 work3 (:) = 0.0 do k = 1, levs @@ -3032,6 +3144,8 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr if (work3(i) > 0.0) cumabs(i) = cumabs(i) / (dtp*work3(i)) enddo + endif + ! do i = 1, im ! do k = kbot(i), ktop(i) ! do k1 = kbot(i), k @@ -3776,7 +3890,7 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr endif - if (Model%do_inline_mp) then ! GFDL Cloud microphysics + if (Model%do_inline_mp) then ! inline microphysics tem = dtp * con_p001 / con_day Statein%prew(:) = Statein%prew(:) * tem @@ -3965,7 +4079,7 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr enddo if (Model%do_cosp) then - if (Model%do_inline_mp) then ! GFDL Cloud microphysics + if (Model%do_inline_mp) then ! inline microphysics Diag%pfr = Statein%prefluxr Diag%pfs = Statein%prefluxs Diag%pfg = Statein%prefluxg @@ -4125,7 +4239,7 @@ subroutine GFS_physics_driver_up(Model, Statein, Stateout, Sfcprop, Coupling, Gr crain = 0.0 csnow = Diag%rainc(i) endif - if (Model%do_inline_mp) then ! GFDL Cloud microphysics + if (Model%do_inline_mp) then ! inline microphysics if ((Statein%prei(i)+Statein%pres(i)+Statein%preg(i)+csnow) .gt. (Statein%prew(i)+Statein%prer(i)+crain)) then Sfcprop%srflag(i) = 1. ! clu: set srflag to 'snow' (i.e. 1) endif diff --git a/GFS_layer/GFS_typedefs.F90 b/GFS_layer/GFS_typedefs.F90 index ea6d8a37..6056cc44 100644 --- a/GFS_layer/GFS_typedefs.F90 +++ b/GFS_layer/GFS_typedefs.F90 @@ -90,6 +90,9 @@ module GFS_typedefs !< for use with internal file reads logical :: hydro !< whether the dynamical core is hydrostatic logical :: do_inline_mp !< flag for GFDL cloud microphysics + logical :: do_inline_pbl !< flag for inline planetary boundary layer + logical :: do_inline_cnv !< flag for inline convection + logical :: do_inline_gwd !< flag for inline gravity wave drag logical :: do_cosp !< flag for COSP end type GFS_init_type @@ -128,12 +131,19 @@ module GFS_typedefs real (kind=kind_phys), pointer :: exch_h (:,:) => null() !< 3D heat exchange coefficient !--- precipitation + real (kind=kind_phys), pointer :: prec (:) => null() !< convective precipitation real (kind=kind_phys), pointer :: prew (:) => null() !< water real (kind=kind_phys), pointer :: prer (:) => null() !< rain real (kind=kind_phys), pointer :: prei (:) => null() !< ice real (kind=kind_phys), pointer :: pres (:) => null() !< snow real (kind=kind_phys), pointer :: preg (:) => null() !< graupel + !--- convection + integer , pointer :: ktop (:) => null() !< upper boundary of convection + integer , pointer :: kbot (:) => null() !< lower boundary of convection + integer , pointer :: kcnv (:) => null() !< whether convection is active (0: no, 1: deep, 2: shallow) + real (kind=kind_phys), pointer :: cumabs (:) => null() !< maximum convective heating rate + !--- precipitation flux real (kind=kind_phys), pointer :: prefluxw (:,:) => null() !< water real (kind=kind_phys), pointer :: prefluxr (:,:) => null() !< rain @@ -141,6 +151,40 @@ module GFS_typedefs real (kind=kind_phys), pointer :: prefluxs (:,:) => null() !< snow real (kind=kind_phys), pointer :: prefluxg (:,:) => null() !< graupel + !-- variables from inline PBL scheme + real (kind=kind_phys), pointer :: hpbl (:) => null() !< pbl height (m) + integer, pointer :: kpbl (:) => null() !< index of pbl + real (kind=kind_phys), pointer :: dtsfc (:) => null() !< sensible heat flux (w/m2) + real (kind=kind_phys), pointer :: dqsfc (:) => null() !< latent heat flux (w/m2) + real (kind=kind_phys), pointer :: dusfc (:) => null() !< u component of surface stress + real (kind=kind_phys), pointer :: dvsfc (:) => null() !< v component of surface stress + + integer , pointer :: lsm (:) => null() !< sea/land mask array (sea:0,land:1,sea-ice:2) + real (kind=kind_phys), pointer :: hflx (:) => null() !< surface sensible heat flux + real (kind=kind_phys), pointer :: evap (:) => null() !< surface evaporation from latent heat flux + real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface temperature in k + real (kind=kind_phys), pointer :: vfrac (:) => null() !< vegetation fraction + real (kind=kind_phys), pointer :: vtype (:) => null() !< vegetation type + real (kind=kind_phys), pointer :: ffmm (:) => null() !< fm parameter from PBL scheme + real (kind=kind_phys), pointer :: ffhh (:) => null() !< fh parameter from PBL scheme + real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph + real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm + real (kind=kind_phys), pointer :: ztrl (:) => null() !< surface roughness for t and q in cm + real (kind=kind_phys), pointer :: uustar (:) => null() !< boundary layer parameter + real (kind=kind_phys), pointer :: shdmax (:) => null() !< max fractnl cover of green veg (not used) + real (kind=kind_phys), pointer :: srflag (:) => null() !< sfc_fld%srflag - snow/rain flag for precipitation + real (kind=kind_phys), pointer :: hice (:) => null() !< sea ice thickness + real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid + real (kind=kind_phys), pointer :: tice (:) => null() !< surface temperature over ice fraction + real (kind=kind_phys), pointer :: weasd (:) => null() !< water equiv of accumulated snow depth (kg/m**2) over land and sea ice + real (kind=kind_phys), pointer :: tprcp (:) => null() !< sfc_fld%tprcp - total precipitation + !real (kind=kind_phys), pointer :: stc (:,:) => null() !< soil temperature + real (kind=kind_phys), pointer :: qsurf (:) => null() !< surface specific humidity + real (kind=kind_phys), pointer :: cmm (:) => null() !< momentum exchange coefficient + real (kind=kind_phys), pointer :: chh (:) => null() !< thermal exchange coefficient + real (kind=kind_phys), pointer :: gflux (:) => null() !< groud conductive heat flux + real (kind=kind_phys), pointer :: ep (:) => null() !< potential evaporation + !--- sea surface temperature real (kind=kind_phys), pointer :: sst (:) => null() !< sea surface temperature real (kind=kind_phys), pointer :: ci (:) => null() !< sea ice fraction @@ -163,6 +207,38 @@ module GFS_typedefs real (kind=kind_phys), pointer :: gt0 (:,:) => null() !< updated temperature real (kind=kind_phys), pointer :: gq0 (:,:,:) => null() !< updated tracers + + integer , pointer :: lsm (:) => null() !< sea/land mask array (sea:0,land:1,sea-ice:2) + real (kind=kind_phys), pointer :: radh (:,:) => null() !< radiation heating + real (kind=kind_phys), pointer :: hflx (:) => null() !< surface sensible heat flux + real (kind=kind_phys), pointer :: evap (:) => null() !< surface evaporation from latent heat flux + real (kind=kind_phys), pointer :: tsfc (:) => null() !< surface temperature in k + real (kind=kind_phys), pointer :: vfrac (:) => null() !< vegetation fraction + real (kind=kind_phys), pointer :: vtype (:) => null() !< vegetation type + real (kind=kind_phys), pointer :: ffmm (:) => null() !< fm parameter from PBL scheme + real (kind=kind_phys), pointer :: ffhh (:) => null() !< fh parameter from PBL scheme + real (kind=kind_phys), pointer :: snowd (:) => null() !< snow depth water equivalent in mm ; same as snwdph + real (kind=kind_phys), pointer :: zorl (:) => null() !< composite surface roughness in cm + real (kind=kind_phys), pointer :: ztrl (:) => null() !< surface roughness for t and q in cm + real (kind=kind_phys), pointer :: uustar (:) => null() !< boundary layer parameter + real (kind=kind_phys), pointer :: shdmax (:) => null() !< max fractnl cover of green veg (not used) + real (kind=kind_phys), pointer :: sfcemis (:) => null() !< surface lw emissivity in fraction + real (kind=kind_phys), pointer :: dlwflx (:) => null() !< + real (kind=kind_phys), pointer :: sfcnsw (:) => null() !< + real (kind=kind_phys), pointer :: sfcdsw (:) => null() !< + real (kind=kind_phys), pointer :: srflag (:) => null() !< sfc_fld%srflag - snow/rain flag for precipitation + real (kind=kind_phys), pointer :: hice (:) => null() !< sea ice thickness + real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid + real (kind=kind_phys), pointer :: tice (:) => null() !< surface temperature over ice fraction + real (kind=kind_phys), pointer :: weasd (:) => null() !< water equiv of accumulated snow depth (kg/m**2) over land and sea ice + real (kind=kind_phys), pointer :: tprcp (:) => null() !< sfc_fld%tprcp - total precipitation + real (kind=kind_phys), pointer :: stc (:,:) => null() !< soil temperature + real (kind=kind_phys), pointer :: qsurf (:) => null() !< surface specific humidity + real (kind=kind_phys), pointer :: cmm (:) => null() !< momentum exchange coefficient + real (kind=kind_phys), pointer :: chh (:) => null() !< thermal exchange coefficient + real (kind=kind_phys), pointer :: gflux (:) => null() !< groud conductive heat flux + real (kind=kind_phys), pointer :: ep (:) => null() !< potential evaporation + contains procedure :: create => stateout_create !< allocate array data end type GFS_stateout_type @@ -602,7 +678,18 @@ module GFS_typedefs !--- GFDL microphysical parameters logical :: do_sat_adj !< flag for fast saturation adjustment - logical :: do_inline_mp !< flag for GFDL cloud microphysics + + !--- inline microphysical parameters + logical :: do_inline_mp !< flag for inline microphysics + + !--- inline planetary boundary layer parameters + logical :: do_inline_pbl !< flag for inline planetary boundary layer + + !--- inline convection parameters + logical :: do_inline_cnv !< flag for inline convection + + !--- inline gravity wave drag parameters + logical :: do_inline_gwd !< flag for inline gravity wave drag !--- The CFMIP Observation Simulator Package (COSP) logical :: do_cosp !< flag for COSP @@ -1601,18 +1688,30 @@ subroutine statein_create (Statein, IM, Model) endif + allocate (Statein%prec(IM)) allocate (Statein%prew(IM)) allocate (Statein%prer(IM)) allocate (Statein%prei(IM)) allocate (Statein%pres(IM)) allocate (Statein%preg(IM)) + Statein%prec = clear_val Statein%prew = clear_val Statein%prer = clear_val Statein%prei = clear_val Statein%pres = clear_val Statein%preg = clear_val + allocate (Statein%ktop(IM)) + allocate (Statein%kbot(IM)) + allocate (Statein%kcnv(IM)) + allocate (Statein%cumabs(IM)) + + Statein%ktop = clear_val + Statein%kbot = clear_val + Statein%kcnv = clear_val + Statein%cumabs = clear_val + if (Model%do_cosp) then allocate (Statein%prefluxw(IM,Model%levs)) @@ -1629,6 +1728,69 @@ subroutine statein_create (Statein, IM, Model) endif + allocate (Statein%hpbl(IM)) + allocate (Statein%kpbl(IM)) + allocate (Statein%dtsfc(IM)) + allocate (Statein%dqsfc(IM)) + allocate (Statein%dusfc(IM)) + allocate (Statein%dvsfc(IM)) + allocate (Statein%lsm(IM)) + allocate (Statein%hflx(IM)) + allocate (Statein%evap(IM)) + allocate (Statein%tsfc(IM)) + allocate (Statein%vfrac(IM)) + allocate (Statein%vtype(IM)) + allocate (Statein%ffmm(IM)) + allocate (Statein%ffhh(IM)) + allocate (Statein%snowd(IM)) + allocate (Statein%zorl(IM)) + allocate (Statein%ztrl(IM)) + allocate (Statein%uustar(IM)) + allocate (Statein%shdmax(IM)) + allocate (Statein%srflag(IM)) + allocate (Statein%hice(IM)) + allocate (Statein%fice(IM)) + allocate (Statein%tice(IM)) + allocate (Statein%weasd(IM)) + allocate (Statein%tprcp(IM)) + !allocate (Statein%stc(IM,Model%lsoil)) + allocate (Statein%qsurf(IM)) + allocate (Statein%cmm(IM)) + allocate (Statein%chh(IM)) + allocate (Statein%gflux(IM)) + allocate (Statein%ep(IM)) + + Statein%hpbl = clear_val + Statein%kpbl = 1 + Statein%dtsfc = clear_val + Statein%dqsfc = clear_val + Statein%dusfc = clear_val + Statein%dvsfc = clear_val + Statein%lsm = 0 + Statein%hflx = clear_val + Statein%evap = clear_val + Statein%tsfc = clear_val + Statein%vfrac = clear_val + Statein%vtype = clear_val + Statein%ffmm = clear_val + Statein%ffhh = clear_val + Statein%snowd = clear_val + Statein%zorl = clear_val + Statein%ztrl = clear_val + Statein%uustar = clear_val + Statein%shdmax = clear_val + Statein%srflag = clear_val + Statein%hice = clear_val + Statein%fice = clear_val + Statein%tice = clear_val + Statein%weasd = clear_val + Statein%tprcp = clear_val + !Statein%stc = clear_val + Statein%qsurf = clear_val + Statein%cmm = clear_val + Statein%chh = clear_val + Statein%gflux = clear_val + Statein%ep = clear_val allocate (Statein%sst(IM)) allocate (Statein%ci(IM)) @@ -1671,6 +1833,69 @@ subroutine stateout_create (Stateout, IM, Model) Stateout%gt0 = clear_val Stateout%gq0 = clear_val + allocate (Stateout%lsm (IM)) + allocate (Stateout%radh (IM,Model%levs)) + allocate (Stateout%hflx (IM)) + allocate (Stateout%evap (IM)) + allocate (Stateout%tsfc (IM)) + allocate (Stateout%vfrac (IM)) + allocate (Stateout%vtype (IM)) + allocate (Stateout%ffmm (IM)) + allocate (Stateout%ffhh (IM)) + allocate (Stateout%snowd (IM)) + allocate (Stateout%zorl (IM)) + allocate (Stateout%ztrl (IM)) + allocate (Stateout%uustar (IM)) + allocate (Stateout%shdmax (IM)) + allocate (Stateout%sfcemis (IM)) + allocate (Stateout%dlwflx (IM)) + allocate (Stateout%sfcnsw (IM)) + allocate (Stateout%sfcdsw (IM)) + allocate (Stateout%srflag (IM)) + allocate (Stateout%hice (IM)) + allocate (Stateout%fice (IM)) + allocate (Stateout%tice (IM)) + allocate (Stateout%weasd (IM)) + allocate (Stateout%tprcp (IM)) + allocate (Stateout%stc (IM,Model%lsoil)) + allocate (Stateout%qsurf (IM)) + allocate (Stateout%cmm (IM)) + allocate (Stateout%chh (IM)) + allocate (Stateout%gflux (IM)) + allocate (Stateout%ep (IM)) + + + Stateout%lsm = 0 + Stateout%radh = clear_val + Stateout%hflx = clear_val + Stateout%evap = clear_val + Stateout%tsfc = clear_val + Stateout%vfrac = clear_val + Stateout%vtype = clear_val + Stateout%ffmm = clear_val + Stateout%ffhh = clear_val + Stateout%snowd = clear_val + Stateout%zorl = clear_val + Stateout%ztrl = clear_val + Stateout%uustar = clear_val + Stateout%shdmax = clear_val + Stateout%sfcemis = clear_val + Stateout%dlwflx = clear_val + Stateout%sfcnsw = clear_val + Stateout%sfcdsw = clear_val + Stateout%srflag = clear_val + Stateout%hice = clear_val + Stateout%fice = clear_val + Stateout%tice = clear_val + Stateout%weasd = clear_val + Stateout%tprcp = clear_val + Stateout%stc = clear_val + Stateout%qsurf = clear_val + Stateout%cmm = clear_val + Stateout%chh = clear_val + Stateout%gflux = clear_val + Stateout%ep = clear_val + end subroutine stateout_create @@ -2292,7 +2517,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & dt_phys, idat, jdat, iau_offset, & tracer_names, input_nml_file, & tile_num, blksz, hydro, & - do_inline_mp, do_cosp) + do_inline_mp, do_inline_pbl, & + do_inline_cnv, do_inline_gwd, & + do_cosp) !--- modules use physcons, only: max_lon, max_lat, min_lon, min_lat, & @@ -2331,6 +2558,9 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & integer, intent(in) :: blksz(:) logical, intent(in) :: hydro logical, intent(in) :: do_inline_mp + logical, intent(in) :: do_inline_pbl + logical, intent(in) :: do_inline_cnv + logical, intent(in) :: do_inline_gwd logical, intent(in) :: do_cosp !--- local variables integer :: n, i, j @@ -2918,7 +3148,14 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & Model%dycore_hydrostatic = hydro !--- GFDL microphysical parameters Model%do_sat_adj = do_sat_adj + !--- inline microphysical parameters Model%do_inline_mp = do_inline_mp + !--- inline planetary boundary layer parameters + Model%do_inline_pbl = do_inline_pbl + !--- inline convection parameters + Model%do_inline_cnv = do_inline_cnv + !--- inline gravity wave drag parameters + Model%do_inline_gwd = do_inline_gwd !--- The CFMIP Observation Simulator Package (COSP) Model%do_cosp = do_cosp !--- Zhao-Carr MP parameters @@ -3318,6 +3555,23 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, & ' ntke=',Model%ntke endif + !--- turn off PBL when the inline planetary boundary layer is activated + if (Model%do_inline_pbl) then + Model%no_pbl = .true. + endif + + !--- turn off convection when the inline convection is activated + if (Model%do_inline_cnv) then + Model%do_deep = .false. + Model%shal_cnv = .false. + endif + + !--- turn off gravity wave drag when the inline gravity wave drag is activated + if (Model%do_inline_gwd) then + Model%orogwd = .false. + Model%cnvgwd = .false. + endif + !--- set number of cloud types if (Model%cscnv) then Model%nctp = nint(Model%cs_parm(5)) @@ -3646,7 +3900,14 @@ subroutine control_print(Model) print *, ' dycore_hydrostatic: ', Model%dycore_hydrostatic print *, ' GFDL microphysical parameters' print *, ' do_sat_adj : ', Model%do_sat_adj + print *, ' inline microphysical parameters' print *, ' do_inline_mp : ', Model%do_inline_mp + print *, ' inline planetary boundary layer parameters' + print *, ' do_inline_pbl : ', Model%do_inline_pbl + print *, ' inline convection parameters' + print *, ' do_inline_cnv : ', Model%do_inline_cnv + print *, ' inline gravity wave drag parameters' + print *, ' do_inline_gwd : ', Model%do_inline_gwd print *, ' The CFMIP Observation Simulator Package (COSP)' print *, ' do_cosp : ', Model%do_cosp print *, ' Z-C microphysical parameters'