pycontrails 0.50.0__tar.gz → 0.50.2__tar.gz

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 (253) hide show
  1. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/release.yaml +1 -1
  2. {pycontrails-0.50.0 → pycontrails-0.50.2}/CHANGELOG.md +47 -0
  3. {pycontrails-0.50.0 → pycontrails-0.50.2}/PKG-INFO +1 -1
  4. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/pycontrails.bib +53 -18
  5. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/GFS.ipynb +1 -1
  6. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/_version.py +2 -2
  7. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/flight.py +108 -6
  8. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/interpolation.py +39 -1
  9. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/met.py +10 -12
  10. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/rgi_cython.c +195 -165
  11. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/vector.py +10 -8
  12. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/goes.py +14 -12
  13. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/cocip.py +22 -5
  14. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/cocip_params.py +11 -2
  15. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/contrail_properties.py +4 -9
  16. pycontrails-0.50.2/pycontrails/models/cocip/unterstrasser_wake_vortex.py +403 -0
  17. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/wake_vortex.py +22 -1
  18. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocipgrid/cocip_grid.py +103 -6
  19. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/emissions.py +2 -2
  20. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/static/default-engine-uids.csv +1 -1
  21. pycontrails-0.50.0/pycontrails/models/emissions/static/edb-gaseous-v28c-engines.csv → pycontrails-0.50.2/pycontrails/models/emissions/static/edb-gaseous-v29b-engines.csv +49 -11
  22. pycontrails-0.50.0/pycontrails/models/emissions/static/edb-nvpm-v28c-engines.csv → pycontrails-0.50.2/pycontrails/models/emissions/static/edb-nvpm-v29b-engines.csv +90 -54
  23. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/issr.py +1 -1
  24. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_aircraft_params.py +13 -1
  25. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_grid.py +20 -20
  26. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_model.py +1 -1
  27. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_operational_limits.py +202 -1
  28. pycontrails-0.50.2/pycontrails/models/ps_model/static/ps-aircraft-params-20240417.csv +64 -0
  29. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/units.py +2 -2
  30. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/types.py +3 -1
  31. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/PKG-INFO +1 -1
  32. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/SOURCES.txt +5 -3
  33. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/conftest.py +17 -3
  34. pycontrails-0.50.2/tests/unit/static/cocip-contrail-output.json +2442 -0
  35. pycontrails-0.50.2/tests/unit/static/cocip-contrail-output2.json +17112 -0
  36. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-flight-output.json +522 -522
  37. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-flight-output2.json +3549 -3549
  38. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip.py +52 -4
  39. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_grid.py +194 -18
  40. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_grid_parity.py +6 -3
  41. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_dtypes.py +7 -2
  42. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_emissions.py +2 -2
  43. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_flight.py +38 -8
  44. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_humidity_scaling.py +1 -1
  45. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_interpolation.py +1 -1
  46. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_ps_model.py +33 -17
  47. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_tau_cirrus.py +2 -2
  48. pycontrails-0.50.2/tests/unit/test_unterstrasser_wake_vortex.py +99 -0
  49. pycontrails-0.50.0/pycontrails/models/ps_model/static/ps-aircraft-params-20240209.csv +0 -63
  50. pycontrails-0.50.0/tests/unit/static/cocip-contrail-output.json +0 -2442
  51. pycontrails-0.50.0/tests/unit/static/cocip-contrail-output2.json +0 -17112
  52. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  53. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  54. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/dependabot.yaml +0 -0
  55. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/pull_request_template.md +0 -0
  56. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/benchmark.yaml +0 -0
  57. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/docs.yaml +0 -0
  58. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/doctest.yaml +0 -0
  59. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/scorecard.yaml +0 -0
  60. {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/test.yaml +0 -0
  61. {pycontrails-0.50.0 → pycontrails-0.50.2}/.gitignore +0 -0
  62. {pycontrails-0.50.0 → pycontrails-0.50.2}/.pre-commit-config.yaml +0 -0
  63. {pycontrails-0.50.0 → pycontrails-0.50.2}/.zenodo.json +0 -0
  64. {pycontrails-0.50.0 → pycontrails-0.50.2}/CONTRIBUTING.md +0 -0
  65. {pycontrails-0.50.0 → pycontrails-0.50.2}/LICENSE +0 -0
  66. {pycontrails-0.50.0 → pycontrails-0.50.2}/Makefile +0 -0
  67. {pycontrails-0.50.0 → pycontrails-0.50.2}/NOTICE +0 -0
  68. {pycontrails-0.50.0 → pycontrails-0.50.2}/README.md +0 -0
  69. {pycontrails-0.50.0 → pycontrails-0.50.2}/RELEASE.md +0 -0
  70. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/css/style.css +0 -0
  71. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/colab.png +0 -0
  72. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/favicon.png +0 -0
  73. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/logo-dark.png +0 -0
  74. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/logo.png +0 -0
  75. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/api.rst +0 -0
  76. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/changelog.rst +0 -0
  77. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/conf.py +0 -0
  78. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/contributing.rst +0 -0
  79. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/develop.rst +0 -0
  80. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/flight.rst +0 -0
  81. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/index.rst +0 -0
  82. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/install.rst +0 -0
  83. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/integrations/ACCF.ipynb +0 -0
  84. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/literature.rst +0 -0
  85. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/meteorology.rst +0 -0
  86. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/models.rst +0 -0
  87. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/ARCO-ERA5.ipynb +0 -0
  88. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/AircraftPerformance.ipynb +0 -0
  89. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/Cache.ipynb +0 -0
  90. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/CoCiP.ipynb +0 -0
  91. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/ECMWF.ipynb +0 -0
  92. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/Flight.ipynb +0 -0
  93. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/GOES.ipynb +0 -0
  94. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/ISSR.ipynb +0 -0
  95. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/Meteorology.ipynb +0 -0
  96. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/SAC.ipynb +0 -0
  97. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/advection.ipynb +0 -0
  98. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/airports.ipynb +0 -0
  99. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/.gitignore +0 -0
  100. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-ap.csv +0 -0
  101. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-cocip.csv +0 -0
  102. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-fdr.csv +0 -0
  103. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-noisy.csv +0 -0
  104. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight.csv +0 -0
  105. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/flightplan.ipynb +0 -0
  106. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/model-levels.ipynb +0 -0
  107. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/run-cocip-on-flight.ipynb +0 -0
  108. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/run-cocip-with-fdr.ipynb +0 -0
  109. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/specific-humidity-interpolation.ipynb +0 -0
  110. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks.rst +0 -0
  111. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/observations.rst +0 -0
  112. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/tutorials.rst +0 -0
  113. {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/utilities.rst +0 -0
  114. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/__init__.py +0 -0
  115. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/__init__.py +0 -0
  116. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/aircraft_performance.py +0 -0
  117. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/airports.py +0 -0
  118. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/cache.py +0 -0
  119. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/coordinates.py +0 -0
  120. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/datalib.py +0 -0
  121. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/fleet.py +0 -0
  122. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/flightplan.py +0 -0
  123. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/fuel.py +0 -0
  124. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/met_var.py +0 -0
  125. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/models.py +0 -0
  126. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/polygon.py +0 -0
  127. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/rgi_cython.pyx +0 -0
  128. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/__init__.py +0 -0
  129. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/__init__.py +0 -0
  130. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/arco_era5.py +0 -0
  131. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/common.py +0 -0
  132. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/era5.py +0 -0
  133. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/hres.py +0 -0
  134. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/ifs.py +0 -0
  135. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/variables.py +0 -0
  136. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/gfs/__init__.py +0 -0
  137. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/gfs/gfs.py +0 -0
  138. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/gfs/variables.py +0 -0
  139. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/spire/__init__.py +0 -0
  140. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/spire/spire.py +0 -0
  141. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/bada.py +0 -0
  142. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/cirium.py +0 -0
  143. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/empirical_grid.py +0 -0
  144. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/synthetic_flight.py +0 -0
  145. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/__init__.py +0 -0
  146. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/accf.py +0 -0
  147. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/__init__.py +0 -0
  148. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/cocip_uncertainty.py +0 -0
  149. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/output_formats.py +0 -0
  150. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/radiative_forcing.py +0 -0
  151. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/radiative_heating.py +0 -0
  152. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/wind_shear.py +0 -0
  153. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocipgrid/__init__.py +0 -0
  154. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocipgrid/cocip_grid_params.py +0 -0
  155. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/dry_advection.py +0 -0
  156. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/__init__.py +0 -0
  157. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/black_carbon.py +0 -0
  158. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/ffm2.py +0 -0
  159. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/humidity_scaling/__init__.py +0 -0
  160. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/humidity_scaling/humidity_scaling.py +0 -0
  161. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/humidity_scaling/quantiles/era5-quantiles.pq +0 -0
  162. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/pcc.py +0 -0
  163. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/pcr.py +0 -0
  164. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/__init__.py +0 -0
  165. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/sac.py +0 -0
  166. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/tau_cirrus.py +0 -0
  167. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/__init__.py +0 -0
  168. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/constants.py +0 -0
  169. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/geo.py +0 -0
  170. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/jet.py +0 -0
  171. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/thermo.py +0 -0
  172. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/py.typed +0 -0
  173. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/__init__.py +0 -0
  174. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/dependencies.py +0 -0
  175. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/iteration.py +0 -0
  176. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/json.py +0 -0
  177. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/temp.py +0 -0
  178. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/dependency_links.txt +0 -0
  179. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/requires.txt +0 -0
  180. {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/top_level.txt +0 -0
  181. {pycontrails-0.50.0 → pycontrails-0.50.2}/pyproject.toml +0 -0
  182. {pycontrails-0.50.0 → pycontrails-0.50.2}/setup.cfg +0 -0
  183. {pycontrails-0.50.0 → pycontrails-0.50.2}/setup.py +0 -0
  184. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/__init__.py +0 -0
  185. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/_deprecated.py +0 -0
  186. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/Makefile +0 -0
  187. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/README.md +0 -0
  188. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/benchmark.py +0 -0
  189. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/compare.py +0 -0
  190. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/data.md +0 -0
  191. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/output.py +0 -0
  192. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/review.ipynb +0 -0
  193. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip-fortran/README.md +0 -0
  194. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/.gcloudignore +0 -0
  195. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/README.md +0 -0
  196. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/support.py +0 -0
  197. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/validate.py +0 -0
  198. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/cocip-met.py +0 -0
  199. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/cocip-met2.py +0 -0
  200. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/ecmwf-met.py +0 -0
  201. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/gfs-met.py +0 -0
  202. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/__init__.py +0 -0
  203. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/NOAA_Solar_Calculations_day.csv +0 -0
  204. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-output-contrail-edges.json +0 -0
  205. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-output-flts-20190101-eu.pq +0 -0
  206. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-cocip2.csv +0 -0
  207. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-meridian.csv +0 -0
  208. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-metadata.json +0 -0
  209. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-spire-data-cleaning.pq +0 -0
  210. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight.csv +0 -0
  211. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flt-wypts-20190101-eu.pq +0 -0
  212. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-20190101-eu.nc +0 -0
  213. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-accf-pl.nc +0 -0
  214. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-accf-sl.nc +0 -0
  215. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-ecmwf-pl.nc +0 -0
  216. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-ecmwf-sl.nc +0 -0
  217. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-era5-cocip1.nc +0 -0
  218. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-era5-cocip2.nc +0 -0
  219. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-gfs.nc +0 -0
  220. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/polygon-bug.nc +0 -0
  221. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-20190101-eu.nc +0 -0
  222. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-era5-cocip1.nc +0 -0
  223. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-era5-cocip2.nc +0 -0
  224. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-gfs.nc +0 -0
  225. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_accf.py +0 -0
  226. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_airports.py +0 -0
  227. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cache.py +0 -0
  228. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_radiative_forcing.py +0 -0
  229. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_uncertainty.py +0 -0
  230. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_coordinates.py +0 -0
  231. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_datalib.py +0 -0
  232. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_dry_advection.py +0 -0
  233. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_ecmwf.py +0 -0
  234. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_fleet.py +0 -0
  235. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_flightplan.py +0 -0
  236. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_fuel.py +0 -0
  237. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_geo.py +0 -0
  238. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_gfs.py +0 -0
  239. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_goes.py +0 -0
  240. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_grid_to_netcdf.py +0 -0
  241. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_init.py +0 -0
  242. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_met.py +0 -0
  243. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_met_cache.py +0 -0
  244. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_models.py +0 -0
  245. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_pcc.py +0 -0
  246. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_polygons.py +0 -0
  247. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_sac_issr.py +0 -0
  248. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_spire.py +0 -0
  249. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_thermo_sac.py +0 -0
  250. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_units.py +0 -0
  251. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_utils.py +0 -0
  252. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_vector.py +0 -0
  253. {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_zarr.py +0 -0
@@ -40,7 +40,7 @@ jobs:
40
40
 
41
41
  # https://cibuildwheel.readthedocs.io/en/stable/options/#testing
42
42
  - name: Build wheels
43
- uses: pypa/cibuildwheel@v2.16
43
+ uses: pypa/cibuildwheel@v2.17
44
44
  env:
45
45
  CIBW_BUILD: cp39-* cp310-* cp311-* cp312-*
46
46
  CIBW_SKIP: '*-win32 *-manylinux_i686 *-musllinux*'
@@ -1,6 +1,53 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## v0.50.2
5
+
6
+ ### Breaking changes
7
+
8
+ - Replaces engine-uid `01P10IA024` with `04P10IA027` (superseded in the IACO EDB).
9
+
10
+ ### Features
11
+
12
+ - Adds support for the `E190` aircraft type in the PS model
13
+ - Adds `Flight.distance_to_coords` which takes in a distance along a flight trajectory in meters and returns geodesic coordinates.
14
+ - Adds methods to `ps_operational_limits` to find the maximum and minimum mach numbers for a given set of operating conditions.
15
+ - Updates ICAO aircraft engine emissions databank (EDB) from v28c to v29b.
16
+
17
+ ### Internals
18
+
19
+ - New data for gaseous and nvPM emissions for PW812D, PW812GA, RR Trent 7000 with improved nvPM combustor
20
+ - Update nvPM emissions for IAE V2530-A5, PW1500G and PW1900G
21
+ - Update PS model coeffiencts to match the latest version provided by Ian Poll
22
+
23
+ ## v0.50.1
24
+
25
+ ### Breaking changes
26
+
27
+ - Updates to flight resampling logic now ensure that resampled waypoints include any and all times between flight start and end times that are a multiple of the resampling frequency. This may add an additional waypoint to some flights after resampling, and may result in `Flight.resample_and_fill` returning a flight with a single waypoint rather than an empty flight.
28
+
29
+ ### Features
30
+
31
+ - Refine CoCiP contrail initialization model based on the work of Unterstrasser (2016, doi:10.5194/acp-16-2059-2016) and Karcher (2018, doi:10.1038/s41467-018-04068-0).
32
+ - This update implements a refined parameterization of the survival fraction of contrail ice crystal number after the wake vortex phase (`f_surv`). The parameterised model was developed by Unterstrasser (2016) based on outputs provided by large eddy simulations, and improves agreement with LES output relative to the default survival fraction parameterization in CoCiP.
33
+ - These changes replicate Fig. 4 of Karcher (2018), where `f_surv` now depends on the initial number of ice crystals. These effects are particularly important, especially in the "soot-poor" scenario where the number fraction of contrail ice crystals that survives the wake vortex phase could be larger than the mass fraction, because the particles are larger in size.
34
+ - This also improves upon the existing assumption in CoCiP, where the survival fraction is estimated as the change in contrail ice water content (by mass) before and after the wake vortex phase.
35
+ The Unterstrasser (2016) parameterization can be used in CoCiP by setting a new parameter, `unterstrasser_ice_survival_fraction`, to `True`.
36
+ - Adds optional ATR20 to CoCiPGrid model.
37
+
38
+ ### Fixes
39
+
40
+ - Update flight resampling logic to align with expected behavior for very short flights, which is now detailed in the `Flight.resample_and_fill` docstring.
41
+
42
+ ### Internals
43
+
44
+ - Adds a parameter to `CoCipParams`, `unterstrasser_ice_survival_fraction`, that activates the Unterstrasser (2016) survival parameterization when set to `True`. This is disabled by default, and only implemented for `CoCiP`. `CoCiPGrid` will produce an error if run with `unterstrasser_ice_surival_fraction=True`.
45
+ - Modifies `CoCiPGrid` so that setting `compute_atr_20` (defined in `CoCipParams`) to `True` adds `global_yearly_mean_rf` and `atr20` to CoCiP-grid output.
46
+ - Replaces `pycontrails.datalib.GOES` ash convention label "MIT" with "SEVIRI"
47
+ - Modifies meteorology time step selection logic in `CoCiPGrid` to reduce duplicate chunk downloads when reading from remote zarr stores.
48
+ - Updates unit tests for xarray v2024.03.0, which introduced changes to netCDF decoding that slightly alter decoded values. Note that some unit tests will fail for earlier xarray versions.
49
+ - Updates `RegularGridInterpolator` to fall back on legacy scipy implementations of tensor-product spline methods when using scipy versions 1.13.0 and later.
50
+
4
51
  ## v0.50.0
5
52
 
6
53
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycontrails
3
- Version: 0.50.0
3
+ Version: 0.50.2
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
@@ -280,6 +280,20 @@
280
280
  langid = {english}
281
281
  }
282
282
 
283
+ @article{karcherFormationRadiativeForcing2018,
284
+ title = {Formation and Radiative Forcing of Contrail Cirrus},
285
+ author = {K{\"a}rcher, Bernd},
286
+ year = {2018},
287
+ month = dec,
288
+ journal = {Nature Communications},
289
+ volume = {9},
290
+ number = {1},
291
+ issn = {2041-1723},
292
+ doi = {10.1038/s41467-018-04068-0},
293
+ urldate = {2020-12-18},
294
+ langid = {english}
295
+ }
296
+
283
297
  @article{khanEmissionsWaterVapour2022,
284
298
  title = {The {{Emissions}} of {{Water Vapour}} and {{NOx}} from {{Modelled Hydrogen-Fuelled Aircraft}} and the {{Impact}} of {{NOx Reduction}} on {{Climate Compared}} with {{Kerosene-Fuelled Aircraft}}},
285
299
  author = {Khan, M. Anwar H. and Brierley, Joel and Tait, Kieran N. and Bullock, Steve and Shallcross, Dudley E. and Lowenberg, Mark H.},
@@ -712,6 +726,12 @@
712
726
  langid = {english}
713
727
  }
714
728
 
729
+ @misc{SEVIRIRGBCal,
730
+ title = {{{SEVIRI RGB Cal Module}} - Part {{II}}},
731
+ urldate = {2024-03-29},
732
+ howpublished = {https://resources.eumetrain.org/data/4/410/navmenu.php?tab=5\&page=2.0.0}
733
+ }
734
+
715
735
  @article{sonntag1994,
716
736
  title = {Advancements in the Field of Hygrometry},
717
737
  author = {Sonntag, D.},
@@ -869,6 +889,23 @@
869
889
  abstract = {Sustainable aviation fuel (SAF) can reduce aviation's CO2 and non-CO2 impacts. We quantify the change in contrail properties and climate forcing in the North Atlantic resulting from different blending ratios of SAF and demonstrate that intelligently allocating the limited SAF supply could multiply its overall climate benefit by factors of 9\textendash 15. A fleetwide adoption of 100\% SAF increases contrail occurrence (+5\%), but lower nonvolatile particle emissions (-52\%) reduce the annual mean contrail net radiative forcing (-44\%), adding to climate gains from reduced life cycle CO2 emissions. However, in the short term, SAF supply will be constrained. SAF blended at a 1\% ratio and uniformly distributed to all transatlantic flights would reduce both the annual contrail energy forcing (EFcontrail) and the total energy forcing (EFtotal, contrails + change in CO2 life cycle emissions) by {$\sim$}0.6\%. Instead, targeting the same quantity of SAF at a 50\% blend ratio to {$\sim$}2\% of flights responsible for the most highly warming contrails reduces EFcontrail and EFtotal by {$\sim$}10 and {$\sim$}6\%, respectively. Acknowledging forecasting uncertainties, SAF blended at lower ratios (10\%) and distributed to more flights ({$\sim$}9\%) still reduces EFcontrail ({$\sim$}5\%) and EFtotal ({$\sim$}3\%). Both strategies deploy SAF on flights with engine particle emissions exceeding 1012 m\textendash 1, at night-time, and in winter.}
870
890
  }
871
891
 
892
+ @article{unterstrasserPropertiesYoungContrails2016,
893
+ title = {Properties of Young Contrails \&ndash; a Parametrisation Based on Large-Eddy Simulations},
894
+ author = {Unterstrasser, Simon},
895
+ year = {2016},
896
+ month = feb,
897
+ journal = {Atmospheric Chemistry and Physics},
898
+ volume = {16},
899
+ number = {4},
900
+ pages = {2059--2082},
901
+ publisher = {{Copernicus GmbH}},
902
+ issn = {1680-7316},
903
+ doi = {10.5194/acp-16-2059-2016},
904
+ urldate = {2023-08-23},
905
+ abstract = {Contrail\&ndash;cirrus is probably the largest climate forcing from aviation. The evolution of contrail\&ndash;cirrus and its radiative impact depends not only on a multitude of atmospheric parameters, but also on the geometric and microphysical properties of the young contrails evolving into contrail\&ndash;cirrus. The early evolution of contrails (t \&lt; 5 min) is dominated by an interplay of ice microphysics and wake vortex dynamics. Young contrails may undergo a fast vertical expansion due to a descent of the wake vortices and may lose a substantial fraction of their ice crystals due to adiabatic heating. The geometric depth H and total ice crystal number N of young contrails are highly variable and depend on many environmental and aircraft parameters. Both properties, H and N, affect the later properties of the evolving contrail\&ndash;cirrus, as they control the extent of shear-induced spreading and sedimentation losses. In this study, we provide parametrisations of H and N after 5 min taking into account the effects of temperature, relative humidity, thermal stratification and aircraft type (mass, wing span, fuel burn). The parametrisations rely on a large data set of recent large-eddy simulations of young contrails. They are suited to be incorporated in larger-scale models in order to refine the present-day contrail initialisations by considering the processes that strongly affect the contrail evolution during the vortex phase.},
906
+ langid = {english}
907
+ }
908
+
872
909
  @misc{uosolarradiationmonitoringlaboratoryUOSRMLSolar2022,
873
910
  title = {{{UO SRML}}: {{Solar}} Radiation Basics},
874
911
  author = {UO Solar Radiation Monitoring Laboratory},
@@ -980,22 +1017,20 @@
980
1017
  langid = {english}
981
1018
  }
982
1019
 
983
-
984
- @article{yin_predicting_2023,
985
- title = {Predicting the climate impact of aviation for en-route emissions: the algorithmic climate change function submodel {ACCF} 1.0 of {EMAC} 2.53},
986
- volume = {16},
987
- issn = {1991-959X},
988
- shorttitle = {Predicting the climate impact of aviation for en-route emissions},
989
- url = {https://gmd.copernicus.org/articles/16/3313/2023/},
990
- doi = {10.5194/gmd-16-3313-2023},
991
- abstract = {Using climate-optimized flight trajectories is one essential measure to reduce aviation's climate impact. Detailed knowledge of temporal and spatial climate sensitivity for aviation emissions in the atmosphere is required to realize such a climate mitigation measure. The algorithmic Climate Change Functions (aCCFs) represent the basis for such purposes. This paper presents the first version of the Algorithmic Climate Change Function submodel (ACCF 1.0) within the European Centre HAMburg general circulation model (ECHAM) and Modular Earth Submodel System (MESSy) Atmospheric Chemistry (EMAC) model framework. In the ACCF 1.0, we implement a set of aCCFs (version 1.0) to estimate the average temperature response over 20 years (ATR20) resulting from aviation CO2 emissions and non-CO2 impacts, such as NOx emissions (via ozone production and methane destruction), water vapour emissions, and contrail cirrus. While the aCCF concept has been introduced in previous research, here, we publish a consistent set of aCCF formulas in terms of fuel scenario, metric, and efficacy for the first time. In particular, this paper elaborates on contrail aCCF development, which has not been published before. ACCF 1.0 uses the simulated atmospheric conditions at the emission location as input to calculate the ATR20 per unit of fuel burned, per NOx emitted, or per flown kilometre. In this research, we perform quality checks of the ACCF 1.0 outputs in two aspects. Firstly, we compare climatological values calculated by ACCF 1.0 to previous studies. The comparison confirms that in the Northern Hemisphere between 150–300 hPa altitude (flight corridor), the vertical and latitudinal structure of NOx-induced ozone and H2O effects are well represented by the ACCF model output. The NOx-induced methane effects increase towards lower altitudes and higher latitudes, which behaves differently from the existing literature. For contrail cirrus, the climatological pattern of the ACCF model output corresponds with the literature, except that contrail-cirrus aCCF generates values at low altitudes near polar regions, which is caused by the conditions set up for contrail formation. Secondly, we evaluate the reduction of NOx-induced ozone effects through trajectory optimization, employing the tagging chemistry approach (contribution approach to tag species according to their emission categories and to inherit these tags to other species during the subsequent chemical reactions). The simulation results show that climate-optimized trajectories reduce the radiative forcing contribution from aviation NOx-induced ozone compared to cost-optimized trajectories. Finally, we couple the ACCF 1.0 to the air traffic simulation submodel AirTraf version 2.0 and demonstrate the variability of the flight trajectories when the efficacy of individual effects is considered. Based on the 1 d simulation results of a subset of European flights, the total ATR20 of the climate-optimized flights is significantly lower (roughly 50 \% less) than that of the cost-optimized flights, with the most considerable contribution from contrail cirrus. The CO2 contribution observed in this study is low compared with the non-CO2 effects, which requires further diagnosis.},
992
- language = {English},
993
- number = {11},
994
- urldate = {2023-08-23},
995
- journal = {Geoscientific Model Development},
996
- author = {Yin, Feijia and Grewe, Volker and Castino, Federica and Rao, Pratik and Matthes, Sigrun and Dahlmann, Katrin and Dietmüller, Simone and Frömming, Christine and Yamashita, Hiroshi and Peter, Patrick and Klingaman, Emma and Shine, Keith P. and Lührs, Benjamin and Linke, Florian},
997
- month = jun,
998
- year = {2023},
999
- note = {Publisher: Copernicus GmbH},
1000
- pages = {3313--3334},
1020
+ @article{yinPredictingClimateImpact2023,
1021
+ title = {Predicting the Climate Impact of Aviation for En-Route Emissions: The Algorithmic Climate Change Function Submodel {{ACCF}} 1.0 of {{EMAC}} 2.53},
1022
+ shorttitle = {Predicting the Climate Impact of Aviation for En-Route Emissions},
1023
+ author = {Yin, Feijia and Grewe, Volker and Castino, Federica and Rao, Pratik and Matthes, Sigrun and Dahlmann, Katrin and Dietm{\"u}ller, Simone and Fr{\"o}mming, Christine and Yamashita, Hiroshi and Peter, Patrick and Klingaman, Emma and Shine, Keith P. and L{\"u}hrs, Benjamin and Linke, Florian},
1024
+ year = {2023},
1025
+ month = jun,
1026
+ journal = {Geoscientific Model Development},
1027
+ volume = {16},
1028
+ number = {11},
1029
+ pages = {3313--3334},
1030
+ publisher = {{Copernicus GmbH}},
1031
+ issn = {1991-959X},
1032
+ doi = {10.5194/gmd-16-3313-2023},
1033
+ urldate = {2023-08-23},
1034
+ abstract = {Using climate-optimized flight trajectories is one essential measure to reduce aviation's climate impact. Detailed knowledge of temporal and spatial climate sensitivity for aviation emissions in the atmosphere is required to realize such a climate mitigation measure. The algorithmic Climate Change Functions (aCCFs) represent the basis for such purposes. This paper presents the first version of the Algorithmic Climate Change Function submodel (ACCF 1.0) within the European Centre HAMburg general circulation model (ECHAM) and Modular Earth Submodel System (MESSy) Atmospheric Chemistry (EMAC) model framework. In the ACCF 1.0, we implement a set of aCCFs (version 1.0) to estimate the average temperature response over 20 years (ATR20) resulting from aviation CO2 emissions and non-CO2 impacts, such as NOx emissions (via ozone production and methane destruction), water vapour emissions, and contrail cirrus. While the aCCF concept has been introduced in previous research, here, we publish a consistent set of aCCF formulas in terms of fuel scenario, metric, and efficacy for the first time. In particular, this paper elaborates on contrail aCCF development, which has not been published before. ACCF 1.0 uses the simulated atmospheric conditions at the emission location as input to calculate the ATR20 per unit of fuel burned, per NOx emitted, or per flown kilometre. In this research, we perform quality checks of the ACCF 1.0 outputs in two aspects. Firstly, we compare climatological values calculated by ACCF 1.0 to previous studies. The comparison confirms that in the Northern Hemisphere between 150\textendash 300 hPa altitude (flight corridor), the vertical and latitudinal structure of NOx-induced ozone and H2O effects are well represented by the ACCF model output. The NOx-induced methane effects increase towards lower altitudes and higher latitudes, which behaves differently from the existing literature. For contrail cirrus, the climatological pattern of the ACCF model output corresponds with the literature, except that contrail-cirrus aCCF generates values at low altitudes near polar regions, which is caused by the conditions set up for contrail formation. Secondly, we evaluate the reduction of NOx-induced ozone effects through trajectory optimization, employing the tagging chemistry approach (contribution approach to tag species according to their emission categories and to inherit these tags to other species during the subsequent chemical reactions). The simulation results show that climate-optimized trajectories reduce the radiative forcing contribution from aviation NOx-induced ozone compared to cost-optimized trajectories. Finally, we couple the ACCF 1.0 to the air traffic simulation submodel AirTraf version 2.0 and demonstrate the variability of the flight trajectories when the efficacy of individual effects is considered. Based on the 1 d simulation results of a subset of European flights, the total ATR20 of the climate-optimized flights is significantly lower (roughly 50 \% less) than that of the cost-optimized flights, with the most considerable contribution from contrail cirrus. The CO2 contribution observed in this study is low compared with the non-CO2 effects, which requires further diagnosis.},
1035
+ langid = {english}
1001
1036
  }
@@ -19,7 +19,7 @@
19
19
  "\n",
20
20
  "- [NOAA GFS](https://registry.opendata.aws/noaa-gfs-bdp-pds/) - AWS Open Data Registry\n",
21
21
  "- [NCEI GFS Documentation](https://www.ncei.noaa.gov/products/weather-climate-models/global-forecast)\n",
22
- "- [NOAA GFS Documentation](https://www.emc.ncep.noaa.gov/emc/pages/numerical_forecast_systems/gfs/documentation.php)\n",
22
+ "- [NOAA GFS Documentation](https://vlab.noaa.gov/web/gfs/documentation)\n",
23
23
  "- [Parameter definitions](https://www.nco.ncep.noaa.gov/pmb/products/gfs/)\n",
24
24
  " \n",
25
25
  "See [API Reference](https://py.contrails.org/api.html#gfs) for usage."
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.50.0'
16
- __version_tuple__ = version_tuple = (0, 50, 0)
15
+ __version__ = version = '0.50.2'
16
+ __version_tuple__ = version_tuple = (0, 50, 2)
@@ -17,6 +17,7 @@ from pycontrails.core.fuel import Fuel, JetA
17
17
  from pycontrails.core.vector import AttrDict, GeoVectorDataset, VectorDataDict, VectorDataset
18
18
  from pycontrails.physics import constants, geo, units
19
19
  from pycontrails.utils import dependencies
20
+ from pycontrails.utils.types import ArrayOrFloat
20
21
 
21
22
  logger = logging.getLogger(__name__)
22
23
 
@@ -787,6 +788,13 @@ class Flight(GeoVectorDataset):
787
788
  Waypoints are resampled according to the frequency ``freq``. Values for :attr:`data`
788
789
  columns ``longitude``, ``latitude``, and ``altitude`` are interpolated.
789
790
 
791
+ Resampled waypoints will include all multiples of ``freq`` between the flight
792
+ start and end time. For example, when resampling to a frequency of 1 minute,
793
+ a flight that starts at 2020/1/1 00:00:59 and ends at 2020/1/1 00:01:01
794
+ will return a single waypoint at 2020/1/1 00:01:00, whereas a flight that
795
+ starts at 2020/1/1 00:01:01 and ends at 2020/1/1 00:01:59 will return an empty
796
+ flight.
797
+
790
798
  Parameters
791
799
  ----------
792
800
  freq : str, optional
@@ -1105,6 +1113,102 @@ class Flight(GeoVectorDataset):
1105
1113
  out.data.pop("level", None) # avoid any ambiguity
1106
1114
  return out
1107
1115
 
1116
+ def distance_to_coords(self: Flight, distance: ArrayOrFloat) -> tuple[
1117
+ ArrayOrFloat,
1118
+ ArrayOrFloat,
1119
+ np.intp | npt.NDArray[np.intp],
1120
+ ]:
1121
+ """
1122
+ Convert distance along flight path to geodesic coordinates.
1123
+
1124
+ Will return a tuple containing `(lat, lon, index)`, where index indicates which flight
1125
+ segment contains the returned coordinate.
1126
+
1127
+ Parameters
1128
+ ----------
1129
+ distance : ArrayOrFloat
1130
+ Distance along flight path, [:math:`m`]
1131
+
1132
+ Returns
1133
+ -------
1134
+ (ArrayOrFloat, ArrayOrFloat, int | npt.NDArray[int])
1135
+ latitude, longitude, and segment index cooresponding to distance.
1136
+ """
1137
+
1138
+ # Check if flight crosses antimeridian line
1139
+ lon_ = self["longitude"]
1140
+ lat_ = self["latitude"]
1141
+ sign_ = np.sign(lon_)
1142
+ min_pos = np.min(lon_[sign_ == 1.0], initial=np.inf)
1143
+ max_neg = np.max(lon_[sign_ == -1.0], initial=-np.inf)
1144
+
1145
+ if (180.0 - min_pos) + (180.0 + max_neg) < 180.0 and min_pos < np.inf and max_neg > -np.inf:
1146
+ # In this case, we believe the flight crosses the antimeridian
1147
+ shift = min_pos
1148
+ # So we shift the longitude "chart"
1149
+ lon_ = (lon_ - shift) % 360.0
1150
+ else:
1151
+ shift = None
1152
+
1153
+ # Make a fake flight that flies at constant height so distance is just
1154
+ # distance traveled across groud
1155
+ flat_dataset = Flight(
1156
+ longitude=self.coords["longitude"],
1157
+ latitude=self.coords["latitude"],
1158
+ time=self.coords["time"],
1159
+ level=[self.coords["level"][0] for _ in range(self.size)],
1160
+ )
1161
+
1162
+ lengths = flat_dataset.segment_length()
1163
+ cumulative_lengths = np.nancumsum(lengths)
1164
+ cumulative_lengths = np.insert(cumulative_lengths[:-1], 0, 0)
1165
+ seg_idx: np.intp | npt.NDArray[np.intp]
1166
+
1167
+ if isinstance(distance, float):
1168
+ seg_idx = np.argmax(cumulative_lengths > distance)
1169
+ else:
1170
+ seg_idx = np.argmax(cumulative_lengths > distance.reshape((distance.size, 1)), axis=1)
1171
+
1172
+ # If in the last segment (which has length 0), then just return the last waypoint
1173
+ seg_idx -= 1
1174
+
1175
+ # linear interpolation in lat/lon - assuming the way points are within 100-200km so this
1176
+ # should be accurate enough without needed to reproject or use spherical distance
1177
+ lat1: ArrayOrFloat = lat_[seg_idx]
1178
+ lon1: ArrayOrFloat = lon_[seg_idx]
1179
+ lat2: ArrayOrFloat = lat_[seg_idx + 1]
1180
+ lon2: ArrayOrFloat = lon_[seg_idx + 1]
1181
+
1182
+ dx = distance - cumulative_lengths[seg_idx]
1183
+ fx = dx / lengths[seg_idx]
1184
+ lat = (1 - fx) * lat1 + fx * lat2
1185
+ lon = (1 - fx) * lon1 + fx * lon2
1186
+
1187
+ if isinstance(distance, float):
1188
+ if distance < 0:
1189
+ lat = np.nan
1190
+ lon = np.nan
1191
+ seg_idx = np.intp(0)
1192
+ elif distance >= cumulative_lengths[-1]:
1193
+ lat = lat_[-1]
1194
+ lon = lon_[-1]
1195
+ seg_idx = np.intp(self.size - 1)
1196
+ else:
1197
+ lat[distance < 0] = np.nan
1198
+ lon[distance < 0] = np.nan
1199
+ seg_idx[distance < 0] = 0 # type: ignore
1200
+
1201
+ lat[distance >= cumulative_lengths[-1]] = lat_[-1]
1202
+ lon[distance >= cumulative_lengths[-1]] = lon_[-1]
1203
+ seg_idx[distance >= cumulative_lengths[-1]] = self.size - 1 # type: ignore
1204
+
1205
+ if shift is not None:
1206
+ # We need to translate back to the original chart here
1207
+ lon += shift
1208
+ lon = ((lon + 180.0) % 360.0) - 180.0
1209
+
1210
+ return lat, lon, seg_idx
1211
+
1108
1212
  def _geodesic_interpolation(self, geodesic_threshold: float) -> pd.DataFrame | None:
1109
1213
  """Geodesic interpolate between large gaps between waypoints.
1110
1214
 
@@ -1349,8 +1453,8 @@ class Flight(GeoVectorDataset):
1349
1453
  >>> # Intersect and attach
1350
1454
  >>> fl["air_temperature"] = fl.intersect_met(met['air_temperature'])
1351
1455
  >>> fl["air_temperature"]
1352
- array([235.94658, 235.95767, 235.96873, ..., 234.59918, 234.60388,
1353
- 234.60846], dtype=float32)
1456
+ array([235.94657007, 235.95766965, 235.96873412, ..., 234.59917962,
1457
+ 234.60387402, 234.60845312])
1354
1458
 
1355
1459
  >>> # Length (in meters) of waypoints whose temperature exceeds 236K
1356
1460
  >>> fl.length_met("air_temperature", threshold=236)
@@ -2063,11 +2167,9 @@ def _resample_to_freq(df: pd.DataFrame, freq: str) -> tuple[pd.DataFrame, pd.Dat
2063
2167
 
2064
2168
  # Manually create a new index that includes all the original index values
2065
2169
  # and the resampled-to-freq index values.
2066
- t0 = df.index[0]
2170
+ t0 = df.index[0].ceil(freq)
2067
2171
  t1 = df.index[-1]
2068
- t = pd.date_range(t0, t1, freq=freq, name="time").floor(freq)
2069
- if t[0] < t0:
2070
- t = t[1:]
2172
+ t = pd.date_range(t0, t1, freq=freq, name="time")
2071
2173
 
2072
2174
  concat_arr = np.concatenate([df.index, t])
2073
2175
  concat_arr = np.unique(concat_arr)
@@ -71,7 +71,9 @@ class PycontrailsRegularGridInterpolator(scipy.interpolate.RegularGridInterpolat
71
71
 
72
72
  self.grid = points
73
73
  self.values = values
74
- self.method = method
74
+ # TODO: consider supporting updated tensor-product spline methods
75
+ # see https://github.com/scipy/scipy/releases/tag/v1.13.0
76
+ self.method = _pick_method(scipy.__version__, method)
75
77
  self.bounds_error = bounds_error
76
78
  self.fill_value = fill_value
77
79
 
@@ -219,6 +221,42 @@ class PycontrailsRegularGridInterpolator(scipy.interpolate.RegularGridInterpolat
219
221
  raise ValueError(msg)
220
222
 
221
223
 
224
+ def _pick_method(scipy_version: str, method: str) -> str:
225
+ """Select an interpolation method.
226
+
227
+ For scipy versions 1.13.0 and later, fall back on legacy implementations
228
+ of tensor-product spline methods. The default implementations in 1.13.0
229
+ and later are incompatible with this class.
230
+
231
+ Parameters
232
+ ----------
233
+ scipy_version : str
234
+ scipy version (major.minor.patch)
235
+
236
+ method : str
237
+ Interpolation method. Passed into :class:`scipy.interpolate.RegularGridInterpolator`
238
+ as-is unless ``scipy_version`` is 1.13.0 or later and ``method`` is ``"slinear"``,
239
+ ``"cubic"``, or ``"quintic"``. In this case, ``"_legacy"`` is appended to ``method``.
240
+
241
+ Returns
242
+ -------
243
+ str
244
+ Interpolation method adjusted for compatibility with this class.
245
+ """
246
+ try:
247
+ version = scipy_version.split(".")
248
+ major = int(version[0])
249
+ minor = int(version[1])
250
+ except (IndexError, ValueError) as exc:
251
+ msg = f"Failed to parse major and minor version from {scipy_version}"
252
+ raise ValueError(msg) from exc
253
+
254
+ reimplemented_methods = ["slinear", "cubic", "quintic"]
255
+ if major > 1 or (major == 1 and minor >= 13) and method in reimplemented_methods:
256
+ return method + "_legacy"
257
+ return method
258
+
259
+
222
260
  def _floatize_time(
223
261
  time: npt.NDArray[np.datetime64], offset: np.datetime64
224
262
  ) -> npt.NDArray[np.float64]:
@@ -674,13 +674,10 @@ class MetDataset(MetBase):
674
674
  >>> da = mda.data # Underlying `xarray` object
675
675
 
676
676
  >>> # Check out a few values
677
- >>> da[5:10, 5:10, 1, 1].values
678
- array([[224.0896 , 224.41374, 224.75946, 225.16237, 225.60507],
679
- [224.09457, 224.42038, 224.76526, 225.16817, 225.61089],
680
- [224.10037, 224.42618, 224.77106, 225.17314, 225.61586],
681
- [224.10617, 224.43282, 224.7777 , 225.17812, 225.62166],
682
- [224.11115, 224.44028, 224.7835 , 225.18393, 225.62663]],
683
- dtype=float32)
677
+ >>> da[5:8, 5:8, 1, 1].values
678
+ array([[224.08959005, 224.41374427, 224.75945349],
679
+ [224.09456429, 224.42037658, 224.76525676],
680
+ [224.10036756, 224.42617985, 224.77106004]])
684
681
 
685
682
  >>> # Mean temperature over entire array
686
683
  >>> da.mean().load().item()
@@ -1618,15 +1615,15 @@ class MetDataArray(MetBase):
1618
1615
 
1619
1616
  >>> # Interpolation at a grid point agrees with value
1620
1617
  >>> mda.interpolate(1, 2, 300, np.datetime64('2022-03-01T14:00'))
1621
- array([241.91974], dtype=float32)
1618
+ array([241.91972984])
1622
1619
 
1623
1620
  >>> da = mda.data
1624
1621
  >>> da.sel(longitude=1, latitude=2, level=300, time=np.datetime64('2022-03-01T14')).item()
1625
- 241.91974
1622
+ 241.9197298421629
1626
1623
 
1627
1624
  >>> # Interpolation off grid
1628
1625
  >>> mda.interpolate(1.1, 2.1, 290, np.datetime64('2022-03-01 13:10'))
1629
- array([239.83794], dtype=float32)
1626
+ array([239.83793798])
1630
1627
 
1631
1628
  >>> # Interpolate along path
1632
1629
  >>> longitude = np.linspace(1, 2, 10)
@@ -1634,8 +1631,9 @@ class MetDataArray(MetBase):
1634
1631
  >>> level = np.linspace(200, 300, 10)
1635
1632
  >>> time = pd.date_range("2022-03-01T14", periods=10, freq="5min")
1636
1633
  >>> mda.interpolate(longitude, latitude, level, time)
1637
- array([220.44348, 223.089 , 225.7434 , 228.41643, 231.10858, 233.54858,
1638
- 235.71506, 237.86479, 239.99275, 242.10793], dtype=float32)
1634
+ array([220.44347694, 223.08900738, 225.74338924, 228.41642088,
1635
+ 231.10858599, 233.54857391, 235.71504913, 237.86478872,
1636
+ 239.99274623, 242.10792167])
1639
1637
  """
1640
1638
  # Load if necessary
1641
1639
  if not self.in_memory: