source: LMDZ6/branches/Amaury_dev/libf/misc/q_sat.F @ 5103

Last change on this file since 5103 was 5103, checked in by abarral, 8 weeks ago

Handle CPP_INLANDSIS in lmdz_cppkeys_wrapper.F90
Remove obsolete key wrgrads_thermcell, _ADV_HALO, _ADV_HALLO, isminmax
Remove redundant uses of CPPKEY_INCA (thanks acozic)
Remove obsolete misc/write_field.F90
Remove unused ioipsl_* wrappers
Remove calls to WriteField_u with wrong signature
Convert .F -> .[fF]90
(lint) uppercase fortran operators
[note: 1d and iso still broken - working on it]

  • 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.6 KB
Line 
1
2! $Header$
3
4
5
6      SUBROUTINE 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      RETURN
70      END
Note: See TracBrowser for help on using the repository browser.