source: trunk/LMDZ.MARS/libf/phymars/watersat.F @ 1242

Last change on this file since 1242 was 689, checked in by flefevre, 13 years ago

Minor change. Better handling of very small water mixing ratio at saturation
(for very low temperatures).

File size: 1.2 KB
Line 
1      SUBROUTINE watersat(naersize,t,p,qsat)
2      IMPLICIT NONE
3
4c=======================================================================
5c
6c  Water mass mixing ratio at saturation (kg/kg) for a given pressure (Pa)
7c   and Temperature (K) array
8c
9c=======================================================================
10
11c   declarations:
12c   -------------
13c   arguments:
14c   ----------
15
16c   INPUT
17      integer naersize
18      real t(naersize) , p(naersize)
19c   OUTPUT
20      real qsat(naersize)
21
22c   local:
23c   ------
24      INTEGER i
25      REAL r2,r3,r4 , To, es
26      SAVE r2,r3,r4
27      DATA r2,r3,r4/611.14,21.875,7.66/
28      SAVE To
29      DATA To/273.16/
30         
31      do i=1,naersize
32c        pression de vapeur saturante :
33c         es =r2*exp(r3*(t(i)-To)/(t(i)-r4))
34c         qsat(i)=es/p(i)*0.41  !rapport de melange
35        es=2.07023-0.00320991*t(i)-2484.896/t(i)+3.56654*alog10(t(i))
36        es=10.**es
37        qsat(i)=(es*100.)/p(i)*0.41
38        qsat(i) = max(qsat(i), 1.e-30)
39
40c        qss = specific humidity
41c        qss=622*10**(2.07023-0.0032991*Tsurf(ig)-2484.896/Tsurf(ig)
42c    $                  +3.56654*log10(Tsurf(ig)))
43
44      enddo
45
46      RETURN
47      END
48
Note: See TracBrowser for help on using the repository browser.