API Reference

Data

Meteorology

MetDataset(data[, cachestore, ...])

Meteorological dataset with multiple variables.

MetDataArray(data[, cachestore, ...])

Meteorological DataArray of single variable.

Vector Data

VectorDataset([data, attrs, copy])

Base class to hold 1D arrays of consistent size.

GeoVectorDataset([data, longitude, ...])

Base class to hold 1D geospatial arrays of consistent size.

Flight & Aircraft

Flight([data, longitude, latitude, ...])

A single flight trajectory.

Fleet([data, longitude, latitude, altitude, ...])

Data structure for holding a sequence of Flight instances.

FlightPhase(value[, names, module, ...])

Flight phase enumeration.

Fuel(fuel_name, q_fuel, hydrogen_content, ...)

Base class for the physical parameters of the fuel.

JetA([fuel_name, q_fuel, hydrogen_content, ...])

Jet A-1 Fuel.

SAFBlend(pct_blend)

Jet A-1 / Sustainable Aviation Fuel Blend.

HydrogenFuel([fuel_name, q_fuel, ...])

Hydrogen Fuel.

Datalib

ECMWF

datalib.ecmwf.ERA5(time, variables[, ...])

Class to support ERA5 data access, download, and organization.

datalib.ecmwf.era5_model_level

Model-level ERA5 data access.

datalib.ecmwf.HRES(time, variables[, ...])

Class to support HRES data access, download, and organization.

datalib.ecmwf.hres_model_level

Model-level HRES data access from the ECMWF operational archive.

datalib.ecmwf.hres.get_forecast_filename(...)

Create forecast filename from ECMWF dissemination products.

datalib.ecmwf.model_levels

Utilities for working with ECMWF model-level data.

datalib.ecmwf.IFS(time, variables[, ...])

ECMWF Integrated Forecasting System (IFS) data source.

datalib.ecmwf.variables

ECMWF Parameter Support.

GFS

datalib.gfs.GFSForecast(time, variables[, ...])

GFS Forecast data access.

datalib.gfs.variables

GFS Parameter Support.

ARCO ERA5

GOES

datalib.goes

Support for GOES access and analysis.

Low Earth Orbit Satellites

datalib.landsat

Support for LANDSAT 8-9 imagery retrieval through Google Cloud Platform.

datalib.sentinel

Support for Sentinel-2 imagery retrieval through Google Cloud Platform.

Models

Base Classes

Model([met, params])

Base class for physical models.

ModelParams([copy_source, ...])

Class for constructing model parameters.

SAC, ISSR & PCC

models.issr

Ice super-saturated regions (ISSR).

models.sac

Schmidt-Appleman criteria (SAC).

models.pcr

Persistent contrail regions (PCR = SAC & ISSR).

models.pcc

Probability of persistent contrail coverage (PCC).

CoCiP

models.cocip.Cocip(met, rad[, params])

Contrail Cirrus Prediction Model (CoCiP).

models.cocip.CocipParams([copy_source, ...])

Model parameters required by the CoCiP models.

models.cocip.CocipFlightParams([...])

Flight specific CoCiP parameters.

models.cocip.contrail_properties

Contrail Property Calculations.

models.cocip.radiative_forcing

Module for calculating radiative forcing of contrail cirrus.

models.cocip.wake_vortex

Wave-vortex downwash functions.

models.cocip.wind_shear

Wind shear functions.

Gridded CoCiP

models.cocipgrid.CocipGrid(met, rad[, params])

Run CoCiP simulation on a grid.

models.cocipgrid.CocipGridParams([...])

Default parameters for CocipGrid.

Dry Advection

models.dry_advection.DryAdvection([met, params])

Simulate "dry advection" of an emissions plume with an elliptical cross section.

models.dry_advection.DryAdvectionParams([...])

Parameters for the DryAdvection model.

ACCF

This model is a this interface over the DLR / UMadrid climaccf package. This package can be installed with pip:

pip install pycontrails[accf]

models.accf.ACCF(met[, surface, params])

Compute Algorithmic Climate Change Functions (ACCF).

models.accf.ACCFParams([copy_source, ...])

Default ACCF model parameters.

APCEMM

This model is an interface to the MIT APCEMM plume model.

models.apcemm.APCEMM(met, apcemm_path[, ...])

Run APCEMM as a pycontrails Model.

models.apcemm.APCEMMParams([copy_source, ...])

Default parameters for the pycontrails APCEMM interface.

Aircraft Performance

core.aircraft_performance

Abstract interfaces for aircraft performance models.

models.ps_model.PSFlightParams([...])

Default parameters for PSFlight.

models.ps_model.PSFlight([met, params])

Simulate aircraft performance using Poll-Schumann (PS) model.

models.ps_model.PSGrid([met, params])

Compute nominal Poll-Schumann aircraft performance over a grid.

models.ps_model.PSAircraftEngineParams(...)

Store extracted aircraft and engine parameters for each aircraft type.

models.ps_model.ps_nominal_grid(aircraft_type, *)

Calculate the nominal performance grid for a given aircraft type.

Emissions

models.emissions.Emissions([met, params])

Emissions handling using ICAO Emissions Databank (EDB) and black carbon correlations.

models.emissions.black_carbon

Non-volatile particulate matter (nvPM) calculations.

models.emissions.ffm2

Calculate nitrogen oxide (NOx), carbon monoxide (CO) and hydrocarbon (HC) emissions.

Cirrus Optical Depth (\(\tau_{cirrus}\))

models.tau_cirrus

Calculate tau cirrus on Met data.

Humidity Scaling

models.humidity_scaling

Humidity scaling methodologies.

Physics

physics.constants

Meteorological, thermophysical, and aircraft constants.

physics.thermo

Thermodynamic relationships.

physics.jet

Jet aircraft trajectory and performance parameters.

physics.geo

Tools for spherical geometry, solar radiation, and wind advection.

physics.units

Unit conversion support.

Cache

DiskCacheStore([cache_dir, allow_clear])

Cache that uses a folder on the local filesystem.

GCPCacheStore([cache_dir, project, bucket, ...])

Google Cloud Platform (Storage) Cache.

Core

core.airports

Airport data support.

core.cache

Pycontrails Caching Support.

core.coordinates

Coordinates utilities.

core.fleet

A single data structure encompassing a sequence of Flight instances.

core.flight

Flight Data Handling.

core.fuel

Fuel data support.

core.interpolation

Interpolation utilities.

core.met

Meteorology data models.

core.met_var

Module containing core met variables.

core.models

Physical model data structures.

core.polygon

Algorithm support for grid to polygon conversion.

core.vector

Lightweight data structures for vector paths.

Utilities

utils.types

Convienence types.

utils.iteration

Utilites for iterating of sequences.

utils.temp

Temp utilities.

utils.json

JSON utilities.

Extensions

BADA

Requires pycontrails-bada extension and data files obtained through BADA license. See BADA Extension for more information.

ext.bada.bada_model

BADA models along flight and on a regular grid.

ext.bada.BADAFlight([met, params])

Compute aircraft properties and fuel consumption.

ext.bada.BADAFlightParams([copy_source, ...])

BADAFlight model parameters.

ext.bada.BADAGrid([met, params])

Compute nominal BADA values for a large grid of independent points.

ext.bada.BADAGridParams([copy_source, ...])

BADAGrid model parameters.

ext.bada.BADA3([bada_path])

BADA 3.15 and 3.16 Support.

ext.bada.BADA4([bada_path])

BADA 4.2 Support.