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

Diff of /trunk/phylmd/suphec.f

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

trunk/libf/phylmd/suphec.f90 revision 47 by guez, Fri Jul 1 15:00:48 2011 UTC trunk/Sources/phylmd/suphec.f revision 169 by guez, Mon Sep 14 17:13:16 2015 UTC
# Line 1  Line 1 
1  module suphec_m  module suphec_m
2    
3      use nr_util, only: pi
4    
5    implicit none    implicit none
6    
7    ! A1.0 Fundamental constants    ! A1.0 Fundamental constants
8    REAL RPI    real, parameter:: RCLUM = 299792458. ! speed of light, m s-1
9    real, parameter:: RCLUM = 299792458.    real, parameter:: RHPLA = 6.6260755E-34 ! Planck constant, J s
10    real, parameter:: RHPLA = 6.6260755E-34    real, parameter:: KBOL = 1.380658E-23 ! Boltzmann constant, in J K-1
11    real, parameter:: RKBOL = 1.380658E-23 ! Boltzmann constant, in J K-1    real, parameter:: NAVO = 6.0221367E23 ! Avogadro number, in mol-1
   real, parameter:: RNAVO = 6.0221367E+23 ! Avogadro number, in mol-1  
12    
13    ! A1.1 Astronomical constants    ! A1.1 Astronomical constants
14    REAL RSIYEA, RSIDAY, ROMEGA    REAL RSIYEA, RSIDAY, ROMEGA
# Line 20  module suphec_m Line 21  module suphec_m
21    real, parameter:: RA = 6371229.    real, parameter:: RA = 6371229.
22    
23    ! A1.3 Radiation    ! A1.3 Radiation
24    REAL RSIGMA    REAL, parameter:: rsigma = 2. * pi**5 * (kbol / rhpla)**3 * kbol / rclum**2 &
25           / 15.
26    
27    ! A1.4 Thermodynamic gas phase    ! A1.4 Thermodynamic gas phase
28    REAL, parameter:: R = RNAVO * RKBOL ! ideal gas constant, in J K-1 mol-1    REAL, parameter:: R = NAVO * KBOL ! ideal gas constant, in J K-1 mol-1
29    real RV, RCPD, RCPV, RCVD, RCVV    real, parameter:: MV = 18.0153 ! molar mass of water, in g mol-1
30    real, parameter:: RMD = 28.9644 ! molar mass of dry air, in g mol-1  
31      real, parameter:: RV = 1e3 * R / MV
32      ! specific ideal gas constant for water vapor, in J K-1 kg-1
33      ! (factor 1e3: conversion from g to kg)
34    
35    real, parameter:: RD = 1000. * R / RMD    real, parameter:: MD = 28.9644 ! molar mass of dry air, in g mol-1
36    
37      real, parameter:: RD = 1e3 * R / MD
38    ! specific ideal gas constant for dry air, in J K-1 kg-1    ! specific ideal gas constant for dry air, in J K-1 kg-1
39      ! (factor 1e3: conversion from g to kg)
40    
41      real, save:: RCPV, RCVD, RCVV
42    
43      real, parameter:: RCPD = 7. / 2 * RD
44      ! specific heat capacity for dry air, in J K-1 kg-1
45    
46    real, parameter:: RMO3 = 47.9942    real, parameter:: RMO3 = 47.9942
47    real, parameter:: RMV = 18.0153    REAL, parameter:: RKAPPA = RD/RCPD
48    REAL RKAPPA, RETV    real, save:: RETV
49    
50    ! A1.5, 6 Thermodynamic liquid, solid phases    ! A1.5, 6 Thermodynamic liquid, solid phases
51    REAL RCW, RCS    REAL, save:: RCW, RCS
52    
53    ! A1.7 Thermodynamic transition of phase    ! A1.7 Thermodynamic transition of phase
54    REAL RLMLT    REAL, save:: RLMLT
55    real, parameter:: RTT = 273.16    real, parameter:: RTT = 273.16
56    real, parameter:: RLVTT = 2.5008E+6    real, parameter:: RLVTT = 2.5008E+6
57    real, parameter:: RLSTT = 2.8345E+6    real, parameter:: RLSTT = 2.8345E+6
58    real, parameter:: RATM = 100000.    real, parameter:: RATM = 1e5
59    
60    ! A1.8 Curve of saturation    ! A1.8 Curve of saturation
61    REAL RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS    REAL, save:: RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS
62    real, parameter:: RESTT = 611.14    real, parameter:: RESTT = 611.14
63    REAL RALPD, RBETD, RGAMD    REAL, save:: RALPD, RBETD, RGAMD
64    
65    save    private pi
66    
67  contains  contains
68    
69    SUBROUTINE suphec    SUBROUTINE suphec
70    
71      ! From phylmd/suphec.F, v 1.2 2005/06/06 13:16:33      ! From phylmd/suphec.F, version 1.2 2005/06/06 13:16:33
72      ! Initialise certaines constantes et parametres physiques.      ! Initialise certaines constantes et certains paramètres physiques.
73    
74      !------------------------------------------      !------------------------------------------
75    
76      PRINT *, 'Call sequence information: suphec'      PRINT *, 'Call sequence information: suphec'
77    
     ! 1. DEFINE FUNDAMENTAL CONSTANTS  
   
     print *, 'Constants of the ICM'  
     RPI = 2.*ASIN(1.)  
     print *, 'Fundamental constants '  
     print '('' PI = '', E13.7, '' -'')', RPI  
     print '('' c = '', E13.7, ''m s-1'')', RCLUM  
     print '('' h = '', E13.7, ''J s'')', RHPLA  
     print '('' K = '', E13.7, ''J K-1'')', RKBOL  
     print '('' N = '', E13.7, ''mol-1'')', RNAVO  
   
78      ! 2. DEFINE ASTRONOMICAL CONSTANTS      ! 2. DEFINE ASTRONOMICAL CONSTANTS
79    
80      RSIYEA = 365.25*RDAY*2.*RPI/6.283076      RSIYEA = 365.25*RDAY*2.*PI/6.283076
81      RSIDAY = RDAY/(1.+RDAY/RSIYEA)      RSIDAY = RDAY/(1.+RDAY/RSIYEA)
82      ROMEGA = 2.*RPI/RSIDAY      ROMEGA = 2.*PI/RSIDAY
83    
84      print *, 'Astronomical constants '      print *, 'Astronomical constants '
85      print '('' day = '', E13.7, '' s'')', RDAY      print '('' day = '', E13.7, '' s'')', RDAY
# Line 95  contains Line 97  contains
97    
98      ! 4. DEFINE RADIATION CONSTANTS.      ! 4. DEFINE RADIATION CONSTANTS.
99    
     rsigma = 2.*rpi**5 * (rkbol/rhpla)**3 * rkbol/rclum/rclum/15.  
100      print *, ' Radiation '      print *, ' Radiation '
101      print '('' Stefan-Bol. = '', E13.7, '' W m-2 K-4'')', RSIGMA      print '('' Stefan-Bol. = '', E13.7, '' W m-2 K-4'')', RSIGMA
102    
103      ! 5. DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.      ! 5. DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.
104    
     RV = 1000.*R/RMV  
     RCPD = 3.5*RD  
105      RCVD = RCPD-RD      RCVD = RCPD-RD
106      RCPV = 4. *RV      RCPV = 4. * RV
107      RCVV = RCPV-RV      RCVV = RCPV-RV
108      RKAPPA = RD/RCPD      RETV = RV / RD - 1.
109      RETV = RV/RD-1.      print *, 'Thermodynamics, gas'
     print *, 'Thermodynamic, gas '  
     print '('' Perfect gas = '', e13.7)', R  
110      print '('' Ozone mass = '', e13.7)', RMO3      print '('' Ozone mass = '', e13.7)', RMO3
111      print '('' Vapour mass = '', e13.7)', RMV      print *, "rd = ", RD, "J K-1 kg-1"
112      print '('' Dry air constant = '', e13.7)', RD      print *, "rv = ", RV, "J K-1 kg-1"
     print '('' Vapour constant = '', e13.7)', RV  
113      print '('' Cpd = '', e13.7)', RCPD      print '('' Cpd = '', e13.7)', RCPD
114      print '('' Cvd = '', e13.7)', RCVD      print '('' Cvd = '', e13.7)', RCVD
115      print '('' Cpv = '', e13.7)', RCPV      print '('' Cpv = '', e13.7)', RCPV
116      print '('' Cvv = '', e13.7)', RCVV      print '('' Cvv = '', e13.7)', RCVV
117      print '('' Rd/Cpd = '', e13.7)', RKAPPA      print '('' Rd/Cpd = '', e13.7)', RKAPPA
118      print '('' Rv/Rd-1 = '', e13.7)', RETV      print '('' Rv / Rd - 1 = '', e13.7)', RETV
119    
120      ! 6. DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.      ! 6. DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.
121    
# Line 136  contains Line 132  contains
132      ! 8. DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.      ! 8. DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.
133    
134      RLMLT = RLSTT-RLVTT      RLMLT = RLSTT-RLVTT
135      print *, 'Thermodynamic, trans. '      print *, 'Thermodynamic, transition of phase:'
136      print '('' Fusion point = '', E13.7)', RTT      print '('' Fusion point = '', E13.7)', RTT
137      print '('' RLvTt = '', E13.7)', RLVTT      print '('' RLvTt = '', E13.7)', RLVTT
138      print '('' RLsTt = '', E13.7)', RLSTT      print '('' RLsTt = '', E13.7)', RLSTT
139      print '('' RLMlt = '', E13.7)', RLMLT      print '('' RLMlt = '', E13.7)', RLMLT
140      print '('' Normal press. = '', E13.7)', RATM      print '('' Normal pressure = '', E13.7)', RATM
141    
142      ! 9. SATURATED VAPOUR PRESSURE.      ! 9. SATURATED VAPOUR PRESSURE.
143    

Legend:
Removed from v.47  
changed lines
  Added in v.169

  ViewVC Help
Powered by ViewVC 1.1.21