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

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

changed the name of watersat to watersat_mod

File size: 1.4 KB
RevLine 
[1996]1      MODULE watersat_mod
2     
3      IMPLICIT NONE
4     
5      CONTAINS
6     
[38]7      SUBROUTINE watersat(naersize,t,p,qsat)
[1996]8     
[38]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
[1996]16c  Move in module by Deborah BARDET 02/07/18
[38]17c=======================================================================
18
19c   declarations:
20c   -------------
21c   arguments:
22c   ----------
23
24c   INPUT
[1996]25      integer, intent(in) :: naersize
26      real, intent(in) :: t(naersize)
27      real, intent(in) :: p(naersize)
[38]28c   OUTPUT
[1996]29      real, intent(out) :: qsat(naersize)
[38]30
31c   local:
32c   ------
33      INTEGER i
[1996]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     
[38]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
[689]48        qsat(i) = max(qsat(i), 1.e-30)
[38]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
[1996]56      END SUBROUTINE watersat
57     
58      END MODULE watersat_mod
Note: See TracBrowser for help on using the repository browser.