pycontrails 0.58.0__cp314-cp314-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.

Files changed (122) hide show
  1. pycontrails/__init__.py +70 -0
  2. pycontrails/_version.py +34 -0
  3. pycontrails/core/__init__.py +30 -0
  4. pycontrails/core/aircraft_performance.py +679 -0
  5. pycontrails/core/airports.py +228 -0
  6. pycontrails/core/cache.py +889 -0
  7. pycontrails/core/coordinates.py +174 -0
  8. pycontrails/core/fleet.py +483 -0
  9. pycontrails/core/flight.py +2185 -0
  10. pycontrails/core/flightplan.py +228 -0
  11. pycontrails/core/fuel.py +140 -0
  12. pycontrails/core/interpolation.py +702 -0
  13. pycontrails/core/met.py +2931 -0
  14. pycontrails/core/met_var.py +387 -0
  15. pycontrails/core/models.py +1321 -0
  16. pycontrails/core/polygon.py +549 -0
  17. pycontrails/core/rgi_cython.cp314-win_amd64.pyd +0 -0
  18. pycontrails/core/vector.py +2249 -0
  19. pycontrails/datalib/__init__.py +12 -0
  20. pycontrails/datalib/_met_utils/metsource.py +746 -0
  21. pycontrails/datalib/ecmwf/__init__.py +73 -0
  22. pycontrails/datalib/ecmwf/arco_era5.py +345 -0
  23. pycontrails/datalib/ecmwf/common.py +114 -0
  24. pycontrails/datalib/ecmwf/era5.py +554 -0
  25. pycontrails/datalib/ecmwf/era5_model_level.py +490 -0
  26. pycontrails/datalib/ecmwf/hres.py +804 -0
  27. pycontrails/datalib/ecmwf/hres_model_level.py +466 -0
  28. pycontrails/datalib/ecmwf/ifs.py +287 -0
  29. pycontrails/datalib/ecmwf/model_levels.py +435 -0
  30. pycontrails/datalib/ecmwf/static/model_level_dataframe_v20240418.csv +139 -0
  31. pycontrails/datalib/ecmwf/variables.py +268 -0
  32. pycontrails/datalib/geo_utils.py +261 -0
  33. pycontrails/datalib/gfs/__init__.py +28 -0
  34. pycontrails/datalib/gfs/gfs.py +656 -0
  35. pycontrails/datalib/gfs/variables.py +104 -0
  36. pycontrails/datalib/goes.py +757 -0
  37. pycontrails/datalib/himawari/__init__.py +27 -0
  38. pycontrails/datalib/himawari/header_struct.py +266 -0
  39. pycontrails/datalib/himawari/himawari.py +667 -0
  40. pycontrails/datalib/landsat.py +589 -0
  41. pycontrails/datalib/leo_utils/__init__.py +5 -0
  42. pycontrails/datalib/leo_utils/correction.py +266 -0
  43. pycontrails/datalib/leo_utils/landsat_metadata.py +300 -0
  44. pycontrails/datalib/leo_utils/search.py +250 -0
  45. pycontrails/datalib/leo_utils/sentinel_metadata.py +748 -0
  46. pycontrails/datalib/leo_utils/static/bq_roi_query.sql +6 -0
  47. pycontrails/datalib/leo_utils/vis.py +59 -0
  48. pycontrails/datalib/sentinel.py +650 -0
  49. pycontrails/datalib/spire/__init__.py +5 -0
  50. pycontrails/datalib/spire/exceptions.py +62 -0
  51. pycontrails/datalib/spire/spire.py +604 -0
  52. pycontrails/ext/bada.py +42 -0
  53. pycontrails/ext/cirium.py +14 -0
  54. pycontrails/ext/empirical_grid.py +140 -0
  55. pycontrails/ext/synthetic_flight.py +431 -0
  56. pycontrails/models/__init__.py +1 -0
  57. pycontrails/models/accf.py +425 -0
  58. pycontrails/models/apcemm/__init__.py +8 -0
  59. pycontrails/models/apcemm/apcemm.py +983 -0
  60. pycontrails/models/apcemm/inputs.py +226 -0
  61. pycontrails/models/apcemm/static/apcemm_yaml_template.yaml +183 -0
  62. pycontrails/models/apcemm/utils.py +437 -0
  63. pycontrails/models/cocip/__init__.py +29 -0
  64. pycontrails/models/cocip/cocip.py +2742 -0
  65. pycontrails/models/cocip/cocip_params.py +305 -0
  66. pycontrails/models/cocip/cocip_uncertainty.py +291 -0
  67. pycontrails/models/cocip/contrail_properties.py +1530 -0
  68. pycontrails/models/cocip/output_formats.py +2270 -0
  69. pycontrails/models/cocip/radiative_forcing.py +1260 -0
  70. pycontrails/models/cocip/radiative_heating.py +520 -0
  71. pycontrails/models/cocip/unterstrasser_wake_vortex.py +508 -0
  72. pycontrails/models/cocip/wake_vortex.py +396 -0
  73. pycontrails/models/cocip/wind_shear.py +120 -0
  74. pycontrails/models/cocipgrid/__init__.py +9 -0
  75. pycontrails/models/cocipgrid/cocip_grid.py +2552 -0
  76. pycontrails/models/cocipgrid/cocip_grid_params.py +138 -0
  77. pycontrails/models/dry_advection.py +602 -0
  78. pycontrails/models/emissions/__init__.py +21 -0
  79. pycontrails/models/emissions/black_carbon.py +599 -0
  80. pycontrails/models/emissions/emissions.py +1353 -0
  81. pycontrails/models/emissions/ffm2.py +336 -0
  82. pycontrails/models/emissions/static/default-engine-uids.csv +239 -0
  83. pycontrails/models/emissions/static/edb-gaseous-v29b-engines.csv +596 -0
  84. pycontrails/models/emissions/static/edb-nvpm-v29b-engines.csv +215 -0
  85. pycontrails/models/extended_k15.py +1327 -0
  86. pycontrails/models/humidity_scaling/__init__.py +37 -0
  87. pycontrails/models/humidity_scaling/humidity_scaling.py +1075 -0
  88. pycontrails/models/humidity_scaling/quantiles/era5-model-level-quantiles.pq +0 -0
  89. pycontrails/models/humidity_scaling/quantiles/era5-pressure-level-quantiles.pq +0 -0
  90. pycontrails/models/issr.py +210 -0
  91. pycontrails/models/pcc.py +326 -0
  92. pycontrails/models/pcr.py +154 -0
  93. pycontrails/models/ps_model/__init__.py +18 -0
  94. pycontrails/models/ps_model/ps_aircraft_params.py +381 -0
  95. pycontrails/models/ps_model/ps_grid.py +701 -0
  96. pycontrails/models/ps_model/ps_model.py +1000 -0
  97. pycontrails/models/ps_model/ps_operational_limits.py +525 -0
  98. pycontrails/models/ps_model/static/ps-aircraft-params-20250328.csv +69 -0
  99. pycontrails/models/ps_model/static/ps-synonym-list-20250328.csv +104 -0
  100. pycontrails/models/sac.py +442 -0
  101. pycontrails/models/tau_cirrus.py +183 -0
  102. pycontrails/physics/__init__.py +1 -0
  103. pycontrails/physics/constants.py +117 -0
  104. pycontrails/physics/geo.py +1138 -0
  105. pycontrails/physics/jet.py +968 -0
  106. pycontrails/physics/static/iata-cargo-load-factors-20250221.csv +74 -0
  107. pycontrails/physics/static/iata-passenger-load-factors-20250221.csv +74 -0
  108. pycontrails/physics/thermo.py +551 -0
  109. pycontrails/physics/units.py +472 -0
  110. pycontrails/py.typed +0 -0
  111. pycontrails/utils/__init__.py +1 -0
  112. pycontrails/utils/dependencies.py +66 -0
  113. pycontrails/utils/iteration.py +13 -0
  114. pycontrails/utils/json.py +187 -0
  115. pycontrails/utils/temp.py +50 -0
  116. pycontrails/utils/types.py +163 -0
  117. pycontrails-0.58.0.dist-info/METADATA +180 -0
  118. pycontrails-0.58.0.dist-info/RECORD +122 -0
  119. pycontrails-0.58.0.dist-info/WHEEL +5 -0
  120. pycontrails-0.58.0.dist-info/licenses/LICENSE +178 -0
  121. pycontrails-0.58.0.dist-info/licenses/NOTICE +43 -0
  122. pycontrails-0.58.0.dist-info/top_level.txt +3 -0
@@ -0,0 +1,138 @@
1
+ """Default :class:`CocipGrid` parameters."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import dataclasses
6
+
7
+ from pycontrails.core.aircraft_performance import AircraftPerformanceGrid
8
+ from pycontrails.core.fuel import Fuel, JetA
9
+ from pycontrails.models.cocip.cocip_params import CocipParams
10
+
11
+
12
+ @dataclasses.dataclass
13
+ class CocipGridParams(CocipParams):
14
+ """Default parameters for :class:`CocipGrid`."""
15
+
16
+ # ---------
17
+ # Algorithm
18
+ # ---------
19
+
20
+ #: Approximate size of a typical :class:`numpy.ndarray` used with in CoCiP calculations.
21
+ #: The 4-dimensional array defining the waypoint is raveled and split into
22
+ #: batches of this size.
23
+ #: A smaller number for this parameter will reduce memory footprint at the
24
+ #: expense of a longer compute time.
25
+ target_split_size: int = 100_000
26
+
27
+ #: Additional boost to target split size before SAC is computed. For typical meshes, only
28
+ #: 10% of waypoints will survive SAC and initial downwash filtering. Accordingly, this parameter
29
+ #: magnifies mesh split size before SAC is computed. See :attr:`target_split_size`.
30
+ target_split_size_pre_SAC_boost: float = 3.0
31
+
32
+ #: Display ``tqdm`` progress bar showing batch evaluation progress.
33
+ show_progress: bool = True
34
+
35
+ # ------------------
36
+ # Simulated Aircraft
37
+ # ------------------
38
+
39
+ #: Nominal segment length to place at each grid point [:math:`m`]. Round-off error
40
+ #: can be problematic with a small nominal segment length and a large
41
+ #: :attr:`dt_integration` parameter. On the other hand,
42
+ #: too large of a nominal segment length diminishes the "locality" of the grid point.
43
+ #:
44
+ #: .. versionadded:: 0.32.2
45
+ #:
46
+ #: EXPERIMENTAL: If None, run CoCiP in "segment-free"
47
+ #: mode. This mode does not include any terms involving segments (wind shear,
48
+ #: segment length, any derived terms). See :attr:`azimuth`
49
+ #: and :attr:`dsn_dz_factor` for more details.
50
+ segment_length: float | None = 1000.0
51
+
52
+ #: Fuel type
53
+ fuel: Fuel = dataclasses.field(default_factory=JetA)
54
+
55
+ #: ICAO code designating simulated aircraft type. Needed for the
56
+ #: :attr:`aircraft_performance` and :class:`Emissions` models.
57
+ aircraft_type: str = "B737"
58
+
59
+ #: Engine unique identification number for the ICAO Aircraft Emissions Databank (EDB)
60
+ #: If None, an assumed engine_uid is used in :class:`Emissions`.
61
+ engine_uid: str | None = None
62
+
63
+ #: Navigation bearing [:math:`\deg`] measured in clockwise direction from
64
+ #: true north, by default 0.0.
65
+ #:
66
+ #: .. versionadded:: 0.32.2
67
+ #:
68
+ #: EXPERIMENTAL: If None, run CoCiP in "segment-free"
69
+ #: mode. This mode does not include any terms involving segments (wind shear,
70
+ #: segment_length, any derived terms), unless :attr:`dsn_dz_factor`
71
+ #: is non-zero.
72
+ azimuth: float | None = 0.0
73
+
74
+ #: Experimental parameter used to approximate ``dsn_dz`` from ``ds_dz`` via
75
+ #: ``dsn_dz = ds_dz * dsn_dz_factor``.
76
+ #: A value of 0.0 disables any normal wind shear effects.
77
+ #: An initial unpublished experiment suggests that
78
+ #: ``dsn_dz_factor = 0.665`` adequately approximates the mean EF predictions
79
+ #: of :class:`CocipGrid` over all azimuths.
80
+ #:
81
+ #: .. versionadded:: 0.32.2
82
+ dsn_dz_factor: float = 0.0
83
+
84
+ #: --------------------
85
+ #: Aircraft Performance
86
+ #: --------------------
87
+
88
+ #: Aircraft wingspan, [:math:`m`]. If included in :attr:`CocipGrid.source`,
89
+ #: this parameter is unused. Otherwise, if this parameter is None, the
90
+ #: :attr:`aircraft_performance` model is used to estimate the wingspan.
91
+ wingspan: float | None = None
92
+
93
+ #: Nominal aircraft mass, [:math:`kg`]. If included in :attr:`CocipGrid.source`,
94
+ #: this parameter is unused. Otherwise, if this parameter is None, the
95
+ #: :attr:`aircraft_performance` model is used to estimate the aircraft mass.
96
+ aircraft_mass: float | None = None
97
+
98
+ #: Cruising true airspeed, [:math:`m \ s^{-1}`]. If included in :attr:`CocipGrid.source`,
99
+ #: this parameter is unused. Otherwise, if this parameter is None, the
100
+ #: :attr:`aircraft_performance` model is used to estimate the true airspeed.
101
+ true_airspeed: float | None = None
102
+
103
+ #: Nominal engine efficiency, [:math:`0 - 1`]. If included in :attr:`CocipGrid.source`,
104
+ #: this parameter is unused. Otherwise, if this parameter is None, the
105
+ #: :attr:`aircraft_performance` model is used to estimate the engine efficiency.
106
+ engine_efficiency: float | None = None
107
+
108
+ #: Nominal fuel flow, [:math:`kg \ s^{-1}`]. If included in :attr:`CocipGrid.source`,
109
+ #: this parameter is unused. Otherwise, if this parameter is None, the
110
+ #: :attr:`aircraft_performance` model is used to estimate the fuel flow.
111
+ fuel_flow: float | None = None
112
+
113
+ #: Aircraft performance model. Required unless ``source`` or ``params``
114
+ #: provide all of the following variables:
115
+ #:
116
+ #: - wingspan
117
+ #: - true_airspeed (or mach_number)
118
+ #: - fuel_flow
119
+ #: - engine_efficiency
120
+ #: - aircraft_mass
121
+ #:
122
+ #: If None and :attr:`CocipGrid.source` or :class:`CocipGridParams` do not provide
123
+ #: the above variables, a ValueError is raised. See :class:`PSGrid` for an open-source
124
+ #: implementation of a :class:`AircraftPerformanceGrid` model.
125
+ aircraft_performance: AircraftPerformanceGrid | None = None
126
+
127
+ # ------------
128
+ # Model output
129
+ # ------------
130
+
131
+ #: Attach additional formation specific data to the output. If True, attach
132
+ #: all possible formation data. See :mod:`pycontrails.models.cocipgrid.cocip_grid`
133
+ #: for a list of supported formation data.
134
+ verbose_outputs_formation: bool | set[str] = False
135
+
136
+ #: Attach contrail evolution data to :attr:`CocipGrid.contrail_list`. Requires
137
+ #: substantial memory overhead.
138
+ verbose_outputs_evolution: bool = False