pycontrails.ext.bada.BADA4

class pycontrails.ext.bada.BADA4(bada_path=None)

Bases: BADA

BADA 4.2 Support.

Base of Aircraft Data (BADA) provides a set of ASCII files containing performance and operating procedure coefficients.`

Parameters:

bada_path (str | pathlib.Path, optional) – Path to BADA 4.2 Model files Default path set to /bada/bada4 in the parent directory of the pycontrails repository.

References

  • Eurocontrol. User Manual for the Base of Aircraft Data (BADA) Family 4.

    Vol EEC Techni. Eurocontrol Experimental Centre; 2016.

__init__(bada_path=None)

Methods

__init__([bada_path])

assumed_aircraft_engine_type_bada4(...)

Get the assumed aircraft type for BADA4.

calculate_aircraft_performance(*, ...)

Calculate aircraft performance along a trajectory.

check_aircraft_type_availability(aircraft_type)

Check if aircraft type designator is available in BADA database.

clip_fuel_flow_by_ptf_bounds(atyp_icao, ...)

Clip array of fuel flow by the BADA PTF-defined thresholds.

correct_fuel_flow(atyp_icao, fuel_flow, ...)

Correct unrealistic fuel mass flow rate by clipping to PTF nominals.

downselect_met()

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

ensure_true_airspeed_on_source()

Add true_airspeed field to source data if not already present.

eval([source])

Evaluate the aircraft performance model.

get_aircraft_engine_properties(atyp_icao[, ...])

Extract the aircraft performance and engine properties from the BADA database.

get_aircraft_params(aircraft_type)

Get aircraft params associated to aircraft type.

get_ptf_params(aircraft_type)

Get PTF params associated to aircraft type.

get_source_param(key[, default, set_attr])

Get source data with default set by parameter key.

is_within_thrust_limits(*, atyp_bada, ...)

Determine whether thrust required at each waypoint is within bounds of BADA model.

nominal_cruising_speed(aircraft_type, alt_ft)

Compute nominal cruising speed at altitude by interpolating over PTF data.

nominal_fuel_flow(aircraft_type, alt_ft, phase)

Compute nominal fuel flow depending on phase based on PTF data.

nominal_fuel_flow_from_flight_phase(...)

Call nominal_fuel_flow() for each phase according to flight_phase.

nominal_roc(aircraft_type, alt_ft)

Compute nominal rate of climb at altitude by interpolating over PTF data.

nominal_rod(aircraft_type, alt_ft)

Compute nominal rate of descent at altitude by interpolating over PTF data.

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 .

simulate_fuel_and_performance(*, ...)

Calculate aircraft mass, fuel mass flow rate, and overall propulsion efficiency.

transfer_met_source_attrs([source])

Transfer met source metadata from met to source.

update_params([params])

Update model parameters on params.

Attributes

path

Path to BADA data directory

synonym_dict

Aircraft type synonyms

aircraft_engine_dataframe

Available/assumed aircraft-engine combinations

ptf_params_dict

aircraft_param_dict

Engine and aircraft properties common to BADA3 and BADA4

default_path

Default path to BADA data directories

version

BADA version.

hash

Generate a unique hash for model instance.

interp_kwargs

Shortcut to create interpolation arguments from params.

long_name

met

Meteorology data

met_required

Require meteorology is not None on __init__()

name

params

Instantiated model parameters, in dictionary form

source

Data evaluated in model

aircraft_engine_options

ptf_param_dict

Coefficients and properties extracted from BADA3 and BADA4 PTF files

met_variables

Required meteorology pressure level variables.

processed_met_variables

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

optional_met_variables

Optional meteorology variables

aircraft_engine_dataframe

Available/assumed aircraft-engine combinations

aircraft_engine_options
aircraft_param_dict

Engine and aircraft properties common to BADA3 and BADA4

assumed_aircraft_engine_type_bada4(atyp_icao, engine_uid)

Get the assumed aircraft type for BADA4.

Parameters:
  • atyp_icao (str) – ICAO aircraft type designator

  • engine_uid (None | str) – Engine unique identification number from the ICAO EDB. If None is provided or engine_uid is unidentified, the default aircraft-engine combination from BADA4 is used.

Returns:

pandas.Series – Assumed aircraft and engine type

calculate_aircraft_performance(*, aircraft_type, altitude_ft, air_temperature, time, true_airspeed, aircraft_mass, engine_efficiency, fuel_flow, thrust, q_fuel, **kwargs)

Calculate aircraft performance along a trajectory.

When time is not None, this method should be used for a single flight trajectory. Waypoints are coupled via the time parameter.

This method computes the rate of climb and descent (ROCD) to determine flight phases: “cruise”, “climb”, and “descent”. Performance metrics depend on this phase.

When time is None, this method can be used to simulate flight performance over an arbitrary sequence of flight waypoints by assuming nominal flight characteristics. In this case, each point is treated independently and all points are assumed to be in a “cruise” phase of the flight.

Parameters:
  • aircraft_type (str) – Used to query the underlying model database for aircraft engine parameters.

  • altitude_ft (npt.NDArray[np.float64]) – Altitude at each waypoint, [\(ft\)]

  • air_temperature (npt.NDArray[np.float64]) – Ambient temperature for each waypoint, [\(K\)]

  • time (npt.NDArray[np.datetime64] | None) – Waypoint time in np.datetime64 format. If None, only drag force will is used in thrust calculations (ie, no vertical change and constant horizontal change). In addition, aircraft is assumed to be in cruise.

  • true_airspeed (npt.NDArray[np.float64] | float | None) – True airspeed for each waypoint, [\(m s^{-1}\)]. If None, a nominal value is used.

  • aircraft_mass (npt.NDArray[np.float64] | float) – Aircraft mass for each waypoint, [\(kg\)].

  • engine_efficiency (npt.NDArray[np.float64] | float | None) – Override the engine efficiency at each waypoint.

  • fuel_flow (npt.NDArray[np.float64] | float | None) – Override the fuel flow at each waypoint, [\(kg s^{-1}\)].

  • thrust (npt.NDArray[np.float64] | float | None) – Override the thrust setting at each waypoint, [:math: N].

  • q_fuel (float) – Lower calorific value (LCV) of fuel, [\(J \ kg_{fuel}^{-1}\)].

  • **kwargs (Any) – Additional keyword arguments to pass to the model.

Returns:

AircraftPerformanceData – Derived performance metrics at each waypoint.

default_path

Default path to BADA data directories

get_aircraft_engine_properties(atyp_icao, engine_uid=None)

Extract the aircraft performance and engine properties from the BADA database.

Parameters:
  • atyp_icao (str) – ICAO aircraft type designator.

  • engine_uid (str) – Engine unique identification number from the ICAO EDB. If None is provided or engine_uid is unidentified, default aircraft-engine combination from BADA will be used. This parameter is unused for BADA3; it is only considered for BADA4.

Returns:

AircraftProperties

is_within_thrust_limits(*, atyp_bada, altitude_ft, air_temperature, time, true_airspeed, aircraft_mass, thrust, flight_phase)

Determine whether thrust required at each waypoint is within bounds of BADA model.

If thrust is not provided as input, it will be computed according to BADA standards. Thrust limits are only defined for the BADA3 model. For BADA4, this function will raise a NotImplementedError.

Parameters:
  • atyp_bada (str) – ICAO aircraft type designator (BADA 3), or long aircraft type designator (BADA 4).

  • altitude_ft (npt.NDArray[np.float_]) – Altitude at each waypoint, [\(ft\)]

  • air_temperature (npt.NDArray[np.float_]) – Ambient temperature for each waypoint, [\(K\)]

  • time (npt.NDArray[np.datetime64] | None) – Waypoint time in np.datetime64 format. If None, only drag force will is used in thrust calculations (ie, no vertical change and constant horizontal change). In addition, aircraft is assumed to be in cruise.

  • true_airspeed (npt.NDArray[np.float_] | float | None) – True airspeed for each waypoint, [\(m s^{-1}\)]. If None, the nominal BADA cruise value is used.

  • aircraft_mass (npt.NDArray[np.float_] | float | None) – Aircraft mass for each waypoint, [\(kg\)]. If None, the nominal BADA value is used.

  • thrust (npt.NDArray[np.float_] | float | None) – Override the thrust setting at each waypoint, [:math: N].

  • flight_phase (npt.NDArray[np.uint8] | flight.FlightPhase | None) – Flight phase for each waypoint. If None, the flight phase is assumed to be cruise.

Returns:

npt.NDArray[np.bool_] – Boolean array telling whether the thrust at each waypoint is within BADA trust limits

long_name = 'Base of Aircraft Data (BADA) Revision 4.2'
name = 'BADA4'
path

Path to BADA data directory

ptf_params_dict
synonym_dict

Aircraft type synonyms

version

BADA version. Currently only used on BADA3 class.