--- trunk/phylmd/Interface_surf/calcul_fluxs.f 2014/03/05 14:57:53 82 +++ trunk/phylmd/Interface_surf/calcul_fluxs.f 2014/08/29 13:00:05 103 @@ -11,8 +11,8 @@ petAcoef, peqAcoef, petBcoef, peqBcoef, & tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l) - ! Cette routine calcule les fluxs en h et q a l'interface et eventuellement - ! une temperature de surface (au cas ou ok_veget = false) + ! Cette routine calcule les fluxs en h et q à l'interface et une + ! température de surface. ! L. Fairhead 4/2000 @@ -75,7 +75,8 @@ real, dimension(klon) :: zx_pkh, zx_dq_s_dt, zx_qsat, zx_coef real, dimension(klon) :: zx_sl, zx_k1 real, dimension(klon) :: zx_q_0 , d_ts - real :: zdelta, zcvm5, zx_qs, zcor, zx_dq_s_dh + logical zdelta + real zcvm5, zx_qs, zcor, zx_dq_s_dh real :: bilan_f, fq_fonte REAL :: subli, fsno REAL :: qsat_new, q1_new @@ -98,7 +99,7 @@ !!CALL flush(6) ENDIF - if (size(coastalflow) /= knon .AND. nisurf == is_ter) then + if (size(run_off) /= knon .AND. nisurf == is_ter) then write(*, *)'Bizarre, le nombre de points continentaux' write(*, *)'a change entre deux appels. J''arrete ...' abort_message='Pb run_off' @@ -120,8 +121,8 @@ DO i = 1, knon zx_pkh(i) = (ps(i)/ps(i))**RKAPPA IF (thermcep) THEN - zdelta=MAX(0., SIGN(1., rtt-tsurf(i))) - zcvm5 = R5LES*RLVTT*(1.-zdelta) + R5IES*RLSTT*zdelta + zdelta= rtt >= tsurf(i) + zcvm5 = merge(R5IES*RLSTT, R5LES*RLVTT, zdelta) zcvm5 = zcvm5 / RCPD / (1.0+RVTMP2*q1lay(i)) zx_qs= r2es * FOEEW(tsurf(i), zdelta)/ps(i) zx_qs=MIN(0.5, zx_qs)