pycontrails 0.54.3__cp312-cp312-macosx_11_0_arm64.whl → 0.54.5__cp312-cp312-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-312-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
|
@@ -157,10 +157,10 @@ RF_CONST = RFConstants()
|
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
def habit_weights(
|
|
160
|
-
r_vol_um: npt.NDArray[np.
|
|
161
|
-
habit_distributions: npt.NDArray[np.
|
|
162
|
-
radius_threshold_um: npt.NDArray[np.
|
|
163
|
-
) -> npt.NDArray[np.
|
|
160
|
+
r_vol_um: npt.NDArray[np.floating],
|
|
161
|
+
habit_distributions: npt.NDArray[np.floating],
|
|
162
|
+
radius_threshold_um: npt.NDArray[np.floating],
|
|
163
|
+
) -> npt.NDArray[np.floating]:
|
|
164
164
|
r"""Assign weights to different ice particle habits for each waypoint.
|
|
165
165
|
|
|
166
166
|
For each waypoint, the distinct mix of ice particle habits are approximated
|
|
@@ -175,18 +175,18 @@ def habit_weights(
|
|
|
175
175
|
|
|
176
176
|
Parameters
|
|
177
177
|
----------
|
|
178
|
-
r_vol_um : npt.NDArray[np.
|
|
178
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
179
179
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
180
|
-
habit_distributions : npt.NDArray[np.
|
|
180
|
+
habit_distributions : npt.NDArray[np.floating]
|
|
181
181
|
Habit weight distributions.
|
|
182
182
|
See :attr:`CocipParams().habit_distributions`
|
|
183
|
-
radius_threshold_um : npt.NDArray[np.
|
|
183
|
+
radius_threshold_um : npt.NDArray[np.floating]
|
|
184
184
|
Radius thresholds for habit distributions.
|
|
185
185
|
See :attr:`CocipParams.radius_threshold_um`
|
|
186
186
|
|
|
187
187
|
Returns
|
|
188
188
|
-------
|
|
189
|
-
npt.NDArray[np.
|
|
189
|
+
npt.NDArray[np.floating]
|
|
190
190
|
Array with shape ``n_waypoints x 8 columns``, where each column is the weights to the ice
|
|
191
191
|
particle habits, [:math:`[0 - 1]`], and the sum of each column should be equal to 1.
|
|
192
192
|
|
|
@@ -212,16 +212,16 @@ def habit_weights(
|
|
|
212
212
|
|
|
213
213
|
|
|
214
214
|
def habit_weight_regime_idx(
|
|
215
|
-
r_vol_um: npt.NDArray[np.
|
|
215
|
+
r_vol_um: npt.NDArray[np.floating], radius_threshold_um: npt.NDArray[np.floating]
|
|
216
216
|
) -> npt.NDArray[np.intp]:
|
|
217
217
|
r"""
|
|
218
218
|
Determine regime of ice particle habits based on contrail ice particle volume mean radius.
|
|
219
219
|
|
|
220
220
|
Parameters
|
|
221
221
|
----------
|
|
222
|
-
r_vol_um : npt.NDArray[np.
|
|
222
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
223
223
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
224
|
-
radius_threshold_um : npt.NDArray[np.
|
|
224
|
+
radius_threshold_um : npt.NDArray[np.floating]
|
|
225
225
|
Radius thresholds for habit distributions.
|
|
226
226
|
See :attr:`CocipParams.radius_threshold_um`
|
|
227
227
|
|
|
@@ -240,7 +240,7 @@ def habit_weight_regime_idx(
|
|
|
240
240
|
|
|
241
241
|
|
|
242
242
|
def effective_radius_by_habit(
|
|
243
|
-
r_vol_um: npt.NDArray[np.
|
|
243
|
+
r_vol_um: npt.NDArray[np.floating], habit_idx: npt.NDArray[np.intp]
|
|
244
244
|
) -> np.ndarray:
|
|
245
245
|
r"""Calculate the effective radius ``r_eff_um`` via the mean ice particle radius and habit type.
|
|
246
246
|
|
|
@@ -250,7 +250,7 @@ def effective_radius_by_habit(
|
|
|
250
250
|
|
|
251
251
|
Parameters
|
|
252
252
|
----------
|
|
253
|
-
r_vol_um : npt.NDArray[np.
|
|
253
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
254
254
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
255
255
|
habit_idx : npt.NDArray[np.intp]
|
|
256
256
|
Habit type index for the contrail ice particle, corresponding to the
|
|
@@ -258,7 +258,7 @@ def effective_radius_by_habit(
|
|
|
258
258
|
|
|
259
259
|
Returns
|
|
260
260
|
-------
|
|
261
|
-
npt.NDArray[np.
|
|
261
|
+
npt.NDArray[np.floating]
|
|
262
262
|
Effective radius of ice particles for each combination of ``r_vol_um``
|
|
263
263
|
and ``habit_idx``, [:math:`\mu m`]
|
|
264
264
|
|
|
@@ -290,35 +290,35 @@ def effective_radius_by_habit(
|
|
|
290
290
|
return np.piecewise(r_vol_um, cond_list, func_list)
|
|
291
291
|
|
|
292
292
|
|
|
293
|
-
def effective_radius_sphere(r_vol_um: npt.NDArray[np.
|
|
293
|
+
def effective_radius_sphere(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
294
294
|
r"""
|
|
295
295
|
Calculate the effective radius of contrail ice particles assuming a sphere particle habit.
|
|
296
296
|
|
|
297
297
|
Parameters
|
|
298
298
|
----------
|
|
299
|
-
r_vol_um : npt.NDArray[np.
|
|
299
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
300
300
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
301
301
|
|
|
302
302
|
Returns
|
|
303
303
|
-------
|
|
304
|
-
npt.NDArray[np.
|
|
304
|
+
npt.NDArray[np.floating]
|
|
305
305
|
Effective radius, [:math:`\mu m`]
|
|
306
306
|
"""
|
|
307
307
|
return np.minimum(r_vol_um, 25.0)
|
|
308
308
|
|
|
309
309
|
|
|
310
|
-
def effective_radius_solid_column(r_vol_um: npt.NDArray[np.
|
|
310
|
+
def effective_radius_solid_column(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
311
311
|
r"""
|
|
312
312
|
Calculate the effective radius of contrail ice particles assuming a solid column particle habit.
|
|
313
313
|
|
|
314
314
|
Parameters
|
|
315
315
|
----------
|
|
316
|
-
r_vol_um : npt.NDArray[np.
|
|
316
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
317
317
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
318
318
|
|
|
319
319
|
Returns
|
|
320
320
|
-------
|
|
321
|
-
npt.NDArray[np.
|
|
321
|
+
npt.NDArray[np.floating]
|
|
322
322
|
Effective radius, [:math:`\mu m`]
|
|
323
323
|
"""
|
|
324
324
|
r_eff_um = (
|
|
@@ -329,17 +329,17 @@ def effective_radius_solid_column(r_vol_um: npt.NDArray[np.float64]) -> npt.NDAr
|
|
|
329
329
|
return np.minimum(r_eff_um, 45.0)
|
|
330
330
|
|
|
331
331
|
|
|
332
|
-
def effective_radius_hollow_column(r_vol_um: npt.NDArray[np.
|
|
332
|
+
def effective_radius_hollow_column(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
333
333
|
r"""Calculate the effective radius of ice particles assuming a hollow column particle habit.
|
|
334
334
|
|
|
335
335
|
Parameters
|
|
336
336
|
----------
|
|
337
|
-
r_vol_um : npt.NDArray[np.
|
|
337
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
338
338
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
339
339
|
|
|
340
340
|
Returns
|
|
341
341
|
-------
|
|
342
|
-
npt.NDArray[np.
|
|
342
|
+
npt.NDArray[np.floating]
|
|
343
343
|
Effective radius, [:math:`\mu m`]
|
|
344
344
|
"""
|
|
345
345
|
r_eff_um = (
|
|
@@ -350,35 +350,37 @@ def effective_radius_hollow_column(r_vol_um: npt.NDArray[np.float64]) -> npt.NDA
|
|
|
350
350
|
return np.minimum(r_eff_um, 45.0)
|
|
351
351
|
|
|
352
352
|
|
|
353
|
-
def effective_radius_rough_aggregate(
|
|
353
|
+
def effective_radius_rough_aggregate(
|
|
354
|
+
r_vol_um: npt.NDArray[np.floating],
|
|
355
|
+
) -> npt.NDArray[np.floating]:
|
|
354
356
|
r"""Calculate the effective radius of ice particles assuming a rough aggregate particle habit.
|
|
355
357
|
|
|
356
358
|
Parameters
|
|
357
359
|
----------
|
|
358
|
-
r_vol_um : npt.NDArray[np.
|
|
360
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
359
361
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
360
362
|
|
|
361
363
|
Returns
|
|
362
364
|
-------
|
|
363
|
-
npt.NDArray[np.
|
|
365
|
+
npt.NDArray[np.floating]
|
|
364
366
|
Effective radius, [:math:`\mu m`]
|
|
365
367
|
"""
|
|
366
368
|
r_eff_um = 0.574 * r_vol_um
|
|
367
369
|
return np.minimum(r_eff_um, 45.0)
|
|
368
370
|
|
|
369
371
|
|
|
370
|
-
def effective_radius_rosette(r_vol_um: npt.NDArray[np.
|
|
372
|
+
def effective_radius_rosette(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
371
373
|
r"""
|
|
372
374
|
Calculate the effective radius of contrail ice particles assuming a rosette particle habit.
|
|
373
375
|
|
|
374
376
|
Parameters
|
|
375
377
|
----------
|
|
376
|
-
r_vol_um : npt.NDArray[np.
|
|
378
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
377
379
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
378
380
|
|
|
379
381
|
Returns
|
|
380
382
|
-------
|
|
381
|
-
npt.NDArray[np.
|
|
383
|
+
npt.NDArray[np.floating]
|
|
382
384
|
Effective radius, [:math:`\mu m`]
|
|
383
385
|
"""
|
|
384
386
|
r_eff_um = r_vol_um * (
|
|
@@ -387,18 +389,18 @@ def effective_radius_rosette(r_vol_um: npt.NDArray[np.float64]) -> npt.NDArray[n
|
|
|
387
389
|
return np.minimum(r_eff_um, 45.0)
|
|
388
390
|
|
|
389
391
|
|
|
390
|
-
def effective_radius_plate(r_vol_um: npt.NDArray[np.
|
|
392
|
+
def effective_radius_plate(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
391
393
|
r"""
|
|
392
394
|
Calculate the effective radius of contrail ice particles assuming a plate particle habit.
|
|
393
395
|
|
|
394
396
|
Parameters
|
|
395
397
|
----------
|
|
396
|
-
r_vol_um : npt.NDArray[np.
|
|
398
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
397
399
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
398
400
|
|
|
399
401
|
Returns
|
|
400
402
|
-------
|
|
401
|
-
npt.NDArray[np.
|
|
403
|
+
npt.NDArray[np.floating]
|
|
402
404
|
Effective radius, [:math:`\mu m`]
|
|
403
405
|
"""
|
|
404
406
|
r_eff_um = r_vol_um * (
|
|
@@ -407,36 +409,36 @@ def effective_radius_plate(r_vol_um: npt.NDArray[np.float64]) -> npt.NDArray[np.
|
|
|
407
409
|
return np.minimum(r_eff_um, 45.0)
|
|
408
410
|
|
|
409
411
|
|
|
410
|
-
def effective_radius_droxtal(r_vol_um: npt.NDArray[np.
|
|
412
|
+
def effective_radius_droxtal(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
411
413
|
r"""
|
|
412
414
|
Calculate the effective radius of contrail ice particles assuming a droxtal particle habit.
|
|
413
415
|
|
|
414
416
|
Parameters
|
|
415
417
|
----------
|
|
416
|
-
r_vol_um : npt.NDArray[np.
|
|
418
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
417
419
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
418
420
|
|
|
419
421
|
Returns
|
|
420
422
|
-------
|
|
421
|
-
npt.NDArray[np.
|
|
423
|
+
npt.NDArray[np.floating]
|
|
422
424
|
Effective radius, [:math:`\mu m`]
|
|
423
425
|
"""
|
|
424
426
|
r_eff_um = 0.94 * r_vol_um
|
|
425
427
|
return np.minimum(r_eff_um, 45.0)
|
|
426
428
|
|
|
427
429
|
|
|
428
|
-
def effective_radius_myhre(r_vol_um: npt.NDArray[np.
|
|
430
|
+
def effective_radius_myhre(r_vol_um: npt.NDArray[np.floating]) -> npt.NDArray[np.floating]:
|
|
429
431
|
r"""
|
|
430
432
|
Calculate the effective radius of contrail ice particles assuming a sphere particle habit.
|
|
431
433
|
|
|
432
434
|
Parameters
|
|
433
435
|
----------
|
|
434
|
-
r_vol_um : npt.NDArray[np.
|
|
436
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
435
437
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
436
438
|
|
|
437
439
|
Returns
|
|
438
440
|
-------
|
|
439
|
-
npt.NDArray[np.
|
|
441
|
+
npt.NDArray[np.floating]
|
|
440
442
|
Effective radius, [:math:`\mu m`]
|
|
441
443
|
"""
|
|
442
444
|
return np.minimum(r_vol_um, 45.0)
|
|
@@ -448,14 +450,14 @@ def effective_radius_myhre(r_vol_um: npt.NDArray[np.float64]) -> npt.NDArray[np.
|
|
|
448
450
|
|
|
449
451
|
|
|
450
452
|
def longwave_radiative_forcing(
|
|
451
|
-
r_vol_um: npt.NDArray[np.
|
|
452
|
-
olr: npt.NDArray[np.
|
|
453
|
-
air_temperature: npt.NDArray[np.
|
|
454
|
-
tau_contrail: npt.NDArray[np.
|
|
455
|
-
tau_cirrus: npt.NDArray[np.
|
|
456
|
-
habit_weights_: npt.NDArray[np.
|
|
457
|
-
r_eff_um: npt.NDArray[np.
|
|
458
|
-
) -> npt.NDArray[np.
|
|
453
|
+
r_vol_um: npt.NDArray[np.floating],
|
|
454
|
+
olr: npt.NDArray[np.floating],
|
|
455
|
+
air_temperature: npt.NDArray[np.floating],
|
|
456
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
457
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
458
|
+
habit_weights_: npt.NDArray[np.floating],
|
|
459
|
+
r_eff_um: npt.NDArray[np.floating] | None = None,
|
|
460
|
+
) -> npt.NDArray[np.floating]:
|
|
459
461
|
r"""
|
|
460
462
|
Calculate the local contrail longwave radiative forcing (:math:`RF_{LW}`).
|
|
461
463
|
|
|
@@ -463,28 +465,28 @@ def longwave_radiative_forcing(
|
|
|
463
465
|
|
|
464
466
|
Parameters
|
|
465
467
|
----------
|
|
466
|
-
r_vol_um : npt.NDArray[np.
|
|
468
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
467
469
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
468
|
-
olr : npt.NDArray[np.
|
|
470
|
+
olr : npt.NDArray[np.floating]
|
|
469
471
|
Outgoing longwave radiation at each waypoint, [:math:`W m^{-2}`]
|
|
470
|
-
air_temperature : npt.NDArray[np.
|
|
472
|
+
air_temperature : npt.NDArray[np.floating]
|
|
471
473
|
Ambient temperature at each waypoint, [:math:`K`]
|
|
472
|
-
tau_contrail : npt.NDArray[np.
|
|
474
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
473
475
|
Contrail optical depth at each waypoint
|
|
474
|
-
tau_cirrus : npt.NDArray[np.
|
|
476
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
475
477
|
Optical depth of numerical weather prediction (NWP) cirrus above the
|
|
476
478
|
contrail at each waypoint
|
|
477
|
-
habit_weights_ : npt.NDArray[np.
|
|
479
|
+
habit_weights_ : npt.NDArray[np.floating]
|
|
478
480
|
Weights to different ice particle habits for each waypoint,
|
|
479
481
|
``n_waypoints x 8`` (habit) columns, [:math:`[0 - 1]`]
|
|
480
|
-
r_eff_um : npt.NDArray[np.
|
|
482
|
+
r_eff_um : npt.NDArray[np.floating], optional
|
|
481
483
|
Provide effective radius corresponding to elements in ``r_vol_um``, [:math:`\mu m`].
|
|
482
484
|
Defaults to None, which means the effective radius will be calculated using ``r_vol_um``
|
|
483
485
|
and habit types in :func:`effective_radius_by_habit`.
|
|
484
486
|
|
|
485
487
|
Returns
|
|
486
488
|
-------
|
|
487
|
-
npt.NDArray[np.
|
|
489
|
+
npt.NDArray[np.floating]
|
|
488
490
|
Local contrail longwave radiative forcing (positive), [:math:`W m^{-2}`]
|
|
489
491
|
|
|
490
492
|
Raises
|
|
@@ -549,15 +551,15 @@ def longwave_radiative_forcing(
|
|
|
549
551
|
|
|
550
552
|
|
|
551
553
|
def shortwave_radiative_forcing(
|
|
552
|
-
r_vol_um: npt.NDArray[np.
|
|
553
|
-
sdr: npt.NDArray[np.
|
|
554
|
-
rsr: npt.NDArray[np.
|
|
555
|
-
sd0: npt.NDArray[np.
|
|
556
|
-
tau_contrail: npt.NDArray[np.
|
|
557
|
-
tau_cirrus: npt.NDArray[np.
|
|
558
|
-
habit_weights_: npt.NDArray[np.
|
|
559
|
-
r_eff_um: npt.NDArray[np.
|
|
560
|
-
) -> npt.NDArray[np.
|
|
554
|
+
r_vol_um: npt.NDArray[np.floating],
|
|
555
|
+
sdr: npt.NDArray[np.floating],
|
|
556
|
+
rsr: npt.NDArray[np.floating],
|
|
557
|
+
sd0: npt.NDArray[np.floating],
|
|
558
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
559
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
560
|
+
habit_weights_: npt.NDArray[np.floating],
|
|
561
|
+
r_eff_um: npt.NDArray[np.floating] | None = None,
|
|
562
|
+
) -> npt.NDArray[np.floating]:
|
|
561
563
|
r"""
|
|
562
564
|
Calculate the local contrail shortwave radiative forcing (:math:`RF_{SW}`).
|
|
563
565
|
|
|
@@ -565,30 +567,30 @@ def shortwave_radiative_forcing(
|
|
|
565
567
|
|
|
566
568
|
Parameters
|
|
567
569
|
----------
|
|
568
|
-
r_vol_um : npt.NDArray[np.
|
|
570
|
+
r_vol_um : npt.NDArray[np.floating]
|
|
569
571
|
Contrail ice particle volume mean radius, [:math:`\mu m`]
|
|
570
|
-
sdr : npt.NDArray[np.
|
|
572
|
+
sdr : npt.NDArray[np.floating]
|
|
571
573
|
Solar direct radiation, [:math:`W m^{-2}`]
|
|
572
|
-
rsr : npt.NDArray[np.
|
|
574
|
+
rsr : npt.NDArray[np.floating]
|
|
573
575
|
Reflected solar radiation, [:math:`W m^{-2}`]
|
|
574
|
-
sd0 : npt.NDArray[np.
|
|
576
|
+
sd0 : npt.NDArray[np.floating]
|
|
575
577
|
Solar constant, [:math:`W m^{-2}`]
|
|
576
|
-
tau_contrail : npt.NDArray[np.
|
|
578
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
577
579
|
Contrail optical depth for each waypoint
|
|
578
|
-
tau_cirrus : npt.NDArray[np.
|
|
580
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
579
581
|
Optical depth of numerical weather prediction (NWP) cirrus above the
|
|
580
582
|
contrail for each waypoint.
|
|
581
|
-
habit_weights_ : npt.NDArray[np.
|
|
583
|
+
habit_weights_ : npt.NDArray[np.floating]
|
|
582
584
|
Weights to different ice particle habits for each waypoint,
|
|
583
585
|
``n_waypoints x 8`` (habit) columns, [:math:`[0 - 1]`]
|
|
584
|
-
r_eff_um : npt.NDArray[np.
|
|
586
|
+
r_eff_um : npt.NDArray[np.floating], optional
|
|
585
587
|
Provide effective radius corresponding to elements in ``r_vol_um``, [:math:`\mu m`].
|
|
586
588
|
Defaults to None, which means the effective radius will be calculated using ``r_vol_um``
|
|
587
589
|
and habit types in :func:`effective_radius_by_habit`.
|
|
588
590
|
|
|
589
591
|
Returns
|
|
590
592
|
-------
|
|
591
|
-
npt.NDArray[np.
|
|
593
|
+
npt.NDArray[np.floating]
|
|
592
594
|
Local contrail shortwave radiative forcing (negative), [:math:`W m^{-2}`]
|
|
593
595
|
|
|
594
596
|
Raises
|
|
@@ -677,8 +679,8 @@ def shortwave_radiative_forcing(
|
|
|
677
679
|
|
|
678
680
|
|
|
679
681
|
def net_radiative_forcing(
|
|
680
|
-
rf_lw: npt.NDArray[np.
|
|
681
|
-
) -> npt.NDArray[np.
|
|
682
|
+
rf_lw: npt.NDArray[np.floating], rf_sw: npt.NDArray[np.floating]
|
|
683
|
+
) -> npt.NDArray[np.floating]:
|
|
682
684
|
"""
|
|
683
685
|
Calculate the local contrail net radiative forcing (rf_net).
|
|
684
686
|
|
|
@@ -686,22 +688,22 @@ def net_radiative_forcing(
|
|
|
686
688
|
|
|
687
689
|
Parameters
|
|
688
690
|
----------
|
|
689
|
-
rf_lw : npt.NDArray[np.
|
|
691
|
+
rf_lw : npt.NDArray[np.floating]
|
|
690
692
|
local contrail longwave radiative forcing, [:math:`W m^{-2}`]
|
|
691
|
-
rf_sw : npt.NDArray[np.
|
|
693
|
+
rf_sw : npt.NDArray[np.floating]
|
|
692
694
|
local contrail shortwave radiative forcing, [:math:`W m^{-2}`]
|
|
693
695
|
|
|
694
696
|
Returns
|
|
695
697
|
-------
|
|
696
|
-
npt.NDArray[np.
|
|
698
|
+
npt.NDArray[np.floating]
|
|
697
699
|
local contrail net radiative forcing, [:math:`W m^{-2}`]
|
|
698
700
|
"""
|
|
699
701
|
return rf_lw + rf_sw
|
|
700
702
|
|
|
701
703
|
|
|
702
704
|
def olr_reduction_natural_cirrus(
|
|
703
|
-
tau_cirrus: npt.NDArray[np.
|
|
704
|
-
) -> npt.NDArray[np.
|
|
705
|
+
tau_cirrus: npt.NDArray[np.floating], delta_lc: npt.NDArray[np.floating]
|
|
706
|
+
) -> npt.NDArray[np.floating]:
|
|
705
707
|
"""
|
|
706
708
|
Calculate reduction in outgoing longwave radiation (OLR) due to the presence of natural cirrus.
|
|
707
709
|
|
|
@@ -710,16 +712,16 @@ def olr_reduction_natural_cirrus(
|
|
|
710
712
|
|
|
711
713
|
Parameters
|
|
712
714
|
----------
|
|
713
|
-
tau_cirrus : npt.NDArray[np.
|
|
715
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
714
716
|
Optical depth of numerical weather prediction (NWP) cirrus above the
|
|
715
717
|
contrail for each waypoint.
|
|
716
|
-
delta_lc : npt.NDArray[np.
|
|
718
|
+
delta_lc : npt.NDArray[np.floating]
|
|
717
719
|
Habit specific parameter to approximate the reduction of the outgoing
|
|
718
720
|
longwave radiation at the contrail level due to natural cirrus above the contrail.
|
|
719
721
|
|
|
720
722
|
Returns
|
|
721
723
|
-------
|
|
722
|
-
npt.NDArray[np.
|
|
724
|
+
npt.NDArray[np.floating]
|
|
723
725
|
Reduction of outgoing longwave radiation
|
|
724
726
|
"""
|
|
725
727
|
# e_lw calculations
|
|
@@ -727,30 +729,32 @@ def olr_reduction_natural_cirrus(
|
|
|
727
729
|
|
|
728
730
|
|
|
729
731
|
def contrail_effective_emissivity(
|
|
730
|
-
r_eff_um: npt.NDArray[np.
|
|
731
|
-
) -> npt.NDArray[np.
|
|
732
|
+
r_eff_um: npt.NDArray[np.floating], delta_lr: npt.NDArray[np.floating]
|
|
733
|
+
) -> npt.NDArray[np.floating]:
|
|
732
734
|
r"""Calculate the effective emissivity of the contrail, ``f_lw``.
|
|
733
735
|
|
|
734
736
|
Refer to Eq. (3) of Schumann et al. (2012).
|
|
735
737
|
|
|
736
738
|
Parameters
|
|
737
739
|
----------
|
|
738
|
-
r_eff_um : npt.NDArray[np.
|
|
740
|
+
r_eff_um : npt.NDArray[np.floating]
|
|
739
741
|
Effective radius for each waypoint, n_waypoints x 8 (habit) columns, [:math:`\mu m`]
|
|
740
742
|
See :func:`effective_radius_habit`.
|
|
741
|
-
delta_lr : npt.NDArray[np.
|
|
743
|
+
delta_lr : npt.NDArray[np.floating]
|
|
742
744
|
Habit specific parameter to approximate the effective emissivity of the contrail.
|
|
743
745
|
|
|
744
746
|
Returns
|
|
745
747
|
-------
|
|
746
|
-
npt.NDArray[np.
|
|
748
|
+
npt.NDArray[np.floating]
|
|
747
749
|
Effective emissivity of the contrail
|
|
748
750
|
"""
|
|
749
751
|
# f_lw calculations
|
|
750
752
|
return 1.0 - np.exp(-delta_lr * r_eff_um)
|
|
751
753
|
|
|
752
754
|
|
|
753
|
-
def albedo(
|
|
755
|
+
def albedo(
|
|
756
|
+
sdr: npt.NDArray[np.floating], rsr: npt.NDArray[np.floating]
|
|
757
|
+
) -> npt.NDArray[np.floating]:
|
|
754
758
|
"""
|
|
755
759
|
Calculate albedo along contrail waypoint.
|
|
756
760
|
|
|
@@ -762,14 +766,14 @@ def albedo(sdr: npt.NDArray[np.float64], rsr: npt.NDArray[np.float64]) -> npt.ND
|
|
|
762
766
|
|
|
763
767
|
Parameters
|
|
764
768
|
----------
|
|
765
|
-
sdr : npt.NDArray[np.
|
|
769
|
+
sdr : npt.NDArray[np.floating]
|
|
766
770
|
Solar direct radiation, [:math:`W m^{-2}`]
|
|
767
|
-
rsr : npt.NDArray[np.
|
|
771
|
+
rsr : npt.NDArray[np.floating]
|
|
768
772
|
Reflected solar radiation, [:math:`W m^{-2}`]
|
|
769
773
|
|
|
770
774
|
Returns
|
|
771
775
|
-------
|
|
772
|
-
npt.NDArray[np.
|
|
776
|
+
npt.NDArray[np.floating]
|
|
773
777
|
Albedo value, [:math:`[0 - 1]`]
|
|
774
778
|
"""
|
|
775
779
|
day = sdr > 0.0
|
|
@@ -780,17 +784,17 @@ def albedo(sdr: npt.NDArray[np.float64], rsr: npt.NDArray[np.float64]) -> npt.ND
|
|
|
780
784
|
|
|
781
785
|
|
|
782
786
|
def contrail_albedo(
|
|
783
|
-
tau_contrail: npt.NDArray[np.
|
|
784
|
-
mue: npt.NDArray[np.
|
|
785
|
-
r_eff_um: npt.NDArray[np.
|
|
786
|
-
A_mu: npt.NDArray[np.
|
|
787
|
-
B_mu: npt.NDArray[np.
|
|
788
|
-
C_mu: npt.NDArray[np.
|
|
789
|
-
delta_sr: npt.NDArray[np.
|
|
790
|
-
F_r: npt.NDArray[np.
|
|
791
|
-
gamma_lower: npt.NDArray[np.
|
|
792
|
-
gamma_upper: npt.NDArray[np.
|
|
793
|
-
) -> npt.NDArray[np.
|
|
787
|
+
tau_contrail: npt.NDArray[np.floating],
|
|
788
|
+
mue: npt.NDArray[np.floating],
|
|
789
|
+
r_eff_um: npt.NDArray[np.floating],
|
|
790
|
+
A_mu: npt.NDArray[np.floating],
|
|
791
|
+
B_mu: npt.NDArray[np.floating],
|
|
792
|
+
C_mu: npt.NDArray[np.floating],
|
|
793
|
+
delta_sr: npt.NDArray[np.floating],
|
|
794
|
+
F_r: npt.NDArray[np.floating],
|
|
795
|
+
gamma_lower: npt.NDArray[np.floating],
|
|
796
|
+
gamma_upper: npt.NDArray[np.floating],
|
|
797
|
+
) -> npt.NDArray[np.floating]:
|
|
794
798
|
r"""
|
|
795
799
|
Calculate the contrail albedo, ``alpha_c``.
|
|
796
800
|
|
|
@@ -798,31 +802,31 @@ def contrail_albedo(
|
|
|
798
802
|
|
|
799
803
|
Parameters
|
|
800
804
|
----------
|
|
801
|
-
tau_contrail : npt.NDArray[np.
|
|
805
|
+
tau_contrail : npt.NDArray[np.floating]
|
|
802
806
|
Contrail optical depth for each waypoint
|
|
803
|
-
mue : npt.NDArray[np.
|
|
807
|
+
mue : npt.NDArray[np.floating]
|
|
804
808
|
Cosine of the solar zenith angle (theta), mue = cos(theta) = sdr/sd0
|
|
805
|
-
r_eff_um : npt.NDArray[np.
|
|
809
|
+
r_eff_um : npt.NDArray[np.floating]
|
|
806
810
|
Effective radius for each waypoint, n_waypoints x 8 (habit) columns, [:math:`\mu m`]
|
|
807
811
|
See :func:`effective_radius_habit`.
|
|
808
|
-
A_mu : npt.NDArray[np.
|
|
812
|
+
A_mu : npt.NDArray[np.floating]
|
|
809
813
|
Habit-specific parameter to approximate the albedo of the contrail
|
|
810
|
-
B_mu : npt.NDArray[np.
|
|
814
|
+
B_mu : npt.NDArray[np.floating]
|
|
811
815
|
Habit-specific parameter to approximate the SZA-dependent contrail sideward scattering
|
|
812
|
-
C_mu : npt.NDArray[np.
|
|
816
|
+
C_mu : npt.NDArray[np.floating]
|
|
813
817
|
Habit-specific parameter to approximate the albedo of the contrail
|
|
814
|
-
delta_sr : npt.NDArray[np.
|
|
818
|
+
delta_sr : npt.NDArray[np.floating]
|
|
815
819
|
Habit-specific parameter to approximate the effective contrail optical depth
|
|
816
|
-
F_r : npt.NDArray[np.
|
|
820
|
+
F_r : npt.NDArray[np.floating]
|
|
817
821
|
Habit-specific parameter to approximate the effective contrail optical depth
|
|
818
|
-
gamma_lower : npt.NDArray[np.
|
|
822
|
+
gamma_lower : npt.NDArray[np.floating]
|
|
819
823
|
Habit-specific parameter to approximate the contrail reflectances
|
|
820
|
-
gamma_upper : npt.NDArray[np.
|
|
824
|
+
gamma_upper : npt.NDArray[np.floating]
|
|
821
825
|
Habit-specific parameter to approximate the contrail reflectances
|
|
822
826
|
|
|
823
827
|
Returns
|
|
824
828
|
-------
|
|
825
|
-
npt.NDArray[np.
|
|
829
|
+
npt.NDArray[np.floating]
|
|
826
830
|
Contrail albedo for each waypoint and ice particle habit
|
|
827
831
|
"""
|
|
828
832
|
tau_aps = tau_contrail * (1.0 - F_r * (1 - np.exp(-delta_sr * r_eff_um)))
|
|
@@ -835,11 +839,11 @@ def contrail_albedo(
|
|
|
835
839
|
|
|
836
840
|
|
|
837
841
|
def effective_tau_cirrus(
|
|
838
|
-
tau_cirrus: npt.NDArray[np.
|
|
839
|
-
mue: npt.NDArray[np.
|
|
840
|
-
delta_sc: npt.NDArray[np.
|
|
841
|
-
delta_sc_aps: npt.NDArray[np.
|
|
842
|
-
) -> npt.NDArray[np.
|
|
842
|
+
tau_cirrus: npt.NDArray[np.floating],
|
|
843
|
+
mue: npt.NDArray[np.floating],
|
|
844
|
+
delta_sc: npt.NDArray[np.floating],
|
|
845
|
+
delta_sc_aps: npt.NDArray[np.floating],
|
|
846
|
+
) -> npt.NDArray[np.floating]:
|
|
843
847
|
r"""
|
|
844
848
|
Calculate the effective optical depth of natural cirrus above the contrail, ``e_sw``.
|
|
845
849
|
|
|
@@ -848,21 +852,21 @@ def effective_tau_cirrus(
|
|
|
848
852
|
|
|
849
853
|
Parameters
|
|
850
854
|
----------
|
|
851
|
-
tau_cirrus : npt.NDArray[np.
|
|
855
|
+
tau_cirrus : npt.NDArray[np.floating]
|
|
852
856
|
Optical depth of numerical weather prediction (NWP) cirrus above the
|
|
853
857
|
contrail for each waypoint.
|
|
854
|
-
mue : npt.NDArray[np.
|
|
858
|
+
mue : npt.NDArray[np.floating]
|
|
855
859
|
Cosine of the solar zenith angle (theta), mue = cos(theta) = sdr/sd0
|
|
856
|
-
delta_sc : npt.NDArray[np.
|
|
860
|
+
delta_sc : npt.NDArray[np.floating]
|
|
857
861
|
Habit-specific parameter to account for the optical depth of natural
|
|
858
862
|
cirrus above the contrail
|
|
859
|
-
delta_sc_aps : npt.NDArray[np.
|
|
863
|
+
delta_sc_aps : npt.NDArray[np.floating]
|
|
860
864
|
Habit-specific parameter to account for the optical depth of natural
|
|
861
865
|
cirrus above the contrail
|
|
862
866
|
|
|
863
867
|
Returns
|
|
864
868
|
-------
|
|
865
|
-
npt.NDArray[np.
|
|
869
|
+
npt.NDArray[np.floating]
|
|
866
870
|
Effective optical depth of natural cirrus above the contrail,
|
|
867
871
|
``n_waypoints x 8`` (habit) columns.
|
|
868
872
|
|
|
@@ -883,8 +887,8 @@ def effective_tau_cirrus(
|
|
|
883
887
|
|
|
884
888
|
def contrail_contrail_overlap_radiative_effects(
|
|
885
889
|
contrails: GeoVectorDataset,
|
|
886
|
-
habit_distributions: npt.NDArray[np.
|
|
887
|
-
radius_threshold_um: npt.NDArray[np.
|
|
890
|
+
habit_distributions: npt.NDArray[np.floating],
|
|
891
|
+
radius_threshold_um: npt.NDArray[np.floating],
|
|
888
892
|
*,
|
|
889
893
|
min_altitude_m: float = 6000.0,
|
|
890
894
|
max_altitude_m: float = 13000.0,
|
|
@@ -910,10 +914,10 @@ def contrail_contrail_overlap_radiative_effects(
|
|
|
910
914
|
- rsr
|
|
911
915
|
- olr
|
|
912
916
|
|
|
913
|
-
habit_distributions : npt.NDArray[np.
|
|
917
|
+
habit_distributions : npt.NDArray[np.floating]
|
|
914
918
|
Habit weight distributions.
|
|
915
919
|
See :attr:`CocipParams.habit_distributions`
|
|
916
|
-
radius_threshold_um : npt.NDArray[np.
|
|
920
|
+
radius_threshold_um : npt.NDArray[np.floating]
|
|
917
921
|
Radius thresholds for habit distributions.
|
|
918
922
|
See :attr:`CocipParams.radius_threshold_um`
|
|
919
923
|
min_altitude_m : float
|
|
@@ -1154,8 +1158,8 @@ def _rsr_and_olr_with_contrail_overlap(
|
|
|
1154
1158
|
|
|
1155
1159
|
def _local_sw_and_lw_rf_with_contrail_overlap(
|
|
1156
1160
|
contrails_level: GeoVectorDataset,
|
|
1157
|
-
habit_distributions: npt.NDArray[np.
|
|
1158
|
-
radius_threshold_um: npt.NDArray[np.
|
|
1161
|
+
habit_distributions: npt.NDArray[np.floating],
|
|
1162
|
+
radius_threshold_um: npt.NDArray[np.floating],
|
|
1159
1163
|
) -> GeoVectorDataset:
|
|
1160
1164
|
"""
|
|
1161
1165
|
Calculate local contrail SW and LW RF after accounting for contrail overlapping.
|
|
@@ -1164,10 +1168,10 @@ def _local_sw_and_lw_rf_with_contrail_overlap(
|
|
|
1164
1168
|
----------
|
|
1165
1169
|
contrails_level : GeoVectorDataset
|
|
1166
1170
|
Contrail waypoints at the current altitude layer.
|
|
1167
|
-
habit_distributions : npt.NDArray[np.
|
|
1171
|
+
habit_distributions : npt.NDArray[np.floating]
|
|
1168
1172
|
Habit weight distributions.
|
|
1169
1173
|
See :attr:`CocipParams().habit_distributions`
|
|
1170
|
-
radius_threshold_um : npt.NDArray[np.
|
|
1174
|
+
radius_threshold_um : npt.NDArray[np.floating]
|
|
1171
1175
|
Radius thresholds for habit distributions.
|
|
1172
1176
|
See :attr:`CocipParams.radius_threshold_um`
|
|
1173
1177
|
|