1 | # |
---|
2 | # $Id: comconst.h 1795 2013-07-18 08:20:28Z emillour $ |
---|
3 | # |
---|
4 | #---------------------------------------------------------------------- |
---|
5 | import numpy as np |
---|
6 | |
---|
7 | # dtvr: dynamical time step (in s) |
---|
8 | # daysec: length (in s) of a standard day |
---|
9 | # pi: something like 3.14159.... |
---|
10 | # dtphys: (s) time step for the physics |
---|
11 | # dtdiss: (s) time step for the dissipation |
---|
12 | # rad: (m) radius of the planet |
---|
13 | # r: Reduced Gas constant r=R/mu |
---|
14 | # with R=8.31.. J.K-1.mol-1, mu: mol mass of atmosphere (kg/mol) |
---|
15 | # cpp: Specific heat Cp (J.kg-1.K-1) |
---|
16 | # kappa: kappa=R/Cp |
---|
17 | # cotot |
---|
18 | # unsim: 1./iim |
---|
19 | # g: (m/s2) gravity |
---|
20 | # omeg: (rad/s) rotation rate of the planet |
---|
21 | # dissip_factz,dissip_deltaz,dissip_zref |
---|
22 | ## top_bound sponge: |
---|
23 | # iflag_top_bound: sponge type |
---|
24 | # mode_top_bound: sponge mode |
---|
25 | # tau_top_bound: inverse of sponge characteristic time scale (Hz) |
---|
26 | # daylen: length of solar day, in 'standard' day length |
---|
27 | # year_day: Number of standard days in a year |
---|
28 | # molmass: (g/mol) molar mass of the atmosphere |
---|
29 | # ihf: (W/m2) Intrinsic heat flux (for giant planets) |
---|
30 | |
---|
31 | planet_type = 'terre' |
---|
32 | iflag_phys = 2 |
---|
33 | daysec = 86400. |
---|
34 | preff = 1013250. |
---|
35 | pa = 500. |
---|
36 | |
---|
37 | #----------------------------------------------------------------------- |
---|
38 | # From suphel |
---|
39 | |
---|
40 | pi = 2.*np.arcsin(1.) |
---|
41 | clum = 299792458. |
---|
42 | hpla = 6.6260755e-34 |
---|
43 | kbol = 1.380658e-23 |
---|
44 | navo = 6.0221367e+23 |
---|
45 | # |
---|
46 | # ---------------------------------------------------------------- |
---|
47 | # |
---|
48 | #* 2. define astronomical constants. |
---|
49 | # ------------------------------ |
---|
50 | # |
---|
51 | day = 86400. |
---|
52 | ea = 149597870000. |
---|
53 | epsm = 0.409093 |
---|
54 | # |
---|
55 | siyea = 365.25*day*2.*pi/6.283076 |
---|
56 | siday = day/(1.+day/siyea) |
---|
57 | omega = 2.*pi/siday |
---|
58 | # |
---|
59 | # |
---|
60 | # ------------------------------------------------------------------ |
---|
61 | # |
---|
62 | #* 3. define geoide. |
---|
63 | # -------------- |
---|
64 | # |
---|
65 | g = 9.80665 |
---|
66 | a = 6371229. |
---|
67 | r1sa = np.float(np.float64(1.)/np.float64(a)) |
---|
68 | #rad = 6371220 |
---|
69 | rad = a*1. |
---|
70 | omeg = 7.272205e-05 |
---|
71 | |
---|
72 | # |
---|
73 | # ----------------------------------------------------------------- |
---|
74 | # |
---|
75 | #* 4. define radiation constants. |
---|
76 | # --------------------------- |
---|
77 | # |
---|
78 | # z.x.li rsigma=2. * rpi**5 * rkbol**4 /(15.* rclum**2 * rhpla**3) |
---|
79 | sigma = 2.*pi**5 * (kbol/hpla)**3 * kbol/clum/clum/15. |
---|
80 | # |
---|
81 | # ----------------------------------------------------------------- |
---|
82 | # |
---|
83 | #* 5. define thermodynamic constants, gas phase. |
---|
84 | # ------------------------------------------ |
---|
85 | # |
---|
86 | r = navo*kbol |
---|
87 | md = 28.9644 |
---|
88 | mo3 = 47.9942 |
---|
89 | mv = 18.0153 |
---|
90 | rd = 1000.*r/md |
---|
91 | rv = 1000.*r/mv |
---|
92 | cpd = 3.5*rd |
---|
93 | cvd = cpd-rd |
---|
94 | cpv = 4.*rv |
---|
95 | cvv = cpv-rv |
---|
96 | kappa = rd/cpd |
---|
97 | etv = rv/rd-1. |
---|
98 | cpp = cpd*1. |
---|
99 | # |
---|
100 | # ---------------------------------------------------------------- |
---|
101 | # |
---|
102 | #* 6. define thermodynamic constants, liquid phase. |
---|
103 | # --------------------------------------------- |
---|
104 | # |
---|
105 | cw = cpv |
---|
106 | # ---------------------------------------------------------------- |
---|
107 | # |
---|
108 | #* 7. define thermodynamic constants, solid phase. |
---|
109 | # -------------------------------------------- |
---|
110 | # |
---|
111 | cs = cpv |
---|
112 | # |
---|
113 | # ---------------------------------------------------------------- |
---|
114 | # |
---|
115 | #* 8. define thermodynamic constants, transition of phase. |
---|
116 | # ---------------------------------------------------- |
---|
117 | # |
---|
118 | tt = 273.16 |
---|
119 | lvtt = 2.5008e+6 |
---|
120 | lstt = 2.8345e+6 |
---|
121 | lmlt = lstt-lvtt |
---|
122 | atm = 100000. |
---|
123 | # |
---|
124 | # ---------------------------------------------------------------- |
---|
125 | # |
---|
126 | #* 9. saturated vapour pressure. |
---|
127 | # -------------------------- |
---|
128 | # |
---|
129 | estt = 611.14 |
---|
130 | gamw = (cw-cpv)/rv |
---|
131 | betw = lvtt/rv+gamw*tt |
---|
132 | alpw = np.log(estt)+betw/tt+gamw*np.log(tt) |
---|
133 | gams = (cs-cpv)/rv |
---|
134 | bets = lstt/rv+gams*tt |
---|
135 | alps = np.log(estt)+bets/tt+gams*np.log(tt) |
---|
136 | gamd = gams-gamw |
---|
137 | betd = bets-betw |
---|
138 | alpd = alps-alpw |
---|
139 | # |
---|
140 | # ------------------------------------------------------------------ |
---|
141 | # |
---|
142 | # calculer les constantes pour les fonctions thermodynamiques |
---|
143 | # |
---|
144 | vtmp2 = cpv/cpd-1. |
---|
145 | hoh2o = atm/100. |
---|
146 | r2es = estt*rd/rv |
---|
147 | r3les = 17.269 |
---|
148 | r3ies = 21.875 |
---|
149 | r4les = 35.86 |
---|
150 | r4ies = 7.66 |
---|
151 | r5les = r3les*(tt-r4les) |
---|
152 | r5ies = r3ies*(tt-r4ies) |
---|
153 | |
---|
154 | # For filtreg |
---|
155 | # |
---|
156 | type_sddu=1 |
---|
157 | type_sddv=2 |
---|
158 | type_unsddu=3 |
---|
159 | type_unsddv=4 |
---|
160 | |
---|
161 | # Zoom related |
---|
162 | # |
---|
163 | fxyhypb = False |
---|
164 | nitergdiv = 1 |
---|
165 | nitergrot = 2 |
---|
166 | niterh = 2 |
---|
167 | coefdis = 0. |
---|
168 | ysinus = True |
---|