Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions physics/GFS_PBL_generic.F90
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
! & dtf,' kdt=',kdt,' lat=',lat
! endif

if (ldiag3d .and. flag_for_pbl_generic_tend .and. lssav) then
if_diag: if (ldiag3d .and. flag_for_pbl_generic_tend .and. lssav) then
Comment thread
DomHeinzeller marked this conversation as resolved.
if (lsidea) then
dt3dt(1:im,:) = dt3dt(1:im,:) + dtdt(1:im,:)*dtf
else
Expand All @@ -615,8 +615,8 @@ subroutine GFS_PBL_generic_post_run (im, levs, nvdiff, ntrac,
enddo
enddo
endif
endif

endif if_diag
endif ! end if_lssav

end subroutine GFS_PBL_generic_post_run
Expand Down
2 changes: 1 addition & 1 deletion physics/moninedmf.f
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ subroutine hedmf_run (ix,im,km,ntrac,ntcw,dv,du,tau,rtg, &
enddo
enddo
if(lssav .and. ldiag3d .and. ntoz>0 .and. qdiag3d .and. &
& flag_for_pbl_generic_tend) then
& .not. flag_for_pbl_generic_tend) then
kk = ntoz
is = (kk-1) * km
do k = 1, km
Expand Down
25 changes: 24 additions & 1 deletion physics/satmedmfvdifq.F
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
& prsi,del,prsl,prslk,phii,phil,delt, &
& dspheat,dusfc,dvsfc,dtsfc,dqsfc,hpbl, &
& kinver,xkzm_m,xkzm_h,xkzm_s,dspfac,bl_upfr,bl_dnfr, &
& ntoz,du3dt,dv3dt,dt3dt,dq3dt,do3dt,ldiag3d,qdiag3d, &
& errmsg,errflg)
!
use machine , only : kind_phys
Expand All @@ -73,9 +74,10 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
implicit none
!
!----------------------------------------------------------------------
integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke
integer, intent(in) :: ix, im, km, ntrac, ntcw, ntiw, ntke, ntoz
integer, intent(in) :: kinver(im)
integer, intent(out) :: kpbl(im)
logical, intent(in) :: ldiag3d,qdiag3d
!
real(kind=kind_phys), intent(in) :: grav,rd,cp,rv,hvap,hfus,fv, &
& eps,epsm1
Expand All @@ -97,6 +99,10 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
& prsi(ix,km+1), del(ix,km), &
& prsl(ix,km), prslk(ix,km), &
& phii(ix,km+1), phil(ix,km)
real(kind=kind_phys), intent(inout), dimension(:,:) :: &
& du3dt(:,:), dv3dt(:,:), &
& dt3dt(:,:), dq3dt(:,:), &
& do3dt(:,:)
real(kind=kind_phys), intent(out) :: &
& dusfc(im), dvsfc(im), &
& dtsfc(im), dqsfc(im), &
Expand Down Expand Up @@ -1301,6 +1307,12 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
rtg(i,k,1) = rtg(i,k,1)+qtend
dtsfc(i) = dtsfc(i)+cont*del(i,k)*ttend
dqsfc(i) = dqsfc(i)+conq*del(i,k)*qtend
if(ldiag3d) then
dt3dt(i,k) = dt3dt(i,k)+dspfac*ttend
if(qdiag3d) then
dq3dt(i,k) = dq3dt(i,k)+dspfac*qtend
endif
endif
enddo
enddo
!
Expand All @@ -1311,6 +1323,9 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
do i = 1, im
qtend = (f2(i,k+is)-q1(i,k,kk))*rdt
rtg(i,k,kk) = rtg(i,k,kk)+qtend
if(kk==ntoz) then
Comment thread
DomHeinzeller marked this conversation as resolved.
Outdated
do3dt(i,k) = do3dt(i,k)+qtend
endif
enddo
enddo
enddo
Expand All @@ -1325,6 +1340,9 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
! ttend = tem / cp
ttend = diss(i,k) / cp
tdt(i,k) = tdt(i,k) + dspfac * ttend
if(ldiag3d) then
dt3dt(i,k) = dt3dt(i,k)+dspfac * ttend
endif
enddo
enddo
endif
Expand Down Expand Up @@ -1401,6 +1419,11 @@ subroutine satmedmfvdifq_run(ix,im,km,ntrac,ntcw,ntiw,ntke, &
dv(i,k) = dv(i,k)+vtend
dusfc(i) = dusfc(i)+conw*del(i,k)*utend
dvsfc(i) = dvsfc(i)+conw*del(i,k)*vtend

if(ldiag3d) then
du3dt(i,k) = du3dt(i,k) + utend
dv3dt(i,k) = dv3dt(i,k) + vtend
endif
enddo
enddo
!
Expand Down
69 changes: 69 additions & 0 deletions physics/satmedmfvdifq.meta
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,75 @@
kind = kind_phys
intent = in
optional = F
[ntoz]
standard_name = index_for_ozone
long_name = tracer index for ozone mixing ratio
units = index
dimensions = ()
type = integer
intent = in
optional = F
[du3dt]
standard_name = cumulative_change_in_x_wind_due_to_PBL
long_name = cumulative change in x wind due to PBL
units = m s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[dv3dt]
standard_name = cumulative_change_in_y_wind_due_to_PBL
long_name = cumulative change in y wind due to PBL
units = m s-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[dt3dt]
standard_name = cumulative_change_in_temperature_due_to_PBL
long_name = cumulative change in temperature due to PBL
units = K
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[dq3dt]
standard_name = cumulative_change_in_water_vapor_specific_humidity_due_to_PBL
long_name = cumulative change in water vapor specific humidity due to PBL
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[do3dt]
standard_name = cumulative_change_in_ozone_mixing_ratio_due_to_PBL
long_name = cumulative change in ozone mixing ratio due to PBL
units = kg kg-1
dimensions = (horizontal_dimension,vertical_dimension)
type = real
kind = kind_phys
intent = inout
optional = F
[ldiag3d]
standard_name = flag_diagnostics_3D
long_name = flag for 3d diagnostic fields
units = flag
dimensions = ()
type = logical
intent = inout
optional = F
[qdiag3d]
standard_name = flag_tracer_diagnostics_3D
long_name = flag for 3d tracer diagnostic fields
units = flag
dimensions = ()
type = logical
intent = inout
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down