pycontrails 0.40.1__cp39-cp39-macosx_11_0_arm64.whl → 0.42.0__cp39-cp39-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/_version.py +2 -2
- pycontrails/core/airports.py +228 -0
- pycontrails/core/datalib.py +8 -4
- pycontrails/core/fleet.py +13 -13
- pycontrails/core/flight.py +311 -86
- pycontrails/core/met.py +78 -78
- pycontrails/core/polygon.py +329 -339
- pycontrails/core/rgi_cython.cpython-39-darwin.so +0 -0
- pycontrails/core/vector.py +63 -51
- pycontrails/datalib/__init__.py +1 -1
- pycontrails/datalib/spire/__init__.py +19 -0
- pycontrails/datalib/spire/spire.py +739 -0
- pycontrails/models/cocip/wind_shear.py +2 -2
- pycontrails/models/emissions/emissions.py +1 -1
- pycontrails/models/humidity_scaling.py +1 -1
- pycontrails/models/issr.py +1 -1
- pycontrails/models/pcr.py +1 -1
- pycontrails/models/sac.py +5 -5
- pycontrails/physics/geo.py +3 -2
- pycontrails/physics/jet.py +66 -113
- {pycontrails-0.40.1.dist-info → pycontrails-0.42.0.dist-info}/METADATA +2 -1
- {pycontrails-0.40.1.dist-info → pycontrails-0.42.0.dist-info}/RECORD +26 -23
- {pycontrails-0.40.1.dist-info → pycontrails-0.42.0.dist-info}/LICENSE +0 -0
- {pycontrails-0.40.1.dist-info → pycontrails-0.42.0.dist-info}/NOTICE +0 -0
- {pycontrails-0.40.1.dist-info → pycontrails-0.42.0.dist-info}/WHEEL +0 -0
- {pycontrails-0.40.1.dist-info → pycontrails-0.42.0.dist-info}/top_level.txt +0 -0
|
@@ -78,7 +78,7 @@ def wind_shear_normal(
|
|
|
78
78
|
Returns
|
|
79
79
|
-------
|
|
80
80
|
ArrayScalarLike
|
|
81
|
-
Wind shear normal to axis, [:math:`
|
|
81
|
+
Wind shear normal to axis, [:math:`s^{-1}`]
|
|
82
82
|
"""
|
|
83
83
|
du_dz = (u_wind_top - u_wind_btm) / dz
|
|
84
84
|
dv_dz = (v_wind_top - v_wind_btm) / dz
|
|
@@ -112,7 +112,7 @@ def wind_shear(
|
|
|
112
112
|
Returns
|
|
113
113
|
-------
|
|
114
114
|
ArrayScalarLike
|
|
115
|
-
Total wind shear, [:math:`
|
|
115
|
+
Total wind shear, [:math:`s^{-1}`]
|
|
116
116
|
"""
|
|
117
117
|
du_dz = (u_wind_top - u_wind_btm) / dz
|
|
118
118
|
dv_dz = (v_wind_top - v_wind_btm) / dz
|
|
@@ -494,7 +494,7 @@ class Emissions(Model):
|
|
|
494
494
|
def _total_pollutant_emissions(self) -> None:
|
|
495
495
|
# Required variables
|
|
496
496
|
# FIXME: These two variables are already calculated in BADA models
|
|
497
|
-
dt_sec = flight.
|
|
497
|
+
dt_sec = flight.segment_duration(self.source["time"], dtype=self.source.altitude_ft.dtype)
|
|
498
498
|
fuel_burn = jet.fuel_burn(self.source.get_data_or_attr("fuel_flow"), dt_sec)
|
|
499
499
|
|
|
500
500
|
# TODO: these currently overwrite values and will throw warnings
|
|
@@ -149,7 +149,7 @@ class HumidityScaling(Model):
|
|
|
149
149
|
kwargs = {k: self.get_source_param(k) for k in self.scaler_specific_keys}
|
|
150
150
|
|
|
151
151
|
q, rhi = self.scale(q, T, p, **kwargs)
|
|
152
|
-
self.source.update(specific_humidity=q, rhi=rhi)
|
|
152
|
+
self.source.update(specific_humidity=q, rhi=rhi)
|
|
153
153
|
|
|
154
154
|
return self.source
|
|
155
155
|
|
pycontrails/models/issr.py
CHANGED
|
@@ -136,7 +136,7 @@ class ISSR(Model):
|
|
|
136
136
|
rhi=self.source.data.get("rhi", None), # if rhi already known, pass it in
|
|
137
137
|
rhi_threshold=self.params["rhi_threshold"],
|
|
138
138
|
)
|
|
139
|
-
self.source["issr"] = issr_
|
|
139
|
+
self.source["issr"] = issr_
|
|
140
140
|
|
|
141
141
|
# Tag output with additional attrs when source is MetDataset
|
|
142
142
|
if isinstance(self.source, MetDataset):
|
pycontrails/models/pcr.py
CHANGED
|
@@ -97,7 +97,7 @@ class PCR(Model):
|
|
|
97
97
|
sac_model.eval(self.source)
|
|
98
98
|
|
|
99
99
|
pcr_ = _pcr_from_issr_and_sac(self.source.data["issr"], self.source.data["sac"])
|
|
100
|
-
self.source["pcr"] = pcr_
|
|
100
|
+
self.source["pcr"] = pcr_
|
|
101
101
|
# Tag output with additional attrs when source is MetDataset
|
|
102
102
|
if isinstance(self.source, MetDataset):
|
|
103
103
|
attrs = {**self.source["issr"].attrs, **self.source["sac"].attrs}
|
pycontrails/models/sac.py
CHANGED
|
@@ -139,11 +139,11 @@ class SAC(Model):
|
|
|
139
139
|
sac_ = sac(rh, rh_crit_sac)
|
|
140
140
|
|
|
141
141
|
# Attaching some intermediate artifacts onto the source
|
|
142
|
-
self.source["G"] = G
|
|
143
|
-
self.source["T_sat_liquid"] = T_sat_liquid_
|
|
144
|
-
self.source["rh"] = rh
|
|
145
|
-
self.source["rh_critical_sac"] = rh_crit_sac
|
|
146
|
-
self.source["sac"] = sac_
|
|
142
|
+
self.source["G"] = G
|
|
143
|
+
self.source["T_sat_liquid"] = T_sat_liquid_
|
|
144
|
+
self.source["rh"] = rh
|
|
145
|
+
self.source["rh_critical_sac"] = rh_crit_sac
|
|
146
|
+
self.source["sac"] = sac_
|
|
147
147
|
|
|
148
148
|
# Tag output with additional attrs when source is MetDataset
|
|
149
149
|
if isinstance(self.source, MetDataset):
|
pycontrails/physics/geo.py
CHANGED
|
@@ -32,11 +32,12 @@ def haversine(lons0: ArrayLike, lats0: ArrayLike, lons1: ArrayLike, lats1: Array
|
|
|
32
32
|
|
|
33
33
|
Notes
|
|
34
34
|
-----
|
|
35
|
-
This formula does not take into account the non-spheroidal (ellipsoidal) shape of the Earth
|
|
35
|
+
This formula does not take into account the non-spheroidal (ellipsoidal) shape of the Earth.
|
|
36
|
+
Originally referenced from https://andrew.hedges.name/experiments/haversine/.
|
|
36
37
|
|
|
37
38
|
References
|
|
38
39
|
----------
|
|
39
|
-
|
|
40
|
+
- :cite:`CalculateDistanceBearing`
|
|
40
41
|
|
|
41
42
|
See Also
|
|
42
43
|
--------
|
pycontrails/physics/jet.py
CHANGED
|
@@ -12,7 +12,7 @@ import logging
|
|
|
12
12
|
import numpy as np
|
|
13
13
|
import numpy.typing as npt
|
|
14
14
|
|
|
15
|
-
from pycontrails.core
|
|
15
|
+
from pycontrails.core import flight
|
|
16
16
|
from pycontrails.physics import constants, units
|
|
17
17
|
from pycontrails.utils.types import ArrayScalarLike
|
|
18
18
|
|
|
@@ -24,76 +24,20 @@ logger = logging.getLogger(__name__)
|
|
|
24
24
|
# -------------------
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
def identify_phase_of_flight(rocd: np.ndarray, *, threshold_rocd: float = 100.0) -> FlightPhase:
|
|
28
|
-
"""Identify the phase of flight (climb, cruise, descent) for each waypoint.
|
|
29
|
-
|
|
30
|
-
Parameters
|
|
31
|
-
----------
|
|
32
|
-
rocd: np.ndarray
|
|
33
|
-
Rate of climb and descent, [:math:`ft min^{-1}`]
|
|
34
|
-
threshold_rocd: float
|
|
35
|
-
ROCD threshold to identify climb and descent, [:math:`ft min^{-1}`].
|
|
36
|
-
Currently set to 100 ft/min.
|
|
37
|
-
|
|
38
|
-
Returns
|
|
39
|
-
-------
|
|
40
|
-
FlightPhase
|
|
41
|
-
Booleans marking if the waypoints are at cruise, climb, or descent
|
|
42
|
-
|
|
43
|
-
Notes
|
|
44
|
-
-----
|
|
45
|
-
Flight data derived from ADS-B and radar sources could contain noise leading
|
|
46
|
-
to small changes in altitude and ROCD. Hence, an arbitrary ``threshold_rocd``
|
|
47
|
-
is specified to identify the different phases of flight.
|
|
48
|
-
"""
|
|
49
|
-
nan = np.isnan(rocd)
|
|
50
|
-
climb = rocd > threshold_rocd
|
|
51
|
-
descent = rocd < -threshold_rocd
|
|
52
|
-
cruise = ~(nan | climb | descent)
|
|
53
|
-
return FlightPhase(cruise=cruise, climb=climb, descent=descent, nan=nan)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
def rate_of_climb_descent(
|
|
57
|
-
dt: npt.NDArray[np.float_], altitude_ft: npt.NDArray[np.float_]
|
|
58
|
-
) -> npt.NDArray[np.float_]:
|
|
59
|
-
"""Calculate the rate of climb and descent (ROCD).
|
|
60
|
-
|
|
61
|
-
Parameters
|
|
62
|
-
----------
|
|
63
|
-
dt: npt.NDArray[np.float_]
|
|
64
|
-
Time difference between waypoints, [:math:`s`].
|
|
65
|
-
Expected to have numeric `dtype`, not `"timedelta64".
|
|
66
|
-
altitude_ft: npt.NDArray[np.float_]
|
|
67
|
-
Altitude of each waypoint, [:math:`ft`]
|
|
68
|
-
|
|
69
|
-
Returns
|
|
70
|
-
-------
|
|
71
|
-
npt.NDArray[np.float_]
|
|
72
|
-
Rate of climb and descent, [:math:`ft min^{-1}`]
|
|
73
|
-
"""
|
|
74
|
-
dt_min = dt / 60.0
|
|
75
|
-
|
|
76
|
-
out = np.empty_like(altitude_ft)
|
|
77
|
-
out[:-1] = np.diff(altitude_ft) / dt_min[:-1]
|
|
78
|
-
out[-1] = np.nan
|
|
79
|
-
|
|
80
|
-
return out
|
|
81
|
-
|
|
82
|
-
|
|
83
27
|
def clip_mach_number(
|
|
84
|
-
true_airspeed: np.
|
|
85
|
-
air_temperature: np.
|
|
28
|
+
true_airspeed: npt.NDArray[np.float_],
|
|
29
|
+
air_temperature: npt.NDArray[np.float_],
|
|
86
30
|
max_mach_number: float,
|
|
87
|
-
) -> tuple[np.
|
|
31
|
+
) -> tuple[npt.NDArray[np.float_], npt.NDArray[np.float_]]:
|
|
88
32
|
r"""Compute the Mach number from the true airspeed and ambient temperature.
|
|
89
33
|
|
|
90
34
|
This method clips the computed Mach number to the value of `max_mach_number`.
|
|
91
35
|
|
|
92
36
|
Parameters
|
|
93
37
|
----------
|
|
94
|
-
true_airspeed : np.
|
|
38
|
+
true_airspeed : npt.NDArray[np.float_]
|
|
95
39
|
Array of true airspeed, [:math:`m \ s^{-1}`]
|
|
96
|
-
air_temperature : np.
|
|
40
|
+
air_temperature : npt.NDArray[np.float_]
|
|
97
41
|
Array of ambient temperature, [:math: `K`]
|
|
98
42
|
max_mach_number : float
|
|
99
43
|
Maximum mach number associated to aircraft, [:math: `Ma`]. If no clipping
|
|
@@ -101,7 +45,7 @@ def clip_mach_number(
|
|
|
101
45
|
|
|
102
46
|
Returns
|
|
103
47
|
-------
|
|
104
|
-
tuple[np.
|
|
48
|
+
tuple[npt.NDArray[np.float_], npt.NDArray[np.float_]] :
|
|
105
49
|
Pair of true airspeed and Mach number arrays. Both are corrected so that
|
|
106
50
|
the Mach numbers are clipped at `max_mach_number`.
|
|
107
51
|
"""
|
|
@@ -110,8 +54,8 @@ def clip_mach_number(
|
|
|
110
54
|
is_unrealistic = mach_num > max_mach_number
|
|
111
55
|
if np.any(is_unrealistic):
|
|
112
56
|
msg = (
|
|
113
|
-
f"Unrealistic Mach numbers found. Discovered {np.sum(is_unrealistic)} "
|
|
114
|
-
f"
|
|
57
|
+
f"Unrealistic Mach numbers found. Discovered {np.sum(is_unrealistic)} / "
|
|
58
|
+
f"{is_unrealistic.size} values exceeding this, the largest of which "
|
|
115
59
|
f"is {np.nanmax(mach_num)}. These are all clipped at {max_mach_number}."
|
|
116
60
|
)
|
|
117
61
|
logger.debug(msg)
|
|
@@ -124,13 +68,13 @@ def clip_mach_number(
|
|
|
124
68
|
|
|
125
69
|
|
|
126
70
|
def overall_propulsion_efficiency(
|
|
127
|
-
true_airspeed: np.
|
|
128
|
-
F_thrust: np.
|
|
129
|
-
fuel_flow: np.
|
|
71
|
+
true_airspeed: npt.NDArray[np.float_],
|
|
72
|
+
F_thrust: npt.NDArray[np.float_],
|
|
73
|
+
fuel_flow: npt.NDArray[np.float_],
|
|
130
74
|
q_fuel: float,
|
|
131
|
-
is_descent: np.
|
|
75
|
+
is_descent: npt.NDArray[np.bool_] | None,
|
|
132
76
|
threshold: float = 0.5,
|
|
133
|
-
) -> np.
|
|
77
|
+
) -> npt.NDArray[np.float_]:
|
|
134
78
|
r"""Calculate the overall propulsion efficiency (OPE).
|
|
135
79
|
|
|
136
80
|
Negative OPE values can occur during the descent phase and is clipped to a
|
|
@@ -139,22 +83,22 @@ def overall_propulsion_efficiency(
|
|
|
139
83
|
|
|
140
84
|
Parameters
|
|
141
85
|
----------
|
|
142
|
-
true_airspeed: np.
|
|
86
|
+
true_airspeed: npt.NDArray[np.float_]
|
|
143
87
|
True airspeed for each waypoint, [:math:`m s^{-1}`].
|
|
144
|
-
F_thrust: np.
|
|
88
|
+
F_thrust: npt.NDArray[np.float_]
|
|
145
89
|
Thrust force provided by the engine, [:math:`N`].
|
|
146
|
-
fuel_flow: np.
|
|
90
|
+
fuel_flow: npt.NDArray[np.float_]
|
|
147
91
|
Fuel mass flow rate, [:math:`kg s^{-1}`].
|
|
148
92
|
q_fuel : float
|
|
149
93
|
Lower calorific value (LCV) of fuel, [:math:`J \ kg_{fuel}^{-1}`].
|
|
150
|
-
is_descent : np.
|
|
94
|
+
is_descent : npt.NDArray[np.float_] | None
|
|
151
95
|
Boolean array that indicates if a waypoint is in a descent phase.
|
|
152
96
|
threshold : float
|
|
153
97
|
Upper bound for realistic engine efficiency.
|
|
154
98
|
|
|
155
99
|
Returns
|
|
156
100
|
-------
|
|
157
|
-
np.
|
|
101
|
+
npt.NDArray[np.float_]
|
|
158
102
|
Overall propulsion efficiency (OPE)
|
|
159
103
|
|
|
160
104
|
References
|
|
@@ -182,22 +126,24 @@ def overall_propulsion_efficiency(
|
|
|
182
126
|
# -------------------
|
|
183
127
|
|
|
184
128
|
|
|
185
|
-
def fuel_burn(
|
|
129
|
+
def fuel_burn(
|
|
130
|
+
fuel_flow: npt.NDArray[np.float_], segment_duration: npt.NDArray[np.float_]
|
|
131
|
+
) -> npt.NDArray[np.float_]:
|
|
186
132
|
"""Calculate the fuel consumption at each waypoint.
|
|
187
133
|
|
|
188
134
|
Parameters
|
|
189
135
|
----------
|
|
190
|
-
fuel_flow: np.
|
|
136
|
+
fuel_flow: npt.NDArray[np.float_]
|
|
191
137
|
Fuel mass flow rate, [:math:`kg s^{-1}`]
|
|
192
|
-
|
|
138
|
+
segment_duration: npt.NDArray[np.float_]
|
|
193
139
|
Time difference between waypoints, [:math:`s`]
|
|
194
140
|
|
|
195
141
|
Returns
|
|
196
142
|
-------
|
|
197
|
-
np.
|
|
143
|
+
npt.NDArray[np.float_]
|
|
198
144
|
Fuel consumption at each waypoint, [:math:`kg`]
|
|
199
145
|
"""
|
|
200
|
-
return fuel_flow *
|
|
146
|
+
return fuel_flow * segment_duration
|
|
201
147
|
|
|
202
148
|
|
|
203
149
|
def equivalent_fuel_flow_rate_at_sea_level(
|
|
@@ -234,23 +180,28 @@ def equivalent_fuel_flow_rate_at_sea_level(
|
|
|
234
180
|
|
|
235
181
|
|
|
236
182
|
def reserve_fuel_requirements(
|
|
237
|
-
rocd:
|
|
183
|
+
rocd: npt.NDArray[np.float_],
|
|
184
|
+
altitude_ft: npt.NDArray[np.float_],
|
|
185
|
+
fuel_flow: npt.NDArray[np.float_],
|
|
186
|
+
fuel_burn: npt.NDArray[np.float_],
|
|
238
187
|
) -> float:
|
|
239
188
|
r"""
|
|
240
189
|
Estimate reserve fuel requirements.
|
|
241
190
|
|
|
242
191
|
Parameters
|
|
243
192
|
----------
|
|
244
|
-
rocd: np.
|
|
193
|
+
rocd: npt.NDArray[np.float_]
|
|
245
194
|
Rate of climb and descent, [:math:`ft \ min^{-1}`]
|
|
246
|
-
|
|
195
|
+
altitude_ft: npt.NDArray[np.float_]
|
|
196
|
+
Altitude, [:math:`ft`]
|
|
197
|
+
fuel_flow: npt.NDArray[np.float_]
|
|
247
198
|
Fuel mass flow rate, [:math:`kg \ s^{-1}`].
|
|
248
|
-
fuel_burn: np.
|
|
199
|
+
fuel_burn: npt.NDArray[np.float_]
|
|
249
200
|
Fuel consumption for each waypoint, [:math:`kg`]
|
|
250
201
|
|
|
251
202
|
Returns
|
|
252
203
|
-------
|
|
253
|
-
np.
|
|
204
|
+
npt.NDArray[np.float_]
|
|
254
205
|
Reserve fuel requirements, [:math:`kg`]
|
|
255
206
|
|
|
256
207
|
References
|
|
@@ -269,13 +220,15 @@ def reserve_fuel_requirements(
|
|
|
269
220
|
|
|
270
221
|
See Also
|
|
271
222
|
--------
|
|
272
|
-
:func:`
|
|
223
|
+
:func:`flight.segment_phase`
|
|
273
224
|
:func:`fuel_burn`
|
|
274
225
|
"""
|
|
275
|
-
|
|
226
|
+
segment_phase = flight.segment_phase(rocd, altitude_ft)
|
|
276
227
|
|
|
277
228
|
# In case flight does not have cruise phase
|
|
278
|
-
is_climb_cruise =
|
|
229
|
+
is_climb_cruise = (segment_phase == flight.FlightPhase.CLIMB) | (
|
|
230
|
+
segment_phase == flight.FlightPhase.CRUISE
|
|
231
|
+
)
|
|
279
232
|
|
|
280
233
|
# If there are no climb and cruise phase, take the mean
|
|
281
234
|
if not np.all(is_climb_cruise):
|
|
@@ -295,17 +248,17 @@ def reserve_fuel_requirements(
|
|
|
295
248
|
# -------------------
|
|
296
249
|
|
|
297
250
|
|
|
298
|
-
def aircraft_weight(aircraft_mass: np.
|
|
251
|
+
def aircraft_weight(aircraft_mass: npt.NDArray[np.float_]) -> npt.NDArray[np.float_]:
|
|
299
252
|
"""Calculate the aircraft weight at each waypoint.
|
|
300
253
|
|
|
301
254
|
Parameters
|
|
302
255
|
----------
|
|
303
|
-
aircraft_mass : np.
|
|
256
|
+
aircraft_mass : npt.NDArray[np.float_]
|
|
304
257
|
Aircraft mass, [:math:`kg`]
|
|
305
258
|
|
|
306
259
|
Returns
|
|
307
260
|
-------
|
|
308
|
-
np.
|
|
261
|
+
npt.NDArray[np.float_]
|
|
309
262
|
Aircraft weight, [:math:`N`]
|
|
310
263
|
"""
|
|
311
264
|
return aircraft_mass * constants.g
|
|
@@ -384,7 +337,7 @@ def update_aircraft_mass(
|
|
|
384
337
|
Aircraft maximum take-off weight, [:math:`kg`].
|
|
385
338
|
max_payload: float
|
|
386
339
|
Aircraft maximum payload, [:math:`kg`]
|
|
387
|
-
fuel_burn: np.
|
|
340
|
+
fuel_burn: npt.NDArray[np.float_]
|
|
388
341
|
Fuel consumption for each waypoint, [:math:`kg`]
|
|
389
342
|
total_reserve_fuel: float
|
|
390
343
|
Total reserve fuel requirements, [:math:`kg`]
|
|
@@ -567,30 +520,30 @@ def turbine_inlet_temperature(
|
|
|
567
520
|
|
|
568
521
|
|
|
569
522
|
def thrust_force(
|
|
570
|
-
altitude: np.
|
|
571
|
-
true_airspeed: np.
|
|
572
|
-
dt: np.
|
|
573
|
-
aircraft_mass: np.
|
|
574
|
-
F_drag: np.
|
|
575
|
-
) -> np.
|
|
523
|
+
altitude: npt.NDArray[np.float_],
|
|
524
|
+
true_airspeed: npt.NDArray[np.float_],
|
|
525
|
+
dt: npt.NDArray[np.float_],
|
|
526
|
+
aircraft_mass: npt.NDArray[np.float_],
|
|
527
|
+
F_drag: npt.NDArray[np.float_],
|
|
528
|
+
) -> npt.NDArray[np.float_]:
|
|
576
529
|
r"""Calculate the thrust force at each waypoint.
|
|
577
530
|
|
|
578
531
|
Parameters
|
|
579
532
|
----------
|
|
580
|
-
altitude : np.
|
|
533
|
+
altitude : npt.NDArray[np.float_]
|
|
581
534
|
Waypoint altitude, [:math:`m`]
|
|
582
|
-
true_airspeed : np.
|
|
535
|
+
true_airspeed : npt.NDArray[np.float_]
|
|
583
536
|
True airspeed, [:math:`m \ s^{-1}`]
|
|
584
|
-
dt : np.
|
|
537
|
+
dt : npt.NDArray[np.float_]
|
|
585
538
|
Time between waypoints, [:math:`s`]
|
|
586
|
-
aircraft_mass : np.
|
|
539
|
+
aircraft_mass : npt.NDArray[np.float_]
|
|
587
540
|
Aircraft mass, [:math:`kg`]
|
|
588
|
-
F_drag : np.
|
|
541
|
+
F_drag : npt.NDArray[np.float_]
|
|
589
542
|
Draft force, [:math:`N`]
|
|
590
543
|
|
|
591
544
|
Returns
|
|
592
545
|
-------
|
|
593
|
-
np.
|
|
546
|
+
npt.NDArray[np.float_]
|
|
594
547
|
Thrust force, [:math:`N`]
|
|
595
548
|
|
|
596
549
|
References
|
|
@@ -728,49 +681,49 @@ def air_to_fuel_ratio(
|
|
|
728
681
|
# -------------------
|
|
729
682
|
|
|
730
683
|
|
|
731
|
-
def temperature_ratio(T: np.
|
|
684
|
+
def temperature_ratio(T: npt.NDArray[np.float_]) -> npt.NDArray[np.float_]:
|
|
732
685
|
"""Calculate the ratio of ambient temperature relative to the temperature at mean sea level.
|
|
733
686
|
|
|
734
687
|
Parameters
|
|
735
688
|
----------
|
|
736
|
-
T : np.
|
|
689
|
+
T : npt.NDArray[np.float_]
|
|
737
690
|
Air temperature, [:math:`K`]
|
|
738
691
|
|
|
739
692
|
Returns
|
|
740
693
|
-------
|
|
741
|
-
np.
|
|
694
|
+
npt.NDArray[np.float_]
|
|
742
695
|
Ratio of the temperature to the temperature at mean sea-level (MSL).
|
|
743
696
|
"""
|
|
744
697
|
return T / constants.T_msl
|
|
745
698
|
|
|
746
699
|
|
|
747
|
-
def pressure_ratio(p: np.
|
|
700
|
+
def pressure_ratio(p: npt.NDArray[np.float_]) -> npt.NDArray[np.float_]:
|
|
748
701
|
"""Calculate the ratio of ambient pressure relative to the surface pressure.
|
|
749
702
|
|
|
750
703
|
Parameters
|
|
751
704
|
----------
|
|
752
|
-
p : np.
|
|
705
|
+
p : npt.NDArray[np.float_]
|
|
753
706
|
Air pressure, [:math:`Pa`]
|
|
754
707
|
|
|
755
708
|
Returns
|
|
756
709
|
-------
|
|
757
|
-
np.
|
|
710
|
+
npt.NDArray[np.float_]
|
|
758
711
|
Ratio of the pressure altitude to the surface pressure.
|
|
759
712
|
"""
|
|
760
713
|
return p / constants.p_surface
|
|
761
714
|
|
|
762
715
|
|
|
763
|
-
def density_ratio(rho: np.
|
|
716
|
+
def density_ratio(rho: npt.NDArray[np.float_]) -> npt.NDArray[np.float_]:
|
|
764
717
|
r"""Calculate the ratio of air density relative to the air density at mean-sea-level.
|
|
765
718
|
|
|
766
719
|
Parameters
|
|
767
720
|
----------
|
|
768
|
-
rho : np.
|
|
721
|
+
rho : npt.NDArray[np.float_]
|
|
769
722
|
Air density, [:math:`kg \ m^{3}`]
|
|
770
723
|
|
|
771
724
|
Returns
|
|
772
725
|
-------
|
|
773
|
-
np.
|
|
726
|
+
npt.NDArray[np.float_]
|
|
774
727
|
Ratio of the density to the air density at mean sea-level (MSL).
|
|
775
728
|
"""
|
|
776
729
|
return rho / constants.rho_msl
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pycontrails
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.42.0
|
|
4
4
|
Summary: Python library for modeling aviation climate impacts
|
|
5
5
|
Author-email: Breakthrough Energy <py@contrails.org>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -98,6 +98,7 @@ Provides-Extra: open3d
|
|
|
98
98
|
Requires-Dist: open3d (>=0.14) ; extra == 'open3d'
|
|
99
99
|
Provides-Extra: vis
|
|
100
100
|
Requires-Dist: matplotlib (>=3.3) ; extra == 'vis'
|
|
101
|
+
Requires-Dist: opencv-python-headless (>=4.5) ; extra == 'vis'
|
|
101
102
|
Requires-Dist: scikit-learn (>=0.23) ; extra == 'vis'
|
|
102
103
|
Requires-Dist: scikit-image (>=0.18) ; extra == 'vis'
|
|
103
104
|
Requires-Dist: seaborn (>=0.11) ; extra == 'vis'
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
pycontrails-0.
|
|
2
|
-
pycontrails-0.
|
|
3
|
-
pycontrails-0.
|
|
4
|
-
pycontrails-0.
|
|
5
|
-
pycontrails-0.
|
|
6
|
-
pycontrails-0.
|
|
7
|
-
pycontrails/_version.py,sha256=
|
|
1
|
+
pycontrails-0.42.0.dist-info/RECORD,,
|
|
2
|
+
pycontrails-0.42.0.dist-info/LICENSE,sha256=gJ-h7SFFD1mCfR6a7HILvEtodDT6Iig8bLXdgqR6ucA,10175
|
|
3
|
+
pycontrails-0.42.0.dist-info/WHEEL,sha256=d8sjrkKo8h1ZY8Oxdq-K-58JEo6nLEfNKzkM0CYZtr0,108
|
|
4
|
+
pycontrails-0.42.0.dist-info/NOTICE,sha256=gKI8DcN1WhiXB2SFRKDogcjONldGubTvBxiOYdC4CXU,1926
|
|
5
|
+
pycontrails-0.42.0.dist-info/top_level.txt,sha256=Z8J1R_AiBAyCVjNw6jYLdrA68PrQqTg0t3_Yek_IZ0Q,29
|
|
6
|
+
pycontrails-0.42.0.dist-info/METADATA,sha256=xQ9tt3JbcEkYt0cretDHsuaUW0Aorvo93bIC2Ue6CaM,8354
|
|
7
|
+
pycontrails/_version.py,sha256=CprMv6GTEx4IrrUdo6yTukVOLmxjWTO3U6cWecLEjMA,162
|
|
8
8
|
pycontrails/__init__.py,sha256=sf7Xhr91V2jAvcQkla9oPqNCaXSKQp2M_dcxkiVkl6w,1943
|
|
9
9
|
pycontrails/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
pycontrails/core/vector.py,sha256=
|
|
11
|
-
pycontrails/core/rgi_cython.cpython-39-darwin.so,sha256=
|
|
10
|
+
pycontrails/core/vector.py,sha256=qxxYQK1YJF5rC5d3wIeOumlDh0QPATiAUTFYipQhEtQ,58368
|
|
11
|
+
pycontrails/core/rgi_cython.cpython-39-darwin.so,sha256=s2Q4wCdEYJT8hFnIkUe6aXnWlVB_32nie-s1ZHGvItM,261692
|
|
12
12
|
pycontrails/core/models.py,sha256=eapTP-JlMgfXVvvLn3WcbushGpCRgbUp3u25sgwi9IU,26792
|
|
13
13
|
pycontrails/core/interpolation.py,sha256=3SK7xE0ChmCc7Ev4uM1saUF3LhS7h0mqNMk4qR3XxwY,24032
|
|
14
|
-
pycontrails/core/fleet.py,sha256=
|
|
15
|
-
pycontrails/core/flight.py,sha256=
|
|
14
|
+
pycontrails/core/fleet.py,sha256=L-tQPLjflT_ofc5z0mt49O2o4_gzXxoQTpCZLA_VkpE,12453
|
|
15
|
+
pycontrails/core/flight.py,sha256=qd0lZQ_0xIUVMbDByOVlYl_8gdm85r0tPtK5SIlptcM,57318
|
|
16
16
|
pycontrails/core/fuel.py,sha256=lEMUgLeFBoazDsiKN07s9udQ12xghOos5v3H9bjveBs,4044
|
|
17
|
-
pycontrails/core/polygon.py,sha256=
|
|
18
|
-
pycontrails/core/datalib.py,sha256=
|
|
17
|
+
pycontrails/core/polygon.py,sha256=FlFHJvonnxajq6iY12cuqW-MP8wGGeb3aiNJh-hks3g,16636
|
|
18
|
+
pycontrails/core/datalib.py,sha256=BT-iFvD2nACKqh82j0wxBRcRgH2WL8VtN3FdSmNFMiQ,21517
|
|
19
19
|
pycontrails/core/cache.py,sha256=uMzN45MUgIni1uhlypLVjc0NhFDvn6m-uK78p9sDdE8,28536
|
|
20
20
|
pycontrails/core/__init__.py,sha256=C6bOLNBKeQaLCHCRza1oPrQTUazutPST7hX4C6O2MG0,866
|
|
21
|
-
pycontrails/core/met.py,sha256=
|
|
21
|
+
pycontrails/core/met.py,sha256=jID-joG-1Mm-SSHVAWijOZL6yLwGd7GJAs2v7dybR2E,86826
|
|
22
|
+
pycontrails/core/airports.py,sha256=5D0VF9DxleQlVOmMW-P8_fVVkob-aB3doO1Co2XNFss,6766
|
|
22
23
|
pycontrails/core/met_var.py,sha256=-gaodcmxx507ryMVKvFclqKkf1c8OHVVtXeG9s2eOOs,9191
|
|
23
24
|
pycontrails/core/coordinates.py,sha256=b7D2lknnnwh8rBSla9M3ojqRYiASAOrVv0OAFD8xpDw,5078
|
|
24
|
-
pycontrails/datalib/__init__.py,sha256=
|
|
25
|
+
pycontrails/datalib/__init__.py,sha256=s5b8W6scXgespKZjPcaC-8jyLd3FqZqN0BZccLxaGuE,237
|
|
25
26
|
pycontrails/datalib/ecmwf/era5.py,sha256=ulII_wQDSLmaqpMdZpAlOCmCCxhpzfSdBBgb8NW4ioA,19590
|
|
26
27
|
pycontrails/datalib/ecmwf/hres.py,sha256=wnGSZ67fnJ7NOw4hZXk3UCNcfFvShK1pWMm4nx0fz6c,30333
|
|
27
28
|
pycontrails/datalib/ecmwf/variables.py,sha256=akqjUS3WKnSzV1Y0KkHLylH7QByvitc3wo8NBFeSNew,8714
|
|
@@ -31,6 +32,8 @@ pycontrails/datalib/ecmwf/ifs.py,sha256=2Atnpc4q6Yy9LjEyE4tYzmnlC0bnnbzUiZvj7XUh
|
|
|
31
32
|
pycontrails/datalib/gfs/gfs.py,sha256=-3_Qd1fKRU2LYCBK8mDvc9FycL2lYTEzJfXeAXpP73M,23084
|
|
32
33
|
pycontrails/datalib/gfs/variables.py,sha256=s6rKyFdDA8E0Jz8X4twM7mgq5zhRGlk5qTedItyqoY8,2860
|
|
33
34
|
pycontrails/datalib/gfs/__init__.py,sha256=tWxgqmlW8Uo07J-3fBTXPrteatzTka9mSXomhWy3NVA,684
|
|
35
|
+
pycontrails/datalib/spire/spire.py,sha256=l52ID6LdYWpWcxxVbupCBono06MvPfwIBOGI9AcxpHQ,25351
|
|
36
|
+
pycontrails/datalib/spire/__init__.py,sha256=4EZPJUmNnF8v2n6QhBvSi_3rYXRBX2zGcPE-WEA-dP8,343
|
|
34
37
|
pycontrails/ext/cirium/__init__.py,sha256=dkNoMUbMfNQJCK69OMgspJGBBI5T6rXzp2MqjDtfkTw,406
|
|
35
38
|
pycontrails/ext/bada/__init__.py,sha256=LYRF_nDHDocSJ603XSJKEEFIX0kfUpFBMXercEndQd8,1054
|
|
36
39
|
pycontrails/utils/iteration.py,sha256=UjMn2FRDyC0A7q_MqKNpqqeNZm-lA23Ws-KV7zFzAl4,292
|
|
@@ -39,23 +42,23 @@ pycontrails/utils/__init__.py,sha256=Gt_57sBgfliFSxx9sDpuchykFDxmM11Wg9xAeSqPcnI
|
|
|
39
42
|
pycontrails/utils/types.py,sha256=0uH2eVmQJZiL76N0v_UtHDyv3FJHeRd7BxEZ_occ0n4,4525
|
|
40
43
|
pycontrails/utils/temp.py,sha256=6BlJ5NaQpACyL-n3FuqfscFb9Mfbgvs72BwWfSzBfmU,1100
|
|
41
44
|
pycontrails/utils/json.py,sha256=lcZtaeJQNx_U5rgR322spbI8zs1XcQ-5So1bb26ow9E,5993
|
|
42
|
-
pycontrails/models/humidity_scaling.py,sha256=
|
|
45
|
+
pycontrails/models/humidity_scaling.py,sha256=pmKDGFT9wRkz7u_qHjeE1uZSi_lOADM2BVg0VlpZof4,19923
|
|
43
46
|
pycontrails/models/pcc.py,sha256=yWi0TochaCWCgrb68dUad9xPMqysIRa2hr6VT8PvxL4,11286
|
|
44
47
|
pycontrails/models/tau_cirrus.py,sha256=jYilgsGQw7aFLjIJaG8zvbu8ITNGlXZvbl18C8vHbE4,4491
|
|
45
48
|
pycontrails/models/__init__.py,sha256=dQTOLQb7RdUdUwslt5se__5y_ymbInBexQmNrmAeOdE,33
|
|
46
|
-
pycontrails/models/issr.py,sha256=
|
|
47
|
-
pycontrails/models/sac.py,sha256=
|
|
49
|
+
pycontrails/models/issr.py,sha256=VIafGHMXLrTnU52WKvpujsKwUIPu4cVwFjGbB1-9ncs,7577
|
|
50
|
+
pycontrails/models/sac.py,sha256=6kwCAC3kFfgXiEJfyEzdPdH9OhlguPaaVBiESSPSFBs,16105
|
|
48
51
|
pycontrails/models/accf.py,sha256=WRFGNrkt2hLgO-mIsgk3JXk9_R7Hbw0jCPUC6iGpcCg,12368
|
|
49
52
|
pycontrails/models/aircraft_performance.py,sha256=r-SdOw6Aor9JXIz4mVKe7HTrG4lKCXpAraUY2KTZhiE,1722
|
|
50
|
-
pycontrails/models/pcr.py,sha256=
|
|
53
|
+
pycontrails/models/pcr.py,sha256=m9cLtZr2DK4omtljgWdIVzDpQAeb3hDEDVVfr6zMDtM,5900
|
|
51
54
|
pycontrails/models/emissions/__init__.py,sha256=MifzpNgS4b4NOjfh2oPYQCs_pvvkb97YvOY7jOHeYWM,122
|
|
52
55
|
pycontrails/models/emissions/ffm2.py,sha256=n08PnKM9DigYXMwPmA2GTNi6UGeLxC_dNAwank6AeCs,11943
|
|
53
|
-
pycontrails/models/emissions/emissions.py,sha256=
|
|
56
|
+
pycontrails/models/emissions/emissions.py,sha256=VW7ZPWmeWfmIsEgcQ88-A08YlmdBTpKXaFXWEoyjm-8,44629
|
|
54
57
|
pycontrails/models/emissions/black_carbon.py,sha256=EDU5yMTuPeWQIeUE3YDkZ6HHFii8ngfi67Svt3AOVH4,20122
|
|
55
58
|
pycontrails/models/emissions/static/edb-gaseous-v28c-engines.csv,sha256=9mok7P9NQSNJnej_gna29pTbgBuZsfI9N5OOoj1S4WI,118901
|
|
56
59
|
pycontrails/models/emissions/static/edb-nvpm-v28c-engines.csv,sha256=otZ3PWXcbu7ZuEgZ3v3bLB0CGjGRAacd69CGFUXAdSU,63472
|
|
57
60
|
pycontrails/models/cocip/radiative_forcing.py,sha256=ReLufq2BWw_Vot18MIBkTkaOqNXrbGyGcoZnAwO0NOg,28853
|
|
58
|
-
pycontrails/models/cocip/wind_shear.py,sha256=
|
|
61
|
+
pycontrails/models/cocip/wind_shear.py,sha256=p4QVwqcpqCP4Pf8rAHPhU_rPM6LlmuWy_fSpOwdIi5w,3727
|
|
59
62
|
pycontrails/models/cocip/cocip.py,sha256=PDnMfZZ7FXqd5r-WWtQCZurD_FyLIvcY2qBELw0YXZE,86552
|
|
60
63
|
pycontrails/models/cocip/__init__.py,sha256=vBicDVNyw-M3bglx1iVplxm6CQRPRk5SS-3_VgL7WQM,370
|
|
61
64
|
pycontrails/models/cocip/cocip_params.py,sha256=0624P6cVc2vBeD8-2S3lMnfZtKkdOaycGhscgyp_nYo,9098
|
|
@@ -70,9 +73,9 @@ pycontrails/models/cocipgrid/cocip_grid_params.py,sha256=fe7w2bw-wQ-PG8ua5K7nBb1
|
|
|
70
73
|
pycontrails/models/cocipgrid/__init__.py,sha256=ar6bF_8Pusbb-myujz_q5ntFylQTNH8yiM8fxP7Zk30,262
|
|
71
74
|
pycontrails/models/cocipgrid/cocip_time_handling.py,sha256=kXO8ePbmjlqZgdV6FMxqA7IAWXUQtVQDRU8RJ12ClWU,13826
|
|
72
75
|
pycontrails/models/cocipgrid/cocip_grid.py,sha256=RCtYk1I49qNgALzLaNlI6EoJaAX4JMmXr_pDYUYJhy4,84548
|
|
73
|
-
pycontrails/physics/geo.py,sha256
|
|
76
|
+
pycontrails/physics/geo.py,sha256=-PoXkcdRJ-KR_a7YdZN15q-b5DnGuSuYboG8ATzqFOM,25121
|
|
74
77
|
pycontrails/physics/units.py,sha256=MV2C3qDV7Qf9Bk-ri_crqNSY-qSZj8MPdelNNu--crM,11349
|
|
75
78
|
pycontrails/physics/constants.py,sha256=GJ_M9W7N78osXopNIfRDcHuqcaINLLAhOpOHQBsaI3I,2955
|
|
76
79
|
pycontrails/physics/__init__.py,sha256=_1eWbEy6evEWdfJCEkwDiSdpiDNzNWEPVqaPekHyhwU,44
|
|
77
80
|
pycontrails/physics/thermo.py,sha256=AT5AcAsjpxL5xvAH7Lbjphmo54ynP9EmCxL9QOE0Kvg,12811
|
|
78
|
-
pycontrails/physics/jet.py,sha256=
|
|
81
|
+
pycontrails/physics/jet.py,sha256=eEoBZ9dei1YeG8g_TDVPsd9BsISqJQ2XQB6xGmd0nXY,22073
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|