pycontrails.ext.bada.BADAGridParams¶
- class pycontrails.ext.bada.BADAGridParams(engine_deterioration_factor=0.025, copy_source=True, interpolation_method='linear', interpolation_bounds_error=False, interpolation_fill_value=nan, interpolation_localize=False, interpolation_use_indices=False, interpolation_q_method=None, verify_met=True, downselect_met=True, met_longitude_buffer=(0.0, 0.0), met_latitude_buffer=(0.0, 0.0), met_level_buffer=(0.0, 0.0), met_time_buffer=(np.timedelta64(0, 'h'), np.timedelta64(0, 'h')), fuel=<factory>, aircraft_type='B737', mach_number=None, aircraft_mass=None, correct_fuel_flow=True, n_iter=3, fill_low_altitude_with_isa_temperature=False, fill_low_altitude_with_zero_wind=False, bada3_path=None, bada4_path=None, bada_priority=4, model_choice='total_energy_model', engine_uid=None)¶
Bases:
BADAParams
,AircraftPerformanceGridParams
BADAGrid
model parameters.See also
BADAParams
- __init__(engine_deterioration_factor=0.025, copy_source=True, interpolation_method='linear', interpolation_bounds_error=False, interpolation_fill_value=nan, interpolation_localize=False, interpolation_use_indices=False, interpolation_q_method=None, verify_met=True, downselect_met=True, met_longitude_buffer=(0.0, 0.0), met_latitude_buffer=(0.0, 0.0), met_level_buffer=(0.0, 0.0), met_time_buffer=(np.timedelta64(0, 'h'), np.timedelta64(0, 'h')), fuel=<factory>, aircraft_type='B737', mach_number=None, aircraft_mass=None, correct_fuel_flow=True, n_iter=3, fill_low_altitude_with_isa_temperature=False, fill_low_altitude_with_zero_wind=False, bada3_path=None, bada4_path=None, bada_priority=4, model_choice='total_energy_model', engine_uid=None)¶
Methods
Attributes
Aircraft mass, [\(kg\)] If
None
, a nominal value is determined by the implementation.ICAO code designating simulated aircraft type.
Default paths to BADA3 and BADA4 data directories Setting path to None will use default path on BADA3 and BADA4 instances
Default BADA database used to search for aircraft characteristics.
Copy input
source
data on evalWhether to correct fuel flow to ensure it remains within the operational limits of the aircraft type.
Downselect input
MetDataset`
to region aroundsource
.Account for "in-service" engine deterioration between maintenance cycles.
Engine unique identification number for the ICAO Aircraft Emissions Databank (EDB) If None, the assumed engine_uid from BADA is used.
Experimental.
Experimental.
If True, points lying outside interpolation will raise an error
Used for outside interpolation value if
interpolation_bounds_error
is FalseExperimental.
Interpolation method.
Experimental.
Experimental.
Mach number, [\(Ma\)] If
None
, a nominal cruise value is determined by the implementation.Met latitude buffer for input to
Flight.downselect_met()
, in WGS84 coordinates.Met level buffer for input to
Flight.downselect_met()
, in [\(hPa\)].Met longitude buffer for input to
Flight.downselect_met()
, in WGS84 coordinates.Met time buffer for input to
Flight.downselect_met()
Only applies whendownselect_met
is True.BADA3 and BADA4 fuel flow model choice
The number of iterations used to calculate aircraft mass and fuel flow.
Call
_verify_met()
on model instantiation.Fuel type
- aircraft_mass = None¶
Aircraft mass, [\(kg\)] If
None
, a nominal value is determined by the implementation. Can be overridden by including anaircraft_mass
key in source data
- aircraft_type = 'B737'¶
ICAO code designating simulated aircraft type. Can be overridden by including
aircraft_type
attribute in source data
- as_dict()¶
Convert object to dictionary.
We use this method instead of dataclasses.asdict to use a shallow/unrecursive copy. This will return values as Any instead of dict.
- Returns:
dict[str
,Any]
– Dictionary version of self.
- bada3_path = None¶
Default paths to BADA3 and BADA4 data directories Setting path to None will use default path on BADA3 and BADA4 instances
- bada4_path = None¶
- bada_priority = 4¶
Default BADA database used to search for aircraft characteristics. At present, this parameter is expected to be 3 or 4.
- copy_source = True¶
Copy input
source
data on eval
- correct_fuel_flow = True¶
Whether to correct fuel flow to ensure it remains within the operational limits of the aircraft type.
- downselect_met = True¶
Downselect input
MetDataset`
to region aroundsource
.
- engine_deterioration_factor = 0.025¶
Account for “in-service” engine deterioration between maintenance cycles. Default value is set to +2.5% increase in fuel consumption. Reference: Gurrola Arrieta, M.D.J., Botez, R.M. and Lasne, A., 2024. An Engine Deterioration Model for Predicting Fuel Consumption Impact in a Regional Aircraft. Aerospace, 11(6), p.426.
- engine_uid = None¶
Engine unique identification number for the ICAO Aircraft Emissions Databank (EDB) If None, the assumed engine_uid from BADA is used.
- fill_low_altitude_with_isa_temperature = False¶
Experimental. If True, fill waypoints below the lowest altitude met level with ISA temperature when interpolating “air_temperature” or “t”. If the
met
data is not provided, the entire air temperature array is approximated with the ISA temperature. Enabling this does NOT remove any NaN values in themet
data itself.
- fill_low_altitude_with_zero_wind = False¶
Experimental. If True, fill waypoints below the lowest altitude met level with zero wind when computing true airspeed. In other words, approximate low-altitude true airspeed with the ground speed. Enabling this does NOT remove any NaN values in the
met
data itself.
- fuel¶
Fuel type
- interpolation_bounds_error = False¶
If True, points lying outside interpolation will raise an error
- interpolation_fill_value = nan¶
Used for outside interpolation value if
interpolation_bounds_error
is False
- interpolation_localize = False¶
Experimental. See
pycontrails.core.interpolation
.
- interpolation_method = 'linear'¶
Interpolation method. Supported methods include “linear”, “nearest”, “slinear”, “cubic”, and “quintic”. See
scipy.interpolate.RegularGridInterpolator
for the description of each method. Not all methods are supported by all met grids. For example, the “cubic” method requires at least 4 points per dimension.
- interpolation_q_method = None¶
Experimental. Alternative interpolation method to account for specific humidity lapse rate bias. Must be one of
None
,"cubic-spline"
, or"log-q-log-p"
. IfNone
, no special interpolation is used for specific humidity. The"cubic-spline"
method applies a custom stretching of the met interpolation table to account for the specific humidity lapse rate bias. The"log-q-log-p"
method interpolates in the log of specific humidity and pressure, then converts back to specific humidity. Only used by models calling tointerpolate_met()
.
- interpolation_use_indices = False¶
Experimental. See
pycontrails.core.interpolation
.
- mach_number = None¶
Mach number, [\(Ma\)] If
None
, a nominal cruise value is determined by the implementation. Can be overridden by including amach_number
key in source data
- met_latitude_buffer = (0.0, 0.0)¶
Met latitude buffer for input to
Flight.downselect_met()
, in WGS84 coordinates. Only applies whendownselect_met
is True.
- met_level_buffer = (0.0, 0.0)¶
Met level buffer for input to
Flight.downselect_met()
, in [\(hPa\)]. Only applies whendownselect_met
is True.
- met_longitude_buffer = (0.0, 0.0)¶
Met longitude buffer for input to
Flight.downselect_met()
, in WGS84 coordinates. Only applies whendownselect_met
is True.
- met_time_buffer = (np.timedelta64(0,'h'), np.timedelta64(0,'h'))¶
Met time buffer for input to
Flight.downselect_met()
Only applies whendownselect_met
is True.
- model_choice = 'total_energy_model'¶
BADA3 and BADA4 fuel flow model choice
- n_iter = 3¶
The number of iterations used to calculate aircraft mass and fuel flow. The default value of 3 is sufficient for most cases.
- verify_met = True¶
Call
_verify_met()
on model instantiation.