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

Diff of /trunk/Sources/phylmd/suphec.f

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

revision 36 by guez, Tue Aug 5 13:31:32 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         !*       2.    DEFINE ASTRONOMICAL CONSTANTS.      RSIYEA=365.25*RDAY*2.*RPI/6.283076
47        RSIDAY=RDAY/(1.+RDAY/RSIYEA)
48         RDAY=86400.      ROMEGA=2.*RPI/RSIDAY
49         REA=149597870000.  
50         REPSM=0.409093      print *, 'Astronomical constants '
51        print '(''          day = '',E13.7,'' s'')', RDAY
52         RSIYEA=365.25*RDAY*2.*RPI/6.283076      print '('' half g. axis = '',E13.7,'' m'')', REA
53         RSIDAY=RDAY/(1.+RDAY/RSIYEA)      print '('' mean anomaly = '',E13.7,'' -'')', REPSM
54         ROMEGA=2.*RPI/RSIDAY      print '('' sideral year = '',E13.7,'' s'')', RSIYEA
55        print '(''  sideral day = '',E13.7,'' s'')', RSIDAY
56         WRITE(UNIT=6,FMT='('' *** Astronomical constants ***'')')      print '(''        omega = '',E13.7,'' s-1'')', ROMEGA
57         WRITE(UNIT=6,FMT='(''          day = '',E13.7,'' s'')')RDAY  
58         WRITE(UNIT=6,FMT='('' half g. axis = '',E13.7,'' m'')')REA      ! 3.    DEFINE GEOIDE.
59         WRITE(UNIT=6,FMT='('' mean anomaly = '',E13.7,'' -'')')REPSM  
60         WRITE(UNIT=6,FMT='('' sideral year = '',E13.7,'' s'')')RSIYEA      RG=9.80665
61         WRITE(UNIT=6,FMT='(''  sideral day = '',E13.7,'' s'')')RSIDAY      RA=6371229.
62         WRITE(UNIT=6,FMT='(''        omega = '',E13.7,'' s-1'')') &      R1SA=SNGL(1.D0/DBLE(RA))
63              ROMEGA      print *, '        Geoide      '
64        print '(''      Gravity = '',E13.7,'' m s-2'')', RG
65         !*       3.    DEFINE GEOIDE.      print '('' Earth radius = '',E13.7,'' m'')', RA
66        print '('' Inverse E.R. = '',E13.7,'' m'')', R1SA
67         RG=9.80665  
68         RA=6371229.      ! 4.    DEFINE RADIATION CONSTANTS.
69         R1SA=SNGL(1.D0/DBLE(RA))  
70         WRITE(UNIT=6,FMT='('' ***         Geoide         ***'')')      rsigma = 2.*rpi**5 * (rkbol/rhpla)**3 * rkbol/rclum/rclum/15.
71         WRITE(UNIT=6,FMT='(''      Gravity = '',E13.7,'' m s-2'')') &      print *, '       Radiation    '
72              RG      print '('' Stefan-Bol.  = '',E13.7,'' W m-2 K-4'')',   RSIGMA
73         WRITE(UNIT=6,FMT='('' Earth radius = '',E13.7,'' m'')')RA  
74         WRITE(UNIT=6,FMT='('' Inverse E.R. = '',E13.7,'' m'')')R1SA      ! 5.    DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.
75    
76         !*       4.    DEFINE RADIATION CONSTANTS.      R=RNAVO*RKBOL
77        RMD=28.9644
78         rsigma = 2.*rpi**5 * (rkbol/rhpla)**3 * rkbol/rclum/rclum/15.      RMO3=47.9942
79         !IM init. dans conf_phys.F90   RI0=1365.      RMV=18.0153
80         WRITE(UNIT=6,FMT='('' ***        Radiation       ***'')')      RD=1000.*R/RMD
81         WRITE(UNIT=6,FMT='('' Stefan-Bol.  = '',E13.7,'' W m-2 K-4'')')  RSIGMA      RV=1000.*R/RMV
82        RCPD=3.5*RD
83         !*       5.    DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.      RCVD=RCPD-RD
84        RCPV=4. *RV
85         R=RNAVO*RKBOL      RCVV=RCPV-RV
86         RMD=28.9644      RKAPPA=RD/RCPD
87         RMO3=47.9942      RETV=RV/RD-1.
88         RMV=18.0153      print *, 'Thermodynamic, gas  '
89         RD=1000.*R/RMD      print '('' Perfect gas  = '',e13.7)',  R
90         RV=1000.*R/RMV      print '('' Dry air mass = '',e13.7)',  RMD
91         RCPD=3.5*RD      print '('' Ozone   mass = '',e13.7)',  RMO3
92         RCVD=RCPD-RD      print '('' Vapour  mass = '',e13.7)',  RMV
93         RCPV=4. *RV      print '('' Dry air cst. = '',e13.7)',  RD
94         RCVV=RCPV-RV      print '('' Vapour  cst. = '',e13.7)',  RV
95         RKAPPA=RD/RCPD      print '(''         Cpd  = '',e13.7)',  RCPD
96         RETV=RV/RD-1.      print '(''         Cvd  = '',e13.7)',  RCVD
97         WRITE(UNIT=6,FMT='('' *** Thermodynamic, gas     ***'')')      print '(''         Cpv  = '',e13.7)',  RCPV
98         WRITE(UNIT=6,FMT='('' Perfect gas  = '',e13.7)') R      print '(''         Cvv  = '',e13.7)',  RCVV
99         WRITE(UNIT=6,FMT='('' Dry air mass = '',e13.7)') RMD      print '(''      Rd/Cpd  = '',e13.7)',  RKAPPA
100         WRITE(UNIT=6,FMT='('' Ozone   mass = '',e13.7)') RMO3      print '(''     Rv/Rd-1  = '',e13.7)',  RETV
101         WRITE(UNIT=6,FMT='('' Vapour  mass = '',e13.7)') RMV  
102         WRITE(UNIT=6,FMT='('' Dry air cst. = '',e13.7)') RD      ! 6.    DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.
103         WRITE(UNIT=6,FMT='('' Vapour  cst. = '',e13.7)') RV  
104         WRITE(UNIT=6,FMT='(''         Cpd  = '',e13.7)') RCPD      RCW=RCPV
105         WRITE(UNIT=6,FMT='(''         Cvd  = '',e13.7)') RCVD      print *, 'Thermodynamic, liquid  '
106         WRITE(UNIT=6,FMT='(''         Cpv  = '',e13.7)') RCPV      print '(''         Cw   = '',E13.7)',  RCW
107         WRITE(UNIT=6,FMT='(''         Cvv  = '',e13.7)') RCVV  
108         WRITE(UNIT=6,FMT='(''      Rd/Cpd  = '',e13.7)') RKAPPA      ! 7.    DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE.
109         WRITE(UNIT=6,FMT='(''     Rv/Rd-1  = '',e13.7)') RETV  
110        RCS=RCPV
111         !*       6.    DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.      print *, 'thermodynamic, solid'
112        print '(''         Cs   = '',E13.7)',  RCS
113         RCW=RCPV  
114         WRITE(UNIT=6,FMT='('' *** Thermodynamic, liquid  ***'')')      ! 8.    DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.
115         WRITE(UNIT=6,FMT='(''         Cw   = '',E13.7)') RCW  
116        RTT=273.16
117         !*       7.    DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE.      RLVTT=2.5008E+6
118        RLSTT=2.8345E+6
119         RCS=RCPV      RLMLT=RLSTT-RLVTT
120         WRITE(UNIT=6,FMT='('' *** thermodynamic, solid   ***'')')      RATM=100000.
121         WRITE(UNIT=6,FMT='(''         Cs   = '',E13.7)') RCS      print *, 'Thermodynamic, trans.  '
122        print '('' Fusion point  = '',E13.7)',  RTT
123         !*       8.    DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.      print '(''        RLvTt  = '',E13.7)',  RLVTT
124        print '(''        RLsTt  = '',E13.7)',  RLSTT
125         RTT=273.16      print '(''        RLMlt  = '',E13.7)',  RLMLT
126         RLVTT=2.5008E+6      print '('' Normal press. = '',E13.7)',  RATM
127         RLSTT=2.8345E+6  
128         RLMLT=RLSTT-RLVTT      ! 9.    SATURATED VAPOUR PRESSURE.
129         RATM=100000.  
130         WRITE(UNIT=6,FMT='('' *** Thermodynamic, trans.  ***'')')      RESTT=611.14
131         WRITE(UNIT=6,FMT='('' Fusion point  = '',E13.7)') RTT      RGAMW=(RCW-RCPV)/RV
132         WRITE(UNIT=6,FMT='(''        RLvTt  = '',E13.7)') RLVTT      RBETW=RLVTT/RV+RGAMW*RTT
133         WRITE(UNIT=6,FMT='(''        RLsTt  = '',E13.7)') RLSTT      RALPW=LOG(RESTT)+RBETW/RTT+RGAMW*LOG(RTT)
134         WRITE(UNIT=6,FMT='(''        RLMlt  = '',E13.7)') RLMLT      RGAMS=(RCS-RCPV)/RV
135         WRITE(UNIT=6,FMT='('' Normal press. = '',E13.7)') RATM      RBETS=RLSTT/RV+RGAMS*RTT
136         WRITE(UNIT=6,FMT='('' Latent heat :  '')')      RALPS=LOG(RESTT)+RBETS/RTT+RGAMS*LOG(RTT)
137        RGAMD=RGAMS-RGAMW
138         !*       9.    SATURATED VAPOUR PRESSURE.      RBETD=RBETS-RBETW
139        RALPD=RALPS-RALPW
140         RESTT=611.14  
141         RGAMW=(RCW-RCPV)/RV      ! calculer les constantes pour les fonctions thermodynamiques
142         RBETW=RLVTT/RV+RGAMW*RTT  
143         RALPW=LOG(RESTT)+RBETW/RTT+RGAMW*LOG(RTT)      RVTMP2=RCPV/RCPD-1.
144         RGAMS=(RCS-RCPV)/RV      RHOH2O=RATM/100.
145         RBETS=RLSTT/RV+RGAMS*RTT      R2ES=RESTT*RD/RV
146         RALPS=LOG(RESTT)+RBETS/RTT+RGAMS*LOG(RTT)      R3LES=17.269
147         RGAMD=RGAMS-RGAMW      R3IES=21.875
148         RBETD=RBETS-RBETW      R4LES=35.86
149         RALPD=RALPS-RALPW      R4IES=7.66
150        R5LES=R3LES*(RTT-R4LES)
151         ! calculer les constantes pour les fonctions thermodynamiques      R5IES=R3IES*(RTT-R4IES)
   
        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.36  
changed lines
  Added in v.37

  ViewVC Help
Powered by ViewVC 1.1.21