pycontrails.models.ps_model.PSGrid

class pycontrails.models.ps_model.PSGrid(met=None, params=None, **params_kwargs)

Bases: AircraftPerformanceGrid

Compute nominal Poll-Schumann aircraft performance over a grid.

For a given aircraft type, altitude, aircraft mass, air temperature, and mach number, the PS model computes a theoretical engine efficiency and fuel flow rate for an aircraft under cruise conditions. Letting the aircraft mass vary and fixing the other parameters, the engine efficiency curve attains a single maximum at a particular aircraft mass. By solving this implicit equation, the PS model can be used to compute the aircraft mass that maximizes engine efficiency for a given set of parameters. This is the “nominal” aircraft mass computed by this model.

This nominal aircraft mass is not always realizable. For example, the maximum engine efficiency may be attained at an aircraft mass that is less than the operating empty mass of the aircraft. This model determines the minimum and maximum possible aircraft mass for a given set of parameters using a simple heuristic. The nominal aircraft mass is then clipped to this range.

__init__(met=None, params=None, **params_kwargs)

Methods

__init__([met, params])

downselect_met()

Downselect met domain to the max/min bounds of source.

eval([source])

Evaluate the PS model over a MetDataset or GeoVectorDataset.

get_source_param(key[, default, set_attr])

Get source data with default set by parameter key.

require_met()

Ensure that met is a MetDataset.

require_source_type(type_)

Ensure that source is type_.

set_source([source])

Attach original or copy of input source to source.

set_source_met([optional, variable])

Ensure or interpolate each required met_variables on source .

transfer_met_source_attrs([source])

Transfer met source metadata from met to source.

update_params([params])

Update model parameters on params.

Attributes

params

Instantiated model parameters, in dictionary form

met

Meteorology data

source

Data evaluated in model

hash

Generate a unique hash for model instance.

interp_kwargs

Shortcut to create interpolation arguments from params.

long_name

met_required

Require meteorology is not None on __init__()

met_variables

Required meteorology pressure level variables.

name

processed_met_variables

Set of required parameters if processing already complete on met input.

optional_met_variables

Optional meteorology variables

default_params

alias of PSGridParams

eval(source=None, **params)

Evaluate the PS model over a MetDataset or GeoVectorDataset.

Parameters:
  • source (GeoVectorDataset | MetDataset | None, optional) – The source data to use for the evaluation. If None, the source is taken from the met attribute of the PSGrid instance. The aircraft type is taken from source.attrs["aircraft_type"]. If this field is not present, params["aircraft_type"] is used instead. See the static CSV file ps-aircraft-params-20231117.csv for a list of supported aircraft types.

  • **params (Any) – Override the default parameters of the PSGrid instance.

Returns:

GeoVectorDataset | MetDataset

The source data with the following variables added:

  • aircraft_mass

  • fuel_flow

  • engine_efficiency

Raises:

NotImplementedError – If “true_airspeed” or “aircraft_mass” fields are included in source.

long_name = 'Poll-Schumann Aircraft Performance evaluated at arbitrary points'
met

Meteorology data

met_variables = (MetVariable(short_name='t', standard_name='air_temperature', long_name='Air Temperature', level_type='isobaricInhPa', ecmwf_id=130, grib1_id=11, grib2_id=(0, 0, 0), units='K', amip='ta', description='Air temperature is the bulk temperature of the air, not the surface (skin) temperature.'),)

Required meteorology pressure level variables. Each element in the list is a MetVariable or a tuple[MetVariable]. If element is a tuple[MetVariable], the variable depends on the data source. Only one variable in the tuple is required.

name = 'PSGrid'
params

Instantiated model parameters, in dictionary form

source

Data evaluated in model