source: LMDZ6/branches/Amaury_dev/libf/misc/q_sat.f90 @ 5114

Last change on this file since 5114 was 5105, checked in by abarral, 4 months ago

Replace 1DUTILS.h by module lmdz_1dutils.f90
Replace 1DConv.h by module lmdz_old_1dconv.f90 (it's only used by old_* files)
Convert *.F to *.f90
Fix gradsdef.h formatting
Remove unnecessary "RETURN" at the end of functions/subroutines

  • 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: 1.5 KB
Line 
1
2! $Header$
3
4
5
6SUBROUTINE q_sat(np,temp,pres,qsat)
7
8  IMPLICIT none
9  !======================================================================
10  ! Autheur(s): Z.X. Li (LMD/CNRS)
11  !  reecriture vectorisee par F. Hourdin.
12  ! Objet: calculer la vapeur d'eau saturante (formule Centre Euro.)
13  !======================================================================
14  ! Arguments:
15  ! kelvin---input-R: temperature en Kelvin
16  ! millibar--input-R: pression en mb
17
18  ! q_sat----output-R: vapeur d'eau saturante en kg/kg
19  !======================================================================
20
21  integer :: np
22  REAL :: temp(np),pres(np),qsat(np)
23
24  REAL :: r2es
25  PARAMETER (r2es=611.14 *18.0153/28.9644)
26
27  REAL :: r3les, r3ies, r3es
28  PARAMETER (R3LES=17.269)
29  PARAMETER (R3IES=21.875)
30
31  REAL :: r4les, r4ies, r4es
32  PARAMETER (R4LES=35.86)
33  PARAMETER (R4IES=7.66)
34
35  REAL :: rtt
36  PARAMETER (rtt=273.16)
37
38  REAL :: retv
39  PARAMETER (retv=28.9644/18.0153 - 1.0)
40
41  real :: zqsat
42  integer :: ip
43
44  ! ------------------------------------------------------------------
45
46
47  do ip=1,np
48
49   ! write(*,*)'kelvin,millibar=',kelvin,millibar
50   !  write(*,*)'temp,pres=',temp(ip),pres(ip)
51
52     IF (temp(ip) <= rtt) THEN
53        r3es = r3ies
54        r4es = r4ies
55     ELSE
56        r3es = r3les
57        r4es = r4les
58     ENDIF
59
60     zqsat=r2es/pres(ip)*EXP(r3es*(temp(ip)-rtt)/(temp(ip)-r4es))
61     zqsat=MIN(0.5,ZQSAT)
62     zqsat=zqsat/(1.-retv *zqsat)
63
64     qsat(ip)= zqsat
65   ! write(*,*)'qsat=',qsat(ip)
66
67  enddo
68
69
70END SUBROUTINE q_sat
Note: See TracBrowser for help on using the repository browser.