Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions physics/GFS_rrtmgp_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = GFS_rrtmgp_post
type = scheme
dependencies = iounitdef.f,machine.F,radiation_aerosols.f,radlw_param.f,radiation_tools.F90,rte-rrtmgp/extensions/mo_heating_rates.F90
dependencies = rte-rrtmgp/rrtmgp/mo_rrtmgp_constants.F90

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module doesn't use mo_rrtmgp_constants. Why add the dependency here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thanks for chiming in @dustinswales . I didn't see the need for it directly, although I think it is a "second-order" dependency because mo_heating_rates uses the constants?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply! I worked out those dependencies one by one, and I haven't tested the changes in UFS weather model.


########################################################################
[ccpp-arg-table]
Expand Down
4 changes: 2 additions & 2 deletions physics/GFS_rrtmgp_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ subroutine GFS_rrtmgp_pre_run(me, nCol, nLev, i_o3, doSWrad, doLWrad, fhswr, fhl
vmr_co2 = gas_vmr(:,:,1)

! Compute volume mixing-ratios for ozone (mmr) and specific-humidity.
vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0., q_lay .ne. 1.)
vmr_o3 = merge(o3_lay*amdo3, 0., o3_lay .gt. 0.)
vmr_h2o = merge((q_lay/(1-q_lay))*amdw, 0.0_kind_phys, q_lay .ne. 1.)
vmr_o3 = merge(o3_lay*amdo3, 0.0_kind_phys, o3_lay .gt. 0.)

! #######################################################################################
! Radiation time step (output) (Is this really needed?) (Used by some diagnostics)
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_suite_interstitial_3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ subroutine GFS_suite_interstitial_3_run (otsptflag, &
integer, intent(in) :: ntinc, ntlnc
logical, intent(in) :: ldiag3d, qdiag3d
integer, dimension(:,:), intent(in) :: dtidx
real, dimension(:,:), intent(out) :: save_lnc, save_inc
real(kind=kind_phys), dimension(:,:), intent(out) :: save_lnc, save_inc

real(kind=kind_phys), intent(in ) :: rhcbot, rhcmax, rhcpbl, rhctop
real(kind=kind_phys), intent(in ), dimension(:) :: work1, work2
Expand Down
68 changes: 35 additions & 33 deletions physics/cires_orowam2017.f
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,28 @@ subroutine oro_wam_2017(im, levs,npt,ipt, kref,kdt,me,master,
real(kind=kind_phys), parameter :: hps =7000., rhp2 = .5/hps
real(kind=kind_phys), parameter :: cxmin=0.5, cxmin2=cxmin*cxmin

real :: akx(nworo), cxoro(nworo), akx2(nworo)
real :: aspkx(nworo), c2f2(nworo) , cdf2(nworo)
real :: tau_sp(nworo,levs+1), wkdis(nworo, levs+1)
real :: tau_kx(nworo),taub_kx(nworo)
real, dimension(nworo, levs+1) :: wrms, akzw

real :: tauz(levs+1), rms_wind(levs+1)
real :: wave_act(nworo,levs+1)

real :: kxw, kzw, kzw2, kzw3, kzi, dzmet, rhoint
real :: rayf, kturb
real :: uz, bv, bv2,kxsp, fcor2, cf2

real :: fdis
real :: wfdm, wfdt, wfim, wfit
real :: betadis, betam, betat, kds, cx, rhofac
real :: etwk, etws, tauk, cx2sat
real :: cdf1, tau_norm
real(kind_phys) :: akx(nworo), cxoro(nworo), akx2(nworo)
real(kind_phys) :: aspkx(nworo), c2f2(nworo) , cdf2(nworo)
real(kind_phys) :: tau_sp(nworo,levs+1), wkdis(nworo, levs+1)
real(kind_phys) :: tau_kx(nworo),taub_kx(nworo)
real(kind_phys), dimension(nworo, levs+1) :: wrms, akzw

real(kind_phys) :: tauz(levs+1), rms_wind(levs+1)
real(kind_phys) :: wave_act(nworo,levs+1)

real(kind_phys) :: kxw, kzw, kzw2, kzw3, kzi, dzmet, rhoint
real(kind_phys) :: rayf, kturb
real(kind_phys) :: uz, bv, bv2,kxsp, fcor2, cf2

real(kind_phys) :: fdis
real(kind_phys) :: wfdm, wfdt, wfim, wfit
real(kind_phys) :: betadis, betam, betat, kds, cx, rhofac
real(kind_phys) :: etwk, etws, tauk, cx2sat
real(kind_phys) :: cdf1, tau_norm
!
! mean flow
!
real, dimension(levs+1) :: uzi,rhoi,ktur, kalp, dzi
real(kind_phys), dimension(levs+1) :: uzi,rhoi,ktur, kalp, dzi

integer :: nw, nzi, ksrc
taud (:, :) = 0.0 ; pkdis(:,:) = 0.0 ; taup (:,:) = 0.0
Expand Down Expand Up @@ -286,29 +286,31 @@ end subroutine oro_wam_2017
subroutine oro_meanflow_v0(nz, nzi, u1, v1, t1, pint, pmid,
& delp, rho, bn2, uzi, rhoi, ktur, kalp, dzi, xn, yn)

use machine, only: kind_phys
use ugwp_common_v0 , only : grav, rgrav, rdi, velmin, dw2min
implicit none

integer :: nz, nzi
real, dimension(nz ) :: u1, v1, t1, delp, rho, pmid
real, dimension(nz ) :: bn2 ! define at the interfaces
real, dimension(nz+1) :: pint
real :: xn, yn
real(kind_phys), dimension(nz ) :: u1, v1, t1, delp, rho, pmid
real(kind_phys), dimension(nz ) :: bn2 ! define at the interfaces
real(kind_phys), dimension(nz+1) :: pint
real(kind_phys) :: xn, yn
! output

real, dimension(nz+1) :: dzi, uzi, rhoi, ktur, kalp
real(kind_phys), dimension(nz+1) :: dzi, uzi, rhoi, ktur, kalp

! locals
integer :: i, j, k
real :: ui, vi, ti, uz, vz, shr2, rdz, kamp
real :: zgrow, zmet, rdpm, ritur, kmol, w1
real(kind_phys) :: ui, vi, ti, uz, vz, shr2, rdz, kamp
real(kind_phys) :: zgrow, zmet, rdpm, ritur, kmol, w1
! paremeters
real, parameter :: hps = 7000., rpspa = 1.e-5
real, parameter :: rhps=1.0/hps
real, parameter :: h4= 0.25/hps
real, parameter :: rimin = 1.0/8.0, kedmin = 0.01
real, parameter :: lturb = 30. , uturb = 150.0
real, parameter :: lsc2 = lturb*lturb,usc2 = uturb*uturb
real(kind_phys), parameter :: hps = 7000., rpspa = 1.e-5
real(kind_phys), parameter :: rhps=1.0/hps
real(kind_phys), parameter :: h4= 0.25/hps
real(kind_phys), parameter :: rimin = 1.0/8.0, kedmin = 0.01
real(kind_phys), parameter :: lturb = 30. , uturb = 150.0
real(kind_phys), parameter :: lsc2 = lturb*lturb
real(kind_phys), parameter :: usc2 = uturb*uturb
kalp(1:nzi) = 2.e-7 ! radiative damping

do k=2, nz
Expand All @@ -323,7 +325,7 @@ subroutine oro_meanflow_v0(nz, nzi, u1, v1, t1, pint, pmid,
uz = u1(k)-u1(k-1)
vz = v1(k)-v1(k-1)
shr2 = rdz*rdz*(max(uz*uz+vz*vz, dw2min))
zmet = -hps*alog(pint(k)*rpspa)
zmet = -hps*log(pint(k)*rpspa)
zgrow = exp(zmet*h4)
kmol = 2.e-5*exp(zmet*rhps)+kedmin
ritur = max(bn2(k)/shr2, rimin)
Expand Down
Loading