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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 212 - (show annotations)
Thu Jan 12 12:31:31 2017 UTC (7 years, 3 months ago) by guez
File size: 4282 byte(s)
Moved variables from module com_io_dyn to module inithist_m, where
they are defined.

Split grid_atob.f into grille_m.f and dist_sphe.f. Extracted ASCCI art
to documentation. In grille_m, use automatic arrays instead of maximum
size. In grille_m, instead of printing data for every problematic
point, print a single diagnostic message.

Removed variables top_height, overlap, lev_histhf, lev_histday,
lev_histmth, type_run, ok_isccp, ok_regdyn, lonmin_ins, lonmax_ins,
latmin_ins, latmax_ins of module clesphys, not used.

Removed variable itap of module histwrite_phy_m, not used. There is a
variable itap in module time_phylmdz.

Added output of tro3.

In physiq, no need to compute wo at every time-step, since we only use
it in radlwsw.

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

  ViewVC Help
Powered by ViewVC 1.1.21