/[lmdze]/trunk/libf/phylmd/suphec.f90
ViewVC logotype

Contents of /trunk/libf/phylmd/suphec.f90

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (show annotations)
Wed Aug 24 11:43:14 2011 UTC (12 years, 8 months ago) by guez
File size: 4683 byte(s)
LMDZE now uses library Jumble.

Removed all calls to "flinget". Replaced calls to "flinget",
"flininfo", "flinopen_nozoom" by calls to NetCDF95 and Jumble.

Split file "cv_driver.f" into "cv_driver.f90", "cv_flag.f90" and
"cv_thermo.f90".

Bug fix: "QANCIEN" was read twice in "phyeytat0".

In "physiq", initialization of "d_t", "d_u", "d_v" was useless.

1 module suphec_m
2
3 implicit none
4
5 ! A1.0 Fundamental constants
6 REAL RPI
7 real, parameter:: RCLUM = 299792458.
8 real, parameter:: RHPLA = 6.6260755E-34
9 real, parameter:: RKBOL = 1.380658E-23 ! Boltzmann constant, in J K-1
10 real, parameter:: RNAVO = 6.0221367E+23 ! Avogadro number, in mol-1
11
12 ! A1.1 Astronomical constants
13 REAL RSIYEA, RSIDAY, ROMEGA
14 real, parameter:: RDAY = 86400.
15 real, parameter:: REA = 149597870000.
16 real, parameter:: REPSM = 0.409093
17
18 ! A1.2 Geoide
19 real, parameter:: RG = 9.80665 ! acceleration of gravity, in m s-2
20 real, parameter:: RA = 6371229.
21
22 ! A1.3 Radiation
23 REAL RSIGMA
24
25 ! A1.4 Thermodynamic gas phase
26 REAL, parameter:: R = RNAVO * RKBOL ! ideal gas constant, in J K-1 mol-1
27 real RV, RCPD, RCPV, RCVD, RCVV
28 real, parameter:: RMD = 28.9644 ! molar mass of dry air, in g mol-1
29
30 real, parameter:: RD = 1000. * R / RMD
31 ! specific ideal gas constant for dry air, in J K-1 kg-1
32 ! (factor 1000: conversion from g to kg)
33
34 real, parameter:: RMO3 = 47.9942
35 real, parameter:: RMV = 18.0153
36 REAL RKAPPA, RETV
37
38 ! A1.5, 6 Thermodynamic liquid, solid phases
39 REAL RCW, RCS
40
41 ! A1.7 Thermodynamic transition of phase
42 REAL RLMLT
43 real, parameter:: RTT = 273.16
44 real, parameter:: RLVTT = 2.5008E+6
45 real, parameter:: RLSTT = 2.8345E+6
46 real, parameter:: RATM = 100000.
47
48 ! A1.8 Curve of saturation
49 REAL RALPW, RBETW, RGAMW, RALPS, RBETS, RGAMS
50 real, parameter:: RESTT = 611.14
51 REAL RALPD, RBETD, RGAMD
52
53 save
54
55 contains
56
57 SUBROUTINE suphec
58
59 ! From phylmd/suphec.F, v 1.2 2005/06/06 13:16:33
60 ! Initialise certaines constantes et parametres physiques.
61
62 !------------------------------------------
63
64 PRINT *, 'Call sequence information: suphec'
65
66 ! 1. DEFINE FUNDAMENTAL CONSTANTS
67
68 print *, 'Constants of the ICM'
69 RPI = 2.*ASIN(1.)
70 print *, 'Fundamental constants '
71 print '('' PI = '', E13.7, '' -'')', RPI
72 print '('' c = '', E13.7, ''m s-1'')', RCLUM
73 print '('' h = '', E13.7, ''J s'')', RHPLA
74 print '('' K = '', E13.7, ''J K-1'')', RKBOL
75 print '('' N = '', E13.7, ''mol-1'')', RNAVO
76
77 ! 2. DEFINE ASTRONOMICAL CONSTANTS
78
79 RSIYEA = 365.25*RDAY*2.*RPI/6.283076
80 RSIDAY = RDAY/(1.+RDAY/RSIYEA)
81 ROMEGA = 2.*RPI/RSIDAY
82
83 print *, 'Astronomical constants '
84 print '('' day = '', E13.7, '' s'')', RDAY
85 print '('' half g. axis = '', E13.7, '' m'')', REA
86 print '('' mean anomaly = '', E13.7, '' -'')', REPSM
87 print '('' sideral year = '', E13.7, '' s'')', RSIYEA
88 print '('' sideral day = '', E13.7, '' s'')', RSIDAY
89 print '('' omega = '', E13.7, '' s-1'')', ROMEGA
90
91 ! 3. DEFINE GEOIDE.
92
93 print *, ' Geoide '
94 print '('' Gravity = '', E13.7, '' m s-2'')', RG
95 print '('' Earth radius = '', E13.7, '' m'')', RA
96
97 ! 4. DEFINE RADIATION CONSTANTS.
98
99 rsigma = 2.*rpi**5 * (rkbol/rhpla)**3 * rkbol/rclum/rclum/15.
100 print *, ' Radiation '
101 print '('' Stefan-Bol. = '', E13.7, '' W m-2 K-4'')', RSIGMA
102
103 ! 5. DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE.
104
105 RV = 1000.*R/RMV
106 RCPD = 3.5*RD
107 RCVD = RCPD-RD
108 RCPV = 4. *RV
109 RCVV = RCPV-RV
110 RKAPPA = RD/RCPD
111 RETV = RV/RD-1.
112 print *, 'Thermodynamic, gas '
113 print '('' Perfect gas = '', e13.7)', R
114 print '('' Ozone mass = '', e13.7)', RMO3
115 print '('' Vapour mass = '', e13.7)', RMV
116 print '('' Dry air constant = '', e13.7)', RD
117 print '('' Vapour constant = '', e13.7)', RV
118 print '('' Cpd = '', e13.7)', RCPD
119 print '('' Cvd = '', e13.7)', RCVD
120 print '('' Cpv = '', e13.7)', RCPV
121 print '('' Cvv = '', e13.7)', RCVV
122 print '('' Rd/Cpd = '', e13.7)', RKAPPA
123 print '('' Rv/Rd-1 = '', e13.7)', RETV
124
125 ! 6. DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE.
126
127 RCW = RCPV
128 print *, 'Thermodynamic, liquid '
129 print '('' Cw = '', E13.7)', RCW
130
131 ! 7. DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE.
132
133 RCS = RCPV
134 print *, 'thermodynamic, solid'
135 print '('' Cs = '', E13.7)', RCS
136
137 ! 8. DEFINE THERMODYNAMIC CONSTANTS, TRANSITION OF PHASE.
138
139 RLMLT = RLSTT-RLVTT
140 print *, 'Thermodynamic, trans. '
141 print '('' Fusion point = '', E13.7)', RTT
142 print '('' RLvTt = '', E13.7)', RLVTT
143 print '('' RLsTt = '', E13.7)', RLSTT
144 print '('' RLMlt = '', E13.7)', RLMLT
145 print '('' Normal press. = '', E13.7)', RATM
146
147 ! 9. SATURATED VAPOUR PRESSURE.
148
149 RGAMW = (RCW-RCPV)/RV
150 RBETW = RLVTT/RV+RGAMW*RTT
151 RALPW = LOG(RESTT)+RBETW/RTT+RGAMW*LOG(RTT)
152 RGAMS = (RCS-RCPV)/RV
153 RBETS = RLSTT/RV+RGAMS*RTT
154 RALPS = LOG(RESTT)+RBETS/RTT+RGAMS*LOG(RTT)
155 RGAMD = RGAMS-RGAMW
156 RBETD = RBETS-RBETW
157 RALPD = RALPS-RALPW
158
159 END SUBROUTINE suphec
160
161 end module suphec_m

  ViewVC Help
Powered by ViewVC 1.1.21