pycontrails 0.54.9__cp313-cp313-macosx_11_0_arm64.whl → 0.54.10__cp313-cp313-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/models.py +5 -5
- pycontrails/core/rgi_cython.cpython-313-darwin.so +0 -0
- pycontrails/datalib/goes.py +47 -7
- pycontrails/models/dry_advection.py +9 -0
- {pycontrails-0.54.9.dist-info → pycontrails-0.54.10.dist-info}/METADATA +1 -1
- {pycontrails-0.54.9.dist-info → pycontrails-0.54.10.dist-info}/RECORD +11 -11
- {pycontrails-0.54.9.dist-info → pycontrails-0.54.10.dist-info}/WHEEL +1 -1
- {pycontrails-0.54.9.dist-info → pycontrails-0.54.10.dist-info}/licenses/LICENSE +0 -0
- {pycontrails-0.54.9.dist-info → pycontrails-0.54.10.dist-info}/licenses/NOTICE +0 -0
- {pycontrails-0.54.9.dist-info → pycontrails-0.54.10.dist-info}/top_level.txt +0 -0
pycontrails/_version.py
CHANGED
pycontrails/core/models.py
CHANGED
|
@@ -543,7 +543,7 @@ class Model(ABC):
|
|
|
543
543
|
|
|
544
544
|
See Also
|
|
545
545
|
--------
|
|
546
|
-
|
|
546
|
+
eval
|
|
547
547
|
"""
|
|
548
548
|
self.source = self._get_source(source)
|
|
549
549
|
|
|
@@ -744,8 +744,8 @@ class Model(ABC):
|
|
|
744
744
|
|
|
745
745
|
See Also
|
|
746
746
|
--------
|
|
747
|
-
|
|
748
|
-
|
|
747
|
+
get_source_param
|
|
748
|
+
pycontrails.core.vector.GeoVectorDataset.get_data_or_attr
|
|
749
749
|
"""
|
|
750
750
|
marker = self.__marker
|
|
751
751
|
|
|
@@ -805,8 +805,8 @@ class Model(ABC):
|
|
|
805
805
|
|
|
806
806
|
See Also
|
|
807
807
|
--------
|
|
808
|
-
|
|
809
|
-
|
|
808
|
+
get_data_param
|
|
809
|
+
pycontrails.core.vector.GeoVectorDataset.get_data_or_attr
|
|
810
810
|
"""
|
|
811
811
|
return self.get_data_param(self.source, key, default, set_attr=set_attr)
|
|
812
812
|
|
|
Binary file
|
pycontrails/datalib/goes.py
CHANGED
|
@@ -59,6 +59,22 @@ DEFAULT_CHANNELS = "C11", "C14", "C15"
|
|
|
59
59
|
#: See `GOES ABI scan information <https://www.goes-r.gov/users/abiScanModeInfo.html>`_.
|
|
60
60
|
GOES_SCAN_MODE_CHANGE = datetime.datetime(2019, 4, 2, 16)
|
|
61
61
|
|
|
62
|
+
#: The date at which GOES-19 data started being available. This is used to
|
|
63
|
+
#: determine the source (GOES-16 or GOES-19) of requested. In particular,
|
|
64
|
+
#: Mesoscale images are only available for GOES-East from GOES-19 after this date.
|
|
65
|
+
#: See the `NOAA press release <https://www.noaa.gov/news-release/noaas-goes-19-satellite-now-operational-providing-critical-new-data-to-forecasters>`_.
|
|
66
|
+
GOES_16_19_SWITCH_DATE = datetime.datetime(2025, 4, 4)
|
|
67
|
+
|
|
68
|
+
#: The GCS bucket for GOES-East data before ``GOES_16_19_SWITCH_DATE``.
|
|
69
|
+
GOES_16_BUCKET = "gcp-public-data-goes-16"
|
|
70
|
+
|
|
71
|
+
#: The GCS bucket for GOES-West data. Note that GOES-17 has degraded data quality
|
|
72
|
+
#: and is not recommended for use. This bucket isn't used by the ``GOES`` handler by default.
|
|
73
|
+
GOES_18_BUCKET = "gcp-public-data-goes-18"
|
|
74
|
+
|
|
75
|
+
#: The GCS bucket for GOES-East data after ``GOES_16_19_SWITCH_DATE``.
|
|
76
|
+
GOES_19_BUCKET = "gcp-public-data-goes-19"
|
|
77
|
+
|
|
62
78
|
|
|
63
79
|
class GOESRegion(enum.Enum):
|
|
64
80
|
"""GOES Region of interest.
|
|
@@ -187,7 +203,7 @@ def gcs_goes_path(
|
|
|
187
203
|
time: datetime.datetime,
|
|
188
204
|
region: GOESRegion,
|
|
189
205
|
channels: str | Iterable[str] | None = None,
|
|
190
|
-
bucket: str =
|
|
206
|
+
bucket: str | None = None,
|
|
191
207
|
fs: gcsfs.GCSFileSystem | None = None,
|
|
192
208
|
) -> list[str]:
|
|
193
209
|
"""Return GCS paths to GOES data at the given time for the given region and channels.
|
|
@@ -208,6 +224,12 @@ def gcs_goes_path(
|
|
|
208
224
|
set ``channels=("C11", "C14", "C15")``. For the true color scheme,
|
|
209
225
|
set ``channels=("C01", "C02", "C03")``. By default, the channels
|
|
210
226
|
required by the SEVIRI ash color scheme are used.
|
|
227
|
+
bucket : str | None
|
|
228
|
+
GCS bucket for GOES data. If None, the bucket is automatically
|
|
229
|
+
set to ``GOES_16_BUCKET`` if ``time`` is before
|
|
230
|
+
``GOES_16_19_SWITCH_DATE`` and ``GOES_19_BUCKET`` otherwise.
|
|
231
|
+
fs : gcsfs.GCSFileSystem | None
|
|
232
|
+
GCS file system instance. If None, a default anonymous instance is created.
|
|
211
233
|
|
|
212
234
|
Returns
|
|
213
235
|
-------
|
|
@@ -236,6 +258,11 @@ def gcs_goes_path(
|
|
|
236
258
|
>>> pprint(paths)
|
|
237
259
|
['gcp-public-data-goes-16/ABI-L2-CMIPM/2023/093/02/OR_ABI-L2-CMIPM1-M6C01_G16_s20230930211249_e20230930211309_c20230930211386.nc']
|
|
238
260
|
|
|
261
|
+
>>> t = datetime.datetime(2025, 5, 4, 3, 2)
|
|
262
|
+
>>> paths = gcs_goes_path(t, GOESRegion.M2, channels="C01")
|
|
263
|
+
>>> pprint(paths)
|
|
264
|
+
['gcp-public-data-goes-19/ABI-L2-CMIPM/2025/124/03/OR_ABI-L2-CMIPM2-M6C01_G19_s20251240302557_e20251240303014_c20251240303092.nc']
|
|
265
|
+
|
|
239
266
|
"""
|
|
240
267
|
time = _check_time_resolution(time, region)
|
|
241
268
|
year = time.strftime("%Y")
|
|
@@ -247,7 +274,10 @@ def gcs_goes_path(
|
|
|
247
274
|
product_name = "CMIP" # Cloud and Moisture Imagery
|
|
248
275
|
product = f"{sensor}-{level}-{product_name}{region.name[0]}"
|
|
249
276
|
|
|
250
|
-
bucket
|
|
277
|
+
if bucket is None:
|
|
278
|
+
bucket = GOES_16_BUCKET if time < GOES_16_19_SWITCH_DATE else GOES_19_BUCKET
|
|
279
|
+
else:
|
|
280
|
+
bucket = bucket.removeprefix("gs://")
|
|
251
281
|
|
|
252
282
|
path_prefix = f"gs://{bucket}/{product}/{year}/{yday}/{hour}/"
|
|
253
283
|
|
|
@@ -267,7 +297,13 @@ def gcs_goes_path(
|
|
|
267
297
|
time_str = f"{time_str[:-1]}6"
|
|
268
298
|
|
|
269
299
|
name_prefix = f"OR_{product[:-1]}{region.name}-{mode}"
|
|
270
|
-
|
|
300
|
+
|
|
301
|
+
try:
|
|
302
|
+
satellite_number = int(bucket[-2:]) # 16 or 18 or 19 -- this may fail for custom buckets
|
|
303
|
+
except (ValueError, IndexError) as exc:
|
|
304
|
+
msg = f"Bucket name {bucket} does not end with a valid satellite number."
|
|
305
|
+
raise ValueError(msg) from exc
|
|
306
|
+
name_suffix = f"_G{satellite_number}_s{time_str}*"
|
|
271
307
|
|
|
272
308
|
channels = _parse_channels(channels)
|
|
273
309
|
|
|
@@ -323,8 +359,12 @@ class GOES:
|
|
|
323
359
|
cachestore : cache.CacheStore | None
|
|
324
360
|
Cache store for GOES data. If None, data is downloaded directly into
|
|
325
361
|
memory. By default, a :class:`cache.DiskCacheStore` is used.
|
|
326
|
-
goes_bucket : str =
|
|
327
|
-
GCP bucket for GOES data.
|
|
362
|
+
goes_bucket : str | None = None
|
|
363
|
+
GCP bucket for GOES data. If None, the bucket is automatically
|
|
364
|
+
set to ``GOES_16_BUCKET`` if the requested time is before
|
|
365
|
+
``GOES_16_19_SWITCH_DATE`` and ``GOES_19_BUCKET`` otherwise.
|
|
366
|
+
The satellite number used for filename construction is derived from the
|
|
367
|
+
last two characters of this bucket name.
|
|
328
368
|
|
|
329
369
|
See Also
|
|
330
370
|
--------
|
|
@@ -396,7 +436,7 @@ class GOES:
|
|
|
396
436
|
region: GOESRegion | str = GOESRegion.F,
|
|
397
437
|
channels: str | Iterable[str] | None = None,
|
|
398
438
|
cachestore: cache.CacheStore | None = __marker, # type: ignore[assignment]
|
|
399
|
-
goes_bucket: str =
|
|
439
|
+
goes_bucket: str | None = None,
|
|
400
440
|
) -> None:
|
|
401
441
|
self.region = _parse_region(region)
|
|
402
442
|
self.channels = _parse_channels(channels)
|
|
@@ -435,7 +475,7 @@ class GOES:
|
|
|
435
475
|
List of GCS paths to GOES data.
|
|
436
476
|
"""
|
|
437
477
|
channels = channels or self.channels
|
|
438
|
-
return gcs_goes_path(time, self.region, channels, self.goes_bucket)
|
|
478
|
+
return gcs_goes_path(time, self.region, channels, bucket=self.goes_bucket, fs=self.fs)
|
|
439
479
|
|
|
440
480
|
def _lpaths(self, time: datetime.datetime) -> dict[str, str]:
|
|
441
481
|
"""Construct names for local netcdf files using the :attr:`cachestore`.
|
|
@@ -217,6 +217,8 @@ class DryAdvection(models.Model):
|
|
|
217
217
|
- ``age``: Age of plume.
|
|
218
218
|
- ``waypoint``: Identifier for each waypoint.
|
|
219
219
|
|
|
220
|
+
If ``flight_id`` is present in :attr:`source`, it is retained.
|
|
221
|
+
|
|
220
222
|
If `"azimuth"` is present in :attr:`source`, `source.attrs`, or :attr:`params`,
|
|
221
223
|
the following variables will also be added:
|
|
222
224
|
|
|
@@ -236,6 +238,9 @@ class DryAdvection(models.Model):
|
|
|
236
238
|
self.source.setdefault("waypoint", np.arange(self.source.size))
|
|
237
239
|
|
|
238
240
|
columns = ["longitude", "latitude", "level", "time", "age", "waypoint"]
|
|
241
|
+
if "flight_id" in self.source:
|
|
242
|
+
columns.append("flight_id")
|
|
243
|
+
|
|
239
244
|
azimuth = self.get_source_param("azimuth", set_attr=False)
|
|
240
245
|
if azimuth is None:
|
|
241
246
|
# Early exit for pointwise only simulation
|
|
@@ -541,6 +546,10 @@ def _evolve_one_step(
|
|
|
541
546
|
}
|
|
542
547
|
)
|
|
543
548
|
|
|
549
|
+
flight_id = vector.get("flight_id")
|
|
550
|
+
if flight_id is not None:
|
|
551
|
+
out["flight_id"] = flight_id
|
|
552
|
+
|
|
544
553
|
azimuth = vector.get("azimuth")
|
|
545
554
|
if azimuth is None:
|
|
546
555
|
# Early exit for "pointwise only" simulation
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
pycontrails-0.54.
|
|
2
|
-
pycontrails-0.54.
|
|
3
|
-
pycontrails-0.54.
|
|
4
|
-
pycontrails-0.54.
|
|
5
|
-
pycontrails-0.54.
|
|
6
|
-
pycontrails-0.54.
|
|
7
|
-
pycontrails/_version.py,sha256=
|
|
1
|
+
pycontrails-0.54.10.dist-info/RECORD,,
|
|
2
|
+
pycontrails-0.54.10.dist-info/WHEEL,sha256=VIOxLMMkshvS_PbEukmsYu1sg_oxjW5SBJ1JnbuDdDk,136
|
|
3
|
+
pycontrails-0.54.10.dist-info/top_level.txt,sha256=Z8J1R_AiBAyCVjNw6jYLdrA68PrQqTg0t3_Yek_IZ0Q,29
|
|
4
|
+
pycontrails-0.54.10.dist-info/METADATA,sha256=6_jv8g-Jc_JE5J9qHUY3iv9S2ZrggE_4zOg-7nbtJ98,9132
|
|
5
|
+
pycontrails-0.54.10.dist-info/licenses/LICENSE,sha256=gJ-h7SFFD1mCfR6a7HILvEtodDT6Iig8bLXdgqR6ucA,10175
|
|
6
|
+
pycontrails-0.54.10.dist-info/licenses/NOTICE,sha256=fiBPdjYibMpDzf8hqcn7TvAQ-yeK10q_Nqq24DnskYg,1962
|
|
7
|
+
pycontrails/_version.py,sha256=XWNQstht0_G88RBCuMbHwa-c0eQNLQAijV1bVbgzzW8,515
|
|
8
8
|
pycontrails/__init__.py,sha256=9ypSB2fKZlKghTvSrjWo6OHm5qfASwiTIvlMew3Olu4,2037
|
|
9
9
|
pycontrails/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
pycontrails/core/vector.py,sha256=N-3VhPaUEyFSJWjplMKFcv9GLvEqAibKn1zqJWuNZQU,73601
|
|
11
|
-
pycontrails/core/models.py,sha256=
|
|
11
|
+
pycontrails/core/models.py,sha256=gpG0hnXZox5caojierunxKkgFLQt-6nHRhzQZJKNrzo,43845
|
|
12
12
|
pycontrails/core/interpolation.py,sha256=wovjj3TAf3xonVxjarclpvZLyLq6N7wZQQXsI9hT3YA,25713
|
|
13
13
|
pycontrails/core/fleet.py,sha256=0hi_N4R93St-7iD29SE0EnadpBEl_p9lSGtDwpWvGkk,16704
|
|
14
14
|
pycontrails/core/flight.py,sha256=QZTGeZVnZ14UUWHSqgCSU49g_EGQZel-hzKwm_9dcFY,80653
|
|
@@ -16,14 +16,14 @@ pycontrails/core/fuel.py,sha256=kJZ3P1lPm1L6rdPREM55XQ-VfJ_pt35cP4sO2Nnvmjs,4332
|
|
|
16
16
|
pycontrails/core/polygon.py,sha256=EmfHPj0e58whsHvR-3YvDgMWkvMFgp_BgwaoG8IZ4n0,18044
|
|
17
17
|
pycontrails/core/cache.py,sha256=IIyx726zN7JzNSKV0JJDksMI9OhCLdnJShmBVStRqzI,28154
|
|
18
18
|
pycontrails/core/__init__.py,sha256=p0O09HxdeXU0X5Z3zrHMlTfXa92YumT3fJ8wJBI5ido,856
|
|
19
|
-
pycontrails/core/rgi_cython.cpython-313-darwin.so,sha256=
|
|
19
|
+
pycontrails/core/rgi_cython.cpython-313-darwin.so,sha256=wys6Uo9rG1wwigoPqXOHGsMsMbzmi-Y-1VhxMYP2dPQ,297728
|
|
20
20
|
pycontrails/core/flightplan.py,sha256=xgyYLi36OlNKtIFuOHaifcDM6XMBYTyMQlXAtfd-6Js,7519
|
|
21
21
|
pycontrails/core/met.py,sha256=4XQAJrKWBN0SZQSeBpMUnkLn87vYpn2VMiY3dQyFRIw,103992
|
|
22
22
|
pycontrails/core/aircraft_performance.py,sha256=Kk_Rb61jDOWPmCQHwn2jR5vMPmB8b3aq1iTWfiUMj9U,28232
|
|
23
23
|
pycontrails/core/airports.py,sha256=ubYo-WvxKPd_dUcADx6yew9Tqh1a4VJDgX7aFqLYwB8,6775
|
|
24
24
|
pycontrails/core/met_var.py,sha256=lAbp3cko_rzMk_u0kq-F27sUXUxUKikUvCNycwp9ILY,12020
|
|
25
25
|
pycontrails/core/coordinates.py,sha256=0ySsHtqTon7GMbuwmmxMbI92j3ueMteJZh4xxNm5zto,5391
|
|
26
|
-
pycontrails/datalib/goes.py,sha256=
|
|
26
|
+
pycontrails/datalib/goes.py,sha256=4bKtu1l3IVsjKv7mLAWhStRzOVaY9Wi_cZxvL_g-V3w,34081
|
|
27
27
|
pycontrails/datalib/landsat.py,sha256=r6366rEF7fOA7mT5KySCPGJplgGE5LvBw5fMqk-U1oM,19697
|
|
28
28
|
pycontrails/datalib/__init__.py,sha256=hW9NWdFPC3y_2vHMteQ7GgQdop3917MkDaf5ZhU2RBY,369
|
|
29
29
|
pycontrails/datalib/sentinel.py,sha256=hYSxIlQnyJHqtHWlKn73HOK_1pm-_IbGebmkHnh4UcA,17172
|
|
@@ -64,7 +64,7 @@ pycontrails/models/__init__.py,sha256=dQTOLQb7RdUdUwslt5se__5y_ymbInBexQmNrmAeOd
|
|
|
64
64
|
pycontrails/models/issr.py,sha256=AYLYLHxtG8je5UG6x1zLV0ul89MJPqe5Xk0oWIyZ7b0,7378
|
|
65
65
|
pycontrails/models/sac.py,sha256=lV1Or0AaLxuS1Zo5V8h5c1fkSKC-hKEgiFm7bmmusWw,15946
|
|
66
66
|
pycontrails/models/accf.py,sha256=egdBa4_G3BUaoUQYWvVlTlAIWpLEuNdtCxlK3eckLOc,13599
|
|
67
|
-
pycontrails/models/dry_advection.py,sha256=
|
|
67
|
+
pycontrails/models/dry_advection.py,sha256=BlOQeap3rXKRhRlvhFfpOLIX3bFgYE_bJg2LlPRHIas,19424
|
|
68
68
|
pycontrails/models/pcr.py,sha256=ZzbEuTOuDdUmmL5T3Wk3HL-O8XzX3HMnn98WcPbASaU,5348
|
|
69
69
|
pycontrails/models/emissions/__init__.py,sha256=CZB2zIkLUI3NGNmq2ddvRYjEtiboY6PWJjiEiXj_zII,478
|
|
70
70
|
pycontrails/models/emissions/ffm2.py,sha256=mAvBHnp-p3hIn2fjKGq50eaMHi0jcb5hA5uXbJGeE9I,12068
|
|
File without changes
|
|
File without changes
|
|
File without changes
|