1 |
module suphec_m |
module suphec_m |
2 |
|
|
3 |
use nr_util, only: pi |
use nr_util, only: pi, twoPI |
4 |
|
|
5 |
implicit none |
implicit none |
6 |
|
|
11 |
real, parameter:: NAVO = 6.0221367E23 ! Avogadro number, in mol-1 |
real, parameter:: NAVO = 6.0221367E23 ! Avogadro number, in mol-1 |
12 |
|
|
13 |
! A1.1 Astronomical constants |
! A1.1 Astronomical constants |
14 |
REAL RSIYEA, RSIDAY, ROMEGA |
|
15 |
real, parameter:: RDAY = 86400. |
real, parameter:: RDAY = 86400. |
16 |
real, parameter:: REA = 149597870000. |
|
17 |
real, parameter:: REPSM = 0.409093 |
REAL, parameter:: RSIYEA = 365.25 * RDAY * 2. * PI / 6.283076 |
18 |
|
! sideral year, in s |
19 |
|
|
20 |
|
REAL, parameter:: RSIDAY = RDAY / (1. + RDAY / RSIYEA) ! sideral day, in s |
21 |
|
REAL, parameter:: ROMEGA = twoPI / RSIDAY |
22 |
|
|
23 |
! A1.2 Geoide |
! A1.2 Geoide |
24 |
real, parameter:: RG = 9.80665 ! acceleration of gravity, in m s-2 |
real, parameter:: RG = 9.80665 ! acceleration of gravity, in m s-2 |
42 |
! 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 |
43 |
! (factor 1e3: conversion from g to kg) |
! (factor 1e3: conversion from g to kg) |
44 |
|
|
45 |
real, save:: RCPV, RCVD, RCVV |
real, parameter:: RCPV = 4. * RV |
46 |
|
! specific heat capacity at constant pressure of water vapor, in J K-1 kg-1 |
47 |
|
|
48 |
|
real, parameter:: RCVV = RCPV - RV |
49 |
|
! specific heat capacity at constant volume of water vapor, in J K-1 kg-1 |
50 |
|
|
51 |
real, parameter:: RCPD = 7. / 2 * RD |
real, parameter:: RCPD = 7. / 2 * RD |
52 |
! specific heat capacity for dry air, in J K-1 kg-1 |
! specific heat capacity at constant pressure of dry air, in J K-1 kg-1 |
53 |
|
|
54 |
|
real, parameter:: RCVD = RCPD - RD |
55 |
|
! specific heat capacity at constant volume of dry air, in J K-1 kg-1 |
56 |
|
|
57 |
real, parameter:: RMO3 = 47.9942 |
real, parameter:: RMO3 = 47.9942 |
58 |
REAL, parameter:: RKAPPA = RD/RCPD |
REAL, parameter:: RKAPPA = RD/RCPD |
59 |
real, save:: RETV |
real, parameter:: RETV = RV / RD - 1. |
60 |
|
|
61 |
! A1.5, 6 Thermodynamic liquid, solid phases |
! A1.5, 6 Thermodynamic liquid, solid phases |
62 |
REAL, save:: RCW, RCS |
|
63 |
|
REAL, parameter:: RCW = RCPV ! LIQUID PHASE Cw |
64 |
|
real, save:: RCS |
65 |
|
|
66 |
! A1.7 Thermodynamic transition of phase |
! A1.7 Thermodynamic transition of phase |
67 |
REAL, save:: RLMLT |
REAL, save:: RLMLT |
68 |
real, parameter:: RTT = 273.16 |
real, parameter:: RTT = 273.16 |
69 |
real, parameter:: RLVTT = 2.5008E+6 |
|
70 |
|
real, parameter:: RLVTT = 2.5008E+6 |
71 |
|
! specific latent heat of vaporization of water at triple point, in J kg-1 |
72 |
|
|
73 |
real, parameter:: RLSTT = 2.8345E+6 |
real, parameter:: RLSTT = 2.8345E+6 |
74 |
real, parameter:: RATM = 1e5 |
real, parameter:: RATM = 1e5 |
75 |
|
|
91 |
|
|
92 |
PRINT *, 'Call sequence information: suphec' |
PRINT *, 'Call sequence information: suphec' |
93 |
|
|
|
! 2. DEFINE ASTRONOMICAL CONSTANTS |
|
|
|
|
|
RSIYEA = 365.25*RDAY*2.*PI/6.283076 |
|
|
RSIDAY = RDAY/(1.+RDAY/RSIYEA) |
|
|
ROMEGA = 2.*PI/RSIDAY |
|
|
|
|
94 |
print *, 'Astronomical constants ' |
print *, 'Astronomical constants ' |
|
print '('' day = '', E13.7, '' s'')', RDAY |
|
|
print '('' half g. axis = '', E13.7, '' m'')', REA |
|
|
print '('' mean anomaly = '', E13.7, '' -'')', REPSM |
|
|
print '('' sideral year = '', E13.7, '' s'')', RSIYEA |
|
|
print '('' sideral day = '', E13.7, '' s'')', RSIDAY |
|
95 |
print '('' omega = '', E13.7, '' s-1'')', ROMEGA |
print '('' omega = '', E13.7, '' s-1'')', ROMEGA |
96 |
|
|
97 |
! 3. DEFINE GEOIDE. |
print *, 'Geoid:' |
|
|
|
|
print *, ' Geoide ' |
|
98 |
print '('' Gravity = '', E13.7, '' m s-2'')', RG |
print '('' Gravity = '', E13.7, '' m s-2'')', RG |
99 |
print '('' Earth radius = '', E13.7, '' m'')', RA |
print '('' Earth radius = '', E13.7, '' m'')', RA |
100 |
|
|
101 |
! 4. DEFINE RADIATION CONSTANTS. |
print *, 'Radiation constants:' |
|
|
|
|
print *, ' Radiation ' |
|
102 |
print '('' Stefan-Bol. = '', E13.7, '' W m-2 K-4'')', RSIGMA |
print '('' Stefan-Bol. = '', E13.7, '' W m-2 K-4'')', RSIGMA |
103 |
|
|
104 |
! 5. DEFINE THERMODYNAMIC CONSTANTS, GAS PHASE. |
print *, 'Thermodynamical constants, gas phase:' |
|
|
|
|
RCVD = RCPD-RD |
|
|
RCPV = 4. * RV |
|
|
RCVV = RCPV-RV |
|
|
RETV = RV / RD - 1. |
|
|
print *, 'Thermodynamics, gas' |
|
|
print '('' Ozone mass = '', e13.7)', RMO3 |
|
105 |
print *, "rd = ", RD, "J K-1 kg-1" |
print *, "rd = ", RD, "J K-1 kg-1" |
106 |
print *, "rv = ", RV, "J K-1 kg-1" |
print *, "rv = ", RV, "J K-1 kg-1" |
107 |
print '('' Cpd = '', e13.7)', RCPD |
print '('' Cpd = '', e13.7)', RCPD |
108 |
print '('' Cvd = '', e13.7)', RCVD |
print '('' Cvd = '', e13.7)', RCVD |
|
print '('' Cpv = '', e13.7)', RCPV |
|
109 |
print '('' Cvv = '', e13.7)', RCVV |
print '('' Cvv = '', e13.7)', RCVV |
110 |
print '('' Rd/Cpd = '', e13.7)', RKAPPA |
print '('' Rd/Cpd = '', e13.7)', RKAPPA |
111 |
print '('' Rv / Rd - 1 = '', e13.7)', RETV |
print '('' Rv / Rd - 1 = '', e13.7)', RETV |
112 |
|
|
|
! 6. DEFINE THERMODYNAMIC CONSTANTS, LIQUID PHASE. |
|
|
|
|
|
RCW = RCPV |
|
|
print *, 'Thermodynamic, liquid ' |
|
|
print '('' Cw = '', E13.7)', RCW |
|
|
|
|
113 |
! 7. DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE. |
! 7. DEFINE THERMODYNAMIC CONSTANTS, SOLID PHASE. |
114 |
|
|
115 |
RCS = RCPV |
RCS = RCPV |
121 |
RLMLT = RLSTT-RLVTT |
RLMLT = RLSTT-RLVTT |
122 |
print *, 'Thermodynamic, transition of phase:' |
print *, 'Thermodynamic, transition of phase:' |
123 |
print '('' Fusion point = '', E13.7)', RTT |
print '('' Fusion point = '', E13.7)', RTT |
|
print '('' RLvTt = '', E13.7)', RLVTT |
|
124 |
print '('' RLsTt = '', E13.7)', RLSTT |
print '('' RLsTt = '', E13.7)', RLSTT |
125 |
print '('' RLMlt = '', E13.7)', RLMLT |
print '('' RLMlt = '', E13.7)', RLMLT |
126 |
print '('' Normal pressure = '', E13.7)', RATM |
print '('' Normal pressure = '', E13.7)', RATM |