source: LMDZ5/branches/LMDZ5_SPLA/libf/phylmd/hydrol.F90

Last change on this file was 1992, checked in by lguez, 11 years ago

Converted to free source form files in libf/phylmd which were still in
fixed source form. The conversion was done using the polish mode of
the NAG Fortran Compiler.

In addition to converting to free source form, the processing of the
files also:

-- indented the code (including comments);

-- set Fortran keywords to uppercase, and set all other identifiers
to lower case;

-- added qualifiers to end statements (for example "end subroutine
conflx", instead of "end");

-- changed the terminating statements of all DO loops so that each
loop ends with an ENDDO statement (instead of a labeled continue).

-- replaced #include by include.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1
2! $Header$
3
4
5
6SUBROUTINE hydrol(dtime, pctsrf, rain_fall, snow_fall, evap, agesno, tsol, &
7    qsol, snow, runoff)
8  USE dimphy
9  USE indice_sol_mod
10
11  IMPLICIT NONE
12  ! ======================================================================
13  ! Auteur(s): Z.X. Li (LMD/CNRS)
14  ! date: 19940414
15  ! ======================================================================
16
17  ! Traitement de l'hydrologie du sol
18  ! ---------------------------------
19  ! rain_fall: taux de pluie
20  ! snow_fall: taux de neige
21  ! agesno: age de la neige
22  ! evap: taux d'evaporation
23  ! tsol: temperature du sol
24  ! qsol: humidite du sol
25  ! snow: couverture neigeuse
26
27  ! ym#include "dimensions.h"
28  ! ym#include "dimphy.h"
29  include "YOMCST.h"
30
31  REAL chasno ! epaisseur du sol: 0.15 m
32  PARAMETER (chasno=3.334E+05/(2.3867E+06*0.15))
33  REAL mx_eau_sol
34  PARAMETER (mx_eau_sol=150.0)
35
36  REAL dtime
37  REAL pctsrf(klon, nbsrf)
38  REAL snow(klon, nbsrf), tsol(klon, nbsrf), qsol(klon, nbsrf)
39  REAL snow_fall(klon), rain_fall(klon), evap(klon)
40  REAL runoff(klon), agesno(klon)
41
42  INTEGER i, is
43  REAL subli, fsno
44  ! -----------------------------------------------------------------------
45  DO i = 1, klon
46
47    runoff(i) = 0.0
48
49    is = is_ter
50    snow(i, is) = snow(i, is) + snow_fall(i)*dtime*pctsrf(i, is)
51    IF (pctsrf(i,is)>epsfra) THEN
52      subli = min(evap(i)*dtime, snow(i,is))
53      snow(i, is) = snow(i, is) - subli
54      fsno = min(max((tsol(i,is)-rtt)/chasno,0.0), snow(i,is))
55      snow(i, is) = snow(i, is) - fsno
56      tsol(i, is) = tsol(i, is) - fsno*chasno
57      qsol(i, is) = qsol(i, is) + (rain_fall(i)-evap(i))*dtime + subli + fsno
58      qsol(i, is) = max(qsol(i,is), 0.0)
59      runoff(i) = runoff(i) + max(qsol(i,is)-mx_eau_sol, 0.0)*pctsrf(i, is)
60      qsol(i, is) = min(qsol(i,is), mx_eau_sol)
61      ! cc         ELSE
62      ! cc            snow(i,is) = 0.0
63      ! cc            qsol(i,is) = 0.0
64      ! cc            tsol(i,is) = 0.0
65    END IF
66
67    is = is_lic
68    snow(i, is) = snow(i, is) + snow_fall(i)*dtime*pctsrf(i, is)
69    IF (pctsrf(i,is)>epsfra) THEN
70      subli = min(evap(i)*dtime, snow(i,is))
71      snow(i, is) = snow(i, is) - subli
72      fsno = min(max((tsol(i,is)-rtt)/chasno,0.0), snow(i,is))
73      snow(i, is) = snow(i, is) - fsno
74      tsol(i, is) = tsol(i, is) - fsno*chasno
75      qsol(i, is) = qsol(i, is) + (rain_fall(i)-evap(i))*dtime + subli + fsno
76      qsol(i, is) = max(qsol(i,is), 0.0)
77      runoff(i) = runoff(i) + max(qsol(i,is)-mx_eau_sol, 0.0)*pctsrf(i, is)
78      qsol(i, is) = min(qsol(i,is), mx_eau_sol)
79      ! je limite la temperature a RTT-1.8 (il faudrait aussi prendre l'eau
80      ! de
81      ! la fonte) (Laurent Li, le 14mars98):
82      ! IM cf GK   tsol(i,is) = MIN(tsol(i,is),RTT-1.8)
83      ! IM cf GK : la glace fond a 0C, non pas a -1.8
84      tsol(i, is) = min(tsol(i,is), rtt)
85
86      ! cc         ELSE
87      ! cc            snow(i,is) = 0.0
88      ! cc            qsol(i,is) = 0.0
89      ! cc            tsol(i,is) = 0.0
90    END IF
91
92    is = is_sic
93    qsol(i, is) = 0.0
94    snow(i, is) = snow(i, is) + snow_fall(i)*dtime*pctsrf(i, is)
95    IF (pctsrf(i,is)>epsfra) THEN
96      subli = min(evap(i)*dtime, snow(i,is))
97      snow(i, is) = snow(i, is) - subli
98      fsno = min(max((tsol(i,is)-rtt)/chasno,0.0), snow(i,is))
99      snow(i, is) = snow(i, is) - fsno
100      tsol(i, is) = tsol(i, is) - fsno*chasno
101      ! je limite la temperature a RTT-1.8 (il faudrait aussi prendre l'eau
102      ! de
103      ! la fonte) (Laurent Li, le 14mars98):
104      ! IM cf GK   tsol(i,is) = MIN(tsol(i,is),RTT-1.8)
105      ! IM cf GK : la glace fond a 0C, non pas a -1.8
106      tsol(i, is) = min(tsol(i,is), rtt)
107
108      ! cc         ELSE
109      ! cc            snow(i,is) = 0.0
110      ! cc            tsol(i,is) = 0.0
111    END IF
112
113    agesno(i) = (agesno(i)+(1.-agesno(i)/50.)*dtime/86400.)* &
114      exp(-1.*max(0.0,snow_fall(i))*dtime/0.3)
115    agesno(i) = max(agesno(i), 0.0)
116
117  END DO
118
119  RETURN
120END SUBROUTINE hydrol
Note: See TracBrowser for help on using the repository browser.