9 use machine ,
only : kind_phys
48 subroutine rhocoef(t, s, rhoref, alpha, beta)
58 real(kind=kind_phys),
intent(in) :: t, s, rhoref
59 real(kind=kind_phys),
intent(out) :: alpha, beta
60 real(kind=kind_phys) :: tc
66 - 2.0 * 9.095290e-3 * tc + 3.0 * 1.001685e-4 * tc**2 &
67 - 4.0 * 1.120083e-6 * tc**3 + 5.0 * 6.536332e-9 * tc**4 &
69 + 2.0 * 7.6438e-5 * tc * s - 3.0 * 8.2467e-7 * tc**2 * s &
70 + 4.0 * 5.3875e-9 * tc**3 * s &
71 + 1.0227e-4 * s**1.5 - 2.0 * 1.6546e-6 * tc * s**1.5
78 8.24493e-1 - 4.0899e-3 * tc &
79 + 7.6438e-5 * tc**2 - 8.2467e-7 * tc**3 &
80 + 5.3875e-9 * tc**4 - 1.5 * 5.72466e-3 * s**.5 &
81 + 1.5 * 1.0227e-4 * tc * s**.5 &
82 - 1.5 * 1.6546e-6 * tc**2 * s**.5 &
95 real(kind=kind_phys),
intent(in) :: t
96 real(kind=kind_phys),
intent(in) :: s
98 real(kind=kind_phys),
intent(out) :: rho
100 real(kind=kind_phys) :: tc
113 999.842594 + 6.793952e-2 * tc &
114 - 9.095290e-3 * tc**2 + 1.001685e-4 * tc**3 &
115 - 1.120083e-6 * tc**4 + 6.536332e-9 * tc**5 &
116 + 8.24493e-1 * s - 4.0899e-3 * tc * s &
117 + 7.6438e-5 * tc**2 * s - 8.2467e-7 * tc**3 * s &
118 + 5.3875e-9 * tc**4 * s - 5.72466e-3 * s**1.5 &
119 + 1.0227e-4 * tc * s**1.5 - 1.6546e-6 * tc**2 * s**1.5 &
140 real(kind=kind_phys),
intent(in) :: z
141 real(kind=kind_phys),
intent(out) :: fxp
142 real(kind=kind_phys),
dimension(9),
parameter :: f=(/0.237,0.36,0.179,0.087,0.08,0.0246,0.025,0.007,0.0004/)
143 real(kind=kind_phys),
dimension(9),
parameter :: gamma=(/34.8,2.27,3.15e-2,5.48e-3,8.32e-4,1.26e-4,3.13e-4,7.82e-5,1.44e-5/)
146 fxp=one-(f(1)*exp(-z/gamma(1))+f(2)*exp(-z/gamma(2))+f(3)*exp(-z/gamma(3))+ &
147 f(4)*exp(-z/gamma(4))+f(5)*exp(-z/gamma(5))+f(6)*exp(-z/gamma(6))+ &
148 f(7)*exp(-z/gamma(7))+f(8)*exp(-z/gamma(8))+f(9)*exp(-z/gamma(9)))
172 real(kind=kind_phys),
intent(in) :: z
173 real(kind=kind_phys),
intent(out) :: aw
174 real(kind=kind_phys),
dimension(9),
parameter :: f=(/0.237,0.36,0.179,0.087,0.08,0.0246,0.025,0.007,0.0004/)
175 real(kind=kind_phys),
dimension(9),
parameter :: gamma=(/34.8,2.27,3.15e-2,5.48e-3,8.32e-4,1.26e-4,3.13e-4,7.82e-5,1.44e-5/)
178 aw=(f(1)/gamma(1))*exp(-z/gamma(1))+(f(2)/gamma(2))*exp(-z/gamma(2))+(f(3)/gamma(3))*exp(-z/gamma(3))+ &
179 (f(1)/gamma(4))*exp(-z/gamma(4))+(f(2)/gamma(5))*exp(-z/gamma(5))+(f(6)/gamma(6))*exp(-z/gamma(6))+ &
180 (f(1)/gamma(7))*exp(-z/gamma(7))+(f(2)/gamma(8))*exp(-z/gamma(8))+(f(9)/gamma(9))*exp(-z/gamma(9))
203 real(kind=kind_phys),
intent(in) :: z
204 real(kind=kind_phys),
intent(out) :: fxp
206 real(kind=kind_phys),
dimension(9),
parameter :: f=(/0.237,0.36,0.179,0.087,0.08,0.0246,0.025,0.007,0.0004/)
207 real(kind=kind_phys),
dimension(9),
parameter :: gamma=(/34.8,2.27,3.15e-2,5.48e-3,8.32e-4,1.26e-4,3.13e-4,7.82e-5,1.44e-5/)
208 real(kind=kind_phys),
dimension(9) :: zgamma
209 real(kind=kind_phys),
dimension(9) :: f_c
213 f_c=f*(one-one/zgamma*(one-exp(-zgamma)))
241 real(kind=kind_phys),
intent(in) :: z
242 real(kind=kind_phys),
intent(out) :: aw
244 real(kind=kind_phys),
dimension(9),
parameter :: f=(/0.237,0.36,0.179,0.087,0.08,0.0246,0.025,0.007,0.0004/)
245 real(kind=kind_phys),
dimension(9),
parameter :: gamma=(/34.8,2.27,3.15e-2,5.48e-3,8.32e-4,1.26e-4,3.13e-4,7.82e-5,1.44e-5/)
246 real(kind=kind_phys),
dimension(9) :: zgamma
247 real(kind=kind_phys),
dimension(9) :: f_aw
251 f_aw=(f/z)*((gamma/z)*(one-exp(-zgamma))-exp(-zgamma))
278 real(kind=kind_phys),
intent(in) :: z
279 real(kind=kind_phys),
intent(out) :: sum
281 real(kind=kind_phys),
dimension(9),
parameter :: gamma=(/34.8,2.27,3.15e-2,5.48e-3,8.32e-4,1.26e-4,3.13e-4,7.82e-5,1.44e-5/)
282 real(kind=kind_phys),
dimension(9) :: zgamma
283 real(kind=kind_phys),
dimension(9) :: f_sum
289 sum=( one/gamma(1))*exp(-z/gamma(1))+(one/gamma(2))*exp(-z/gamma(2))+(one/gamma(3))*exp(-z/gamma(3))+ &
290 (one/gamma(4))*exp(-z/gamma(4))+(one/gamma(5))*exp(-z/gamma(5))+(one/gamma(6))*exp(-z/gamma(6))+ &
291 (one/gamma(7))*exp(-z/gamma(7))+(one/gamma(8))*exp(-z/gamma(8))+(one/gamma(9))*exp(-z/gamma(9))
313 real(kind=kind_phys),
intent(in) :: z,f_sol_0
314 real(kind=kind_phys),
intent(out) :: df_sol_z
317 df_sol_z=f_sol_0*(0.137+11.0*z-6.6e-6/z*(one-exp(-z/8.e-4)))
343 real(kind=kind_phys),
intent(in) :: z,f_sol_0
344 real(kind=kind_phys),
intent(out) :: df_sol_z
347 df_sol_z=f_sol_0*(0.065+11.0*z-6.6e-5/z*(one-exp(-z/8.e-4)))
375 real(kind=kind_phys),
intent(in) :: z,f_sol_0
376 real(kind=kind_phys),
intent(out) :: df_sol_z
377 real(kind=kind_phys),
dimension(3) :: f_c
378 real(kind=kind_phys),
dimension(3),
parameter :: f=(/0.45,0.27,0.28/)
379 real(kind=kind_phys),
dimension(3),
parameter :: gamma=(/12.82,0.357,0.014/)
382 f_c = f*gamma(int(one-exp(-z/gamma)))
383 df_sol_z = f_sol_0*(one-sum(f_c)/z)
405 real(kind=kind_phys),
intent(in) :: z,f_sol_0
406 real(kind=kind_phys),
intent(out) :: df_sol_z
409 df_sol_z=f_sol_0*(one &
410 -(0.28*0.014*(one-exp(-z/0.014)) &
411 + 0.27*0.357*(one-exp(-z/0.357)) &
412 + 0.45*12.82*(one-exp(-z/12.82)))/z &
432 real(kind=kind_phys),
intent(in) :: z
433 real(kind=kind_phys),
intent(out) :: aw
434 real(kind=kind_phys) :: fxp
438 -(0.28*0.014*(one-exp(-z/0.014)) &
439 + 0.27*0.357*(one-exp(-z/0.357)) &
440 + 0.45*12.82*(one-exp(-z/12.82)))/z &
442 aw=one-fxp-(0.28*exp(-z/0.014)+0.27*exp(-z/0.357)+0.45*exp(-z/12.82))
462 real(kind=kind_phys),
intent(in) :: z
463 real(kind=kind_phys),
intent(out) :: fxp
466 fxp=.065+11.*z-6.6e-5/z*(one-exp(-z/8.0e-4))
475 real(kind_phys) function
grv(x)
476 real(kind=kind_phys) :: x
477 real(kind=kind_phys) :: gamma,c1,c2,c3,c4
484 grv=gamma*(one+(c1*x**2)+(c2*x**4)+(c3*x**6)+(c4*x**8))
493 real(kind=kind_phys),
intent(in) :: jday
494 real(kind=kind_phys),
intent(in) :: xlon
495 real(kind=kind_phys),
intent(out) :: soltim
496 real(kind=kind_phys) :: fjd,xhr,xmin,xsec,intime
500 xhr=floor(fjd*24.0)-sign(12.0,fjd-half)
501 xmin=nint(fjd*1440.0)-(xhr+sign(12.0,fjd-half))*60.0
503 intime=xhr+xmin/60.0+xsec/3600.0+24.0
504 soltim=mod(xlon/15.0+intime,24.0)*3600.0
513 subroutine compjd(jyr,jmnth,jday,jhr,jmn,jd,fjd)
546 integer :: jyr,jmnth,jday,jhr,jmn,jd
548 real (kind=kind_phys) fjd
549 jd=iw3jdn(jyr,jmnth,jday)
552 fjd=half+jhr/24.+jmn/1440.
554 fjd=(jhr-12)/24.+jmn/1440.
588 real (kind=kind_phys),
intent(in) :: xt,xz,dt_cool,zc,z1,z2
589 real (kind=kind_phys),
intent(out) :: dtm
591 real (kind=kind_phys) :: dt_warm,dtw,dtc
597 if ( xt > zero )
then
601 dtw = dt_warm*(one-(z1+z2)/(xz+xz))
602 elseif ( z1 < xz .and. z2 >= xz )
then
603 dtw = half*(one-z1/xz)*dt_warm*(xz-z1)/(z2-z1)
605 elseif ( z1 == z2 )
then
607 dtw = dt_warm*(one-z1/xz)
615 if ( zc > zero )
then
618 dtc = dt_cool*(one-(z1+z2)/(zc+zc))
619 elseif ( z1 < zc .and. z2 >= zc )
then
620 dtc = half*(one-z1/zc)*dt_cool*(zc-z1)/(z2-z1)
622 elseif ( z1 == z2 )
then
624 dtc = dt_cool*(one-z1/zc)
637 subroutine get_dtzm_2d(xt,xz,dt_cool,zc,wet,z1,z2,nx,ny,nth,dtm)
671 integer,
intent(in) :: nx,ny, nth
672 real (kind=kind_phys),
dimension(nx,ny),
intent(in) :: xt,xz,dt_cool,zc
673 logical,
dimension(nx,ny),
intent(in) :: wet
675 real (kind=kind_phys),
intent(in) :: z1,z2
676 real (kind=kind_phys),
dimension(nx,ny),
intent(out) :: dtm
679 real (kind=kind_phys) :: dt_warm, dtw, dtc, xzi
693 if ( xt(i,j) > zero )
then
695 dt_warm = (xt(i,j)+xt(i,j)) * xzi
697 if ( z2 < xz(i,j) )
then
698 dtw = dt_warm * (one-half*(z1+z2)*xzi)
699 elseif (z1 < xz(i,j) .and. z2 >= xz(i,j) )
then
700 dtw = half*(one-z1*xzi)*dt_warm*(xz(i,j)-z1)/(z2-z1)
702 elseif (z1 == z2 )
then
703 if (z1 < xz(i,j) )
then
704 dtw = dt_warm * (one-z1*xzi)
712 if ( zc(i,j) > zero )
then
714 if ( z2 < zc(i,j) )
then
715 dtc = dt_cool(i,j) * (one-(z1+z2)/(zc(i,j)+zc(i,j)))
716 elseif ( z1 < zc(i,j) .and. z2 >= zc(i,j) )
then
717 dtc = half*(one-z1/zc(i,j))*dt_cool(i,j)*(zc(i,j)-z1)/(z2-z1)
719 elseif ( z1 == z2 )
then
720 if ( z1 < zc(i,j) )
then
721 dtc = dt_cool(i,j) * (one-z1/zc(i,j))
elemental subroutine sw_fairall_6exp_v1_sum(z, sum)
This subroutine computes fraction of the solar radiation absorbed by the ocean at the depth z (Fairal...
subroutine, public density(t, s, rho)
This subroutine computes sea water density.
subroutine, public get_dtzm_point(xt, xz, dt_cool, zc, z1, z2, dtm)
This subroutine computes dtm (the mean of ).
subroutine compjd(jyr, jmnth, jday, jhr, jmn, jd, fjd)
This subroutine computes julian day and fraction from year, month, day and time UTC.
elemental subroutine sw_soloviev_3exp_v1(f_sol_0, z, df_sol_z)
This subroutine computes solar radiation absorbed by the ocean at the depth z (Fairall et al....
elemental subroutine sw_fairall_6exp_v1(z, fxp)
This subroutine computes fraction of the solar radiation absorbed by the ocean at the depth z (Fairal...
elemental subroutine sw_wick_v1(f_sol_0, z, df_sol_z)
solar radiation absorbed by the ocean at the depth z (Zeng and Beljaars (2005) zeng_and_beljaars_2005...
elemental subroutine sw_fairall_6exp_v1_aw(z, aw)
This subroutine calculates fraction of the solar radiation absorbed by the ocean at the depth z (fair...
subroutine, public rhocoef(t, s, rhoref, alpha, beta)
This subroutine computes thermal expansion coefficient (alpha) and saline contraction coefficient (be...
subroutine, public get_dtzm_2d(xt, xz, dt_cool, zc, wet, z1, z2, nx, ny, nth, dtm)
elemental subroutine sw_fairall_simple_v1(f_sol_0, z, df_sol_z)
Solar radiation absorbed by the ocean at the depth z (Fairall et al. (1996) fairall_et_al_1996,...
subroutine solar_time_from_julian(jday, xlon, soltim)
This subroutine computes solar time from the julian date.
elemental subroutine sw_soloviev_3exp_v2_aw(z, aw)
elemental subroutine sw_ohlmann_v1(z, fxp)
elemental subroutine sw_soloviev_3exp_v2(f_sol_0, z, df_sol_z)
real(kind_phys) function, public grv(x)
This module contains constants and parameters used in GFS near surface sea temperature scheme.
This module contains GFS NSST water property subroutines.