pycontrails.ext.bada.BADAGrid

class pycontrails.ext.bada.BADAGrid(met=None, params=None, **params_kwargs)

Bases: AircraftPerformanceGrid

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

This model automatically corrects engine efficiency values to ensure that they remain realistic by clipping to a nominal grid of BADA-derived values.

Parameters:
  • met (MetDataset | None, optional) – Dataset containing “air_temperature” variable. Only used if these variables are not already found on parameter source in eval(). By default None.

  • params (dict[str, Any], optional) – Override model parameters with dictionary. See BADAGridParams for model parameters.

  • **params_kwargs – Override model parameters with keyword arguments. See BADAFlightParams for model parameters.

See also

-

meth:eval

-

class:BADAGridParams

__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])

Extract aircraft properties and calculate the fuel consumption.

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

Evaluated data source

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

optional_met_variables

Optional meteorology variables

processed_met_variables

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

default_params

alias of BADAGridParams

eval(source=None, **params)

Extract aircraft properties and calculate the fuel consumption.

Parameters:
  • source (GeoVectorDataset | None, optional) – Vector dataset defining coordinates to evaluate model. If None, the coordinates of met are used as evaluation points.

  • **params (Any) – Overwrite model parameters before eval

Returns:

GeoVectorDataset

Data with variables:

  • ”engine_efficiency”

  • ”true_airspeed”

  • ”fuel_flow”

  • ”thrust”

  • ”aircraft_mass”

and attributes:

  • ”aircraft_type”

  • ”bada_model”

  • ”aircraft_type_bada”

  • ”wingspan”

  • ”max_mach”

  • ”max_altitude”

  • ”engine_name”

  • ”n_engine”

long_name = 'Base of aircraft data 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 = 'bada-points'
optional_met_variables = (MetVariable(short_name='u', standard_name='eastward_wind', long_name='Eastward Wind', level_type='isobaricInhPa', ecmwf_id=131, grib1_id=33, grib2_id=(0, 2, 2), units='m s**-1', amip='ua', description='"Eastward" indicates a vector component which is positive when directed eastward (negative westward). Wind is defined as a two-dimensional (horizontal) air velocity vector, with no vertical component.'), MetVariable(short_name='v', standard_name='northward_wind', long_name='Northward Wind', level_type='isobaricInhPa', ecmwf_id=132, grib1_id=34, grib2_id=(0, 2, 3), units='m s**-1', amip='va', description='"Northward" indicates a vector component which is positive when directed northward (negative southward). Wind is defined as a two-dimensional (horizontal) air velocity vector, with no vertical component.'))

Optional meteorology variables

params

Instantiated model parameters, in dictionary form

source

Evaluated data source