11 |
petAcoef, peqAcoef, petBcoef, peqBcoef, & |
petAcoef, peqAcoef, petBcoef, peqBcoef, & |
12 |
tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) |
tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) |
13 |
|
|
14 |
! Cette routine calcule les fluxs en h et q a l'interface et eventuellement |
! Cette routine calcule les fluxs en h et q à l'interface et une |
15 |
! une temperature de surface (au cas ou ok_veget = false) |
! température de surface. |
16 |
|
|
17 |
! L. Fairhead 4/2000 |
! L. Fairhead 4/2000 |
18 |
|
|
75 |
real, dimension(klon) :: zx_pkh, zx_dq_s_dt, zx_qsat, zx_coef |
real, dimension(klon) :: zx_pkh, zx_dq_s_dt, zx_qsat, zx_coef |
76 |
real, dimension(klon) :: zx_sl, zx_k1 |
real, dimension(klon) :: zx_sl, zx_k1 |
77 |
real, dimension(klon) :: zx_q_0 , d_ts |
real, dimension(klon) :: zx_q_0 , d_ts |
78 |
real :: zdelta, zcvm5, zx_qs, zcor, zx_dq_s_dh |
logical zdelta |
79 |
|
real zcvm5, zx_qs, zcor, zx_dq_s_dh |
80 |
real :: bilan_f, fq_fonte |
real :: bilan_f, fq_fonte |
81 |
REAL :: subli, fsno |
REAL :: subli, fsno |
82 |
REAL :: qsat_new, q1_new |
REAL :: qsat_new, q1_new |
99 |
!!CALL flush(6) |
!!CALL flush(6) |
100 |
ENDIF |
ENDIF |
101 |
|
|
102 |
if (size(coastalflow) /= knon .AND. nisurf == is_ter) then |
if (size(run_off) /= knon .AND. nisurf == is_ter) then |
103 |
write(*, *)'Bizarre, le nombre de points continentaux' |
write(*, *)'Bizarre, le nombre de points continentaux' |
104 |
write(*, *)'a change entre deux appels. J''arrete ...' |
write(*, *)'a change entre deux appels. J''arrete ...' |
105 |
abort_message='Pb run_off' |
abort_message='Pb run_off' |
121 |
DO i = 1, knon |
DO i = 1, knon |
122 |
zx_pkh(i) = (ps(i)/ps(i))**RKAPPA |
zx_pkh(i) = (ps(i)/ps(i))**RKAPPA |
123 |
IF (thermcep) THEN |
IF (thermcep) THEN |
124 |
zdelta=MAX(0., SIGN(1., rtt-tsurf(i))) |
zdelta= rtt >= tsurf(i) |
125 |
zcvm5 = R5LES*RLVTT*(1.-zdelta) + R5IES*RLSTT*zdelta |
zcvm5 = merge(R5IES*RLSTT, R5LES*RLVTT, zdelta) |
126 |
zcvm5 = zcvm5 / RCPD / (1.0+RVTMP2*q1lay(i)) |
zcvm5 = zcvm5 / RCPD / (1.0+RVTMP2*q1lay(i)) |
127 |
zx_qs= r2es * FOEEW(tsurf(i), zdelta)/ps(i) |
zx_qs= r2es * FOEEW(tsurf(i), zdelta)/ps(i) |
128 |
zx_qs=MIN(0.5, zx_qs) |
zx_qs=MIN(0.5, zx_qs) |