/[lmdze]/trunk/phylmd/suphec.f
ViewVC logotype

Diff of /trunk/phylmd/suphec.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3 by guez, Wed Feb 27 13:16:39 2008 UTC revision 37 by guez, Tue Dec 21 15:45:48 2010 UTC
# Line 15  contains Line 15  contains
15           rv, rcpd, rcvd, rcpv, rcvv, rkappa, retv, rcw, rcs, rtt, rlvtt, &           rv, rcpd, rcvd, rcpv, rcvv, rkappa, retv, rcw, rcs, rtt, rlvtt, &
16           rlstt, rlmlt, ratm, restt, rgamw, rbetw, ralpw, rgams, rbets, ralps, &           rlstt, rlmlt, ratm, restt, rgamw, rbetw, ralpw, rgams, rbets, ralps, &
17           rgamd, rbetd, ralpd           rgamd, rbetd, ralpd
18      use yoethf      use yoethf, only: r2es, r3ies, r3les, r4ies, r4les, r5ies, r5les, rhoh2o, &
19             rvtmp2
     LOGICAL:: firstcall = .TRUE.  
20    
21      !------------------------------------------      !------------------------------------------
22    
23      IF (firstcall) THEN      PRINT *, 'Call sequence information: suphec'
24         PRINT *, 'suphec initialise les constantes du GCM'  
25         firstcall = .FALSE.      ! 1. DEFINE FUNDAMENTAL CONSTANTS
26         !  
27         !*       1.    DEFINE FUNDAMENTAL CONSTANTS.      print *, 'Constants of the ICM'
28         !      RPI=2.*ASIN(1.)
29         WRITE(UNIT=6,FMT='(''0*** Constants of the ICM   ***'')')      RCLUM=299792458.
30         RPI=2.*ASIN(1.)      RHPLA=6.6260755E-34
31         RCLUM=299792458.      RKBOL=1.380658E-23
32         RHPLA=6.6260755E-34      RNAVO=6.0221367E+23
33         RKBOL=1.380658E-23      print *, 'Fundamental constants '
34         RNAVO=6.0221367E+23      print '(''           PI = '',E13.7,'' -'')', RPI
35         WRITE(UNIT=6,FMT='('' *** Fundamental constants ***'')')      print '(''            c = '',E13.7,''m s-1'')', RCLUM
36         WRITE(UNIT=6,FMT='(''           PI = '',E13.7,'' -'')')RPI      print '(''            h = '',E13.7,''J s'')', RHPLA
37         WRITE(UNIT=6,FMT='(''            c = '',E13.7,''m s-1'')') &      print '(''            K = '',E13.7,''J K-1'')', RKBOL
38              RCLUM      print '(''            N = '',E13.7,''mol-1'')', RNAVO
39         WRITE(UNIT=6,FMT='(''            h = '',E13.7,''J s'')') &  
40              RHPLA      ! 2. DEFINE ASTRONOMICAL CONSTANTS
41         WRITE(UNIT=6,FMT='(''            K = '',E13.7,''J K-1'')') &  
42              RKBOL      RDAY=86400.
43         WRITE(UNIT=6,FMT='(''            N = '',E13.7,''mol-1'')') &      REA=149597870000.
44              RNAVO      REPSM=0.409093
45         !  
46         !      RSIYEA=365.25*RDAY*2.*RPI/6.283076
47         !*       2.    DEFINE ASTRONOMICAL CONSTANTS.      RSIDAY=RDAY/(1.+RDAY/RSIYEA)
48         !      ROMEGA=2.*RPI/RSIDAY
49         RDAY=86400.  
50         REA=149597870000.      print *, 'Astronomical constants '
51         REPSM=0.409093      print '(''          day = '',E13.7,'' s'')', RDAY
52         !      print '('' half g. axis = '',E13.7,'' m'')', REA
53         RSIYEA=365.25*RDAY*2.*RPI/6.283076      print '('' mean anomaly = '',E13.7,'' -'')', REPSM
54         RSIDAY=RDAY/(1.+RDAY/RSIYEA)      print '('' sideral year = '',E13.7,'' s'')', RSIYEA
55         ROMEGA=2.*RPI/RSIDAY      print '(''  sideral day = '',E13.7,'' s'')', RSIDAY
56         !      print '(''        omega = '',E13.7,'' s-1'')', ROMEGA
57         WRITE(UNIT=6,FMT='('' *** Astronomical constants ***'')')  
58         WRITE(UNIT=6,FMT='(''          day = '',E13.7,'' s'')')RDAY      ! 3.    DEFINE GEOIDE.
59         WRITE(UNIT=6,FMT='('' half g. axis = '',E13.7,'' m'')')REA  
60         WRITE(UNIT=6,FMT='('' mean anomaly = '',E13.7,'' -'')')REPSM      RG=9.80665
61         WRITE(UNIT=6,FMT='('' sideral year = '',E13.7,'' s'')')RSIYEA      RA=6371229.
62         WRITE(UNIT=6,FMT='(''  sideral day = '',E13.7,'' s'')')RSIDAY      R1SA=SNGL(1.D0/DBLE(RA))
63         WRITE(UNIT=6,FMT='(''        omega = '',E13.7,'' s-1'')') &      print *, '        Geoide      '
64              ROMEGA      print '(''      Gravity = '',E13.7,'' m s-2'')', RG
65         !      print '('' Earth radius = '',E13.7,'' m'')', RA
66         !*       3.    DEFINE GEOIDE.      print '('' Inverse E.R. = '',E13.7,'' m'')', R1SA
67         !  
68         RG=9.80665      ! 4.    DEFINE RADIATION CONSTANTS.
69         RA=6371229.  
70         R1SA=SNGL(1.D0/DBLE(RA))      rsigma = 2.*rpi**5 * (rkbol/rhpla)**3 * rkbol/rclum/rclum/15.
71         WRITE(UNIT=6,FMT='('' ***         Geoide         ***'')')      print *, '       Radiation    '
72         WRITE(UNIT=6,FMT='(''      Gravity = '',E13.7,'' m s-2'')') &      print '('' Stefan-Bol.  = '',E13.7,'' W m-2 K-4'')',   RSIGMA
73              RG  
74         WRITE(UNIT=6,FMT='('' Earth radius = '',E13.7,'' m'')')RA      ! 5.    DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.
75         WRITE(UNIT=6,FMT='('' Inverse E.R. = '',E13.7,'' m'')')R1SA  
76         !      R=RNAVO*RKBOL
77         !      RMD=28.9644
78         !*       4.    DEFINE RADIATION CONSTANTS.      RMO3=47.9942
79         !      RMV=18.0153
80         ! z.x.li      RSIGMA=2. * RPI**5 * RKBOL**4 /(15.* RCLUM**2 * RHPLA**3)      RD=1000.*R/RMD
81         rsigma = 2.*rpi**5 * (rkbol/rhpla)**3 * rkbol/rclum/rclum/15.      RV=1000.*R/RMV
82         !IM init. dans conf_phys.F90   RI0=1365.      RCPD=3.5*RD
83         WRITE(UNIT=6,FMT='('' ***        Radiation       ***'')')      RCVD=RCPD-RD
84         WRITE(UNIT=6,FMT='('' Stefan-Bol.  = '',E13.7,'' W m-2 K-4'')')  RSIGMA      RCPV=4. *RV
85        RCVV=RCPV-RV
86         !      RKAPPA=RD/RCPD
87         !*       5.    DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.      RETV=RV/RD-1.
88         !      print *, 'Thermodynamic, gas  '
89         R=RNAVO*RKBOL      print '('' Perfect gas  = '',e13.7)',  R
90         RMD=28.9644      print '('' Dry air mass = '',e13.7)',  RMD
91         RMO3=47.9942      print '('' Ozone   mass = '',e13.7)',  RMO3
92         RMV=18.0153      print '('' Vapour  mass = '',e13.7)',  RMV
93         RD=1000.*R/RMD      print '('' Dry air cst. = '',e13.7)',  RD
94         RV=1000.*R/RMV      print '('' Vapour  cst. = '',e13.7)',  RV
95         RCPD=3.5*RD      print '(''         Cpd  = '',e13.7)',  RCPD
96         RCVD=RCPD-RD      print '(''         Cvd  = '',e13.7)',  RCVD
97         RCPV=4. *RV      print '(''         Cpv  = '',e13.7)',  RCPV
98         RCVV=RCPV-RV      print '(''         Cvv  = '',e13.7)',  RCVV
99         RKAPPA=RD/RCPD      print '(''      Rd/Cpd  = '',e13.7)',  RKAPPA
100         RETV=RV/RD-1.      print '(''     Rv/Rd-1  = '',e13.7)',  RETV
101         WRITE(UNIT=6,FMT='('' *** Thermodynamic, gas     ***'')')  
102         WRITE(UNIT=6,FMT='('' Perfect gas  = '',e13.7)') R      ! 6.    DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.
103         WRITE(UNIT=6,FMT='('' Dry air mass = '',e13.7)') RMD  
104         WRITE(UNIT=6,FMT='('' Ozone   mass = '',e13.7)') RMO3      RCW=RCPV
105         WRITE(UNIT=6,FMT='('' Vapour  mass = '',e13.7)') RMV      print *, 'Thermodynamic, liquid  '
106         WRITE(UNIT=6,FMT='('' Dry air cst. = '',e13.7)') RD      print '(''         Cw   = '',E13.7)',  RCW
107         WRITE(UNIT=6,FMT='('' Vapour  cst. = '',e13.7)') RV  
108         WRITE(UNIT=6,FMT='(''         Cpd  = '',e13.7)') RCPD      ! 7.    DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE.
109         WRITE(UNIT=6,FMT='(''         Cvd  = '',e13.7)') RCVD  
110         WRITE(UNIT=6,FMT='(''         Cpv  = '',e13.7)') RCPV      RCS=RCPV
111         WRITE(UNIT=6,FMT='(''         Cvv  = '',e13.7)') RCVV      print *, 'thermodynamic, solid'
112         WRITE(UNIT=6,FMT='(''      Rd/Cpd  = '',e13.7)') RKAPPA      print '(''         Cs   = '',E13.7)',  RCS
113         WRITE(UNIT=6,FMT='(''     Rv/Rd-1  = '',e13.7)') RETV  
114         !      ! 8.    DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.
115         !  
116         !*       6.    DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.      RTT=273.16
117         !      RLVTT=2.5008E+6
118         RCW=RCPV      RLSTT=2.8345E+6
119         WRITE(UNIT=6,FMT='('' *** Thermodynamic, liquid  ***'')')      RLMLT=RLSTT-RLVTT
120         WRITE(UNIT=6,FMT='(''         Cw   = '',E13.7)') RCW      RATM=100000.
121         !      print *, 'Thermodynamic, trans.  '
122         !      print '('' Fusion point  = '',E13.7)',  RTT
123         !*       7.    DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE.      print '(''        RLvTt  = '',E13.7)',  RLVTT
124         !      print '(''        RLsTt  = '',E13.7)',  RLSTT
125         RCS=RCPV      print '(''        RLMlt  = '',E13.7)',  RLMLT
126         WRITE(UNIT=6,FMT='('' *** thermodynamic, solid   ***'')')      print '('' Normal press. = '',E13.7)',  RATM
127         WRITE(UNIT=6,FMT='(''         Cs   = '',E13.7)') RCS  
128         !      ! 9.    SATURATED VAPOUR PRESSURE.
129         !  
130         !*       8.    DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.      RESTT=611.14
131         !      RGAMW=(RCW-RCPV)/RV
132         RTT=273.16      RBETW=RLVTT/RV+RGAMW*RTT
133         RLVTT=2.5008E+6      RALPW=LOG(RESTT)+RBETW/RTT+RGAMW*LOG(RTT)
134         RLSTT=2.8345E+6      RGAMS=(RCS-RCPV)/RV
135         RLMLT=RLSTT-RLVTT      RBETS=RLSTT/RV+RGAMS*RTT
136         RATM=100000.      RALPS=LOG(RESTT)+RBETS/RTT+RGAMS*LOG(RTT)
137         WRITE(UNIT=6,FMT='('' *** Thermodynamic, trans.  ***'')')      RGAMD=RGAMS-RGAMW
138         WRITE(UNIT=6,FMT='('' Fusion point  = '',E13.7)') RTT      RBETD=RBETS-RBETW
139         WRITE(UNIT=6,FMT='(''        RLvTt  = '',E13.7)') RLVTT      RALPD=RALPS-RALPW
140         WRITE(UNIT=6,FMT='(''        RLsTt  = '',E13.7)') RLSTT  
141         WRITE(UNIT=6,FMT='(''        RLMlt  = '',E13.7)') RLMLT      ! calculer les constantes pour les fonctions thermodynamiques
142         WRITE(UNIT=6,FMT='('' Normal press. = '',E13.7)') RATM  
143         WRITE(UNIT=6,FMT='('' Latent heat :  '')')      RVTMP2=RCPV/RCPD-1.
144         !      RHOH2O=RATM/100.
145         !      R2ES=RESTT*RD/RV
146         !*       9.    SATURATED VAPOUR PRESSURE.      R3LES=17.269
147         !      R3IES=21.875
148         RESTT=611.14      R4LES=35.86
149         RGAMW=(RCW-RCPV)/RV      R4IES=7.66
150         RBETW=RLVTT/RV+RGAMW*RTT      R5LES=R3LES*(RTT-R4LES)
151         RALPW=LOG(RESTT)+RBETW/RTT+RGAMW*LOG(RTT)      R5IES=R3IES*(RTT-R4IES)
        RGAMS=(RCS-RCPV)/RV  
        RBETS=RLSTT/RV+RGAMS*RTT  
        RALPS=LOG(RESTT)+RBETS/RTT+RGAMS*LOG(RTT)  
        RGAMD=RGAMS-RGAMW  
        RBETD=RBETS-RBETW  
        RALPD=RALPS-RALPW  
        !  
        !  
        ! calculer les constantes pour les fonctions thermodynamiques  
        !  
        RVTMP2=RCPV/RCPD-1.  
        RHOH2O=RATM/100.  
        R2ES=RESTT*RD/RV  
        R3LES=17.269  
        R3IES=21.875  
        R4LES=35.86  
        R4IES=7.66  
        R5LES=R3LES*(RTT-R4LES)  
        R5IES=R3IES*(RTT-R4IES)  
   
     ELSE  
        PRINT *, 'suphec DEJA APPELE '  
     ENDIF  
152    
153    END SUBROUTINE suphec    END SUBROUTINE suphec
154    

Legend:
Removed from v.3  
changed lines
  Added in v.37

  ViewVC Help
Powered by ViewVC 1.1.21