pycontrails 0.53.0__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.

Files changed (109) hide show
  1. pycontrails/__init__.py +70 -0
  2. pycontrails/_version.py +16 -0
  3. pycontrails/core/__init__.py +30 -0
  4. pycontrails/core/aircraft_performance.py +641 -0
  5. pycontrails/core/airports.py +226 -0
  6. pycontrails/core/cache.py +881 -0
  7. pycontrails/core/coordinates.py +174 -0
  8. pycontrails/core/fleet.py +470 -0
  9. pycontrails/core/flight.py +2312 -0
  10. pycontrails/core/flightplan.py +220 -0
  11. pycontrails/core/fuel.py +140 -0
  12. pycontrails/core/interpolation.py +721 -0
  13. pycontrails/core/met.py +2833 -0
  14. pycontrails/core/met_var.py +307 -0
  15. pycontrails/core/models.py +1181 -0
  16. pycontrails/core/polygon.py +549 -0
  17. pycontrails/core/rgi_cython.cpython-313-darwin.so +0 -0
  18. pycontrails/core/vector.py +2191 -0
  19. pycontrails/datalib/__init__.py +12 -0
  20. pycontrails/datalib/_leo_utils/search.py +250 -0
  21. pycontrails/datalib/_leo_utils/static/bq_roi_query.sql +6 -0
  22. pycontrails/datalib/_leo_utils/vis.py +59 -0
  23. pycontrails/datalib/_met_utils/metsource.py +743 -0
  24. pycontrails/datalib/ecmwf/__init__.py +53 -0
  25. pycontrails/datalib/ecmwf/arco_era5.py +527 -0
  26. pycontrails/datalib/ecmwf/common.py +109 -0
  27. pycontrails/datalib/ecmwf/era5.py +538 -0
  28. pycontrails/datalib/ecmwf/era5_model_level.py +482 -0
  29. pycontrails/datalib/ecmwf/hres.py +782 -0
  30. pycontrails/datalib/ecmwf/hres_model_level.py +495 -0
  31. pycontrails/datalib/ecmwf/ifs.py +284 -0
  32. pycontrails/datalib/ecmwf/model_levels.py +79 -0
  33. pycontrails/datalib/ecmwf/static/model_level_dataframe_v20240418.csv +139 -0
  34. pycontrails/datalib/ecmwf/variables.py +256 -0
  35. pycontrails/datalib/gfs/__init__.py +28 -0
  36. pycontrails/datalib/gfs/gfs.py +646 -0
  37. pycontrails/datalib/gfs/variables.py +100 -0
  38. pycontrails/datalib/goes.py +772 -0
  39. pycontrails/datalib/landsat.py +568 -0
  40. pycontrails/datalib/sentinel.py +512 -0
  41. pycontrails/datalib/spire.py +739 -0
  42. pycontrails/ext/bada.py +41 -0
  43. pycontrails/ext/cirium.py +14 -0
  44. pycontrails/ext/empirical_grid.py +140 -0
  45. pycontrails/ext/synthetic_flight.py +426 -0
  46. pycontrails/models/__init__.py +1 -0
  47. pycontrails/models/accf.py +406 -0
  48. pycontrails/models/apcemm/__init__.py +8 -0
  49. pycontrails/models/apcemm/apcemm.py +983 -0
  50. pycontrails/models/apcemm/inputs.py +226 -0
  51. pycontrails/models/apcemm/static/apcemm_yaml_template.yaml +183 -0
  52. pycontrails/models/apcemm/utils.py +437 -0
  53. pycontrails/models/cocip/__init__.py +29 -0
  54. pycontrails/models/cocip/cocip.py +2617 -0
  55. pycontrails/models/cocip/cocip_params.py +299 -0
  56. pycontrails/models/cocip/cocip_uncertainty.py +285 -0
  57. pycontrails/models/cocip/contrail_properties.py +1517 -0
  58. pycontrails/models/cocip/output_formats.py +2261 -0
  59. pycontrails/models/cocip/radiative_forcing.py +1262 -0
  60. pycontrails/models/cocip/radiative_heating.py +520 -0
  61. pycontrails/models/cocip/unterstrasser_wake_vortex.py +403 -0
  62. pycontrails/models/cocip/wake_vortex.py +396 -0
  63. pycontrails/models/cocip/wind_shear.py +120 -0
  64. pycontrails/models/cocipgrid/__init__.py +9 -0
  65. pycontrails/models/cocipgrid/cocip_grid.py +2573 -0
  66. pycontrails/models/cocipgrid/cocip_grid_params.py +138 -0
  67. pycontrails/models/dry_advection.py +486 -0
  68. pycontrails/models/emissions/__init__.py +21 -0
  69. pycontrails/models/emissions/black_carbon.py +594 -0
  70. pycontrails/models/emissions/emissions.py +1353 -0
  71. pycontrails/models/emissions/ffm2.py +336 -0
  72. pycontrails/models/emissions/static/default-engine-uids.csv +239 -0
  73. pycontrails/models/emissions/static/edb-gaseous-v29b-engines.csv +596 -0
  74. pycontrails/models/emissions/static/edb-nvpm-v29b-engines.csv +215 -0
  75. pycontrails/models/humidity_scaling/__init__.py +37 -0
  76. pycontrails/models/humidity_scaling/humidity_scaling.py +1025 -0
  77. pycontrails/models/humidity_scaling/quantiles/era5-model-level-quantiles.pq +0 -0
  78. pycontrails/models/humidity_scaling/quantiles/era5-pressure-level-quantiles.pq +0 -0
  79. pycontrails/models/issr.py +210 -0
  80. pycontrails/models/pcc.py +327 -0
  81. pycontrails/models/pcr.py +154 -0
  82. pycontrails/models/ps_model/__init__.py +17 -0
  83. pycontrails/models/ps_model/ps_aircraft_params.py +376 -0
  84. pycontrails/models/ps_model/ps_grid.py +505 -0
  85. pycontrails/models/ps_model/ps_model.py +1017 -0
  86. pycontrails/models/ps_model/ps_operational_limits.py +540 -0
  87. pycontrails/models/ps_model/static/ps-aircraft-params-20240524.csv +68 -0
  88. pycontrails/models/ps_model/static/ps-synonym-list-20240524.csv +103 -0
  89. pycontrails/models/sac.py +459 -0
  90. pycontrails/models/tau_cirrus.py +168 -0
  91. pycontrails/physics/__init__.py +1 -0
  92. pycontrails/physics/constants.py +116 -0
  93. pycontrails/physics/geo.py +989 -0
  94. pycontrails/physics/jet.py +837 -0
  95. pycontrails/physics/thermo.py +451 -0
  96. pycontrails/physics/units.py +472 -0
  97. pycontrails/py.typed +0 -0
  98. pycontrails/utils/__init__.py +1 -0
  99. pycontrails/utils/dependencies.py +66 -0
  100. pycontrails/utils/iteration.py +13 -0
  101. pycontrails/utils/json.py +188 -0
  102. pycontrails/utils/temp.py +50 -0
  103. pycontrails/utils/types.py +165 -0
  104. pycontrails-0.53.0.dist-info/LICENSE +178 -0
  105. pycontrails-0.53.0.dist-info/METADATA +181 -0
  106. pycontrails-0.53.0.dist-info/NOTICE +43 -0
  107. pycontrails-0.53.0.dist-info/RECORD +109 -0
  108. pycontrails-0.53.0.dist-info/WHEEL +5 -0
  109. pycontrails-0.53.0.dist-info/top_level.txt +3 -0
@@ -0,0 +1,256 @@
1
+ """ECMWF Parameter Support.
2
+
3
+ Sourced from the ECMWF Parameter DB:
4
+ https://apps.ecmwf.int/codes/grib/param-db
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pycontrails.core import met_var
10
+ from pycontrails.core.met import MetVariable
11
+
12
+ RelativeVorticity = MetVariable(
13
+ short_name="vo",
14
+ standard_name="atmosphere_upward_relative_vorticity",
15
+ long_name="Vorticity (relative)",
16
+ units="s**-1",
17
+ level_type="isobaricInhPa",
18
+ grib1_id=43,
19
+ ecmwf_id=138,
20
+ grib2_id=(0, 2, 12),
21
+ description=(
22
+ "Atmosphere upward relative vorticity is the vertical component of the 3D air vorticity"
23
+ " vector. The vertical component arises from horizontal velocity only. 'Relative' in this"
24
+ " context means the vorticity of the air relative to the rotating solid earth reference"
25
+ " frame, i.e. excluding the Earth's own rotation. In contrast, the quantity with standard"
26
+ " name atmosphere_upward_absolute_vorticity includes the Earth's rotation. 'Upward'"
27
+ " indicates a vector component which is positive when directed upward (negative downward)."
28
+ " A positive value of atmosphere_upward_relative_vorticity indicates anticlockwise rotation"
29
+ " when viewed from above."
30
+ ),
31
+ )
32
+
33
+ PotentialVorticity = MetVariable(
34
+ short_name="pv",
35
+ standard_name="potential_vorticity",
36
+ long_name="Potential vorticity (K m^2 / kg s)",
37
+ units="K m**2 kg**-1 s**-1",
38
+ level_type="isobaricInhPa",
39
+ grib1_id=128,
40
+ ecmwf_id=60,
41
+ grib2_id=(0, 2, 14),
42
+ amip="pvu",
43
+ description=(
44
+ "Potential vorticity is a measure of the capacity for air to rotate in the atmosphere.If we"
45
+ " ignore the effects of heating and friction, potential vorticity is conserved following an"
46
+ " air parcel.It is used to look for places where large wind storms are likely to originate"
47
+ " and develop.Potential vorticity increases strongly above the tropopause and therefore, it"
48
+ " can also be used in studiesrelated to the stratosphere and stratosphere-troposphere"
49
+ " exchanges. Large wind storms develop when a columnof air in the atmosphere starts to"
50
+ " rotate. Potential vorticity is calculated from the wind, temperature andpressure across a"
51
+ " column of air in the atmosphere."
52
+ ),
53
+ )
54
+
55
+ CloudAreaFractionInLayer = MetVariable(
56
+ short_name="cc",
57
+ standard_name="fraction_of_cloud_cover",
58
+ long_name="Cloud area fraction in atmosphere layer",
59
+ ecmwf_id=248,
60
+ level_type="isobaricInhPa",
61
+ grib2_id=(0, 6, 32),
62
+ units="[0 - 1]",
63
+ amip="cl",
64
+ description=(
65
+ "This parameter is the proportion of a grid box covered by cloud (liquid or ice) at a"
66
+ " specific pressure level."
67
+ ),
68
+ )
69
+
70
+ SpecificCloudLiquidWaterContent = MetVariable(
71
+ short_name="clwc",
72
+ standard_name="specific_cloud_liquid_water_content",
73
+ long_name="Specific cloud liquid water content",
74
+ units="kg kg**-1",
75
+ level_type="isobaricInhPa",
76
+ ecmwf_id=246,
77
+ grib2_id=(0, 1, 83),
78
+ description=(
79
+ "This parameter is the mass of cloud liquid water droplets per kilogram of the total mass"
80
+ " of moist air. The 'total mass of moist air' is the sum of the dry air, water vapour,"
81
+ " cloud liquid, cloud ice, rain and falling snow. This parameter represents the average"
82
+ " value for a grid box."
83
+ ),
84
+ )
85
+
86
+
87
+ SpecificCloudIceWaterContent = MetVariable(
88
+ short_name="ciwc",
89
+ standard_name="specific_cloud_ice_water_content",
90
+ long_name="Specific cloud ice water content",
91
+ units="kg kg**-1",
92
+ level_type="isobaricInhPa",
93
+ ecmwf_id=247,
94
+ grib2_id=(0, 1, 84),
95
+ description=(
96
+ "This parameter is the mass of cloud ice particles per kilogram of the total mass of moist"
97
+ " air. The 'total mass of moist air' is the sum of the dry air, water vapour, cloud liquid,"
98
+ " cloud ice, rain and falling snow. This parameter represents the average value for a grid"
99
+ " box."
100
+ ),
101
+ )
102
+
103
+ # Override units and description on Relative humidity
104
+ RelativeHumidity = MetVariable(
105
+ short_name=met_var.RelativeHumidity.short_name,
106
+ standard_name=met_var.RelativeHumidity.standard_name,
107
+ long_name=met_var.RelativeHumidity.long_name,
108
+ units="%",
109
+ level_type=met_var.RelativeHumidity.level_type,
110
+ ecmwf_id=met_var.RelativeHumidity.ecmwf_id,
111
+ grib2_id=met_var.RelativeHumidity.grib2_id,
112
+ description=(
113
+ "This parameter is the water vapour pressure as a percentage of the value at which the air"
114
+ " becomes saturated "
115
+ "(the point at which water vapour begins to condense into liquid water or deposition into"
116
+ " ice)."
117
+ "For temperatures over 0°C (273.15 K) it is calculated for saturation over water. "
118
+ "At temperatures below -23°C it is calculated for saturation over ice. "
119
+ "Between -23°C and 0°C this parameter is calculated by interpolating between the ice and"
120
+ " water values using a quadratic function."
121
+ "See https://www.ecmwf.int/sites/default/files/elibrary/2016/17117-part-iv-physical-processes.pdf#subsection.7.4.2"
122
+ ),
123
+ )
124
+
125
+
126
+ Divergence = MetVariable(
127
+ short_name="d",
128
+ standard_name="divergence_of_wind",
129
+ long_name="Divergence of wind",
130
+ units="s**-1",
131
+ level_type="isobaricInhPa",
132
+ ecmwf_id=155,
133
+ grib2_id=(0, 2, 13),
134
+ description=(
135
+ "This parameter is the horizontal divergence of velocity. It is the rate "
136
+ "at which air is spreading out horizontally from a point, per square metre. "
137
+ "This parameter is positive for air that is spreading out, or diverging, and "
138
+ "negative for air that is moving inward toward a point, or converging."
139
+ ),
140
+ )
141
+
142
+
143
+ TOAIncidentSolarRadiation = MetVariable(
144
+ short_name="tisr",
145
+ standard_name="toa_incident_solar_radiation",
146
+ long_name="Top of atmosphere incident shortwave radiation",
147
+ units="J m**-2",
148
+ level_type="nominalTop",
149
+ ecmwf_id=212,
150
+ grib2_id=(192, 128, 212), # reference ECMWF
151
+ description="Top of atmosphere incident solar radiation. Accumulated field.",
152
+ )
153
+
154
+ TopNetSolarRadiation = MetVariable(
155
+ short_name="tsr",
156
+ standard_name="top_net_solar_radiation",
157
+ long_name="Top of atmosphere net solar (shortwave) radiation",
158
+ units="J m**-2",
159
+ level_type="nominalTop",
160
+ ecmwf_id=178,
161
+ grib2_id=(0, 4, 1),
162
+ description=(
163
+ "This parameter is the incoming solar radiation (also known as shortwave radiation) "
164
+ "minus the outgoing solar radiation at the top of the atmosphere. "
165
+ "It is the amount of radiation passing through a horizontal plane. "
166
+ "The incoming solar radiation is the amount received from the Sun. "
167
+ "The outgoing solar radiation is the amount reflected and scattered by the Earth's"
168
+ " atmosphere and surface"
169
+ "See https://www.ecmwf.int/sites/default/files/elibrary/2015/18490-radiation-quantities-ecmwf-model-and-mars.pdf"
170
+ ),
171
+ )
172
+
173
+ TopNetThermalRadiation = MetVariable(
174
+ short_name="ttr",
175
+ standard_name="top_net_thermal_radiation",
176
+ long_name="Top of atmosphere net thermal (longwave) radiation",
177
+ units="J m**-2",
178
+ level_type="nominalTop",
179
+ ecmwf_id=179,
180
+ grib2_id=(0, 5, 5),
181
+ description=(
182
+ "The thermal (also known as terrestrial or longwave) "
183
+ "radiation emitted to space at the top of the atmosphere is commonly known as the Outgoing"
184
+ " Longwave Radiation (OLR). "
185
+ "The top net thermal radiation (this parameter) is equal to the negative of OLR."
186
+ "See https://www.ecmwf.int/sites/default/files/elibrary/2015/18490-radiation-quantities-ecmwf-model-and-mars.pdf"
187
+ ),
188
+ )
189
+
190
+ SurfaceSolarDownwardRadiation = MetVariable(
191
+ short_name="ssrd",
192
+ standard_name="surface_solar_downward_radiation",
193
+ long_name="Surface Solar Downward Radiation",
194
+ units="J m**-2",
195
+ level_type="surface",
196
+ ecmwf_id=169,
197
+ grib2_id=(0, 4, 7),
198
+ description=(
199
+ "This parameter is the amount of solar radiation (also known as shortwave radiation) that"
200
+ " reaches a horizontal plane at the surface of the Earth. This parameter comprises both"
201
+ " direct and diffuse solar radiation."
202
+ ),
203
+ )
204
+
205
+ CloudAreaFraction = MetVariable(
206
+ short_name="tcc",
207
+ standard_name="total_cloud_cover",
208
+ long_name="Cloud area fraction (total)",
209
+ level_type="surface",
210
+ grib1_id=71,
211
+ ecmwf_id=164,
212
+ grib2_id=(192, 128, 164), # reference ECMWF
213
+ units="[0 - 1]",
214
+ amip="clt",
215
+ description=(
216
+ "This parameter is the proportion of a grid box covered by cloud (liquid or ice) for a"
217
+ " whole atmosphere column."
218
+ ),
219
+ )
220
+
221
+ PRESSURE_LEVEL_VARIABLES = [
222
+ met_var.AirTemperature,
223
+ met_var.SpecificHumidity,
224
+ met_var.Geopotential,
225
+ met_var.EastwardWind,
226
+ met_var.NorthwardWind,
227
+ met_var.VerticalVelocity,
228
+ RelativeHumidity,
229
+ RelativeVorticity,
230
+ CloudAreaFractionInLayer,
231
+ SpecificCloudIceWaterContent,
232
+ SpecificCloudLiquidWaterContent,
233
+ PotentialVorticity,
234
+ ]
235
+ SURFACE_VARIABLES = [
236
+ met_var.SurfacePressure,
237
+ TOAIncidentSolarRadiation,
238
+ TopNetSolarRadiation,
239
+ TopNetThermalRadiation,
240
+ CloudAreaFraction,
241
+ SurfaceSolarDownwardRadiation,
242
+ ]
243
+ MODEL_LEVEL_VARIABLES = [
244
+ met_var.AirTemperature,
245
+ met_var.SpecificHumidity,
246
+ met_var.VerticalVelocity,
247
+ met_var.EastwardWind,
248
+ met_var.NorthwardWind,
249
+ RelativeVorticity,
250
+ Divergence,
251
+ CloudAreaFractionInLayer,
252
+ SpecificCloudIceWaterContent,
253
+ SpecificCloudLiquidWaterContent,
254
+ ]
255
+
256
+ ECMWF_VARIABLES = PRESSURE_LEVEL_VARIABLES + SURFACE_VARIABLES
@@ -0,0 +1,28 @@
1
+ """GFS Data Access."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from pycontrails.datalib.gfs.gfs import GFS_FORECAST_BUCKET, GFSForecast
6
+ from pycontrails.datalib.gfs.variables import (
7
+ GFS_VARIABLES,
8
+ PRESSURE_LEVEL_VARIABLES,
9
+ SURFACE_VARIABLES,
10
+ CloudIceWaterMixingRatio,
11
+ TOAUpwardLongwaveRadiation,
12
+ TOAUpwardShortwaveRadiation,
13
+ TotalCloudCoverIsobaric,
14
+ Visibility,
15
+ )
16
+
17
+ __all__ = [
18
+ "GFS_FORECAST_BUCKET",
19
+ "GFSForecast",
20
+ "CloudIceWaterMixingRatio",
21
+ "TotalCloudCoverIsobaric",
22
+ "Visibility",
23
+ "TOAUpwardShortwaveRadiation",
24
+ "TOAUpwardLongwaveRadiation",
25
+ "GFS_VARIABLES",
26
+ "PRESSURE_LEVEL_VARIABLES",
27
+ "SURFACE_VARIABLES",
28
+ ]