pycontrails 0.53.0__cp312-cp312-win_amd64.whl → 0.54.0__cp312-cp312-win_amd64.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/flight.py +3 -1
- pycontrails/core/rgi_cython.cp312-win_amd64.pyd +0 -0
- pycontrails/core/vector.py +0 -1
- pycontrails/datalib/_met_utils/metsource.py +8 -5
- pycontrails/datalib/ecmwf/__init__.py +22 -2
- pycontrails/datalib/ecmwf/arco_era5.py +118 -305
- pycontrails/datalib/ecmwf/common.py +1 -1
- pycontrails/datalib/ecmwf/era5.py +21 -9
- pycontrails/datalib/ecmwf/era5_model_level.py +126 -121
- pycontrails/datalib/ecmwf/hres_model_level.py +38 -74
- pycontrails/datalib/ecmwf/model_levels.py +399 -44
- pycontrails/datalib/ecmwf/variables.py +11 -0
- pycontrails/datalib/landsat.py +3 -2
- pycontrails/datalib/sentinel.py +0 -1
- pycontrails/ext/synthetic_flight.py +5 -1
- pycontrails/models/apcemm/apcemm.py +0 -1
- pycontrails/models/cocip/cocip.py +0 -1
- pycontrails/models/cocipgrid/cocip_grid.py +4 -4
- pycontrails/models/dry_advection.py +11 -3
- pycontrails/models/issr.py +2 -2
- {pycontrails-0.53.0.dist-info → pycontrails-0.54.0.dist-info}/METADATA +2 -4
- {pycontrails-0.53.0.dist-info → pycontrails-0.54.0.dist-info}/RECORD +27 -27
- {pycontrails-0.53.0.dist-info → pycontrails-0.54.0.dist-info}/WHEEL +1 -1
- {pycontrails-0.53.0.dist-info → pycontrails-0.54.0.dist-info}/LICENSE +0 -0
- {pycontrails-0.53.0.dist-info → pycontrails-0.54.0.dist-info}/NOTICE +0 -0
- {pycontrails-0.53.0.dist-info → pycontrails-0.54.0.dist-info}/top_level.txt +0 -0
pycontrails/_version.py
CHANGED
pycontrails/core/flight.py
CHANGED
|
@@ -1151,7 +1151,9 @@ class Flight(GeoVectorDataset):
|
|
|
1151
1151
|
out.data.pop("level", None) # avoid any ambiguity
|
|
1152
1152
|
return out
|
|
1153
1153
|
|
|
1154
|
-
def distance_to_coords(
|
|
1154
|
+
def distance_to_coords(
|
|
1155
|
+
self: Flight, distance: ArrayOrFloat
|
|
1156
|
+
) -> tuple[
|
|
1155
1157
|
ArrayOrFloat,
|
|
1156
1158
|
ArrayOrFloat,
|
|
1157
1159
|
np.intp | npt.NDArray[np.intp],
|
|
Binary file
|
pycontrails/core/vector.py
CHANGED
|
@@ -1073,7 +1073,6 @@ class VectorDataset:
|
|
|
1073
1073
|
|
|
1074
1074
|
# Convert numpy objects to python objects
|
|
1075
1075
|
if isinstance(obj, np.ndarray | np.generic):
|
|
1076
|
-
|
|
1077
1076
|
# round time to unix seconds
|
|
1078
1077
|
if key == "time":
|
|
1079
1078
|
return np_encoder.default(obj.astype("datetime64[s]").astype(int))
|
|
@@ -79,12 +79,12 @@ def parse_timesteps(time: TimeInput | None, freq: str | None = "1h") -> list[dat
|
|
|
79
79
|
elif len(time) == 1:
|
|
80
80
|
time = (time[0], time[0])
|
|
81
81
|
elif len(time) != 2:
|
|
82
|
-
msg = f"Input time bounds must have length
|
|
82
|
+
msg = f"Input time bounds must have length 1 or 2, got {len(time)}"
|
|
83
83
|
raise ValueError(msg)
|
|
84
84
|
|
|
85
85
|
# convert all to pandas Timestamp
|
|
86
86
|
try:
|
|
87
|
-
|
|
87
|
+
t0, t1 = (pd.to_datetime(t) for t in time)
|
|
88
88
|
except ValueError as e:
|
|
89
89
|
msg = (
|
|
90
90
|
f"Failed to parse time input {time}. "
|
|
@@ -93,10 +93,13 @@ def parse_timesteps(time: TimeInput | None, freq: str | None = "1h") -> list[dat
|
|
|
93
93
|
raise ValueError(msg) from e
|
|
94
94
|
|
|
95
95
|
if freq is None:
|
|
96
|
-
daterange = pd.DatetimeIndex([
|
|
96
|
+
daterange = pd.DatetimeIndex([t0, t1])
|
|
97
97
|
else:
|
|
98
98
|
# get date range that encompasses all whole hours
|
|
99
|
-
daterange = pd.date_range(
|
|
99
|
+
daterange = pd.date_range(t0.floor(freq), t1.ceil(freq), freq=freq)
|
|
100
|
+
if len(daterange) == 0:
|
|
101
|
+
msg = f"Time range {t0} to {t1} with freq {freq} has no valid time steps."
|
|
102
|
+
raise ValueError(msg)
|
|
100
103
|
|
|
101
104
|
# return list of datetimes
|
|
102
105
|
return daterange.to_pydatetime().tolist()
|
|
@@ -638,7 +641,7 @@ class MetDataSource(abc.ABC):
|
|
|
638
641
|
|
|
639
642
|
- chunks: {"time": 1}
|
|
640
643
|
- engine: "netcdf4"
|
|
641
|
-
- parallel:
|
|
644
|
+
- parallel: False
|
|
642
645
|
|
|
643
646
|
Returns
|
|
644
647
|
-------
|
|
@@ -2,12 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from pycontrails.datalib.ecmwf.arco_era5 import
|
|
5
|
+
from pycontrails.datalib.ecmwf.arco_era5 import (
|
|
6
|
+
ARCOERA5,
|
|
7
|
+
open_arco_era5_model_level_data,
|
|
8
|
+
open_arco_era5_single_level,
|
|
9
|
+
)
|
|
10
|
+
from pycontrails.datalib.ecmwf.common import CDSCredentialsNotFound
|
|
6
11
|
from pycontrails.datalib.ecmwf.era5 import ERA5
|
|
7
12
|
from pycontrails.datalib.ecmwf.era5_model_level import ERA5ModelLevel
|
|
8
13
|
from pycontrails.datalib.ecmwf.hres import HRES
|
|
9
14
|
from pycontrails.datalib.ecmwf.hres_model_level import HRESModelLevel
|
|
10
15
|
from pycontrails.datalib.ecmwf.ifs import IFS
|
|
16
|
+
from pycontrails.datalib.ecmwf.model_levels import (
|
|
17
|
+
MODEL_LEVELS_PATH,
|
|
18
|
+
ml_to_pl,
|
|
19
|
+
model_level_pressure,
|
|
20
|
+
model_level_reference_pressure,
|
|
21
|
+
)
|
|
11
22
|
from pycontrails.datalib.ecmwf.variables import (
|
|
12
23
|
ECMWF_VARIABLES,
|
|
13
24
|
MODEL_LEVEL_VARIABLES,
|
|
@@ -16,6 +27,7 @@ from pycontrails.datalib.ecmwf.variables import (
|
|
|
16
27
|
CloudAreaFraction,
|
|
17
28
|
CloudAreaFractionInLayer,
|
|
18
29
|
Divergence,
|
|
30
|
+
OzoneMassMixingRatio,
|
|
19
31
|
PotentialVorticity,
|
|
20
32
|
RelativeHumidity,
|
|
21
33
|
RelativeVorticity,
|
|
@@ -29,14 +41,21 @@ from pycontrails.datalib.ecmwf.variables import (
|
|
|
29
41
|
|
|
30
42
|
__all__ = [
|
|
31
43
|
"ARCOERA5",
|
|
44
|
+
"CDSCredentialsNotFound",
|
|
32
45
|
"ERA5",
|
|
33
46
|
"ERA5ModelLevel",
|
|
34
47
|
"HRES",
|
|
35
48
|
"HRESModelLevel",
|
|
36
49
|
"IFS",
|
|
50
|
+
"model_level_reference_pressure",
|
|
51
|
+
"model_level_pressure",
|
|
52
|
+
"ml_to_pl",
|
|
53
|
+
"open_arco_era5_model_level_data",
|
|
54
|
+
"open_arco_era5_single_level",
|
|
37
55
|
"CloudAreaFraction",
|
|
38
56
|
"CloudAreaFractionInLayer",
|
|
39
57
|
"Divergence",
|
|
58
|
+
"OzoneMassMixingRatio",
|
|
40
59
|
"PotentialVorticity",
|
|
41
60
|
"RelativeHumidity",
|
|
42
61
|
"RelativeVorticity",
|
|
@@ -47,7 +66,8 @@ __all__ = [
|
|
|
47
66
|
"TopNetSolarRadiation",
|
|
48
67
|
"TopNetThermalRadiation",
|
|
49
68
|
"ECMWF_VARIABLES",
|
|
69
|
+
"MODEL_LEVELS_PATH",
|
|
70
|
+
"MODEL_LEVEL_VARIABLES",
|
|
50
71
|
"PRESSURE_LEVEL_VARIABLES",
|
|
51
72
|
"SURFACE_VARIABLES",
|
|
52
|
-
"MODEL_LEVEL_VARIABLES",
|
|
53
73
|
]
|