Skip to content

Commit f211b01

Browse files
authored
Merge pull request #8 from natgeo-wong/main
Adding radiative tendencies and fixed wind fluxes
2 parents b693b44 + d331d32 commit f211b01

File tree

4 files changed

+52
-17
lines changed

4 files changed

+52
-17
lines changed

forcing.f90

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,26 @@ subroutine forcing
322322

323323
endif
324324

325+
!----------------------------------------------------------------------------
326+
! Temperature Tendency Forcing:
327+
! Simple Radiative Tendencies taken from Pauluis & Garner [2006]
328+
329+
if(doradtendency.and.time.gt.timelargescale) then
330+
331+
do k = 1,nzm
332+
do j=1,ny
333+
do i=1,nx
334+
if (tabs(i,j,k)>207.5) then
335+
t(i,j,k) = t(i,j,k) - dtn * troptend / 86400
336+
else
337+
t(i,j,k) = t(i,j,k) + dtn * (200 - tabs(i,j,k)) / (5*86400)
338+
end if
339+
end do
340+
end do
341+
end do
342+
343+
endif
344+
325345
!-------------------------------------------------------------------------------
326346

327347
if(.not.dosfcforcing.and.dodynamicocean) call sst_evolve()

params.f90

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ module params
134134
real:: bubble_dtemp = 0.
135135
real:: bubble_dq = 0.
136136

137-
! The following are added by Kuang Lab at Harvard
137+
!!!!! The following are added by Kuang Lab at Harvard !!!!!
138138

139139
! Options
140140
logical:: dompiensemble = .false. ! Subdomains defined in domains.f90 are run separately
@@ -146,5 +146,13 @@ module params
146146
real:: tperturbA = 1. ! Default perturbation 1 time positive
147147
real:: qperturbA = 1.
148148

149+
! Radiative tendencies as per Pauluis & Garner [2006]
150+
logical :: doradtendency = .false.
151+
real :: troptend = 1.5 ! Convective tendency in Pauluis & Garner [2006]
152+
153+
! Option to fix wind speed used in calculation of bulk surface fluxes
154+
! Taken from Peter Blossey's version of SAM
155+
logical :: dobulksfcflx = .false.
156+
real :: bulksfcflx_u = 0.
149157

150158
end module params

setparm.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ subroutine setparm
4747

4848
! Parameters added by Kuang Lab at Harvard
4949
NAMELIST /KUANG_PARAMS/ dompiensemble, &
50-
dolayerperturb, tperturbi, qperturbi, tperturbA, qperturbA ! linear response perturbation: layer by layer (Song Qiyu, 2022)
50+
dolayerperturb, tperturbi, qperturbi, tperturbA, qperturbA, &
51+
doradtendency, troptend, &
52+
dobulksfcflx, bulksfcflx_u
5153

5254
!bloss: Create dummy namelist, so that we can figure out error code
5355
! for a mising namelist. This lets us differentiate between

surface.f90

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,26 @@ subroutine surface()
3535

3636
if(landmask(i,j).eq.0) then
3737

38-
u_h = 0.5*(u(i+1,j,1)+u(i,j,1)) + ug
39-
v_h = 0.5*(v(i,j+YES3D,1)+v(i,j,1)) + vg
40-
ta_h = tabs(i,j,1)
41-
q_h = qv(i,j,1)
42-
t_h = tabs(i,j,1)*prespot(1)
43-
t_s = (sstxy(i,j)+t00)*prespoti(1)
44-
q_s = salt_factor*qsatw(sstxy(i,j)+t00,presi(1))
45-
46-
call oceflx(rho(1), u_h, v_h, ta_h, q_h, t_h, z(1)-zi(1), t_s, q_s, &
47-
fluxt0, fluxq0, taux0, tauy0)
48-
49-
fluxbu(i,j) = taux0/rho(1)
50-
fluxbv(i,j) = tauy0/rho(1)
51-
fluxbt(i,j) = fluxt0
52-
fluxbq(i,j) = fluxq0
38+
u_h = 0.5*(u(i+1,j,1)+u(i,j,1)) + ug
39+
v_h = 0.5*(v(i,j+YES3D,1)+v(i,j,1)) + vg
40+
ta_h = tabs(i,j,1)
41+
q_h = qv(i,j,1)
42+
t_h = tabs(i,j,1)*prespot(1)
43+
t_s = (sstxy(i,j)+t00)*prespoti(1)
44+
q_s = salt_factor*qsatw(sstxy(i,j)+t00,presi(1))
45+
46+
if (dobulksfcflx) then
47+
call oceflx(rho(1), u_h, v_h, ta_h, q_h, t_h, z(1)-zi(1), t_s, q_s, &
48+
fluxt0, fluxq0, taux0, tauy0)
49+
else
50+
call oceflx(rho(1), bulksfcflx_u, 0, ta_h, q_h, t_h, z(1)-zi(1), t_s, q_s, &
51+
fluxt0, fluxq0, taux0, tauy0)
52+
endif
53+
54+
fluxbu(i,j) = taux0/rho(1)
55+
fluxbv(i,j) = tauy0/rho(1)
56+
fluxbt(i,j) = fluxt0
57+
fluxbq(i,j) = fluxq0
5358

5459
end if
5560

0 commit comments

Comments
 (0)