pycontrails 0.54.3__cp310-cp310-macosx_11_0_arm64.whl → 0.54.5__cp310-cp310-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pycontrails might be problematic. Click here for more details.
- pycontrails/__init__.py +2 -2
- pycontrails/_version.py +2 -2
- pycontrails/core/__init__.py +1 -1
- pycontrails/core/aircraft_performance.py +58 -58
- pycontrails/core/cache.py +7 -7
- pycontrails/core/fleet.py +54 -29
- pycontrails/core/flight.py +218 -301
- pycontrails/core/interpolation.py +63 -60
- pycontrails/core/met.py +193 -125
- pycontrails/core/models.py +27 -13
- pycontrails/core/polygon.py +15 -15
- pycontrails/core/rgi_cython.cpython-310-darwin.so +0 -0
- pycontrails/core/vector.py +119 -96
- pycontrails/datalib/_met_utils/metsource.py +8 -5
- pycontrails/datalib/ecmwf/__init__.py +14 -14
- pycontrails/datalib/ecmwf/common.py +1 -1
- pycontrails/datalib/ecmwf/era5.py +7 -7
- pycontrails/datalib/ecmwf/hres.py +3 -3
- pycontrails/datalib/ecmwf/ifs.py +1 -1
- pycontrails/datalib/gfs/__init__.py +6 -6
- pycontrails/datalib/gfs/gfs.py +2 -2
- pycontrails/datalib/goes.py +5 -5
- pycontrails/ext/empirical_grid.py +1 -1
- pycontrails/models/apcemm/apcemm.py +5 -5
- pycontrails/models/apcemm/utils.py +1 -1
- pycontrails/models/cocip/__init__.py +2 -2
- pycontrails/models/cocip/cocip.py +23 -24
- pycontrails/models/cocip/cocip_params.py +2 -11
- pycontrails/models/cocip/cocip_uncertainty.py +24 -18
- pycontrails/models/cocip/contrail_properties.py +331 -316
- pycontrails/models/cocip/output_formats.py +53 -53
- pycontrails/models/cocip/radiative_forcing.py +135 -131
- pycontrails/models/cocip/radiative_heating.py +135 -135
- pycontrails/models/cocip/unterstrasser_wake_vortex.py +90 -87
- pycontrails/models/cocip/wake_vortex.py +92 -92
- pycontrails/models/cocip/wind_shear.py +8 -8
- pycontrails/models/cocipgrid/cocip_grid.py +37 -96
- pycontrails/models/dry_advection.py +60 -19
- pycontrails/models/emissions/__init__.py +2 -2
- pycontrails/models/emissions/black_carbon.py +108 -108
- pycontrails/models/emissions/emissions.py +87 -87
- pycontrails/models/emissions/ffm2.py +35 -35
- pycontrails/models/humidity_scaling/humidity_scaling.py +23 -23
- pycontrails/models/issr.py +2 -2
- pycontrails/models/ps_model/__init__.py +1 -1
- pycontrails/models/ps_model/ps_aircraft_params.py +8 -4
- pycontrails/models/ps_model/ps_grid.py +76 -66
- pycontrails/models/ps_model/ps_model.py +16 -16
- pycontrails/models/ps_model/ps_operational_limits.py +20 -18
- pycontrails/models/tau_cirrus.py +8 -1
- pycontrails/physics/geo.py +67 -67
- pycontrails/physics/jet.py +79 -79
- pycontrails/physics/units.py +14 -14
- pycontrails/utils/json.py +1 -2
- pycontrails/utils/types.py +12 -7
- {pycontrails-0.54.3.dist-info → pycontrails-0.54.5.dist-info}/METADATA +2 -2
- {pycontrails-0.54.3.dist-info → pycontrails-0.54.5.dist-info}/NOTICE +1 -1
- pycontrails-0.54.5.dist-info/RECORD +111 -0
- pycontrails-0.54.3.dist-info/RECORD +0 -111
- {pycontrails-0.54.3.dist-info → pycontrails-0.54.5.dist-info}/LICENSE +0 -0
- {pycontrails-0.54.3.dist-info → pycontrails-0.54.5.dist-info}/WHEEL +0 -0
- {pycontrails-0.54.3.dist-info → pycontrails-0.54.5.dist-info}/top_level.txt +0 -0
|
@@ -98,25 +98,25 @@ RAD_HEAT = RadiativeHeatingConstants()
|
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
def convective_velocity_scale(
|
|
101
|
-
depth_eff: npt.NDArray[np.
|
|
102
|
-
eff_heat_rate: npt.NDArray[np.
|
|
103
|
-
air_temperature: npt.NDArray[np.
|
|
104
|
-
) -> npt.NDArray[np.
|
|
101
|
+
depth_eff: npt.NDArray[np.floating],
|
|
102
|
+
eff_heat_rate: npt.NDArray[np.floating],
|
|
103
|
+
air_temperature: npt.NDArray[np.floating],
|
|
104
|
+
) -> npt.NDArray[np.floating]:
|
|
105
105
|
"""
|
|
106
106
|
Calculate the convective velocity scale, i.e., vertical mixing rate.
|
|
107
107
|
|
|
108
108
|
Parameters
|
|
109
109
|
----------
|
|
110
|
-
depth_eff : npt.NDArray[np.
|
|
110
|
+
depth_eff : npt.NDArray[np.floating]
|
|
111
111
|
Effective depth of the contrail plume, [:math:`m`]
|
|
112
|
-
eff_heat_rate: npt.NDArray[np.
|
|
112
|
+
eff_heat_rate: npt.NDArray[np.floating]
|
|
113
113
|
Effective heating rate, i.e., rate of which the contrail plume is heated, [:math:`K s^{-1}`]
|
|
114
|
-
air_temperature : npt.NDArray[np.
|
|
114
|
+
air_temperature : npt.NDArray[np.floating]
|
|
115
115
|
Ambient temperature for each waypoint, [:math:`K`]
|
|
116
116
|
|
|
117
117
|
Returns
|
|
118
118
|
-------
|
|
119
|
-
npt.NDArray[np.
|
|
119
|
+
npt.NDArray[np.floating]
|
|
120
120
|
Convective velocity scale, [:math:`m s^{-1}`]
|
|
121
121
|
"""
|
|
122
122
|
return ((constants.g * depth_eff**2 * np.maximum(-eff_heat_rate, 0)) / air_temperature) ** (
|
|
@@ -125,11 +125,11 @@ def convective_velocity_scale(
|
|
|
125
125
|
|
|
126
126
|
|
|
127
127
|
def effective_heating_rate(
|
|
128
|
-
d_heat_rate: npt.NDArray[np.
|
|
129
|
-
cumul_rad_heat: npt.NDArray[np.
|
|
130
|
-
dT_dz: npt.NDArray[np.
|
|
131
|
-
depth: npt.NDArray[np.
|
|
132
|
-
) -> npt.NDArray[np.
|
|
128
|
+
d_heat_rate: npt.NDArray[np.floating],
|
|
129
|
+
cumul_rad_heat: npt.NDArray[np.floating],
|
|
130
|
+
dT_dz: npt.NDArray[np.floating],
|
|
131
|
+
depth: npt.NDArray[np.floating],
|
|
132
|
+
) -> npt.NDArray[np.floating]:
|
|
133
133
|
"""Calculate effective heating rate.
|
|
134
134
|
|
|
135
135
|
The effective heating rate accounts for the heat required to overcome the stable stratification.
|
|
@@ -137,20 +137,20 @@ def effective_heating_rate(
|
|
|
137
137
|
|
|
138
138
|
Parameters
|
|
139
139
|
----------
|
|
140
|
-
d_heat_rate: npt.NDArray[np.
|
|
140
|
+
d_heat_rate: npt.NDArray[np.floating]
|
|
141
141
|
Differential heating rate, i.e., rate of which the contrail
|
|
142
142
|
plume is heated, [:math:`K s^{-1}`]
|
|
143
|
-
cumul_rad_heat: npt.NDArray[np.
|
|
143
|
+
cumul_rad_heat: npt.NDArray[np.floating]
|
|
144
144
|
Cumulative solar and terrestrial radiative heating energy
|
|
145
145
|
absorbed by the contrail, [:math:`K`]
|
|
146
|
-
dT_dz: npt.NDArray[np.
|
|
146
|
+
dT_dz: npt.NDArray[np.floating]
|
|
147
147
|
Temperature gradient with respect to altitude (dz), [:math:`K m^{-1}`]
|
|
148
|
-
depth : npt.NDArray[np.
|
|
148
|
+
depth : npt.NDArray[np.floating]
|
|
149
149
|
Contrail depth at each waypoint, [:math:`m`]
|
|
150
150
|
|
|
151
151
|
Returns
|
|
152
152
|
-------
|
|
153
|
-
npt.NDArray[np.
|
|
153
|
+
npt.NDArray[np.floating]
|
|
154
154
|
Effective heating rate, [:math:`K s^{-1}`]
|
|
155
155
|
"""
|
|
156
156
|
filt = cumul_rad_heat > 0.0
|
|
@@ -164,18 +164,18 @@ def effective_heating_rate(
|
|
|
164
164
|
|
|
165
165
|
|
|
166
166
|
def differential_heating_rate(
|
|
167
|
-
air_temperature: npt.NDArray[np.
|
|
168
|
-
rhi: npt.NDArray[np.
|
|
169
|
-
rho_air: npt.NDArray[np.
|
|
170
|
-
r_ice_vol: npt.NDArray[np.
|
|
171
|
-
depth_eff: npt.NDArray[np.
|
|
172
|
-
tau_contrail: npt.NDArray[np.
|
|
173
|
-
tau_cirrus: npt.NDArray[np.
|
|
174
|
-
sd0: npt.NDArray[np.
|
|
175
|
-
sdr: npt.NDArray[np.
|
|
176
|
-
rsr: npt.NDArray[np.
|
|
177
|
-
olr: npt.NDArray[np.
|
|
178
|
-
) -> npt.NDArray[np.
|
|
167
|
+
air_temperature: npt.NDArray[np.floating],
|
|
168
|
+
rhi: npt.NDArray[np.floating],
|
|
169
|
+
rho_air: npt.NDArray[np.floating],
|
|
170
|
+
r_ice_vol: npt.NDArray[np.floating],
|
|
171
|
+
depth_eff: npt.NDArray[np.floating],
|
|
172
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
173
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
174
|
+
sd0: npt.NDArray[np.floating],
|
|
175
|
+
sdr: npt.NDArray[np.floating],
|
|
176
|
+
rsr: npt.NDArray[np.floating],
|
|
177
|
+
olr: npt.NDArray[np.floating],
|
|
178
|
+
) -> npt.NDArray[np.floating]:
|
|
179
179
|
"""
|
|
180
180
|
Calculate the differential heating rate affecting the contrail plume.
|
|
181
181
|
|
|
@@ -186,32 +186,32 @@ def differential_heating_rate(
|
|
|
186
186
|
|
|
187
187
|
Parameters
|
|
188
188
|
----------
|
|
189
|
-
air_temperature : npt.NDArray[np.
|
|
189
|
+
air_temperature : npt.NDArray[np.floating]
|
|
190
190
|
Ambient temperature at each waypoint, [:math:`K`]
|
|
191
|
-
rhi : npt.NDArray[np.
|
|
191
|
+
rhi : npt.NDArray[np.floating]
|
|
192
192
|
Relative humidity with respect to ice at each waypoint
|
|
193
|
-
rho_air : npt.NDArray[np.
|
|
193
|
+
rho_air : npt.NDArray[np.floating]
|
|
194
194
|
Density of air for each waypoint, [:math:`kg m^{-3}`]
|
|
195
|
-
r_ice_vol : npt.NDArray[np.
|
|
195
|
+
r_ice_vol : npt.NDArray[np.floating]
|
|
196
196
|
Ice particle volume mean radius, [:math:`m`]
|
|
197
|
-
depth_eff : npt.NDArray[np.
|
|
197
|
+
depth_eff : npt.NDArray[np.floating]
|
|
198
198
|
Effective depth of the contrail plume, [:math:`m`]
|
|
199
|
-
tau_contrail : npt.NDArray[np.
|
|
199
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
200
200
|
Contrail optical depth for each waypoint
|
|
201
|
-
tau_cirrus : npt.NDArray[np.
|
|
201
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
202
202
|
Optical depth of numerical weather prediction (NWP) cirrus above the contrail
|
|
203
|
-
sd0 : npt.NDArray[np.
|
|
203
|
+
sd0 : npt.NDArray[np.floating]
|
|
204
204
|
Solar constant, [:math:`W m^{-2}`]
|
|
205
|
-
sdr : npt.NDArray[np.
|
|
205
|
+
sdr : npt.NDArray[np.floating]
|
|
206
206
|
Solar direct radiation, [:math:`W m^{-2}`]
|
|
207
|
-
rsr : npt.NDArray[np.
|
|
207
|
+
rsr : npt.NDArray[np.floating]
|
|
208
208
|
Reflected solar radiation, [:math:`W m^{-2}`]
|
|
209
|
-
olr : npt.NDArray[np.
|
|
209
|
+
olr : npt.NDArray[np.floating]
|
|
210
210
|
Outgoing longwave radiation at each waypoint, [:math:`W m^{-2}`]
|
|
211
211
|
|
|
212
212
|
Returns
|
|
213
213
|
-------
|
|
214
|
-
npt.NDArray[np.
|
|
214
|
+
npt.NDArray[np.floating]
|
|
215
215
|
Differential heating rate, [:math:`K s^{-1}`]
|
|
216
216
|
"""
|
|
217
217
|
r_ice_vol_um = r_ice_vol * 1e6
|
|
@@ -226,14 +226,14 @@ def differential_heating_rate(
|
|
|
226
226
|
|
|
227
227
|
|
|
228
228
|
def differential_heating_rate_shortwave(
|
|
229
|
-
cp_contrail: npt.NDArray[np.
|
|
230
|
-
r_ice_vol_um: npt.NDArray[np.
|
|
231
|
-
tau_contrail: npt.NDArray[np.
|
|
232
|
-
tau_cirrus: npt.NDArray[np.
|
|
233
|
-
sd0: npt.NDArray[np.
|
|
234
|
-
sdr: npt.NDArray[np.
|
|
235
|
-
rsr: npt.NDArray[np.
|
|
236
|
-
) -> npt.NDArray[np.
|
|
229
|
+
cp_contrail: npt.NDArray[np.floating],
|
|
230
|
+
r_ice_vol_um: npt.NDArray[np.floating],
|
|
231
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
232
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
233
|
+
sd0: npt.NDArray[np.floating],
|
|
234
|
+
sdr: npt.NDArray[np.floating],
|
|
235
|
+
rsr: npt.NDArray[np.floating],
|
|
236
|
+
) -> npt.NDArray[np.floating]:
|
|
237
237
|
r"""
|
|
238
238
|
Calculate shortwave differential heating rate.
|
|
239
239
|
|
|
@@ -244,24 +244,24 @@ def differential_heating_rate_shortwave(
|
|
|
244
244
|
|
|
245
245
|
Parameters
|
|
246
246
|
----------
|
|
247
|
-
cp_contrail : npt.NDArray[np.
|
|
247
|
+
cp_contrail : npt.NDArray[np.floating]
|
|
248
248
|
Contrail heat capacity per unit length and width, [:math:`J K^{-1} m^{-2}`]
|
|
249
|
-
r_ice_vol_um : npt.NDArray[np.
|
|
249
|
+
r_ice_vol_um : npt.NDArray[np.floating]
|
|
250
250
|
Ice particle volume mean radius, [:math:`\mu m`]
|
|
251
|
-
tau_contrail : npt.NDArray[np.
|
|
251
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
252
252
|
Contrail optical depth for each waypoint
|
|
253
|
-
tau_cirrus : npt.NDArray[np.
|
|
253
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
254
254
|
Optical depth of numerical weather prediction (NWP) cirrus above the contrail
|
|
255
|
-
sd0 : npt.NDArray[np.
|
|
255
|
+
sd0 : npt.NDArray[np.floating]
|
|
256
256
|
Solar constant, [:math:`W m^{-2}`]
|
|
257
|
-
sdr : npt.NDArray[np.
|
|
257
|
+
sdr : npt.NDArray[np.floating]
|
|
258
258
|
Solar direct radiation, [:math:`W m^{-2}`]
|
|
259
|
-
rsr : npt.NDArray[np.
|
|
259
|
+
rsr : npt.NDArray[np.floating]
|
|
260
260
|
Reflected solar radiation, [:math:`W m^{-2}`]
|
|
261
261
|
|
|
262
262
|
Returns
|
|
263
263
|
-------
|
|
264
|
-
npt.NDArray[np.
|
|
264
|
+
npt.NDArray[np.floating]
|
|
265
265
|
Shortwave component of the differential heating rate, [:math:`K s^{-1}`]
|
|
266
266
|
"""
|
|
267
267
|
# short circuit if no waypoints have sdr > 0
|
|
@@ -286,14 +286,14 @@ def differential_heating_rate_shortwave(
|
|
|
286
286
|
|
|
287
287
|
|
|
288
288
|
def differential_heating_rate_longwave(
|
|
289
|
-
air_temperature: npt.NDArray[np.
|
|
290
|
-
rhi: npt.NDArray[np.
|
|
291
|
-
cp_contrail: npt.NDArray[np.
|
|
292
|
-
r_ice_vol_um: npt.NDArray[np.
|
|
293
|
-
tau_contrail: npt.NDArray[np.
|
|
294
|
-
tau_cirrus: npt.NDArray[np.
|
|
295
|
-
olr: npt.NDArray[np.
|
|
296
|
-
) -> npt.NDArray[np.
|
|
289
|
+
air_temperature: npt.NDArray[np.floating],
|
|
290
|
+
rhi: npt.NDArray[np.floating],
|
|
291
|
+
cp_contrail: npt.NDArray[np.floating],
|
|
292
|
+
r_ice_vol_um: npt.NDArray[np.floating],
|
|
293
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
294
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
295
|
+
olr: npt.NDArray[np.floating],
|
|
296
|
+
) -> npt.NDArray[np.floating]:
|
|
297
297
|
r"""
|
|
298
298
|
Calculate longwave differential heating rate.
|
|
299
299
|
|
|
@@ -305,24 +305,24 @@ def differential_heating_rate_longwave(
|
|
|
305
305
|
|
|
306
306
|
Parameters
|
|
307
307
|
----------
|
|
308
|
-
air_temperature : npt.NDArray[np.
|
|
308
|
+
air_temperature : npt.NDArray[np.floating]
|
|
309
309
|
Ambient temperature at each waypoint, [:math:`K`]
|
|
310
|
-
rhi : npt.NDArray[np.
|
|
310
|
+
rhi : npt.NDArray[np.floating]
|
|
311
311
|
Relative humidity with respect to ice at each waypoint
|
|
312
|
-
cp_contrail : npt.NDArray[np.
|
|
312
|
+
cp_contrail : npt.NDArray[np.floating]
|
|
313
313
|
Contrail heat capacity per unit length and width, [:math:`J K^{-1} m^{-2}`]
|
|
314
|
-
r_ice_vol_um : npt.NDArray[np.
|
|
314
|
+
r_ice_vol_um : npt.NDArray[np.floating]
|
|
315
315
|
Ice particle volume mean radius, [:math:`\mu m`]
|
|
316
|
-
tau_contrail : npt.NDArray[np.
|
|
316
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
317
317
|
Contrail optical depth for each waypoint
|
|
318
|
-
tau_cirrus : npt.NDArray[np.
|
|
318
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
319
319
|
Optical depth of numerical weather prediction (NWP) cirrus above the contrail
|
|
320
|
-
olr : npt.NDArray[np.
|
|
320
|
+
olr : npt.NDArray[np.floating]
|
|
321
321
|
Outgoing longwave radiation at each waypoint, [:math:`W m^{-2}`]
|
|
322
322
|
|
|
323
323
|
Returns
|
|
324
324
|
-------
|
|
325
|
-
npt.NDArray[np.
|
|
325
|
+
npt.NDArray[np.floating]
|
|
326
326
|
Longwave component of the differential heating rate, [:math:`K s^{-1}`]
|
|
327
327
|
"""
|
|
328
328
|
cool = RAD_HEAT.dsigma * air_temperature**RAD_HEAT.dak
|
|
@@ -341,18 +341,18 @@ def differential_heating_rate_longwave(
|
|
|
341
341
|
|
|
342
342
|
|
|
343
343
|
def heating_rate(
|
|
344
|
-
air_temperature: npt.NDArray[np.
|
|
345
|
-
rhi: npt.NDArray[np.
|
|
346
|
-
rho_air: npt.NDArray[np.
|
|
347
|
-
r_ice_vol: npt.NDArray[np.
|
|
348
|
-
depth_eff: npt.NDArray[np.
|
|
349
|
-
tau_contrail: npt.NDArray[np.
|
|
350
|
-
tau_cirrus: npt.NDArray[np.
|
|
351
|
-
sd0: npt.NDArray[np.
|
|
352
|
-
sdr: npt.NDArray[np.
|
|
353
|
-
rsr: npt.NDArray[np.
|
|
354
|
-
olr: npt.NDArray[np.
|
|
355
|
-
) -> npt.NDArray[np.
|
|
344
|
+
air_temperature: npt.NDArray[np.floating],
|
|
345
|
+
rhi: npt.NDArray[np.floating],
|
|
346
|
+
rho_air: npt.NDArray[np.floating],
|
|
347
|
+
r_ice_vol: npt.NDArray[np.floating],
|
|
348
|
+
depth_eff: npt.NDArray[np.floating],
|
|
349
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
350
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
351
|
+
sd0: npt.NDArray[np.floating],
|
|
352
|
+
sdr: npt.NDArray[np.floating],
|
|
353
|
+
rsr: npt.NDArray[np.floating],
|
|
354
|
+
olr: npt.NDArray[np.floating],
|
|
355
|
+
) -> npt.NDArray[np.floating]:
|
|
356
356
|
"""
|
|
357
357
|
Calculate the heating rate affecting the contrail plume.
|
|
358
358
|
|
|
@@ -360,32 +360,32 @@ def heating_rate(
|
|
|
360
360
|
|
|
361
361
|
Parameters
|
|
362
362
|
----------
|
|
363
|
-
air_temperature : npt.NDArray[np.
|
|
363
|
+
air_temperature : npt.NDArray[np.floating]
|
|
364
364
|
Ambient temperature at each waypoint, [:math:`K`]
|
|
365
|
-
rhi : npt.NDArray[np.
|
|
365
|
+
rhi : npt.NDArray[np.floating]
|
|
366
366
|
Relative humidity with respect to ice at each waypoint
|
|
367
|
-
rho_air : npt.NDArray[np.
|
|
367
|
+
rho_air : npt.NDArray[np.floating]
|
|
368
368
|
Density of air for each waypoint, [:math:`kg m^{-3}`]
|
|
369
|
-
r_ice_vol : npt.NDArray[np.
|
|
369
|
+
r_ice_vol : npt.NDArray[np.floating]
|
|
370
370
|
Ice particle volume mean radius, [:math:`m`]
|
|
371
|
-
depth_eff : npt.NDArray[np.
|
|
371
|
+
depth_eff : npt.NDArray[np.floating]
|
|
372
372
|
Effective depth of the contrail plume, [:math:`m`]
|
|
373
|
-
tau_contrail : npt.NDArray[np.
|
|
373
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
374
374
|
Contrail optical depth for each waypoint
|
|
375
|
-
tau_cirrus : npt.NDArray[np.
|
|
375
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
376
376
|
Optical depth of numerical weather prediction (NWP) cirrus above the contrail
|
|
377
|
-
sd0 : npt.NDArray[np.
|
|
377
|
+
sd0 : npt.NDArray[np.floating]
|
|
378
378
|
Solar constant, [:math:`W m^{-2}`]
|
|
379
|
-
sdr : npt.NDArray[np.
|
|
379
|
+
sdr : npt.NDArray[np.floating]
|
|
380
380
|
Solar direct radiation, [:math:`W m^{-2}`]
|
|
381
|
-
rsr : npt.NDArray[np.
|
|
381
|
+
rsr : npt.NDArray[np.floating]
|
|
382
382
|
Reflected solar radiation, [:math:`W m^{-2}`]
|
|
383
|
-
olr : npt.NDArray[np.
|
|
383
|
+
olr : npt.NDArray[np.floating]
|
|
384
384
|
Outgoing longwave radiation at each waypoint, [:math:`W m^{-2}`]
|
|
385
385
|
|
|
386
386
|
Returns
|
|
387
387
|
-------
|
|
388
|
-
npt.NDArray[np.
|
|
388
|
+
npt.NDArray[np.floating]
|
|
389
389
|
Heating rate, [:math:`K s^{-1}`]
|
|
390
390
|
"""
|
|
391
391
|
r_ice_vol_um = r_ice_vol * 1e6
|
|
@@ -400,36 +400,36 @@ def heating_rate(
|
|
|
400
400
|
|
|
401
401
|
|
|
402
402
|
def heating_rate_shortwave(
|
|
403
|
-
cp_contrail: npt.NDArray[np.
|
|
404
|
-
r_ice_vol_um: npt.NDArray[np.
|
|
405
|
-
tau_contrail: npt.NDArray[np.
|
|
406
|
-
tau_cirrus: npt.NDArray[np.
|
|
407
|
-
sd0: npt.NDArray[np.
|
|
408
|
-
sdr: npt.NDArray[np.
|
|
409
|
-
rsr: npt.NDArray[np.
|
|
410
|
-
) -> npt.NDArray[np.
|
|
403
|
+
cp_contrail: npt.NDArray[np.floating],
|
|
404
|
+
r_ice_vol_um: npt.NDArray[np.floating],
|
|
405
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
406
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
407
|
+
sd0: npt.NDArray[np.floating],
|
|
408
|
+
sdr: npt.NDArray[np.floating],
|
|
409
|
+
rsr: npt.NDArray[np.floating],
|
|
410
|
+
) -> npt.NDArray[np.floating]:
|
|
411
411
|
r"""Calculate shortwave heating rate.
|
|
412
412
|
|
|
413
413
|
Parameters
|
|
414
414
|
----------
|
|
415
|
-
cp_contrail : npt.NDArray[np.
|
|
415
|
+
cp_contrail : npt.NDArray[np.floating]
|
|
416
416
|
Contrail heat capacity per unit length and width, [:math:`J K^{-1} m^{-2}`]
|
|
417
|
-
r_ice_vol_um : npt.NDArray[np.
|
|
417
|
+
r_ice_vol_um : npt.NDArray[np.floating]
|
|
418
418
|
Ice particle volume mean radius, [:math:`\mu m`]
|
|
419
|
-
tau_contrail : npt.NDArray[np.
|
|
419
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
420
420
|
Contrail optical depth for each waypoint
|
|
421
|
-
tau_cirrus : npt.NDArray[np.
|
|
421
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
422
422
|
Optical depth of numerical weather prediction (NWP) cirrus above the contrail
|
|
423
|
-
sd0 : npt.NDArray[np.
|
|
423
|
+
sd0 : npt.NDArray[np.floating]
|
|
424
424
|
Solar constant, [:math:`W m^{-2}`]
|
|
425
|
-
sdr : npt.NDArray[np.
|
|
425
|
+
sdr : npt.NDArray[np.floating]
|
|
426
426
|
Solar direct radiation, [:math:`W m^{-2}`]
|
|
427
|
-
rsr : npt.NDArray[np.
|
|
427
|
+
rsr : npt.NDArray[np.floating]
|
|
428
428
|
Reflected solar radiation, [:math:`W m^{-2}`]
|
|
429
429
|
|
|
430
430
|
Returns
|
|
431
431
|
-------
|
|
432
|
-
npt.NDArray[np.
|
|
432
|
+
npt.NDArray[np.floating]
|
|
433
433
|
Shortwave component of heating rate, [:math:`K s^{-1}`]
|
|
434
434
|
"""
|
|
435
435
|
# short circuit if no waypoints have sdr > 0
|
|
@@ -452,36 +452,36 @@ def heating_rate_shortwave(
|
|
|
452
452
|
|
|
453
453
|
|
|
454
454
|
def heating_rate_longwave(
|
|
455
|
-
air_temperature: npt.NDArray[np.
|
|
456
|
-
rhi: npt.NDArray[np.
|
|
457
|
-
cp_contrail: npt.NDArray[np.
|
|
458
|
-
r_ice_vol_um: npt.NDArray[np.
|
|
459
|
-
tau_contrail: npt.NDArray[np.
|
|
460
|
-
tau_cirrus: npt.NDArray[np.
|
|
461
|
-
olr: npt.NDArray[np.
|
|
462
|
-
) -> npt.NDArray[np.
|
|
455
|
+
air_temperature: npt.NDArray[np.floating],
|
|
456
|
+
rhi: npt.NDArray[np.floating],
|
|
457
|
+
cp_contrail: npt.NDArray[np.floating],
|
|
458
|
+
r_ice_vol_um: npt.NDArray[np.floating],
|
|
459
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
460
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
461
|
+
olr: npt.NDArray[np.floating],
|
|
462
|
+
) -> npt.NDArray[np.floating]:
|
|
463
463
|
r"""Calculate longwave heating rate.
|
|
464
464
|
|
|
465
465
|
Parameters
|
|
466
466
|
----------
|
|
467
|
-
air_temperature : npt.NDArray[np.
|
|
467
|
+
air_temperature : npt.NDArray[np.floating]
|
|
468
468
|
Ambient temperature at each waypoint, [:math:`K`]
|
|
469
|
-
rhi : npt.NDArray[np.
|
|
469
|
+
rhi : npt.NDArray[np.floating]
|
|
470
470
|
Relative humidity with respect to ice at each waypoint
|
|
471
|
-
cp_contrail : npt.NDArray[np.
|
|
471
|
+
cp_contrail : npt.NDArray[np.floating]
|
|
472
472
|
Contrail heat capacity per unit length and width, [:math:`J K^{-1} m^{-2}`]
|
|
473
|
-
r_ice_vol_um : npt.NDArray[np.
|
|
473
|
+
r_ice_vol_um : npt.NDArray[np.floating]
|
|
474
474
|
Ice particle volume mean radius, [:math:`\mu m`]
|
|
475
|
-
tau_contrail : npt.NDArray[np.
|
|
475
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
476
476
|
Contrail optical depth for each waypoint
|
|
477
|
-
tau_cirrus : npt.NDArray[np.
|
|
477
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
478
478
|
Optical depth of numerical weather prediction (NWP) cirrus above the contrail
|
|
479
|
-
olr : npt.NDArray[np.
|
|
479
|
+
olr : npt.NDArray[np.floating]
|
|
480
480
|
Outgoing longwave radiation at each waypoint, [:math:`W m^{-2}`]
|
|
481
481
|
|
|
482
482
|
Returns
|
|
483
483
|
-------
|
|
484
|
-
npt.NDArray[np.
|
|
484
|
+
npt.NDArray[np.floating]
|
|
485
485
|
Longwave component of heating rate, [:math:`K s^{-1}`]
|
|
486
486
|
"""
|
|
487
487
|
fzlw = np.exp(-(rhi - 0.9) * RAD_HEAT.czlw)
|
|
@@ -500,21 +500,21 @@ def heating_rate_longwave(
|
|
|
500
500
|
|
|
501
501
|
|
|
502
502
|
def contrail_heat_capacity(
|
|
503
|
-
rho_air: npt.NDArray[np.
|
|
504
|
-
) -> npt.NDArray[np.
|
|
503
|
+
rho_air: npt.NDArray[np.floating], depth_eff: npt.NDArray[np.floating]
|
|
504
|
+
) -> npt.NDArray[np.floating]:
|
|
505
505
|
"""
|
|
506
506
|
Calculate contrail heat capacity per unit length and width.
|
|
507
507
|
|
|
508
508
|
Parameters
|
|
509
509
|
----------
|
|
510
|
-
rho_air : npt.NDArray[np.
|
|
510
|
+
rho_air : npt.NDArray[np.floating]
|
|
511
511
|
density of air for each waypoint, [:math:`kg m^{-3}`]
|
|
512
|
-
depth_eff: npt.NDArray[np.
|
|
512
|
+
depth_eff: npt.NDArray[np.floating]
|
|
513
513
|
Effective depth of the contrail plume, [:math:`m`]
|
|
514
514
|
|
|
515
515
|
Returns
|
|
516
516
|
-------
|
|
517
|
-
npt.NDArray[np.
|
|
517
|
+
npt.NDArray[np.floating]
|
|
518
518
|
Contrail heat capacity per unit length and width, [:math:`J K^{-1} m^{-2}`]
|
|
519
519
|
"""
|
|
520
520
|
return depth_eff * rho_air * constants.c_pd
|