1 !WRF:MODEL_LAYER:PHYSICS
3 MODULE module_sf_sstskin
7 SUBROUTINE sst_skin_update(xland,glw,gsw,hfx,qfx,tsk,ust,emiss, &
8 dtw1,sstsk,dt,stbolt, &
9 ids, ide, jds, jde, kds, kde, &
10 ims, ime, jms, jme, kms, kme, &
11 its, ite, jts, jte, kts, kte )
18 !---------------------------------------------------------------------
19 INTEGER , INTENT(IN) :: ids, ide, jds, jde, kds, kde, &
20 ims, ime, jms, jme, kms, kme, &
21 its, ite, jts, jte, kts, kte
24 REAL, DIMENSION( ims:ime , jms:jme ) , INTENT(IN ) :: xland, glw, gsw
25 REAL, DIMENSION( ims:ime , jms:jme ) , INTENT(IN ) :: hfx, qfx, tsk
26 REAL, DIMENSION( ims:ime , jms:jme ) , INTENT(IN ) :: ust, emiss
27 REAL, DIMENSION( ims:ime , jms:jme ) , INTENT(INOUT ) :: dtw1 ! warm temp difference (C)
28 REAL, DIMENSION( ims:ime , jms:jme ) , INTENT(INOUT ) :: sstsk ! skin sst (K)
29 REAL, INTENT(IN ) :: DT ! model time step
30 REAL, INTENT(IN ) :: STBOLT ! Stefan-Boltzmann constant (W/m^2/K^4)
31 !---------------------------------------------------------------------
33 REAL :: lw, sw, q, qn, zeta, dep, dtw3, skinmax, skinmin
34 REAL :: fs, con1, con2, con3, con4, con5, zlan, q2, ts, phi, qn1
35 REAL :: usw, qo, swo, us, tb, dtc, dtw, alw, dtwo, delt, f1
37 !---------------------------------------------------------------------
38 INTEGER , PARAMETER :: n=1152
39 REAL , PARAMETER :: z1=3.,an=.3,zk=.4,rho=1.2,rhow=1025.,cw=4190.
40 REAL , PARAMETER :: g=9.8,znuw=1.e-6,zkw=1.4e-7,sdate=1201.6667
41 ! parameter(g=9.8,delt=900.,znuw=1.e-6,zkw=1.4e-7)
44 ! (all fluxes are positive downwards)
45 ! real qo ! LH + SH + LW (W/m^2), + down
46 ! real swo ! Net shortwave flux (W/m^2), + down
47 ! real u ! Wind speed (m/s)
48 ! real us ! Atmospheric friction velocity (m/s)
49 ! real tb ! Bulk temperature (deg C)
50 ! real dtwo ! Warm layer temp. diff. from previous time (deg C)
54 ! real q ! LH + SH + LW
55 ! real qn ! Q + R_s - R(-d)
57 ! real dep ! Skin layer depth (m)
60 ! real dtw ! Warm layer temp. diff. (deg C)
61 ! real dtc ! Cool skin temp. diff. (deg C)
62 ! real ts ! Skin temperature (deg C)
70 if(xland(i,j).ge.1.5) then
71 qo=glw(i,j)-emiss(i,j)*stbolt*(sstsk(i,j)**4)-2.5e6*qfx(i,j)-hfx(i,j)
73 us=MAX(ust(i,j), 0.01)
81 ! f1=1.-0.28*exp(-71.5*z1)-0.27*exp(-2.8*z1)-0.45*exp(-0.07*z1)
82 f1=1. -0.27*exp(-2.8*z1)-0.45*exp(-0.07*z1)
87 con4=16.*g*alw*znuw**3/zkw**2
90 ! otherwise, iterations would be needed for the computation of fs
91 ! iteration impact is less than 0.03C
92 q2=max(1./(rhow*cw),-q)
93 zlan=6./(1.+(con5*q2)**0.75)**0.333
94 dep=zlan*znuw/usw ! skin layer depth (m)
95 fs=0.065+11.*dep-(6.6e-5/dep)*(1.-exp(-dep/8.e-4))
96 fs=max(fs,0.01) ! fract. of solar rad. absorbed in sublayer
97 dtc=dep*(q+sw*fs)/zkw ! cool skin temp. diff (deg C)
99 ! warm layer (X. Zeng)
103 con1=sqrt(5.*z1*g*alw/an)
106 usw=sqrt(rho/rhow)*us
107 ! does not change when qn is positive
108 if(dtwo.gt.0..and.qn.lt.0.) then
109 qn1=sqrt(dtwo)*usw**2/con1
112 zeta=z1*con2*qn/usw**3
116 phi=1./sqrt(1.-16.*zeta)
120 dtw=(dtwo+(an+1.)/an*(q+sw*f1)* &
121 delt/z1)/(1.+(an+1.)*con3*delt)
126 skinmax=amax1(skinmax,ts-tb)
127 skinmin=amin1(skinmin,ts-tb)
128 sstsk(i,j)=ts+273.15 ! convert ts (in C) to sstsk (in K)
129 dtw1(i,j)=dtw ! dtw always in C
134 ! print *, 'check skin sst skinmax = ', skinmax, ' skinmin = ', skinmin
138 END SUBROUTINE sst_skin_update
141 END MODULE module_sf_sstskin