pycontrails.models.dry_advection.DryAdvectionParams¶
- class pycontrails.models.dry_advection.DryAdvectionParams(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=(10.0, 10.0), met_latitude_buffer=(10.0, 10.0), met_level_buffer=(40.0, 40.0), met_time_buffer=(np.timedelta64(0, 'h'), np.timedelta64(0, 'h')), dt_integration=np.timedelta64(30, 'm'), max_age=np.timedelta64(20, 'h'), timesteps=None, sedimentation_rate=0.0, dz_m=200.0, max_depth=1500.0, width=100.0, depth=100.0, azimuth=0.0, verbose_outputs=False, include_source_in_output=False)¶
Bases:
AdvectionBuffersParameters for the
DryAdvectionmodel.- __init__(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=(10.0, 10.0), met_latitude_buffer=(10.0, 10.0), met_level_buffer=(40.0, 40.0), met_time_buffer=(np.timedelta64(0, 'h'), np.timedelta64(0, 'h')), dt_integration=np.timedelta64(30, 'm'), max_age=np.timedelta64(20, 'h'), timesteps=None, sedimentation_rate=0.0, dz_m=200.0, max_depth=1500.0, width=100.0, depth=100.0, azimuth=0.0, verbose_outputs=False, include_source_in_output=False)¶
Methods
Attributes
Copy input
sourcedata on evalDownselect input
MetDataset`to region aroundsource.Apply Euler's method with a fixed step size of
dt_integration.Difference in altitude between top and bottom layer for stratification calculations, [\(m\)].
Whether to include
sourcepoints in the output vector.If True, points lying outside interpolation will raise an error
Used for outside interpolation value if
interpolation_bounds_erroris FalseExperimental.
Interpolation method.
Experimental.
Experimental.
Max age of plume evolution.
Upper bound for evolved plume depth, constraining it to realistic values.
Met latitude buffer [WGS84] for evolution by advection.
Met level buffer [\(hPa\)] for evolution by advection.
Met longitude [WGS84] buffer for evolution by advection.
Met time buffer for input to
Flight.downselect_met()Only applies whendownselect_metis True.Rate of change of pressure due to sedimentation [\(Pa/s\)]
Advection timesteps.
Add additional intermediate variables to the output vector.
Call
_verify_met()on model instantiation.- 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.
- azimuth = 0.0¶
- copy_source = True¶
Copy input
sourcedata on eval
- depth = 100.0¶
- downselect_met = True¶
Downselect input
MetDataset`to region aroundsource.
- dt_integration = np.timedelta64(30,'m')¶
Apply Euler’s method with a fixed step size of
dt_integration. Advected waypoints are interpolated against met data once eachdt_integration.
- dz_m = 200.0¶
Difference in altitude between top and bottom layer for stratification calculations, [\(m\)]. Used to approximate derivative of “lagrangian_tendency_of_air_pressure” (upward component of air velocity) with respect to altitude.
- include_source_in_output = False¶
Whether to include
sourcepoints in the output vector. Enabling allows the user to view additional data (e.g., interpolated met variables) for source points as well as evolved points.
- 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_erroris 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.RegularGridInterpolatorfor 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.
- max_age = np.timedelta64(20,'h')¶
Max age of plume evolution. If set to
None,timestepsmust not be None and advection will continue until the final timestep for all plumes.
- max_depth = 1500.0¶
Upper bound for evolved plume depth, constraining it to realistic values.
- met_latitude_buffer = (10.0, 10.0)¶
Met latitude buffer [WGS84] for evolution by advection.
- met_level_buffer = (40.0, 40.0)¶
Met level buffer [\(hPa\)] for evolution by advection.
- met_longitude_buffer = (10.0, 10.0)¶
Met longitude [WGS84] buffer for evolution by advection.
- met_time_buffer = (np.timedelta64(0,'h'), np.timedelta64(0,'h'))¶
Met time buffer for input to
Flight.downselect_met()Only applies whendownselect_metis True.
- sedimentation_rate = 0.0¶
Rate of change of pressure due to sedimentation [\(Pa/s\)]
- timesteps = None¶
Advection timesteps. If provided,
dt_integrationwill be ignored.Added in version 0.54.11.
- verbose_outputs = False¶
Add additional intermediate variables to the output vector. This includes interpolated met variables and wind-shear-derived geometry.
- verify_met = True¶
Call
_verify_met()on model instantiation.
- width = 100.0¶