pycontrails 0.50.0__tar.gz → 0.50.1__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 (252) hide show
  1. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/workflows/release.yaml +1 -1
  2. {pycontrails-0.50.0 → pycontrails-0.50.1}/CHANGELOG.md +28 -0
  3. {pycontrails-0.50.0 → pycontrails-0.50.1}/PKG-INFO +1 -1
  4. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/_static/pycontrails.bib +53 -18
  5. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/_version.py +2 -2
  6. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/flight.py +11 -6
  7. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/interpolation.py +39 -1
  8. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/met.py +10 -12
  9. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/rgi_cython.c +195 -165
  10. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/vector.py +10 -8
  11. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/goes.py +14 -12
  12. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/cocip.py +22 -5
  13. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/cocip_params.py +11 -2
  14. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/contrail_properties.py +4 -9
  15. pycontrails-0.50.1/pycontrails/models/cocip/unterstrasser_wake_vortex.py +403 -0
  16. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/wake_vortex.py +22 -1
  17. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocipgrid/cocip_grid.py +103 -6
  18. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/issr.py +1 -1
  19. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails.egg-info/PKG-INFO +1 -1
  20. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails.egg-info/SOURCES.txt +2 -0
  21. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/conftest.py +17 -3
  22. pycontrails-0.50.1/tests/unit/static/cocip-contrail-output.json +2442 -0
  23. pycontrails-0.50.1/tests/unit/static/cocip-contrail-output2.json +17112 -0
  24. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/cocip-flight-output.json +522 -522
  25. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/cocip-flight-output2.json +3549 -3549
  26. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_cocip.py +52 -4
  27. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_cocip_grid.py +193 -17
  28. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_cocip_grid_parity.py +6 -3
  29. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_dtypes.py +7 -2
  30. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_flight.py +24 -8
  31. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_humidity_scaling.py +1 -1
  32. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_interpolation.py +1 -1
  33. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_tau_cirrus.py +2 -2
  34. pycontrails-0.50.1/tests/unit/test_unterstrasser_wake_vortex.py +99 -0
  35. pycontrails-0.50.0/tests/unit/static/cocip-contrail-output.json +0 -2442
  36. pycontrails-0.50.0/tests/unit/static/cocip-contrail-output2.json +0 -17112
  37. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  38. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  39. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/dependabot.yaml +0 -0
  40. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/pull_request_template.md +0 -0
  41. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/workflows/benchmark.yaml +0 -0
  42. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/workflows/docs.yaml +0 -0
  43. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/workflows/doctest.yaml +0 -0
  44. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/workflows/scorecard.yaml +0 -0
  45. {pycontrails-0.50.0 → pycontrails-0.50.1}/.github/workflows/test.yaml +0 -0
  46. {pycontrails-0.50.0 → pycontrails-0.50.1}/.gitignore +0 -0
  47. {pycontrails-0.50.0 → pycontrails-0.50.1}/.pre-commit-config.yaml +0 -0
  48. {pycontrails-0.50.0 → pycontrails-0.50.1}/.zenodo.json +0 -0
  49. {pycontrails-0.50.0 → pycontrails-0.50.1}/CONTRIBUTING.md +0 -0
  50. {pycontrails-0.50.0 → pycontrails-0.50.1}/LICENSE +0 -0
  51. {pycontrails-0.50.0 → pycontrails-0.50.1}/Makefile +0 -0
  52. {pycontrails-0.50.0 → pycontrails-0.50.1}/NOTICE +0 -0
  53. {pycontrails-0.50.0 → pycontrails-0.50.1}/README.md +0 -0
  54. {pycontrails-0.50.0 → pycontrails-0.50.1}/RELEASE.md +0 -0
  55. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/_static/css/style.css +0 -0
  56. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/_static/img/colab.png +0 -0
  57. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/_static/img/favicon.png +0 -0
  58. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/_static/img/logo-dark.png +0 -0
  59. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/_static/img/logo.png +0 -0
  60. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/api.rst +0 -0
  61. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/changelog.rst +0 -0
  62. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/conf.py +0 -0
  63. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/contributing.rst +0 -0
  64. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/develop.rst +0 -0
  65. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/flight.rst +0 -0
  66. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/index.rst +0 -0
  67. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/install.rst +0 -0
  68. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/integrations/ACCF.ipynb +0 -0
  69. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/literature.rst +0 -0
  70. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/meteorology.rst +0 -0
  71. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/models.rst +0 -0
  72. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/ARCO-ERA5.ipynb +0 -0
  73. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/AircraftPerformance.ipynb +0 -0
  74. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/Cache.ipynb +0 -0
  75. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/CoCiP.ipynb +0 -0
  76. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/ECMWF.ipynb +0 -0
  77. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/Flight.ipynb +0 -0
  78. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/GFS.ipynb +0 -0
  79. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/GOES.ipynb +0 -0
  80. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/ISSR.ipynb +0 -0
  81. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/Meteorology.ipynb +0 -0
  82. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/SAC.ipynb +0 -0
  83. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/advection.ipynb +0 -0
  84. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/airports.ipynb +0 -0
  85. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/data/.gitignore +0 -0
  86. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/data/flight-ap.csv +0 -0
  87. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/data/flight-cocip.csv +0 -0
  88. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/data/flight-fdr.csv +0 -0
  89. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/data/flight-noisy.csv +0 -0
  90. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/data/flight.csv +0 -0
  91. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/flightplan.ipynb +0 -0
  92. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/model-levels.ipynb +0 -0
  93. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/run-cocip-on-flight.ipynb +0 -0
  94. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/run-cocip-with-fdr.ipynb +0 -0
  95. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks/specific-humidity-interpolation.ipynb +0 -0
  96. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/notebooks.rst +0 -0
  97. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/observations.rst +0 -0
  98. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/tutorials.rst +0 -0
  99. {pycontrails-0.50.0 → pycontrails-0.50.1}/docs/utilities.rst +0 -0
  100. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/__init__.py +0 -0
  101. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/__init__.py +0 -0
  102. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/aircraft_performance.py +0 -0
  103. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/airports.py +0 -0
  104. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/cache.py +0 -0
  105. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/coordinates.py +0 -0
  106. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/datalib.py +0 -0
  107. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/fleet.py +0 -0
  108. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/flightplan.py +0 -0
  109. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/fuel.py +0 -0
  110. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/met_var.py +0 -0
  111. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/models.py +0 -0
  112. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/polygon.py +0 -0
  113. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/core/rgi_cython.pyx +0 -0
  114. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/__init__.py +0 -0
  115. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/__init__.py +0 -0
  116. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/arco_era5.py +0 -0
  117. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/common.py +0 -0
  118. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/era5.py +0 -0
  119. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/hres.py +0 -0
  120. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/ifs.py +0 -0
  121. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/ecmwf/variables.py +0 -0
  122. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/gfs/__init__.py +0 -0
  123. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/gfs/gfs.py +0 -0
  124. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/gfs/variables.py +0 -0
  125. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/spire/__init__.py +0 -0
  126. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/datalib/spire/spire.py +0 -0
  127. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/ext/bada.py +0 -0
  128. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/ext/cirium.py +0 -0
  129. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/ext/empirical_grid.py +0 -0
  130. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/ext/synthetic_flight.py +0 -0
  131. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/__init__.py +0 -0
  132. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/accf.py +0 -0
  133. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/__init__.py +0 -0
  134. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/cocip_uncertainty.py +0 -0
  135. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/output_formats.py +0 -0
  136. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/radiative_forcing.py +0 -0
  137. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/radiative_heating.py +0 -0
  138. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocip/wind_shear.py +0 -0
  139. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocipgrid/__init__.py +0 -0
  140. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/cocipgrid/cocip_grid_params.py +0 -0
  141. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/dry_advection.py +0 -0
  142. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/__init__.py +0 -0
  143. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/black_carbon.py +0 -0
  144. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/emissions.py +0 -0
  145. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/ffm2.py +0 -0
  146. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/static/default-engine-uids.csv +0 -0
  147. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/static/edb-gaseous-v28c-engines.csv +0 -0
  148. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/emissions/static/edb-nvpm-v28c-engines.csv +0 -0
  149. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/humidity_scaling/__init__.py +0 -0
  150. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/humidity_scaling/humidity_scaling.py +0 -0
  151. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/humidity_scaling/quantiles/era5-quantiles.pq +0 -0
  152. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/pcc.py +0 -0
  153. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/pcr.py +0 -0
  154. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/ps_model/__init__.py +0 -0
  155. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/ps_model/ps_aircraft_params.py +0 -0
  156. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/ps_model/ps_grid.py +0 -0
  157. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/ps_model/ps_model.py +0 -0
  158. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/ps_model/ps_operational_limits.py +0 -0
  159. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/ps_model/static/ps-aircraft-params-20240209.csv +0 -0
  160. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/sac.py +0 -0
  161. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/models/tau_cirrus.py +0 -0
  162. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/physics/__init__.py +0 -0
  163. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/physics/constants.py +0 -0
  164. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/physics/geo.py +0 -0
  165. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/physics/jet.py +0 -0
  166. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/physics/thermo.py +0 -0
  167. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/physics/units.py +0 -0
  168. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/py.typed +0 -0
  169. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/utils/__init__.py +0 -0
  170. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/utils/dependencies.py +0 -0
  171. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/utils/iteration.py +0 -0
  172. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/utils/json.py +0 -0
  173. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/utils/temp.py +0 -0
  174. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails/utils/types.py +0 -0
  175. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails.egg-info/dependency_links.txt +0 -0
  176. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails.egg-info/requires.txt +0 -0
  177. {pycontrails-0.50.0 → pycontrails-0.50.1}/pycontrails.egg-info/top_level.txt +0 -0
  178. {pycontrails-0.50.0 → pycontrails-0.50.1}/pyproject.toml +0 -0
  179. {pycontrails-0.50.0 → pycontrails-0.50.1}/setup.cfg +0 -0
  180. {pycontrails-0.50.0 → pycontrails-0.50.1}/setup.py +0 -0
  181. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/__init__.py +0 -0
  182. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/_deprecated.py +0 -0
  183. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/Makefile +0 -0
  184. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/README.md +0 -0
  185. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/benchmark.py +0 -0
  186. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/compare.py +0 -0
  187. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/data.md +0 -0
  188. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/output.py +0 -0
  189. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip/review.ipynb +0 -0
  190. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/cocip-fortran/README.md +0 -0
  191. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/north-atlantic-study/.gcloudignore +0 -0
  192. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/north-atlantic-study/README.md +0 -0
  193. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/north-atlantic-study/support.py +0 -0
  194. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/benchmark/north-atlantic-study/validate.py +0 -0
  195. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/fixtures/cocip-met.py +0 -0
  196. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/fixtures/cocip-met2.py +0 -0
  197. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/fixtures/ecmwf-met.py +0 -0
  198. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/fixtures/gfs-met.py +0 -0
  199. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/__init__.py +0 -0
  200. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/NOAA_Solar_Calculations_day.csv +0 -0
  201. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/cocip-output-contrail-edges.json +0 -0
  202. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/cocip-output-flts-20190101-eu.pq +0 -0
  203. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/flight-cocip2.csv +0 -0
  204. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/flight-meridian.csv +0 -0
  205. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/flight-metadata.json +0 -0
  206. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/flight-spire-data-cleaning.pq +0 -0
  207. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/flight.csv +0 -0
  208. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/flt-wypts-20190101-eu.pq +0 -0
  209. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-20190101-eu.nc +0 -0
  210. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-accf-pl.nc +0 -0
  211. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-accf-sl.nc +0 -0
  212. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-ecmwf-pl.nc +0 -0
  213. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-ecmwf-sl.nc +0 -0
  214. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-era5-cocip1.nc +0 -0
  215. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-era5-cocip2.nc +0 -0
  216. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/met-gfs.nc +0 -0
  217. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/polygon-bug.nc +0 -0
  218. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/rad-20190101-eu.nc +0 -0
  219. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/rad-era5-cocip1.nc +0 -0
  220. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/rad-era5-cocip2.nc +0 -0
  221. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/static/rad-gfs.nc +0 -0
  222. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_accf.py +0 -0
  223. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_airports.py +0 -0
  224. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_cache.py +0 -0
  225. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_cocip_radiative_forcing.py +0 -0
  226. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_cocip_uncertainty.py +0 -0
  227. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_coordinates.py +0 -0
  228. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_datalib.py +0 -0
  229. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_dry_advection.py +0 -0
  230. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_ecmwf.py +0 -0
  231. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_emissions.py +0 -0
  232. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_fleet.py +0 -0
  233. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_flightplan.py +0 -0
  234. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_fuel.py +0 -0
  235. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_geo.py +0 -0
  236. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_gfs.py +0 -0
  237. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_goes.py +0 -0
  238. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_grid_to_netcdf.py +0 -0
  239. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_init.py +0 -0
  240. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_met.py +0 -0
  241. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_met_cache.py +0 -0
  242. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_models.py +0 -0
  243. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_pcc.py +0 -0
  244. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_polygons.py +0 -0
  245. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_ps_model.py +0 -0
  246. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_sac_issr.py +0 -0
  247. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_spire.py +0 -0
  248. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_thermo_sac.py +0 -0
  249. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_units.py +0 -0
  250. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_utils.py +0 -0
  251. {pycontrails-0.50.0 → pycontrails-0.50.1}/tests/unit/test_vector.py +0 -0
  252. {pycontrails-0.50.0 → pycontrails-0.50.1}/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,34 @@
1
1
 
2
2
  # Changelog
3
3
 
4
+ ## v0.50.1
5
+
6
+ ### Breaking changes
7
+
8
+ - 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.
9
+
10
+ ### Features
11
+
12
+ - 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).
13
+ - 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.
14
+ - 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.
15
+ - 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.
16
+ The Unterstrasser (2016) parameterization can be used in CoCiP by setting a new parameter, `unterstrasser_ice_survival_fraction`, to `True`.
17
+ - Adds optional ATR20 to CoCiPGrid model.
18
+
19
+ ### Fixes
20
+
21
+ - Update flight resampling logic to align with expected behavior for very short flights, which is now detailed in the `Flight.resample_and_fill` docstring.
22
+
23
+ ### Internals
24
+
25
+ - 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`.
26
+ - Modifies `CoCiPGrid` so that setting `compute_atr_20` (defined in `CoCipParams`) to `True` adds `global_yearly_mean_rf` and `atr20` to CoCiP-grid output.
27
+ - Replaces `pycontrails.datalib.GOES` ash convention label "MIT" with "SEVIRI"
28
+ - Modifies meteorology time step selection logic in `CoCiPGrid` to reduce duplicate chunk downloads when reading from remote zarr stores.
29
+ - 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.
30
+ - Updates `RegularGridInterpolator` to fall back on legacy scipy implementations of tensor-product spline methods when using scipy versions 1.13.0 and later.
31
+
4
32
  ## v0.50.0
5
33
 
6
34
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycontrails
3
- Version: 0.50.0
3
+ Version: 0.50.1
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
  }
@@ -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.1'
16
+ __version_tuple__ = version_tuple = (0, 50, 1)
@@ -787,6 +787,13 @@ class Flight(GeoVectorDataset):
787
787
  Waypoints are resampled according to the frequency ``freq``. Values for :attr:`data`
788
788
  columns ``longitude``, ``latitude``, and ``altitude`` are interpolated.
789
789
 
790
+ Resampled waypoints will include all multiples of ``freq`` between the flight
791
+ start and end time. For example, when resampling to a frequency of 1 minute,
792
+ a flight that starts at 2020/1/1 00:00:59 and ends at 2020/1/1 00:01:01
793
+ will return a single waypoint at 2020/1/1 00:01:00, whereas a flight that
794
+ starts at 2020/1/1 00:01:01 and ends at 2020/1/1 00:01:59 will return an empty
795
+ flight.
796
+
790
797
  Parameters
791
798
  ----------
792
799
  freq : str, optional
@@ -1349,8 +1356,8 @@ class Flight(GeoVectorDataset):
1349
1356
  >>> # Intersect and attach
1350
1357
  >>> fl["air_temperature"] = fl.intersect_met(met['air_temperature'])
1351
1358
  >>> fl["air_temperature"]
1352
- array([235.94658, 235.95767, 235.96873, ..., 234.59918, 234.60388,
1353
- 234.60846], dtype=float32)
1359
+ array([235.94657007, 235.95766965, 235.96873412, ..., 234.59917962,
1360
+ 234.60387402, 234.60845312])
1354
1361
 
1355
1362
  >>> # Length (in meters) of waypoints whose temperature exceeds 236K
1356
1363
  >>> fl.length_met("air_temperature", threshold=236)
@@ -2063,11 +2070,9 @@ def _resample_to_freq(df: pd.DataFrame, freq: str) -> tuple[pd.DataFrame, pd.Dat
2063
2070
 
2064
2071
  # Manually create a new index that includes all the original index values
2065
2072
  # and the resampled-to-freq index values.
2066
- t0 = df.index[0]
2073
+ t0 = df.index[0].ceil(freq)
2067
2074
  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:]
2075
+ t = pd.date_range(t0, t1, freq=freq, name="time")
2071
2076
 
2072
2077
  concat_arr = np.concatenate([df.index, t])
2073
2078
  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: