pycontrails 0.54.10__tar.gz → 0.54.12__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 (278) hide show
  1. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/workflows/docs.yaml +2 -2
  2. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/workflows/doctest.yaml +2 -2
  3. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/workflows/release.yaml +6 -6
  4. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/workflows/scorecard.yaml +2 -2
  5. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/workflows/test.yaml +2 -2
  6. {pycontrails-0.54.10 → pycontrails-0.54.12}/CHANGELOG.md +31 -0
  7. {pycontrails-0.54.10 → pycontrails-0.54.12}/Makefile +0 -6
  8. {pycontrails-0.54.10/pycontrails.egg-info → pycontrails-0.54.12}/PKG-INFO +2 -4
  9. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/_version.py +16 -3
  10. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/flight.py +31 -16
  11. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/flightplan.py +2 -2
  12. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/met.py +1 -1
  13. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/models.py +5 -1
  14. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/polygon.py +1 -1
  15. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/rgi_cython.c +705 -536
  16. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/vector.py +5 -5
  17. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/_met_utils/metsource.py +2 -2
  18. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/hres.py +47 -30
  19. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/hres_model_level.py +2 -0
  20. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/goes.py +12 -5
  21. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/accf.py +4 -6
  22. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/output_formats.py +4 -4
  23. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocipgrid/cocip_grid.py +4 -4
  24. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/dry_advection.py +41 -11
  25. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/issr.py +1 -1
  26. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/pcr.py +1 -1
  27. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/sac.py +5 -22
  28. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/geo.py +3 -3
  29. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/thermo.py +121 -21
  30. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/units.py +1 -1
  31. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/utils/types.py +3 -10
  32. {pycontrails-0.54.10 → pycontrails-0.54.12/pycontrails.egg-info}/PKG-INFO +2 -4
  33. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails.egg-info/requires.txt +0 -1
  34. {pycontrails-0.54.10 → pycontrails-0.54.12}/pyproject.toml +9 -10
  35. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/cocip-contrail-output.json +159 -159
  36. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/cocip-flight-output.json +95 -55
  37. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/cocip-flight-output2.json +684 -360
  38. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_cocip.py +2 -2
  39. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_cocip_grid.py +5 -3
  40. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_coordinates.py +8 -8
  41. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_dry_advection.py +60 -0
  42. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_flight.py +17 -0
  43. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_geo.py +1 -2
  44. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_sac_issr.py +34 -26
  45. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_vector.py +9 -3
  46. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  47. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  48. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/dependabot.yaml +0 -0
  49. {pycontrails-0.54.10 → pycontrails-0.54.12}/.github/pull_request_template.md +0 -0
  50. {pycontrails-0.54.10 → pycontrails-0.54.12}/.gitignore +0 -0
  51. {pycontrails-0.54.10 → pycontrails-0.54.12}/.pre-commit-config.yaml +0 -0
  52. {pycontrails-0.54.10 → pycontrails-0.54.12}/.zenodo.json +0 -0
  53. {pycontrails-0.54.10 → pycontrails-0.54.12}/CONTRIBUTING.md +0 -0
  54. {pycontrails-0.54.10 → pycontrails-0.54.12}/LICENSE +0 -0
  55. {pycontrails-0.54.10 → pycontrails-0.54.12}/NOTICE +0 -0
  56. {pycontrails-0.54.10 → pycontrails-0.54.12}/README.md +0 -0
  57. {pycontrails-0.54.10 → pycontrails-0.54.12}/RELEASE.md +0 -0
  58. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/_static/css/style.css +0 -0
  59. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/_static/img/colab.png +0 -0
  60. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/_static/img/favicon.png +0 -0
  61. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/_static/img/logo-dark.png +0 -0
  62. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/_static/img/logo.png +0 -0
  63. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/_static/pycontrails.bib +0 -0
  64. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/api.rst +0 -0
  65. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/changelog.rst +0 -0
  66. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/conf.py +0 -0
  67. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/contributing.rst +0 -0
  68. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/develop.rst +0 -0
  69. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/flight.rst +0 -0
  70. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/index.rst +0 -0
  71. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/install.rst +0 -0
  72. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/integrations/ACCF.ipynb +0 -0
  73. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/integrations/APCEMM.ipynb +0 -0
  74. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/literature.rst +0 -0
  75. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/meteorology.rst +0 -0
  76. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/models.rst +0 -0
  77. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/ARCO-ERA5.ipynb +0 -0
  78. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/AircraftPerformance.ipynb +0 -0
  79. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/Cache.ipynb +0 -0
  80. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/CoCiP.ipynb +0 -0
  81. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/CoCiPGrid.ipynb +0 -0
  82. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/ECMWF.ipynb +0 -0
  83. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/Flight.ipynb +0 -0
  84. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/GFS.ipynb +0 -0
  85. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/GOES.ipynb +0 -0
  86. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/ISSR.ipynb +0 -0
  87. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/Landsat.ipynb +0 -0
  88. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/Meteorology.ipynb +0 -0
  89. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/SAC.ipynb +0 -0
  90. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/Sentinel.ipynb +0 -0
  91. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/advection.ipynb +0 -0
  92. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/airports.ipynb +0 -0
  93. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/.gitignore +0 -0
  94. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/flight-ap.csv +0 -0
  95. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/flight-cocip.csv +0 -0
  96. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/flight-fdr.csv +0 -0
  97. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/flight-noisy.csv +0 -0
  98. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/flight.csv +0 -0
  99. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/iagos-flight-landsat.csv +0 -0
  100. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/data/iagos-flight-sentinel.csv +0 -0
  101. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/flightplan.ipynb +0 -0
  102. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/model-levels.ipynb +0 -0
  103. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/run-cocip-on-flight.ipynb +0 -0
  104. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/run-cocip-with-fdr.ipynb +0 -0
  105. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks/specific-humidity-interpolation.ipynb +0 -0
  106. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/notebooks.rst +0 -0
  107. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/observations.rst +0 -0
  108. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/tutorials.rst +0 -0
  109. {pycontrails-0.54.10 → pycontrails-0.54.12}/docs/utilities.rst +0 -0
  110. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/__init__.py +0 -0
  111. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/__init__.py +0 -0
  112. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/aircraft_performance.py +0 -0
  113. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/airports.py +0 -0
  114. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/cache.py +0 -0
  115. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/coordinates.py +0 -0
  116. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/fleet.py +0 -0
  117. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/fuel.py +0 -0
  118. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/interpolation.py +0 -0
  119. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/met_var.py +0 -0
  120. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/core/rgi_cython.pyx +0 -0
  121. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/__init__.py +0 -0
  122. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/_leo_utils/search.py +0 -0
  123. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/_leo_utils/static/bq_roi_query.sql +0 -0
  124. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/_leo_utils/vis.py +0 -0
  125. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/__init__.py +0 -0
  126. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/arco_era5.py +0 -0
  127. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/common.py +0 -0
  128. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/era5.py +0 -0
  129. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/era5_model_level.py +0 -0
  130. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/ifs.py +0 -0
  131. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/model_levels.py +0 -0
  132. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/static/model_level_dataframe_v20240418.csv +0 -0
  133. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/ecmwf/variables.py +0 -0
  134. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/gfs/__init__.py +0 -0
  135. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/gfs/gfs.py +0 -0
  136. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/gfs/variables.py +0 -0
  137. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/landsat.py +0 -0
  138. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/sentinel.py +0 -0
  139. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/spire/__init__.py +0 -0
  140. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/spire/exceptions.py +0 -0
  141. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/datalib/spire/spire.py +0 -0
  142. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/ext/bada.py +0 -0
  143. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/ext/cirium.py +0 -0
  144. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/ext/empirical_grid.py +0 -0
  145. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/ext/synthetic_flight.py +0 -0
  146. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/__init__.py +0 -0
  147. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/apcemm/__init__.py +0 -0
  148. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/apcemm/apcemm.py +0 -0
  149. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/apcemm/inputs.py +0 -0
  150. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/apcemm/static/apcemm_yaml_template.yaml +0 -0
  151. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/apcemm/utils.py +0 -0
  152. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/__init__.py +0 -0
  153. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/cocip.py +0 -0
  154. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/cocip_params.py +0 -0
  155. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/cocip_uncertainty.py +0 -0
  156. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/contrail_properties.py +0 -0
  157. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/radiative_forcing.py +0 -0
  158. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/radiative_heating.py +0 -0
  159. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/unterstrasser_wake_vortex.py +0 -0
  160. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/wake_vortex.py +0 -0
  161. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocip/wind_shear.py +0 -0
  162. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocipgrid/__init__.py +0 -0
  163. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/cocipgrid/cocip_grid_params.py +0 -0
  164. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/__init__.py +0 -0
  165. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/black_carbon.py +0 -0
  166. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/emissions.py +0 -0
  167. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/ffm2.py +0 -0
  168. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/static/default-engine-uids.csv +0 -0
  169. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/static/edb-gaseous-v29b-engines.csv +0 -0
  170. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/emissions/static/edb-nvpm-v29b-engines.csv +0 -0
  171. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/humidity_scaling/__init__.py +0 -0
  172. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/humidity_scaling/humidity_scaling.py +0 -0
  173. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/humidity_scaling/quantiles/era5-model-level-quantiles.pq +0 -0
  174. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/humidity_scaling/quantiles/era5-pressure-level-quantiles.pq +0 -0
  175. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/pcc.py +0 -0
  176. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/__init__.py +0 -0
  177. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/ps_aircraft_params.py +0 -0
  178. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/ps_grid.py +0 -0
  179. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/ps_model.py +0 -0
  180. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/ps_operational_limits.py +0 -0
  181. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/static/ps-aircraft-params-20250328.csv +0 -0
  182. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/ps_model/static/ps-synonym-list-20250328.csv +0 -0
  183. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/models/tau_cirrus.py +0 -0
  184. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/__init__.py +0 -0
  185. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/constants.py +0 -0
  186. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/jet.py +0 -0
  187. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/static/iata-cargo-load-factors-20250221.csv +0 -0
  188. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/physics/static/iata-passenger-load-factors-20250221.csv +0 -0
  189. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/py.typed +0 -0
  190. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/utils/__init__.py +0 -0
  191. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/utils/dependencies.py +0 -0
  192. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/utils/iteration.py +0 -0
  193. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/utils/json.py +0 -0
  194. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails/utils/temp.py +0 -0
  195. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails.egg-info/SOURCES.txt +0 -0
  196. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails.egg-info/dependency_links.txt +0 -0
  197. {pycontrails-0.54.10 → pycontrails-0.54.12}/pycontrails.egg-info/top_level.txt +0 -0
  198. {pycontrails-0.54.10 → pycontrails-0.54.12}/setup.cfg +0 -0
  199. {pycontrails-0.54.10 → pycontrails-0.54.12}/setup.py +0 -0
  200. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/__init__.py +0 -0
  201. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/_deprecated.py +0 -0
  202. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/Makefile +0 -0
  203. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/README.md +0 -0
  204. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/benchmark.py +0 -0
  205. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/compare.py +0 -0
  206. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/data.md +0 -0
  207. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/output.py +0 -0
  208. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip/review.ipynb +0 -0
  209. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/cocip-fortran/README.md +0 -0
  210. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/north-atlantic-study/.gcloudignore +0 -0
  211. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/north-atlantic-study/README.md +0 -0
  212. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/north-atlantic-study/support.py +0 -0
  213. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/benchmark/north-atlantic-study/validate.py +0 -0
  214. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/fixtures/cocip-met.py +0 -0
  215. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/fixtures/cocip-met2.py +0 -0
  216. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/fixtures/ecmwf-met.py +0 -0
  217. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/fixtures/gfs-met.py +0 -0
  218. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/__init__.py +0 -0
  219. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/conftest.py +0 -0
  220. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/NOAA_Solar_Calculations_day.csv +0 -0
  221. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/cocip-contrail-output2.json +0 -0
  222. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/cocip-output-contrail-edges.json +0 -0
  223. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/cocip-output-flts-20190101-eu.pq +0 -0
  224. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/flight-cocip2.csv +0 -0
  225. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/flight-meridian.csv +0 -0
  226. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/flight-metadata.json +0 -0
  227. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/flight-spire-data-cleaning.pq +0 -0
  228. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/flight.csv +0 -0
  229. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/flt-wypts-20190101-eu.pq +0 -0
  230. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-20190101-eu.nc +0 -0
  231. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-accf-pl.nc +0 -0
  232. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-accf-sl.nc +0 -0
  233. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-ecmwf-lnsp.nc +0 -0
  234. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-ecmwf-ml.nc +0 -0
  235. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-ecmwf-pl.nc +0 -0
  236. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-ecmwf-sl.nc +0 -0
  237. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-era5-cocip1.nc +0 -0
  238. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-era5-cocip2.nc +0 -0
  239. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/met-gfs.nc +0 -0
  240. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/polygon-bug.nc +0 -0
  241. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/rad-20190101-eu.nc +0 -0
  242. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/rad-era5-cocip1.nc +0 -0
  243. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/rad-era5-cocip2.nc +0 -0
  244. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/static/rad-gfs.nc +0 -0
  245. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_accf.py +0 -0
  246. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_airports.py +0 -0
  247. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_apcemm.py +0 -0
  248. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_cache.py +0 -0
  249. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_cocip_grid_parity.py +0 -0
  250. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_cocip_radiative_forcing.py +0 -0
  251. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_cocip_uncertainty.py +0 -0
  252. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_datalib_metsource.py +0 -0
  253. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_dtypes.py +0 -0
  254. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_ecmwf.py +0 -0
  255. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_emissions.py +0 -0
  256. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_fleet.py +0 -0
  257. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_flightplan.py +0 -0
  258. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_fuel.py +0 -0
  259. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_gfs.py +0 -0
  260. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_goes.py +0 -0
  261. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_grid_to_netcdf.py +0 -0
  262. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_humidity_scaling.py +0 -0
  263. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_init.py +0 -0
  264. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_interpolation.py +0 -0
  265. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_leo.py +0 -0
  266. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_met.py +0 -0
  267. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_met_cache.py +0 -0
  268. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_models.py +0 -0
  269. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_pcc.py +0 -0
  270. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_polygons.py +0 -0
  271. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_ps_model.py +0 -0
  272. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_spire.py +0 -0
  273. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_tau_cirrus.py +0 -0
  274. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_thermo_sac.py +0 -0
  275. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_units.py +0 -0
  276. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_unterstrasser_wake_vortex.py +0 -0
  277. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_utils.py +0 -0
  278. {pycontrails-0.54.10 → pycontrails-0.54.12}/tests/unit/test_zarr.py +0 -0
@@ -31,7 +31,7 @@ jobs:
31
31
  - name: OS Dependencies
32
32
  run: sudo apt-get install -y pandoc
33
33
 
34
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v5
35
35
  with:
36
36
  fetch-depth: 0
37
37
 
@@ -74,7 +74,7 @@ jobs:
74
74
  ls -la docs/_build/html
75
75
 
76
76
  - name: Upload artifact
77
- uses: actions/upload-pages-artifact@v3
77
+ uses: actions/upload-pages-artifact@v4
78
78
  with:
79
79
  path: 'docs/_build/html/'
80
80
 
@@ -35,7 +35,7 @@ jobs:
35
35
  runs-on: ubuntu-latest
36
36
 
37
37
  steps:
38
- - uses: actions/checkout@v4
38
+ - uses: actions/checkout@v5
39
39
  with:
40
40
  fetch-depth: 0
41
41
 
@@ -51,7 +51,7 @@ jobs:
51
51
  credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
52
52
 
53
53
  - name: Set up Cloud SDK
54
- uses: google-github-actions/setup-gcloud@v2
54
+ uses: google-github-actions/setup-gcloud@v3.0.0
55
55
 
56
56
  # put bada files in the default location
57
57
  - name: BADA files
@@ -20,7 +20,7 @@ jobs:
20
20
  - name: OS Dependencies
21
21
  run: sudo apt-get install -y curl jq
22
22
 
23
- - uses: actions/checkout@v4
23
+ - uses: actions/checkout@v5
24
24
 
25
25
  - name: Check main test status
26
26
  run: make main-test-status
@@ -34,13 +34,13 @@ jobs:
34
34
  os: [ubuntu-latest, windows-latest, macos-latest]
35
35
 
36
36
  steps:
37
- - uses: actions/checkout@v4
37
+ - uses: actions/checkout@v5
38
38
  with:
39
39
  fetch-depth: 0
40
40
 
41
41
  # https://cibuildwheel.readthedocs.io/en/stable/options/#testing
42
42
  - name: Build wheels
43
- uses: pypa/cibuildwheel@v2.23
43
+ uses: pypa/cibuildwheel@v3.1
44
44
  env:
45
45
  CIBW_BUILD: cp310-* cp311-* cp312-* cp313-*
46
46
  CIBW_SKIP: '*-win32 *-manylinux_i686 *-musllinux*'
@@ -69,7 +69,7 @@ jobs:
69
69
  name: Build source distribution
70
70
  runs-on: ubuntu-latest
71
71
  steps:
72
- - uses: actions/checkout@v4
72
+ - uses: actions/checkout@v5
73
73
  with:
74
74
  fetch-depth: 0
75
75
 
@@ -99,7 +99,7 @@ jobs:
99
99
 
100
100
  steps:
101
101
  - name: Download artifacts
102
- uses: actions/download-artifact@v4
102
+ uses: actions/download-artifact@v5
103
103
  with:
104
104
  path: artifacts
105
105
 
@@ -132,7 +132,7 @@ jobs:
132
132
 
133
133
  steps:
134
134
  - name: Download artifacts
135
- uses: actions/download-artifact@v4
135
+ uses: actions/download-artifact@v5
136
136
  with:
137
137
  path: artifacts
138
138
 
@@ -27,10 +27,10 @@ jobs:
27
27
  id-token: write
28
28
 
29
29
  steps:
30
- - uses: actions/checkout@v4
30
+ - uses: actions/checkout@v5
31
31
 
32
32
  - name: Run OpenSSF Security Scorecard
33
- uses: ossf/scorecard-action@v2.4.1
33
+ uses: ossf/scorecard-action@v2.4.2
34
34
  with:
35
35
  results_file: results.sarif
36
36
  results_format: sarif
@@ -42,7 +42,7 @@ jobs:
42
42
  runs-on: ${{ matrix.os }}
43
43
 
44
44
  steps:
45
- - uses: actions/checkout@v4
45
+ - uses: actions/checkout@v5
46
46
  with:
47
47
  fetch-depth: 0
48
48
 
@@ -68,7 +68,7 @@ jobs:
68
68
  credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
69
69
 
70
70
  - name: Set up Cloud SDK
71
- uses: google-github-actions/setup-gcloud@v2
71
+ uses: google-github-actions/setup-gcloud@v3.0.0
72
72
 
73
73
  - name: Download BADA files
74
74
  timeout-minutes: 5 # `gcloud storage cp` occasionally hangs on windows
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.54.12
4
+
5
+ ### Breaking changes
6
+
7
+ - Update the formula used to compute the saturation vapor pressure over liquid water from Sonntag (1994) to [Murphy and Koop (2005)](https://doi.org/10.1256/qj.04.94). This improves consistency with [Ponsonby et al.](https://egusphere.copernicus.org/preprints/2025/egusphere-2025-1717/). Minor numerical differences may appear in models that depend on the saturation vapor pressure over liquid water (for example, applications involving the Schmidt-Appleman criterion). Users who wish to supply their own saturation vapor pressure function can monkey-patch `thermo.e_sat_liquid` and `thermo.e_sat_liquid_prime`.
8
+
9
+ ### Internals
10
+
11
+ - Consolidate several `pycontrails.utils.types` type variables to speed up type checking. This has no effect on runtime behavior.
12
+
13
+ ## 0.54.11
14
+
15
+ ### Features
16
+
17
+ - Add new `timesteps` parameter to the `DryAdvection` model. If provided, this parameter overrides the timesteps computed by the model. Providing `timesteps` and setting the `max_age` parameter to `None` allows the model to advect all waypoints to the specified times. This is useful for running advection simulations over a fixed time period rather than to a fixed age. The `timesteps` parameter is optional and defaults to `None`, in which case the model behaves as before.
18
+ - Add new `time` parameter to `Flight.resample_and_fill`. If provided, flights will be resampled to times in `time` rather than to times computed based on `freq`. The `time` parameter is optional and defaults to `None`, in which case `Flight.resample_and_fill` behaves as before.
19
+
20
+ ### Fixes
21
+
22
+ - Fix the `GOES` interface caching mechanism when a custom `goes_bucket` is provided. This allows users to cache both GOES-16 and GOES-18 data without conflicts.
23
+ - Officially support the "scda" HRES stream (useful for forecast reference times 06Z and 18Z). Previously, this was implicitly assumed.
24
+ - Fix an issue with how the `parse_atc_plan` method handles newline characters in the flightplan string.
25
+ - Fix an issue with the `DryAdvection.eval` implementation in which a large temporal gap between waypoints caused the model to end prematurely.
26
+ - Fix the error message emitted by `ACCF.eval` if the [`climaccf`](https://github.com/dlr-pa/climaccf) package is not installed. (The `climaccf` package can be installed with `pip install git+https://github.com/dlr-pa/climaccf.git`.)
27
+
28
+ ### Internals
29
+
30
+ - Support [PEP 639](https://peps.python.org/pep-0639/).
31
+ - Support [ruff 0.12.0](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md#0120).
32
+ - Remove the `dep_license` optional dependency from the `dev` extras.
33
+
3
34
  ## 0.54.10
4
35
 
5
36
  ### Features
@@ -51,12 +51,6 @@ clean: docs-clean
51
51
  remove: clean
52
52
  pip uninstall pycontrails
53
53
 
54
- licenses:
55
- deplic .
56
-
57
- check-licenses:
58
- deplic -c setup.cfg .
59
-
60
54
  # -----------
61
55
  # Extensions
62
56
  # -----------
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pycontrails
3
- Version: 0.54.10
3
+ Version: 0.54.12
4
4
  Summary: Python library for modeling aviation climate impacts
5
5
  Author-email: "Contrails.org" <py@contrails.org>
6
- License: Apache-2.0
6
+ License-Expression: Apache-2.0
7
7
  Project-URL: Changelog, https://py.contrails.org/changelog.html
8
8
  Project-URL: Documentation, https://py.contrails.org
9
9
  Project-URL: Issues, https://github.com/contrailcirrus/pycontrails/issues
@@ -11,7 +11,6 @@ Project-URL: Repository, https://github.com/contrailcirrus/pycontrails
11
11
  Keywords: contrails,climate,aviation,geospatial
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Intended Audience :: Science/Research
14
- Classifier: License :: OSI Approved :: Apache Software License
15
14
  Classifier: Operating System :: OS Independent
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Programming Language :: Python :: 3.10
@@ -36,7 +35,6 @@ Requires-Dist: xarray>=2022.3
36
35
  Provides-Extra: complete
37
36
  Requires-Dist: pycontrails[ecmwf,gcp,gfs,jupyter,pyproj,sat,vis,zarr]; extra == "complete"
38
37
  Provides-Extra: dev
39
- Requires-Dist: dep_license; extra == "dev"
40
38
  Requires-Dist: fastparquet>=0.8; extra == "dev"
41
39
  Requires-Dist: ipdb>=0.13; extra == "dev"
42
40
  Requires-Dist: memory_profiler; extra == "dev"
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '0.54.10'
21
- __version_tuple__ = version_tuple = (0, 54, 10)
31
+ __version__ = version = '0.54.12'
32
+ __version_tuple__ = version_tuple = (0, 54, 12)
33
+
34
+ __commit_id__ = commit_id = 'g5920a0c98'
@@ -806,19 +806,24 @@ class Flight(GeoVectorDataset):
806
806
  nominal_rocd: float = constants.nominal_rocd,
807
807
  drop: bool = True,
808
808
  keep_original_index: bool = False,
809
+ time: npt.NDArray[np.datetime64] | None = None,
809
810
  ) -> Self:
810
811
  """Resample and fill flight trajectory with geodesics and linear interpolation.
811
812
 
812
- Waypoints are resampled according to the frequency ``freq``. Values for :attr:`data`
813
- columns ``longitude``, ``latitude``, and ``altitude`` are interpolated.
813
+ Waypoints are resampled according to the frequency ``freq`` or to the times in ``time``.
814
+ Values for :attr:`data` columns ``longitude``, ``latitude``, and ``altitude``
815
+ are interpolated.
814
816
 
815
- Resampled waypoints will include all multiples of ``freq`` between the flight
816
- start and end time. For example, when resampling to a frequency of 1 minute,
817
- a flight that starts at 2020/1/1 00:00:59 and ends at 2020/1/1 00:01:01
817
+ When resampled based on ``freq``, waypoints will include all multiples of ``freq``
818
+ between the flight start and end time. For example, when resampling to a frequency of
819
+ 1 minute, a flight that starts at 2020/1/1 00:00:59 and ends at 2020/1/1 00:01:01
818
820
  will return a single waypoint at 2020/1/1 00:01:00, whereas a flight that
819
821
  starts at 2020/1/1 00:01:01 and ends at 2020/1/1 00:01:59 will return an empty
820
822
  flight.
821
823
 
824
+ When resampled based on ``time``, waypoints will include all times between the
825
+ flight start and end time.
826
+
822
827
  Parameters
823
828
  ----------
824
829
  freq : str, optional
@@ -844,6 +849,9 @@ class Flight(GeoVectorDataset):
844
849
  Keep the original index of the :class:`Flight` in addition to the new
845
850
  resampled index. Defaults to ``False``.
846
851
  .. versionadded:: 0.45.2
852
+ time : npt.NDArray[np.datetime64], optional
853
+ Times to resample to. Will override ``freq`` if provided.
854
+ .. versionadded:: 0.54.11
847
855
 
848
856
  Returns
849
857
  -------
@@ -930,10 +938,10 @@ class Flight(GeoVectorDataset):
930
938
  if shift is not None:
931
939
  df["longitude"] = (df["longitude"] - shift) % 360.0
932
940
 
933
- # STEP 5: Resample flight to freq
941
+ # STEP 5: Resample flight
934
942
  # Save altitudes to copy over - these just get rounded down in time.
935
943
  # Also get target sample indices
936
- df, t = _resample_to_freq(df, freq)
944
+ df, t = _resample_to_freq_or_time(df, freq, time)
937
945
 
938
946
  if shift is not None:
939
947
  # We need to translate back to the original chart here
@@ -2129,13 +2137,14 @@ def segment_rocd(
2129
2137
  return T_correction * out # type: ignore[return-value]
2130
2138
 
2131
2139
 
2132
- def _resample_to_freq(df: pd.DataFrame, freq: str) -> tuple[pd.DataFrame, pd.DatetimeIndex]:
2140
+ def _resample_to_freq_or_time(
2141
+ df: pd.DataFrame, freq: str, time: npt.NDArray[np.datetime64] | None
2142
+ ) -> tuple[pd.DataFrame, pd.DatetimeIndex]:
2133
2143
  """Resample a DataFrame to a given frequency.
2134
2144
 
2135
- This function is used to resample a DataFrame to a given frequency. The new
2136
- index will include all the original index values and the new resampled-to-freq
2137
- index values. The "longitude" and "latitude" columns will be linearly interpolated
2138
- to the new index values.
2145
+ This function is used to resample a DataFrame to a given frequency or a specified set of times.
2146
+ The new index will include all the original index values and the new resampled index values.
2147
+ The "longitude" and "latitude" columns will be linearly interpolated to the new index values.
2139
2148
 
2140
2149
  Parameters
2141
2150
  ----------
@@ -2145,6 +2154,8 @@ def _resample_to_freq(df: pd.DataFrame, freq: str) -> tuple[pd.DataFrame, pd.Dat
2145
2154
  freq : str
2146
2155
  Frequency to resample to. See :func:`pd.DataFrame.resample` for
2147
2156
  valid frequency strings.
2157
+ time : pd.DatetimeIndex | None
2158
+ Times to resample to. Overrides ``freq`` if not ``None``.
2148
2159
 
2149
2160
  Returns
2150
2161
  -------
@@ -2153,10 +2164,14 @@ def _resample_to_freq(df: pd.DataFrame, freq: str) -> tuple[pd.DataFrame, pd.Dat
2153
2164
  """
2154
2165
 
2155
2166
  # Manually create a new index that includes all the original index values
2156
- # and the resampled-to-freq index values.
2157
- t0 = df.index[0].ceil(freq)
2158
- t1 = df.index[-1]
2159
- t = pd.date_range(t0, t1, freq=freq, name="time")
2167
+ # and the resampled index values
2168
+ if time is None:
2169
+ t0 = df.index[0].ceil(freq)
2170
+ t1 = df.index[-1]
2171
+ t = pd.date_range(t0, t1, freq=freq, name="time")
2172
+ else:
2173
+ mask = (time >= df.index[0]) & (time <= df.index[-1])
2174
+ t = pd.DatetimeIndex(time[mask], name="time")
2160
2175
 
2161
2176
  concat_arr = np.concatenate([df.index, t])
2162
2177
  concat_arr = np.unique(concat_arr)
@@ -97,8 +97,8 @@ def parse_atc_plan(atc_plan: str) -> dict[str, str]:
97
97
  --------
98
98
  :func:`to_atc_plan`
99
99
  """
100
- atc_plan = atc_plan.replace("\r", "")
101
- atc_plan = atc_plan.replace("\n", "")
100
+ atc_plan = atc_plan.replace("\r", " ")
101
+ atc_plan = atc_plan.replace("\n", " ")
102
102
  atc_plan = atc_plan.upper()
103
103
  atc_plan = atc_plan.strip()
104
104
 
@@ -522,7 +522,7 @@ class MetBase(ABC, Generic[XArrayType]):
522
522
  return self.data.__len__()
523
523
 
524
524
  @property
525
- def attrs(self) -> dict[Hashable, Any]:
525
+ def attrs(self) -> dict[str, Any]:
526
526
  """Pass through to :attr:`self.data.attrs`."""
527
527
  return self.data.attrs
528
528
 
@@ -1311,7 +1311,11 @@ def update_param_dict(param_dict: dict[str, Any], new_params: dict[str, Any]) ->
1311
1311
  raise KeyError(msg) from None
1312
1312
 
1313
1313
  # Convenience: convert timedelta64-like params
1314
- if isinstance(old_value, np.timedelta64) and not isinstance(value, np.timedelta64):
1314
+ if (
1315
+ isinstance(old_value, np.timedelta64)
1316
+ and not isinstance(value, np.timedelta64)
1317
+ and value is not None
1318
+ ):
1315
1319
  value = pd.to_timedelta(value).to_numpy()
1316
1320
 
1317
1321
  param_dict[param] = value
@@ -238,7 +238,7 @@ def _contours_to_polygons(
238
238
  latitude=latitude,
239
239
  precision=precision,
240
240
  buffer=buffer,
241
- i=child_i,
241
+ i=child_i, # type: ignore[arg-type]
242
242
  )
243
243
 
244
244
  candidate = shapely.Polygon(polygon.exterior, [h.exterior for h in holes])