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.
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/release.yaml +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/CHANGELOG.md +47 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/PKG-INFO +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/pycontrails.bib +53 -18
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/GFS.ipynb +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/_version.py +2 -2
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/flight.py +108 -6
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/interpolation.py +39 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/met.py +10 -12
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/rgi_cython.c +195 -165
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/vector.py +10 -8
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/goes.py +14 -12
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/cocip.py +22 -5
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/cocip_params.py +11 -2
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/contrail_properties.py +4 -9
- pycontrails-0.50.2/pycontrails/models/cocip/unterstrasser_wake_vortex.py +403 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/wake_vortex.py +22 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocipgrid/cocip_grid.py +103 -6
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/emissions.py +2 -2
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/static/default-engine-uids.csv +1 -1
- 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
- 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
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/issr.py +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_aircraft_params.py +13 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_grid.py +20 -20
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_model.py +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/ps_operational_limits.py +202 -1
- pycontrails-0.50.2/pycontrails/models/ps_model/static/ps-aircraft-params-20240417.csv +64 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/units.py +2 -2
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/types.py +3 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/PKG-INFO +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/SOURCES.txt +5 -3
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/conftest.py +17 -3
- pycontrails-0.50.2/tests/unit/static/cocip-contrail-output.json +2442 -0
- pycontrails-0.50.2/tests/unit/static/cocip-contrail-output2.json +17112 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-flight-output.json +522 -522
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-flight-output2.json +3549 -3549
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip.py +52 -4
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_grid.py +194 -18
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_grid_parity.py +6 -3
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_dtypes.py +7 -2
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_emissions.py +2 -2
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_flight.py +38 -8
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_humidity_scaling.py +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_interpolation.py +1 -1
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_ps_model.py +33 -17
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_tau_cirrus.py +2 -2
- pycontrails-0.50.2/tests/unit/test_unterstrasser_wake_vortex.py +99 -0
- pycontrails-0.50.0/pycontrails/models/ps_model/static/ps-aircraft-params-20240209.csv +0 -63
- pycontrails-0.50.0/tests/unit/static/cocip-contrail-output.json +0 -2442
- pycontrails-0.50.0/tests/unit/static/cocip-contrail-output2.json +0 -17112
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/dependabot.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/pull_request_template.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/benchmark.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/docs.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/doctest.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/scorecard.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.github/workflows/test.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.gitignore +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.pre-commit-config.yaml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/.zenodo.json +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/CONTRIBUTING.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/LICENSE +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/Makefile +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/NOTICE +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/README.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/RELEASE.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/css/style.css +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/colab.png +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/favicon.png +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/logo-dark.png +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/_static/img/logo.png +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/api.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/changelog.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/conf.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/contributing.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/develop.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/flight.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/index.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/install.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/integrations/ACCF.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/literature.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/meteorology.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/models.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/ARCO-ERA5.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/AircraftPerformance.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/Cache.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/CoCiP.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/ECMWF.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/Flight.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/GOES.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/ISSR.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/Meteorology.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/SAC.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/advection.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/airports.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/.gitignore +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-ap.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-cocip.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-fdr.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight-noisy.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/data/flight.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/flightplan.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/model-levels.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/run-cocip-on-flight.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/run-cocip-with-fdr.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks/specific-humidity-interpolation.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/notebooks.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/observations.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/tutorials.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/docs/utilities.rst +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/aircraft_performance.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/airports.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/cache.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/coordinates.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/datalib.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/fleet.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/flightplan.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/fuel.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/met_var.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/models.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/polygon.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/core/rgi_cython.pyx +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/arco_era5.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/common.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/era5.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/hres.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/ifs.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/ecmwf/variables.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/gfs/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/gfs/gfs.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/gfs/variables.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/spire/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/datalib/spire/spire.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/bada.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/cirium.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/empirical_grid.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/ext/synthetic_flight.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/accf.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/cocip_uncertainty.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/output_formats.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/radiative_forcing.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/radiative_heating.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocip/wind_shear.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocipgrid/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/cocipgrid/cocip_grid_params.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/dry_advection.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/black_carbon.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/emissions/ffm2.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/humidity_scaling/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/humidity_scaling/humidity_scaling.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/humidity_scaling/quantiles/era5-quantiles.pq +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/pcc.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/pcr.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/ps_model/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/sac.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/models/tau_cirrus.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/constants.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/geo.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/jet.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/physics/thermo.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/py.typed +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/dependencies.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/iteration.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/json.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails/utils/temp.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/dependency_links.txt +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/requires.txt +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pycontrails.egg-info/top_level.txt +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/pyproject.toml +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/setup.cfg +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/setup.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/_deprecated.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/Makefile +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/README.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/benchmark.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/compare.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/data.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/output.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip/review.ipynb +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/cocip-fortran/README.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/.gcloudignore +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/README.md +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/support.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/benchmark/north-atlantic-study/validate.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/cocip-met.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/cocip-met2.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/ecmwf-met.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/fixtures/gfs-met.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/__init__.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/NOAA_Solar_Calculations_day.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-output-contrail-edges.json +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/cocip-output-flts-20190101-eu.pq +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-cocip2.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-meridian.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-metadata.json +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight-spire-data-cleaning.pq +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flight.csv +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/flt-wypts-20190101-eu.pq +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-20190101-eu.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-accf-pl.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-accf-sl.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-ecmwf-pl.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-ecmwf-sl.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-era5-cocip1.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-era5-cocip2.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/met-gfs.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/polygon-bug.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-20190101-eu.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-era5-cocip1.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-era5-cocip2.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/static/rad-gfs.nc +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_accf.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_airports.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cache.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_radiative_forcing.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_cocip_uncertainty.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_coordinates.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_datalib.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_dry_advection.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_ecmwf.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_fleet.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_flightplan.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_fuel.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_geo.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_gfs.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_goes.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_grid_to_netcdf.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_init.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_met.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_met_cache.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_models.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_pcc.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_polygons.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_sac_issr.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_spire.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_thermo_sac.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_units.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_utils.py +0 -0
- {pycontrails-0.50.0 → pycontrails-0.50.2}/tests/unit/test_vector.py +0 -0
- {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.
|
|
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
|
|
@@ -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 \– 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\–cirrus is probably the largest climate forcing from aviation. The evolution of contrail\–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\–cirrus. The early evolution of contrails (t \< 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\–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
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
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://
|
|
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."
|
|
@@ -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.
|
|
1353
|
-
234.
|
|
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")
|
|
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
|
-
|
|
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:
|
|
678
|
-
array([[224.
|
|
679
|
-
[224.
|
|
680
|
-
[224.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
1638
|
-
|
|
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:
|