Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ subroutine gw_intr (pcols, pver, dt, pgwv,
real :: cw (-pgwv:pgwv) ! wave phase speeds
real :: cw4(-pgwv:pgwv) ! wave phase speeds


!-----------------------------------------------------------------------------

! Assign wave phase speeds
Expand Down Expand Up @@ -292,8 +293,8 @@ subroutine gw_intr (pcols, pver, dt, pgwv,

! Add the orographic tendencies to the spectrum tendencies
! Compute the temperature tendency from energy conservation (includes spectrum).

do k = 1, pver
do k = 1, pver
dudt_org_dev(i,k) = utgw(k)
dvdt_org_dev(i,k) = vtgw(k)
dtdt_org_dev(i,k) = ttgw(k)
Expand All @@ -308,7 +309,8 @@ subroutine gw_intr (pcols, pver, dt, pgwv,
end if

end do I_LOOP
rc = 0

rc = 0

return
end subroutine gw_intr
Expand Down Expand Up @@ -489,15 +491,27 @@ subroutine gw_oro (i, pcols, pver, pgwv, &
end if

! Project the local wind at midpoints onto the source wind.

do k = 1, pver
ubm(k) = u(i,k) * xv + v(i,k) * yv
if (pm(i,k) >= 1.0) then ! GEOS_MLT
ubm(k) = u(i,k) * xv + v(i,k) * yv
end if
end do

! Compute the interface wind projection by averaging the midpoint winds.
! Use the top level wind at the top interface.
ubi(0) = ubm(1)

do k = 1, pver
ubi(k) = ubm(k)
if (pm(i,k) >= 1.0) then ! GEOS_MLT
ubi(0) = ubm(k)
exit
end if
end do

do k = 1, pver
if (pm(i,k) >= 1.0) then ! GEOS_MLT
ubi(k) = ubm(k)
end if
end do

! Determine the orographic c=0 source term following McFarlane (1987).
Expand Down Expand Up @@ -647,13 +661,14 @@ subroutine gw_bgnd (i, pcols, pver, cw, &
end if

! Project the local wind at midpoints onto the source wind.
do k = 1, pver
!do k = 1, pver
do k = 8, pver

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Andrew-won-Lee This probably needs it as well. k=8 is still an assumption

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.

There is another one.. thanks modified it.

ubm(k) = u(i,k) * xv + v(i,k) * yv
end do

! Compute the bottom interface wind projection using the midpoint winds.
ubi(0) = ubm(1)
do k = 1, pver
do k = 8, pver
ubi(k) = ubm(k)
end do

Expand Down Expand Up @@ -862,7 +877,7 @@ subroutine gw_drag_prof (i, pcols, pver, &

! Loop from bottom to top to get stress profiles
do l = -ngwv, ngwv
do k = pver-1, ktop, -1
do k = pver-1, ktop, -1
if (k <= kbot-1) then
d = dback(k)
ubmc = ubi(k) - c(l)
Expand Down Expand Up @@ -1075,6 +1090,7 @@ subroutine gw_drag_prof (i, pcols, pver, &
tau0x = tau(0,kbot) * xv * effgw*utfac
tau0y = tau(0,kbot) * yv * effgw*utfac


return
end subroutine gw_drag_prof

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,32 @@ subroutine gw_intr_ncar(pcols, pver, dt, nrdg,
dtdt_gwd_dev = dtdt_gwd_dev + dtdt_org_dev
endif

! GEOS_MLT: Zero out gravity wave drag tendencies above 0.01 hPa.
! k=1 is at model top, k=pver is near the surface.
! pmid_dev is layer-midpoint pressure in Pa; 0.01 hPa = 1 Pa.

do k = 1, pver
do i = 1, pcols
if (pmid_dev(i,k) < 1.0) then
dudt_gwd_dev(i,k) = 0.0
dvdt_gwd_dev(i,k) = 0.0
dtdt_gwd_dev(i,k) = 0.0
dudt_org_dev(i,k) = 0.0
dvdt_org_dev(i,k) = 0.0
dtdt_org_dev(i,k) = 0.0
end if
end do
end do


taugwdx_dev(1:pcols) = 0.0 !zonal gravity wave surface stress
taugwdy_dev(1:pcols) = 0.0 !meridional gravity wave surface stress
taubkgx_dev(1:pcols) = 0.0 !zonal gravity wave background stress
taubkgy_dev(1:pcols) = 0.0 !meridional gravity wave background stress




return
end subroutine gw_intr_ncar

Expand Down
Loading