source: trunk/LMDZ.MARS/libf/phymars/watersat_mod.F @ 2616

Last change on this file since 2616 was 2154, checked in by aslmd, 5 years ago

changed the name of watersat to watersat_mod

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