particle_tracking_manager.models.opendrift.config_opendrift¶
Defines classes OpenDriftConfig, LeewayModelConfig, OceanDriftModelConfig, OpenOilModelConfig, LarvalFishModelConfig, PhytoplanktonModelConfig.
Classes
|
Larval fish model configuration for OpenDrift. |
|
Leeway model configuration for OpenDrift. |
|
Ocean drift model configuration for OpenDrift. |
|
Some of the parameters in this mirror OpenDriftSimulation clss in OpenDrift |
|
OpenOil model configuration for OpenDrift. |
|
Phytoplankton (HAB) model configuration for OpenDrift. |
- class particle_tracking_manager.models.opendrift.config_opendrift.LarvalFishModelConfig(*, model=ModelEnum.opendrift, lon=None, lat=None, geojson=None, start_time=datetime.datetime(2022, 1, 1, 0, 0), start_time_end=None, run_forward=True, time_step=300, time_step_output_integer=12, steps=None, duration=None, end_time=None, ocean_model='CIOFSOP', ocean_model_local=True, do3D=True, use_static_masks=False, output_file=None, output_format=OutputFormatEnum.netcdf, use_cache=True, log_level=LogLevelEnum.INFO, horizontal_diffusivity=None, stokes_drift=False, z=0, number=1, drift_model=DriftModelEnum.LarvalFish, save_interpolator=False, interpolator_filename=None, export_variables=None, plots=None, radius=1000.0, radius_type=RadiusTypeEnum.gaussian, max_speed=20.0, use_auto_landmask=False, coastline_action=CoastlineActionEnum.stranding, current_uncertainty=0, wind_uncertainty=0, seed_seafloor=False, diffusivitymodel='windspeed_Large1994', mixed_layer_depth=20, seafloor_action=SeafloorActionEnum.lift_to_seafloor, wind_drift=True, wind_drift_depth=0.1, vertical_mixing_timestep=60, wind_drift_factor=0.0, vertical_mixing=True, vertical_mixing_at_surface=True, vertical_advection_at_surface=False, diameter=0.0014, neutral_buoyancy_salinity=31.25, stage_fraction=0.0, hatched=0, length=None, weight=0.08, vertical_behavior_mode=VerticalBehaviorModeEnum.dvm, w_active=0.003, z_pref=-10.0, z_day=-25.0, z_night=-5.0, hatching_method=HatchingMethodEnum.fixed_time, hatch_time_days=2.0, dz_min=1.0, dz_rel=0.1, dz_max=15.0)[source]¶
Bases:
OceanDriftModelConfigLarval fish model configuration for OpenDrift.
- Attributes:
drop_varsGather variables to drop based on PTMConfig and OpenDriftConfig.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
ocean_model_configSelect ocean model config based on ocean_model.
ocean_model_simulationSelect ocean model simulation based on ocean_model.
seed_flagDetermine seed_flag based on whether geojson is set.
time_step_outputCalculate time_step_output as time_step multiplied by time_step_output_integer.
timedirSet timedir to 1 for forward, -1 for backward.
Methods
Calculate horizontal diffusivity based on ocean model.
Calculate start_time, end_time, duration, and steps based on the other parameters.
If do3D is False, set vertical_mixing to False.
Descrive how ocean_model_local is set.
Check if exactly two of start_time, end_time, duration, and steps are set.
Check if do3D is set to True for LarvalFish model.
Check if interpolator_filename is set correctly.
Check if lon and lat are set when geojson is None, and vice versa.
Check if all plots are requested.
Check if oil budget plot is requested and drift model is OpenOil.
Check if plot keys start with a PlotTypeEnum.
If seed_seafloor True, z is set to None.
If do3D is False, vertical_advection_at_surface is also False.
If do3D is True, vertical_advection_at_surface is also True.
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
If wind_drift is False, set wind_drift_factor to 0.
copy(*[, include, exclude, update, deep])Returns a copy of the model.
If simulation is backward, make time_step negative.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
Remove timezone information from datetime fields.
Select ocean model simulation based on ocean_model.
Set up TXLA if used.
Setup interpolator.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- _abc_impl = <_abc._abc_data object>¶
- _calculate_keys(*args, **kwargs)¶
- _copy_and_set_values(*args, **kwargs)¶
- classmethod _get_value(*args, **kwargs)¶
- _iter(*args, **kwargs)¶
- _setattr_handler(name, value)¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- assign_horizontal_diffusivity()¶
Calculate horizontal diffusivity based on ocean model.
- calculate_config_times()¶
Calculate start_time, end_time, duration, and steps based on the other parameters.
- check_config_do3D()¶
If do3D is False, set vertical_mixing to False.
- check_config_ocean_model_local()¶
Descrive how ocean_model_local is set.
- check_config_time_parameters()¶
Check if exactly two of start_time, end_time, duration, and steps are set.
- check_interpolator_filename()¶
Check if interpolator_filename is set correctly.
- check_lon_lat_geojson_consistency()¶
Check if lon and lat are set when geojson is None, and vice versa.
- check_plot_all()¶
Check if all plots are requested.
- check_plot_oil()¶
Check if oil budget plot is requested and drift model is OpenOil.
- check_plot_prefix_enum()¶
Check if plot keys start with a PlotTypeEnum.
- check_seed_seafloor()¶
If seed_seafloor True, z is set to None.
- check_vertical_advection_at_surface_False()¶
If do3D is False, vertical_advection_at_surface is also False.
- check_vertical_advection_at_surface_True()¶
If do3D is True, vertical_advection_at_surface is also True.
- check_vertical_mixing_at_surface_False()¶
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
- check_vertical_mixing_at_surface_True()¶
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
- check_wind_drift()¶
If wind_drift is False, set wind_drift_factor to 0.
- coastline_action¶
- classmethod construct(_fields_set=None, **values)¶
- copy(*, include=None, exclude=None, update=None, deep=False)¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- current_uncertainty¶
- diameter¶
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)¶
- diffusivitymodel¶
- do3D¶
- drift_model¶
- property drop_vars¶
Gather variables to drop based on PTMConfig and OpenDriftConfig.
- duration¶
- dz_max¶
- dz_min¶
- dz_rel¶
- end_time¶
- export_variables¶
- classmethod from_orm(obj)¶
- geojson¶
- hatch_time_days¶
- hatched¶
- hatching_method¶
- horizontal_diffusivity¶
- interpolator_filename¶
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)¶
- lat¶
- length¶
- log_level¶
- lon¶
- match_time_step_sign_to_timedir_sign()¶
If simulation is backward, make time_step negative.
Sign of input time_step is ignored.
- max_speed¶
- mixed_layer_depth¶
- model¶
- model_computed_fields = {'ocean_model_config': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.ocean_model_registry.OceanModelConfig'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model config based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'ocean_model_simulation': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.config_ocean_model.OceanModelSimulation'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model simulation based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'seed_flag': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'str'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Determine seed_flag based on whether geojson is set.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'time_step_output': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Calculate time_step_output as time_step multiplied by time_step_output_integer.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'timedir': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'int'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Set timedir to 1 for forward, -1 for backward.', deprecated=None, examples=None, json_schema_extra=None, repr=True)}¶
- model_config = {'extra': 'forbid', 'use_enum_values': True, 'validate_default': True, 'validate_defaults': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'coastline_action': FieldInfo(annotation=CoastlineActionEnum, required=False, default=<CoastlineActionEnum.stranding: 'stranding'>, title='Coastline Action', description='This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.', json_schema_extra={'od_mapping': 'general:coastline_action', 'ptm_level': 2}), 'current_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Current Uncertainty', description='Add gaussian perturbation with this standard deviation to current components at each time step', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:current_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'diameter': FieldInfo(annotation=float, required=False, default=0.0014, title='Diameter', description='Seeding value of diameter. The diameter gives the egg diameter so must be used with `hatched=0`.', json_schema_extra={'units': 'm', 'od_mapping': 'seed:diameter', 'ptm_level': 2}, metadata=[Gt(gt=0)]), 'diffusivitymodel': FieldInfo(annotation=DiffusivityModelEnum, required=False, default='windspeed_Large1994', title='Diffusivity model', description='Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback. Parameterizations based on wind speed are also available.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:diffusivitymodel', 'ptm_level': 3}), 'do3D': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to run drifters in 3D, by default False for most drift models.', json_schema_extra={'ptm_level': 1}), 'drift_model': FieldInfo(annotation=DriftModelEnum, required=False, default=<DriftModelEnum.LarvalFish: 'LarvalFish'>), 'duration': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.', json_schema_extra={'ptm_level': 1}), 'dz_max': FieldInfo(annotation=float, required=False, default=15.0, title='Max Band Half-Width', description='Maximum half-width for depth bands (internal parameter).', json_schema_extra={'units': 'm', 'od_mapping': 'biology:dz_max', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=1000)]), 'dz_min': FieldInfo(annotation=float, required=False, default=1.0, title='Min Band Half-Width', description='Minimum half-width for depth bands (internal parameter).', json_schema_extra={'units': 'm', 'od_mapping': 'biology:dz_min', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=100)]), 'dz_rel': FieldInfo(annotation=float, required=False, default=0.1, title='Relative Band Factor', description='Relative depth band expansion factor (internal parameter).', json_schema_extra={'units': 'fraction', 'od_mapping': 'biology:dz_rel', 'ptm_level': 3}, metadata=[Ge(ge=0.0), Le(le=1.0)]), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'export_variables': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, description="List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.", json_schema_extra={'ptm_level': 3}), 'geojson': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='GeoJSON describing a polygon within which to seed drifters; must contain "geometry". If this is set, `lon` and `lat` should be None.', json_schema_extra={'ptm_level': 1}), 'hatch_time_days': FieldInfo(annotation=float, required=False, default=2.0, title='Hatch Time', description='Fixed time to hatching when hatching_method is fixed_time.', json_schema_extra={'units': 'days', 'od_mapping': 'egg:hatch_time_days', 'ptm_level': 2}, metadata=[Ge(ge=0.004), Le(le=416)]), 'hatched': FieldInfo(annotation=int, required=False, default=0, title='Hatched', description='Seeding value of hatched. 0 for eggs, 1 for larvae.', json_schema_extra={'units': '', 'od_mapping': 'seed:hatched', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=1)]), 'hatching_method': FieldInfo(annotation=HatchingMethodEnum, required=False, default=<HatchingMethodEnum.fixed_time: 'fixed_time'>, title='Hatching Method', description='Egg hatching method. temperature: use ambient temperature (Ellertsen et al. 1988). fixed_time: hatch after fixed duration.', json_schema_extra={'od_mapping': 'egg:hatching_method', 'ptm_level': 2}), 'horizontal_diffusivity': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Horizontal Diffusivity', description='Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.', json_schema_extra={'units': 'm2/s', 'ptm_level': 2, 'od_mapping': 'environment:constant:horizontal_diffusivity'}, metadata=[Ge(ge=0), Le(le=100000)]), 'interpolator_filename': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).', json_schema_extra={'ptm_level': 3}), 'lat': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_north'}, metadata=[Ge(ge=-90), Le(le=90)]), 'length': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Length', description='Seeding value of length. This is not currently used.', json_schema_extra={'units': 'mm', 'od_mapping': 'seed:length', 'ptm_level': 2}, metadata=[Gt(gt=0)]), 'log_level': FieldInfo(annotation=LogLevelEnum, required=False, default=<LogLevelEnum.INFO: 'INFO'>, description='Log verbosity', json_schema_extra={'ptm_level': 3}), 'lon': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_east'}, metadata=[Ge(ge=-180), Le(le=180)]), 'max_speed': FieldInfo(annotation=float, required=False, default=20.0, title='Maximum speed', description='Typical maximum speed of elements, used to estimate reader buffer size', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:max_speed', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'mixed_layer_depth': FieldInfo(annotation=float, required=False, default=20, title='Mixed Layer Depth', description='mixed_layer_depth controls how deep the vertical diffusivity profile reaches. This sets the fallback value for ocean_mixed_layer_thickness if not available from any reader.', json_schema_extra={'units': 'm', 'od_mapping': 'environment:constant:ocean_mixed_layer_thickness', 'ptm_level': 3}, metadata=[Ge(ge=0.0)]), 'model': FieldInfo(annotation=ModelEnum, required=False, default=<ModelEnum.opendrift: 'opendrift'>, description='Lagrangian model software to use for simulation.', json_schema_extra={'ptm_level': 1}), 'neutral_buoyancy_salinity': FieldInfo(annotation=float, required=False, default=31.25, title='Neutral Buoyancy Salinity', description='Seeding value of neutral_buoyancy_salinity. This is a property of the egg so must be used with `hatched=0`.', json_schema_extra={'units': 'PSU', 'od_mapping': 'seed:neutral_buoyancy_salinity', 'ptm_level': 2}, metadata=[Gt(gt=0)]), 'number': FieldInfo(annotation=int, required=False, default=1, title='Number', description='The number of elements for the simulation.', json_schema_extra={'units': 1, 'ptm_level': 1, 'od_mapping': 'seed:number'}, metadata=[Ge(ge=1)]), 'ocean_model': FieldInfo(annotation=OceanModelEnum, required=False, default='CIOFSOP', description='Name of ocean model to use for driving drifter simulation.', json_schema_extra={'ptm_level': 1}), 'ocean_model_local': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use local version of known `ocean_model` instead of remote version.', json_schema_extra={'ptm_level': 3}), 'output_file': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Name of file to write output to. If None, default name is used.', json_schema_extra={'ptm_level': 3}), 'output_format': FieldInfo(annotation=OutputFormatEnum, required=False, default=<OutputFormatEnum.netcdf: 'netcdf'>, description='Output file format. Options are "netcdf", "parquet", or "both".', json_schema_extra={'ptm_level': 2}), 'plots': FieldInfo(annotation=Union[dict[str, dict], str, NoneType], required=False, default=None, description='Dictionary of plots to generate using OpenDrift.', json_schema_extra={'ptm_level': 1}), 'radius': FieldInfo(annotation=float, required=False, default=1000.0, description='Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.', json_schema_extra={'ptm_level': 2, 'units': 'm'}, metadata=[Ge(ge=0.0), Le(le=1000000)]), 'radius_type': FieldInfo(annotation=RadiusTypeEnum, required=False, default=<RadiusTypeEnum.gaussian: 'gaussian'>, description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.", json_schema_extra={'ptm_level': 3}), 'run_forward': FieldInfo(annotation=bool, required=False, default=True, description='Run forward in time.', json_schema_extra={'ptm_level': 2}), 'save_interpolator': FieldInfo(annotation=bool, required=False, default=False, description='Whether to save the interpolator.'), 'seafloor_action': FieldInfo(annotation=SeafloorActionEnum, required=False, default=<SeafloorActionEnum.lift_to_seafloor: 'lift_to_seafloor'>, title='Seafloor Action', description='This controls particle behavior at the seafloor. Use `deactivate` to stick particles to the seafloor at the point of interaction. Use `lift_to_seafloor` to elevate particles up to seabed if below. User `previous` to move elements back to previous position. Use None to ignore seafloor.', json_schema_extra={'od_mapping': 'general:seafloor_action', 'ptm_level': 2}), 'seed_seafloor': FieldInfo(annotation=bool, required=False, default=False, title='Seed Seafloor', description='Elements are seeded at seafloor, and seeding depth (z) is neglected and must be None.', json_schema_extra={'od_mapping': 'seed:seafloor', 'ptm_level': 2}), 'stage_fraction': FieldInfo(annotation=float, required=False, default=0.0, title='Stage Fraction', description='Seeding value of stage_fraction. stage_fraction tracks percentage of development time completed, from 0 to 1, where a value of 1 means the egg has hatched. If `hatched==1` then `stage_fraction` is ignored in `OpenDrift`.', json_schema_extra={'units': '', 'od_mapping': 'seed:stage_fraction', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=1)]), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=datetime.datetime(2022, 1, 1, 0, 0), description='Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'start_time_end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 2}), 'steps': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Maximum number of steps. End of simulation will be start_time + steps * time_step.', json_schema_extra={'ptm_level': 1}, metadata=[Ge(ge=1), Le(le=10000)]), 'stokes_drift': FieldInfo(annotation=bool, required=False, default=False, title='Stokes Drift', description='Advection elements with Stokes drift (wave orbital motion).', json_schema_extra={'ptm_level': 2, 'od_mapping': 'drift:stokes_drift'}), 'time_step': FieldInfo(annotation=float, required=False, default=300, description='Interval between particles updates, in seconds.', json_schema_extra={'ptm_level': 3, 'units': 'seconds'}, metadata=[Ge(ge=0.01), Le(le=1440)]), 'time_step_output_integer': FieldInfo(annotation=int, required=False, default=12, description='Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.', json_schema_extra={'ptm_level': 3, 'units': ''}, metadata=[Ge(ge=1), Le(le=300)]), 'use_auto_landmask': FieldInfo(annotation=bool, required=False, default=False, title='Use Auto Landmask', description='If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.', json_schema_extra={'od_mapping': 'general:use_auto_landmask', 'ptm_level': 3}), 'use_cache': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use cache for storing interpolators.', json_schema_extra={'ptm_level': 3}), 'use_static_masks': FieldInfo(annotation=bool, required=False, default=False, description="If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.", json_schema_extra={'ptm_level': 3}), 'vertical_advection_at_surface': FieldInfo(annotation=bool, required=False, default=False, title='Vertical Advection At Surface', description='If vertical advection is activated, surface elements (z=0) can only be advected (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_advection_at_surface', 'ptm_level': 2}), 'vertical_behavior_mode': FieldInfo(annotation=VerticalBehaviorModeEnum, required=False, default=<VerticalBehaviorModeEnum.dvm: 'dvm'>, title='Vertical Behavior Mode', description='Vertical behavior mode. none: passive. depth: maintain preferred depth band. dvm: diel vertical migration.', json_schema_extra={'od_mapping': 'biology:vertical_behavior_mode', 'ptm_level': 2}), 'vertical_mixing': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing', description='Activate vertical mixing scheme. Vertical mixing includes movement due to buoyancy and turbulent mixing.', json_schema_extra={'od_mapping': 'drift:vertical_mixing', 'ptm_level': 2}), 'vertical_mixing_at_surface': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing At Surface', description='If vertical mixing is activated, surface elements (z=0) can only be mixed (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_mixing_at_surface', 'ptm_level': 2}), 'vertical_mixing_timestep': FieldInfo(annotation=float, required=False, default=60, title='Vertical Mixing Timestep', description='Time step used for inner (fast) loop of the vertical mixing model. Set this smaller to increase frequency of vertical mixing calculation; number of loops is calculated as int(self.time_step/vertical_mixing_timestep) so vertical_mixing_timestep must be smaller than time_step.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:timestep', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=3600)]), 'w_active': FieldInfo(annotation=float, required=False, default=0.003, title='Vertical Speed', description='Maximum active vertical positioning speed (swimming for larvae).', json_schema_extra={'units': 'm/s', 'od_mapping': 'biology:w_active', 'ptm_level': 2}, metadata=[Ge(ge=0.0), Le(le=1.0)]), 'weight': FieldInfo(annotation=float, required=False, default=0.08, title='Weight', description='Seeding value of weight. This is the starting weight for larval fish, whenever they reach that stage.', json_schema_extra={'units': 'mg', 'od_mapping': 'seed:weight', 'ptm_level': 2}, metadata=[Gt(gt=0)]), 'wind_drift': FieldInfo(annotation=bool, required=False, default=True, title='Wind Drift', description='If on, elements at surface are moved with a fraction, the wind draft factor, of the wind speed from the surface down to the wind drift depth.', json_schema_extra={'ptm_level': 1}), 'wind_drift_depth': FieldInfo(annotation=float, required=False, default=0.1, title='Wind Drift Depth', description='The direct wind drift (windage) is linearly decreasing from the surface value (wind_drift_factor) until 0 at this depth.', json_schema_extra={'units': 'meters', 'od_mapping': 'drift:wind_drift_depth', 'ptm_level': 3}, metadata=[Ge(ge=0), Le(le=1)]), 'wind_drift_factor': FieldInfo(annotation=float, required=False, default=0.0, title='Wind Drift Factor', description='Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift. Multiply by 100 to get the percent windage.', json_schema_extra={'units': '1', 'od_mapping': 'seed:wind_drift_factor', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=0.1)]), 'wind_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Wind Uncertainty', description='Add gaussian perturbation with this standard deviation to wind components at each time step.', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:wind_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'z': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, title='Z', description='Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.', json_schema_extra={'units': 'm', 'ptm_level': 1, 'od_mapping': 'seed:z'}, metadata=[Ge(ge=-10000), Le(le=0)]), 'z_day': FieldInfo(annotation=float, required=False, default=-25.0, title='Day Depth', description="Target depth during daytime for DVM mode (negative down from surface). Used when vertical_behavior_mode is 'dvm'.", json_schema_extra={'units': 'm', 'od_mapping': 'biology:z_day', 'ptm_level': 2}, metadata=[Ge(ge=-10000), Le(le=0.0)]), 'z_night': FieldInfo(annotation=float, required=False, default=-5.0, title='Night Depth', description="Target depth during nighttime for DVM mode (negative down from surface). Used when vertical_behavior_mode is 'dvm'.", json_schema_extra={'units': 'm', 'od_mapping': 'biology:z_night', 'ptm_level': 2}, metadata=[Ge(ge=-10000), Le(le=0.0)]), 'z_pref': FieldInfo(annotation=float, required=False, default=-10.0, title='Preferred Depth', description="Preferred depth for depth mode (negative down from surface). Used when vertical_behavior_mode is 'depth'.", json_schema_extra={'units': 'm', 'od_mapping': 'biology:z_pref', 'ptm_level': 2}, metadata=[Ge(ge=-10000), Le(le=0.0)])}¶
- property model_fields_set¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params)¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(context, /)¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- neutral_buoyancy_salinity¶
- number¶
- ocean_model¶
- property ocean_model_config¶
Select ocean model config based on ocean_model.
- ocean_model_local¶
- property ocean_model_simulation¶
Select ocean model simulation based on ocean_model.
- output_file¶
- output_format¶
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- classmethod parse_obj(obj)¶
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- plots¶
- radius¶
- radius_type¶
- remove_timezone_info()¶
Remove timezone information from datetime fields.
- run_forward¶
- save_interpolator¶
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')¶
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)¶
- seafloor_action¶
- property seed_flag¶
Determine seed_flag based on whether geojson is set.
- seed_seafloor¶
- select_ocean_model_simulation_on_init()¶
Select ocean model simulation based on ocean_model.
- setup_TXLA_if_used()¶
Set up TXLA if used.
- setup_interpolator()¶
Setup interpolator.
- stage_fraction¶
- start_time¶
- start_time_end¶
- steps¶
- stokes_drift¶
- time_step¶
- property time_step_output¶
Calculate time_step_output as time_step multiplied by time_step_output_integer.
- time_step_output_integer¶
- property timedir¶
Set timedir to 1 for forward, -1 for backward.
- classmethod update_forward_refs(**localns)¶
- use_auto_landmask¶
- use_cache¶
- use_static_masks¶
- classmethod validate(value)¶
- vertical_advection_at_surface¶
- vertical_behavior_mode¶
- vertical_mixing¶
- vertical_mixing_at_surface¶
- vertical_mixing_timestep¶
- w_active¶
- weight¶
- wind_drift¶
- wind_drift_depth¶
- wind_drift_factor¶
- wind_uncertainty¶
- z¶
- z_day¶
- z_night¶
- z_pref¶
- class particle_tracking_manager.models.opendrift.config_opendrift.LeewayModelConfig(*, model=ModelEnum.opendrift, lon=None, lat=None, geojson=None, start_time=datetime.datetime(2022, 1, 1, 0, 0), start_time_end=None, run_forward=True, time_step=300, time_step_output_integer=12, steps=None, duration=None, end_time=None, ocean_model='CIOFSOP', ocean_model_local=True, do3D=False, use_static_masks=False, output_file=None, output_format=OutputFormatEnum.netcdf, use_cache=True, log_level=LogLevelEnum.INFO, horizontal_diffusivity=None, stokes_drift=False, z=0, number=1, drift_model=DriftModelEnum.Leeway, save_interpolator=False, interpolator_filename=None, export_variables=None, plots=None, radius=1000.0, radius_type=RadiusTypeEnum.gaussian, max_speed=20.0, use_auto_landmask=False, coastline_action=CoastlineActionEnum.stranding, current_uncertainty=0, wind_uncertainty=0, object_type=ObjectTypeEnum.O1)[source]¶
Bases:
OpenDriftConfigLeeway model configuration for OpenDrift.
- Attributes:
drop_varsGather variables to drop based on PTMConfig and OpenDriftConfig.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
ocean_model_configSelect ocean model config based on ocean_model.
ocean_model_simulationSelect ocean model simulation based on ocean_model.
seed_flagDetermine seed_flag based on whether geojson is set.
time_step_outputCalculate time_step_output as time_step multiplied by time_step_output_integer.
timedirSet timedir to 1 for forward, -1 for backward.
Methods
Calculate horizontal diffusivity based on ocean model.
Calculate start_time, end_time, duration, and steps based on the other parameters.
Descrive how ocean_model_local is set.
Check if exactly two of start_time, end_time, duration, and steps are set.
Check if do3D is set to False for Leeway model.
Check if interpolator_filename is set correctly.
Check if lon and lat are set when geojson is None, and vice versa.
Check if all plots are requested.
Check if oil budget plot is requested and drift model is OpenOil.
Check if plot keys start with a PlotTypeEnum.
Check if stokes_drift is set to False for Leeway model.
copy(*[, include, exclude, update, deep])Returns a copy of the model.
If simulation is backward, make time_step negative.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
Remove timezone information from datetime fields.
Select ocean model simulation based on ocean_model.
Set up TXLA if used.
Setup interpolator.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- _abc_impl = <_abc._abc_data object>¶
- _calculate_keys(*args, **kwargs)¶
- _copy_and_set_values(*args, **kwargs)¶
- classmethod _get_value(*args, **kwargs)¶
- _iter(*args, **kwargs)¶
- _setattr_handler(name, value)¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- assign_horizontal_diffusivity()¶
Calculate horizontal diffusivity based on ocean model.
- calculate_config_times()¶
Calculate start_time, end_time, duration, and steps based on the other parameters.
- check_config_ocean_model_local()¶
Descrive how ocean_model_local is set.
- check_config_time_parameters()¶
Check if exactly two of start_time, end_time, duration, and steps are set.
- check_interpolator_filename()¶
Check if interpolator_filename is set correctly.
- check_lon_lat_geojson_consistency()¶
Check if lon and lat are set when geojson is None, and vice versa.
- check_plot_all()¶
Check if all plots are requested.
- check_plot_oil()¶
Check if oil budget plot is requested and drift model is OpenOil.
- check_plot_prefix_enum()¶
Check if plot keys start with a PlotTypeEnum.
- coastline_action¶
- classmethod construct(_fields_set=None, **values)¶
- copy(*, include=None, exclude=None, update=None, deep=False)¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- current_uncertainty¶
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)¶
- do3D¶
- drift_model¶
- property drop_vars¶
Gather variables to drop based on PTMConfig and OpenDriftConfig.
- duration¶
- end_time¶
- export_variables¶
- classmethod from_orm(obj)¶
- geojson¶
- horizontal_diffusivity¶
- interpolator_filename¶
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)¶
- lat¶
- log_level¶
- lon¶
- match_time_step_sign_to_timedir_sign()¶
If simulation is backward, make time_step negative.
Sign of input time_step is ignored.
- max_speed¶
- model¶
- model_computed_fields = {'ocean_model_config': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.ocean_model_registry.OceanModelConfig'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model config based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'ocean_model_simulation': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.config_ocean_model.OceanModelSimulation'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model simulation based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'seed_flag': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'str'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Determine seed_flag based on whether geojson is set.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'time_step_output': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Calculate time_step_output as time_step multiplied by time_step_output_integer.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'timedir': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'int'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Set timedir to 1 for forward, -1 for backward.', deprecated=None, examples=None, json_schema_extra=None, repr=True)}¶
- model_config = {'extra': 'forbid', 'use_enum_values': True, 'validate_default': True, 'validate_defaults': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'coastline_action': FieldInfo(annotation=CoastlineActionEnum, required=False, default=<CoastlineActionEnum.stranding: 'stranding'>, title='Coastline Action', description='This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.', json_schema_extra={'od_mapping': 'general:coastline_action', 'ptm_level': 2}), 'current_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Current Uncertainty', description='Add gaussian perturbation with this standard deviation to current components at each time step', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:current_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'do3D': FieldInfo(annotation=bool, required=False, default=False, description='Set to True to run drifters in 3D, by default False for most drift models.', json_schema_extra={'ptm_level': 1}), 'drift_model': FieldInfo(annotation=DriftModelEnum, required=False, default=<DriftModelEnum.Leeway: 'Leeway'>), 'duration': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.', json_schema_extra={'ptm_level': 1}), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'export_variables': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, description="List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.", json_schema_extra={'ptm_level': 3}), 'geojson': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='GeoJSON describing a polygon within which to seed drifters; must contain "geometry". If this is set, `lon` and `lat` should be None.', json_schema_extra={'ptm_level': 1}), 'horizontal_diffusivity': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Horizontal Diffusivity', description='Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.', json_schema_extra={'units': 'm2/s', 'ptm_level': 2, 'od_mapping': 'environment:constant:horizontal_diffusivity'}, metadata=[Ge(ge=0), Le(le=100000)]), 'interpolator_filename': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).', json_schema_extra={'ptm_level': 3}), 'lat': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_north'}, metadata=[Ge(ge=-90), Le(le=90)]), 'log_level': FieldInfo(annotation=LogLevelEnum, required=False, default=<LogLevelEnum.INFO: 'INFO'>, description='Log verbosity', json_schema_extra={'ptm_level': 3}), 'lon': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_east'}, metadata=[Ge(ge=-180), Le(le=180)]), 'max_speed': FieldInfo(annotation=float, required=False, default=20.0, title='Maximum speed', description='Typical maximum speed of elements, used to estimate reader buffer size', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:max_speed', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'model': FieldInfo(annotation=ModelEnum, required=False, default=<ModelEnum.opendrift: 'opendrift'>, description='Lagrangian model software to use for simulation.', json_schema_extra={'ptm_level': 1}), 'number': FieldInfo(annotation=int, required=False, default=1, title='Number', description='The number of elements for the simulation.', json_schema_extra={'units': 1, 'ptm_level': 1, 'od_mapping': 'seed:number'}, metadata=[Ge(ge=1)]), 'object_type': FieldInfo(annotation=ObjectTypeEnum, required=False, default=<ObjectTypeEnum.O1: 'Person-in-water (PIW), unknown state (mean values)'>, title='Object Type', description='Leeway object category for this simulation. List is originally from USCG technical reports. More details here: https://github.com/OpenDrift/opendrift/blob/master/opendrift/models/OBJECTPROP.DAT.', json_schema_extra={'od_mapping': 'seed:object_type', 'ptm_level': 1}), 'ocean_model': FieldInfo(annotation=OceanModelEnum, required=False, default='CIOFSOP', description='Name of ocean model to use for driving drifter simulation.', json_schema_extra={'ptm_level': 1}), 'ocean_model_local': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use local version of known `ocean_model` instead of remote version.', json_schema_extra={'ptm_level': 3}), 'output_file': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Name of file to write output to. If None, default name is used.', json_schema_extra={'ptm_level': 3}), 'output_format': FieldInfo(annotation=OutputFormatEnum, required=False, default=<OutputFormatEnum.netcdf: 'netcdf'>, description='Output file format. Options are "netcdf", "parquet", or "both".', json_schema_extra={'ptm_level': 2}), 'plots': FieldInfo(annotation=Union[dict[str, dict], str, NoneType], required=False, default=None, description='Dictionary of plots to generate using OpenDrift.', json_schema_extra={'ptm_level': 1}), 'radius': FieldInfo(annotation=float, required=False, default=1000.0, description='Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.', json_schema_extra={'ptm_level': 2, 'units': 'm'}, metadata=[Ge(ge=0.0), Le(le=1000000)]), 'radius_type': FieldInfo(annotation=RadiusTypeEnum, required=False, default=<RadiusTypeEnum.gaussian: 'gaussian'>, description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.", json_schema_extra={'ptm_level': 3}), 'run_forward': FieldInfo(annotation=bool, required=False, default=True, description='Run forward in time.', json_schema_extra={'ptm_level': 2}), 'save_interpolator': FieldInfo(annotation=bool, required=False, default=False, description='Whether to save the interpolator.'), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=datetime.datetime(2022, 1, 1, 0, 0), description='Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'start_time_end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 2}), 'steps': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Maximum number of steps. End of simulation will be start_time + steps * time_step.', json_schema_extra={'ptm_level': 1}, metadata=[Ge(ge=1), Le(le=10000)]), 'stokes_drift': FieldInfo(annotation=bool, required=False, default=False, title='Stokes Drift', description='Advection elements with Stokes drift (wave orbital motion).', json_schema_extra={'ptm_level': 2, 'od_mapping': 'drift:stokes_drift'}), 'time_step': FieldInfo(annotation=float, required=False, default=300, description='Interval between particles updates, in seconds.', json_schema_extra={'ptm_level': 3, 'units': 'seconds'}, metadata=[Ge(ge=0.01), Le(le=1440)]), 'time_step_output_integer': FieldInfo(annotation=int, required=False, default=12, description='Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.', json_schema_extra={'ptm_level': 3, 'units': ''}, metadata=[Ge(ge=1), Le(le=300)]), 'use_auto_landmask': FieldInfo(annotation=bool, required=False, default=False, title='Use Auto Landmask', description='If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.', json_schema_extra={'od_mapping': 'general:use_auto_landmask', 'ptm_level': 3}), 'use_cache': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use cache for storing interpolators.', json_schema_extra={'ptm_level': 3}), 'use_static_masks': FieldInfo(annotation=bool, required=False, default=False, description="If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.", json_schema_extra={'ptm_level': 3}), 'wind_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Wind Uncertainty', description='Add gaussian perturbation with this standard deviation to wind components at each time step.', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:wind_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'z': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, title='Z', description='Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.', json_schema_extra={'units': 'm', 'ptm_level': 1, 'od_mapping': 'seed:z'}, metadata=[Ge(ge=-10000), Le(le=0)])}¶
- property model_fields_set¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params)¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(context, /)¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- number¶
- object_type¶
- ocean_model¶
- property ocean_model_config¶
Select ocean model config based on ocean_model.
- ocean_model_local¶
- property ocean_model_simulation¶
Select ocean model simulation based on ocean_model.
- output_file¶
- output_format¶
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- classmethod parse_obj(obj)¶
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- plots¶
- radius¶
- radius_type¶
- remove_timezone_info()¶
Remove timezone information from datetime fields.
- run_forward¶
- save_interpolator¶
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')¶
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)¶
- property seed_flag¶
Determine seed_flag based on whether geojson is set.
- select_ocean_model_simulation_on_init()¶
Select ocean model simulation based on ocean_model.
- setup_TXLA_if_used()¶
Set up TXLA if used.
- setup_interpolator()¶
Setup interpolator.
- start_time¶
- start_time_end¶
- steps¶
- stokes_drift¶
- time_step¶
- property time_step_output¶
Calculate time_step_output as time_step multiplied by time_step_output_integer.
- time_step_output_integer¶
- property timedir¶
Set timedir to 1 for forward, -1 for backward.
- classmethod update_forward_refs(**localns)¶
- use_auto_landmask¶
- use_cache¶
- use_static_masks¶
- classmethod validate(value)¶
- wind_uncertainty¶
- z¶
- class particle_tracking_manager.models.opendrift.config_opendrift.OceanDriftModelConfig(*, model=ModelEnum.opendrift, lon=None, lat=None, geojson=None, start_time=datetime.datetime(2022, 1, 1, 0, 0), start_time_end=None, run_forward=True, time_step=300, time_step_output_integer=12, steps=None, duration=None, end_time=None, ocean_model='CIOFSOP', ocean_model_local=True, do3D=False, use_static_masks=False, output_file=None, output_format=OutputFormatEnum.netcdf, use_cache=True, log_level=LogLevelEnum.INFO, horizontal_diffusivity=None, stokes_drift=True, z=0, number=1, drift_model=DriftModelEnum.OceanDrift, save_interpolator=False, interpolator_filename=None, export_variables=None, plots=None, radius=1000.0, radius_type=RadiusTypeEnum.gaussian, max_speed=20.0, use_auto_landmask=False, coastline_action=CoastlineActionEnum.stranding, current_uncertainty=0, wind_uncertainty=0, seed_seafloor=False, diffusivitymodel='windspeed_Large1994', mixed_layer_depth=20, seafloor_action=SeafloorActionEnum.lift_to_seafloor, wind_drift=True, wind_drift_depth=0.1, vertical_mixing_timestep=60, wind_drift_factor=0.02, vertical_mixing=True, vertical_mixing_at_surface=True, vertical_advection_at_surface=False)[source]¶
Bases:
OpenDriftConfigOcean drift model configuration for OpenDrift.
- Attributes:
drop_varsGather variables to drop based on PTMConfig and OpenDriftConfig.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
ocean_model_configSelect ocean model config based on ocean_model.
ocean_model_simulationSelect ocean model simulation based on ocean_model.
seed_flagDetermine seed_flag based on whether geojson is set.
time_step_outputCalculate time_step_output as time_step multiplied by time_step_output_integer.
timedirSet timedir to 1 for forward, -1 for backward.
Methods
Calculate horizontal diffusivity based on ocean model.
Calculate start_time, end_time, duration, and steps based on the other parameters.
If do3D is False, set vertical_mixing to False.
Descrive how ocean_model_local is set.
Check if exactly two of start_time, end_time, duration, and steps are set.
Check if interpolator_filename is set correctly.
Check if lon and lat are set when geojson is None, and vice versa.
Check if all plots are requested.
Check if oil budget plot is requested and drift model is OpenOil.
Check if plot keys start with a PlotTypeEnum.
If seed_seafloor True, z is set to None.
If do3D is False, vertical_advection_at_surface is also False.
If do3D is True, vertical_advection_at_surface is also True.
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
If wind_drift is False, set wind_drift_factor to 0.
copy(*[, include, exclude, update, deep])Returns a copy of the model.
If simulation is backward, make time_step negative.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
Remove timezone information from datetime fields.
Select ocean model simulation based on ocean_model.
Set up TXLA if used.
Setup interpolator.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- _abc_impl = <_abc._abc_data object>¶
- _calculate_keys(*args, **kwargs)¶
- _copy_and_set_values(*args, **kwargs)¶
- classmethod _get_value(*args, **kwargs)¶
- _iter(*args, **kwargs)¶
- _setattr_handler(name, value)¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- assign_horizontal_diffusivity()¶
Calculate horizontal diffusivity based on ocean model.
- calculate_config_times()¶
Calculate start_time, end_time, duration, and steps based on the other parameters.
- check_config_ocean_model_local()¶
Descrive how ocean_model_local is set.
- check_config_time_parameters()¶
Check if exactly two of start_time, end_time, duration, and steps are set.
- check_interpolator_filename()¶
Check if interpolator_filename is set correctly.
- check_lon_lat_geojson_consistency()¶
Check if lon and lat are set when geojson is None, and vice versa.
- check_plot_all()¶
Check if all plots are requested.
- check_plot_oil()¶
Check if oil budget plot is requested and drift model is OpenOil.
- check_plot_prefix_enum()¶
Check if plot keys start with a PlotTypeEnum.
- check_vertical_advection_at_surface_False()[source]¶
If do3D is False, vertical_advection_at_surface is also False.
- check_vertical_advection_at_surface_True()[source]¶
If do3D is True, vertical_advection_at_surface is also True.
- check_vertical_mixing_at_surface_False()[source]¶
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
- check_vertical_mixing_at_surface_True()[source]¶
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
- coastline_action¶
- classmethod construct(_fields_set=None, **values)¶
- copy(*, include=None, exclude=None, update=None, deep=False)¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- current_uncertainty¶
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)¶
- diffusivitymodel¶
- do3D¶
- drift_model¶
- property drop_vars¶
Gather variables to drop based on PTMConfig and OpenDriftConfig.
- duration¶
- end_time¶
- export_variables¶
- classmethod from_orm(obj)¶
- geojson¶
- horizontal_diffusivity¶
- interpolator_filename¶
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)¶
- lat¶
- log_level¶
- lon¶
- match_time_step_sign_to_timedir_sign()¶
If simulation is backward, make time_step negative.
Sign of input time_step is ignored.
- max_speed¶
- mixed_layer_depth¶
- model¶
- model_computed_fields = {'ocean_model_config': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.ocean_model_registry.OceanModelConfig'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model config based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'ocean_model_simulation': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.config_ocean_model.OceanModelSimulation'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model simulation based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'seed_flag': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'str'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Determine seed_flag based on whether geojson is set.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'time_step_output': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Calculate time_step_output as time_step multiplied by time_step_output_integer.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'timedir': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'int'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Set timedir to 1 for forward, -1 for backward.', deprecated=None, examples=None, json_schema_extra=None, repr=True)}¶
- model_config = {'extra': 'forbid', 'use_enum_values': True, 'validate_default': True, 'validate_defaults': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'coastline_action': FieldInfo(annotation=CoastlineActionEnum, required=False, default=<CoastlineActionEnum.stranding: 'stranding'>, title='Coastline Action', description='This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.', json_schema_extra={'od_mapping': 'general:coastline_action', 'ptm_level': 2}), 'current_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Current Uncertainty', description='Add gaussian perturbation with this standard deviation to current components at each time step', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:current_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'diffusivitymodel': FieldInfo(annotation=DiffusivityModelEnum, required=False, default='windspeed_Large1994', title='Diffusivity model', description='Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback. Parameterizations based on wind speed are also available.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:diffusivitymodel', 'ptm_level': 3}), 'do3D': FieldInfo(annotation=bool, required=False, default=False, description='Set to True to run drifters in 3D, by default False for most drift models.', json_schema_extra={'ptm_level': 1}), 'drift_model': FieldInfo(annotation=DriftModelEnum, required=False, default=<DriftModelEnum.OceanDrift: 'OceanDrift'>), 'duration': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.', json_schema_extra={'ptm_level': 1}), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'export_variables': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, description="List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.", json_schema_extra={'ptm_level': 3}), 'geojson': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='GeoJSON describing a polygon within which to seed drifters; must contain "geometry". If this is set, `lon` and `lat` should be None.', json_schema_extra={'ptm_level': 1}), 'horizontal_diffusivity': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Horizontal Diffusivity', description='Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.', json_schema_extra={'units': 'm2/s', 'ptm_level': 2, 'od_mapping': 'environment:constant:horizontal_diffusivity'}, metadata=[Ge(ge=0), Le(le=100000)]), 'interpolator_filename': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).', json_schema_extra={'ptm_level': 3}), 'lat': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_north'}, metadata=[Ge(ge=-90), Le(le=90)]), 'log_level': FieldInfo(annotation=LogLevelEnum, required=False, default=<LogLevelEnum.INFO: 'INFO'>, description='Log verbosity', json_schema_extra={'ptm_level': 3}), 'lon': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_east'}, metadata=[Ge(ge=-180), Le(le=180)]), 'max_speed': FieldInfo(annotation=float, required=False, default=20.0, title='Maximum speed', description='Typical maximum speed of elements, used to estimate reader buffer size', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:max_speed', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'mixed_layer_depth': FieldInfo(annotation=float, required=False, default=20, title='Mixed Layer Depth', description='mixed_layer_depth controls how deep the vertical diffusivity profile reaches. This sets the fallback value for ocean_mixed_layer_thickness if not available from any reader.', json_schema_extra={'units': 'm', 'od_mapping': 'environment:constant:ocean_mixed_layer_thickness', 'ptm_level': 3}, metadata=[Ge(ge=0.0)]), 'model': FieldInfo(annotation=ModelEnum, required=False, default=<ModelEnum.opendrift: 'opendrift'>, description='Lagrangian model software to use for simulation.', json_schema_extra={'ptm_level': 1}), 'number': FieldInfo(annotation=int, required=False, default=1, title='Number', description='The number of elements for the simulation.', json_schema_extra={'units': 1, 'ptm_level': 1, 'od_mapping': 'seed:number'}, metadata=[Ge(ge=1)]), 'ocean_model': FieldInfo(annotation=OceanModelEnum, required=False, default='CIOFSOP', description='Name of ocean model to use for driving drifter simulation.', json_schema_extra={'ptm_level': 1}), 'ocean_model_local': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use local version of known `ocean_model` instead of remote version.', json_schema_extra={'ptm_level': 3}), 'output_file': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Name of file to write output to. If None, default name is used.', json_schema_extra={'ptm_level': 3}), 'output_format': FieldInfo(annotation=OutputFormatEnum, required=False, default=<OutputFormatEnum.netcdf: 'netcdf'>, description='Output file format. Options are "netcdf", "parquet", or "both".', json_schema_extra={'ptm_level': 2}), 'plots': FieldInfo(annotation=Union[dict[str, dict], str, NoneType], required=False, default=None, description='Dictionary of plots to generate using OpenDrift.', json_schema_extra={'ptm_level': 1}), 'radius': FieldInfo(annotation=float, required=False, default=1000.0, description='Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.', json_schema_extra={'ptm_level': 2, 'units': 'm'}, metadata=[Ge(ge=0.0), Le(le=1000000)]), 'radius_type': FieldInfo(annotation=RadiusTypeEnum, required=False, default=<RadiusTypeEnum.gaussian: 'gaussian'>, description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.", json_schema_extra={'ptm_level': 3}), 'run_forward': FieldInfo(annotation=bool, required=False, default=True, description='Run forward in time.', json_schema_extra={'ptm_level': 2}), 'save_interpolator': FieldInfo(annotation=bool, required=False, default=False, description='Whether to save the interpolator.'), 'seafloor_action': FieldInfo(annotation=SeafloorActionEnum, required=False, default=<SeafloorActionEnum.lift_to_seafloor: 'lift_to_seafloor'>, title='Seafloor Action', description='This controls particle behavior at the seafloor. Use `deactivate` to stick particles to the seafloor at the point of interaction. Use `lift_to_seafloor` to elevate particles up to seabed if below. User `previous` to move elements back to previous position. Use None to ignore seafloor.', json_schema_extra={'od_mapping': 'general:seafloor_action', 'ptm_level': 2}), 'seed_seafloor': FieldInfo(annotation=bool, required=False, default=False, title='Seed Seafloor', description='Elements are seeded at seafloor, and seeding depth (z) is neglected and must be None.', json_schema_extra={'od_mapping': 'seed:seafloor', 'ptm_level': 2}), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=datetime.datetime(2022, 1, 1, 0, 0), description='Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'start_time_end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 2}), 'steps': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Maximum number of steps. End of simulation will be start_time + steps * time_step.', json_schema_extra={'ptm_level': 1}, metadata=[Ge(ge=1), Le(le=10000)]), 'stokes_drift': FieldInfo(annotation=bool, required=False, default=True, title='Stokes Drift', description='Advection elements with Stokes drift (wave orbital motion).', json_schema_extra={'ptm_level': 2, 'od_mapping': 'drift:stokes_drift'}), 'time_step': FieldInfo(annotation=float, required=False, default=300, description='Interval between particles updates, in seconds.', json_schema_extra={'ptm_level': 3, 'units': 'seconds'}, metadata=[Ge(ge=0.01), Le(le=1440)]), 'time_step_output_integer': FieldInfo(annotation=int, required=False, default=12, description='Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.', json_schema_extra={'ptm_level': 3, 'units': ''}, metadata=[Ge(ge=1), Le(le=300)]), 'use_auto_landmask': FieldInfo(annotation=bool, required=False, default=False, title='Use Auto Landmask', description='If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.', json_schema_extra={'od_mapping': 'general:use_auto_landmask', 'ptm_level': 3}), 'use_cache': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use cache for storing interpolators.', json_schema_extra={'ptm_level': 3}), 'use_static_masks': FieldInfo(annotation=bool, required=False, default=False, description="If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.", json_schema_extra={'ptm_level': 3}), 'vertical_advection_at_surface': FieldInfo(annotation=bool, required=False, default=False, title='Vertical Advection At Surface', description='If vertical advection is activated, surface elements (z=0) can only be advected (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_advection_at_surface', 'ptm_level': 2}), 'vertical_mixing': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing', description='Activate vertical mixing scheme. Vertical mixing includes movement due to buoyancy and turbulent mixing.', json_schema_extra={'od_mapping': 'drift:vertical_mixing', 'ptm_level': 2}), 'vertical_mixing_at_surface': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing At Surface', description='If vertical mixing is activated, surface elements (z=0) can only be mixed (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_mixing_at_surface', 'ptm_level': 2}), 'vertical_mixing_timestep': FieldInfo(annotation=float, required=False, default=60, title='Vertical Mixing Timestep', description='Time step used for inner (fast) loop of the vertical mixing model. Set this smaller to increase frequency of vertical mixing calculation; number of loops is calculated as int(self.time_step/vertical_mixing_timestep) so vertical_mixing_timestep must be smaller than time_step.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:timestep', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=3600)]), 'wind_drift': FieldInfo(annotation=bool, required=False, default=True, title='Wind Drift', description='If on, elements at surface are moved with a fraction, the wind draft factor, of the wind speed from the surface down to the wind drift depth.', json_schema_extra={'ptm_level': 1}), 'wind_drift_depth': FieldInfo(annotation=float, required=False, default=0.1, title='Wind Drift Depth', description='The direct wind drift (windage) is linearly decreasing from the surface value (wind_drift_factor) until 0 at this depth.', json_schema_extra={'units': 'meters', 'od_mapping': 'drift:wind_drift_depth', 'ptm_level': 3}, metadata=[Ge(ge=0), Le(le=1)]), 'wind_drift_factor': FieldInfo(annotation=float, required=False, default=0.02, title='Wind Drift Factor', description='Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift. Multiply by 100 to get the percent windage.', json_schema_extra={'units': '1', 'od_mapping': 'seed:wind_drift_factor', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=0.1)]), 'wind_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Wind Uncertainty', description='Add gaussian perturbation with this standard deviation to wind components at each time step.', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:wind_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'z': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, title='Z', description='Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.', json_schema_extra={'units': 'm', 'ptm_level': 1, 'od_mapping': 'seed:z'}, metadata=[Ge(ge=-10000), Le(le=0)])}¶
- property model_fields_set¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params)¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(context, /)¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- number¶
- ocean_model¶
- property ocean_model_config¶
Select ocean model config based on ocean_model.
- ocean_model_local¶
- property ocean_model_simulation¶
Select ocean model simulation based on ocean_model.
- output_file¶
- output_format¶
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- classmethod parse_obj(obj)¶
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- plots¶
- radius¶
- radius_type¶
- remove_timezone_info()¶
Remove timezone information from datetime fields.
- run_forward¶
- save_interpolator¶
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')¶
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)¶
- seafloor_action¶
- property seed_flag¶
Determine seed_flag based on whether geojson is set.
- seed_seafloor¶
- select_ocean_model_simulation_on_init()¶
Select ocean model simulation based on ocean_model.
- setup_TXLA_if_used()¶
Set up TXLA if used.
- setup_interpolator()¶
Setup interpolator.
- start_time¶
- start_time_end¶
- steps¶
- stokes_drift¶
- time_step¶
- property time_step_output¶
Calculate time_step_output as time_step multiplied by time_step_output_integer.
- time_step_output_integer¶
- property timedir¶
Set timedir to 1 for forward, -1 for backward.
- classmethod update_forward_refs(**localns)¶
- use_auto_landmask¶
- use_cache¶
- use_static_masks¶
- classmethod validate(value)¶
- vertical_advection_at_surface¶
- vertical_mixing¶
- vertical_mixing_at_surface¶
- vertical_mixing_timestep¶
- wind_drift¶
- wind_drift_depth¶
- wind_drift_factor¶
- wind_uncertainty¶
- z¶
- class particle_tracking_manager.models.opendrift.config_opendrift.OpenDriftConfig(*, model=ModelEnum.opendrift, lon=None, lat=None, geojson=None, start_time=datetime.datetime(2022, 1, 1, 0, 0), start_time_end=None, run_forward=True, time_step=300, time_step_output_integer=12, steps=None, duration=None, end_time=None, ocean_model='CIOFSOP', ocean_model_local=True, do3D=False, use_static_masks=False, output_file=None, output_format=OutputFormatEnum.netcdf, use_cache=True, log_level=LogLevelEnum.INFO, horizontal_diffusivity=None, stokes_drift=True, z=0, number=1, drift_model=DriftModelEnum.OceanDrift, save_interpolator=False, interpolator_filename=None, export_variables=None, plots=None, radius=1000.0, radius_type=RadiusTypeEnum.gaussian, max_speed=20.0, use_auto_landmask=False, coastline_action=CoastlineActionEnum.stranding, current_uncertainty=0, wind_uncertainty=0)[source]¶
Bases:
TheManagerConfigSome of the parameters in this mirror OpenDriftSimulation clss in OpenDrift
- Attributes:
drop_varsGather variables to drop based on PTMConfig and OpenDriftConfig.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
ocean_model_configSelect ocean model config based on ocean_model.
ocean_model_simulationSelect ocean model simulation based on ocean_model.
seed_flagDetermine seed_flag based on whether geojson is set.
time_step_outputCalculate time_step_output as time_step multiplied by time_step_output_integer.
timedirSet timedir to 1 for forward, -1 for backward.
Methods
Calculate horizontal diffusivity based on ocean model.
Calculate start_time, end_time, duration, and steps based on the other parameters.
Descrive how ocean_model_local is set.
Check if exactly two of start_time, end_time, duration, and steps are set.
Check if interpolator_filename is set correctly.
Check if lon and lat are set when geojson is None, and vice versa.
Check if all plots are requested.
Check if oil budget plot is requested and drift model is OpenOil.
Check if plot keys start with a PlotTypeEnum.
copy(*[, include, exclude, update, deep])Returns a copy of the model.
If simulation is backward, make time_step negative.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
Remove timezone information from datetime fields.
Select ocean model simulation based on ocean_model.
Set up TXLA if used.
Setup interpolator.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- _abc_impl = <_abc._abc_data object>¶
- _calculate_keys(*args, **kwargs)¶
- _copy_and_set_values(*args, **kwargs)¶
- classmethod _get_value(*args, **kwargs)¶
- _iter(*args, **kwargs)¶
- _setattr_handler(name, value)¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- assign_horizontal_diffusivity()¶
Calculate horizontal diffusivity based on ocean model.
- calculate_config_times()¶
Calculate start_time, end_time, duration, and steps based on the other parameters.
- check_config_ocean_model_local()¶
Descrive how ocean_model_local is set.
- check_config_time_parameters()¶
Check if exactly two of start_time, end_time, duration, and steps are set.
- check_lon_lat_geojson_consistency()¶
Check if lon and lat are set when geojson is None, and vice versa.
- coastline_action¶
- classmethod construct(_fields_set=None, **values)¶
- copy(*, include=None, exclude=None, update=None, deep=False)¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- current_uncertainty¶
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)¶
- do3D¶
- drift_model¶
- property drop_vars¶
Gather variables to drop based on PTMConfig and OpenDriftConfig.
- duration¶
- end_time¶
- export_variables¶
- classmethod from_orm(obj)¶
- geojson¶
- horizontal_diffusivity¶
- interpolator_filename¶
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)¶
- lat¶
- log_level¶
- lon¶
- match_time_step_sign_to_timedir_sign()¶
If simulation is backward, make time_step negative.
Sign of input time_step is ignored.
- max_speed¶
- model¶
- model_computed_fields = {'ocean_model_config': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.ocean_model_registry.OceanModelConfig'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model config based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'ocean_model_simulation': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.config_ocean_model.OceanModelSimulation'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model simulation based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'seed_flag': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'str'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Determine seed_flag based on whether geojson is set.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'time_step_output': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Calculate time_step_output as time_step multiplied by time_step_output_integer.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'timedir': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'int'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Set timedir to 1 for forward, -1 for backward.', deprecated=None, examples=None, json_schema_extra=None, repr=True)}¶
- model_config = {'extra': 'forbid', 'use_enum_values': True, 'validate_default': True, 'validate_defaults': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'coastline_action': FieldInfo(annotation=CoastlineActionEnum, required=False, default=<CoastlineActionEnum.stranding: 'stranding'>, title='Coastline Action', description='This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.', json_schema_extra={'od_mapping': 'general:coastline_action', 'ptm_level': 2}), 'current_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Current Uncertainty', description='Add gaussian perturbation with this standard deviation to current components at each time step', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:current_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'do3D': FieldInfo(annotation=bool, required=False, default=False, description='Set to True to run drifters in 3D, by default False for most drift models.', json_schema_extra={'ptm_level': 1}), 'drift_model': FieldInfo(annotation=DriftModelEnum, required=False, default=<DriftModelEnum.OceanDrift: 'OceanDrift'>, description='Scenario to use for simulation.'), 'duration': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.', json_schema_extra={'ptm_level': 1}), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'export_variables': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, description="List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.", json_schema_extra={'ptm_level': 3}), 'geojson': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='GeoJSON describing a polygon within which to seed drifters; must contain "geometry". If this is set, `lon` and `lat` should be None.', json_schema_extra={'ptm_level': 1}), 'horizontal_diffusivity': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Horizontal Diffusivity', description='Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.', json_schema_extra={'units': 'm2/s', 'ptm_level': 2, 'od_mapping': 'environment:constant:horizontal_diffusivity'}, metadata=[Ge(ge=0), Le(le=100000)]), 'interpolator_filename': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).', json_schema_extra={'ptm_level': 3}), 'lat': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_north'}, metadata=[Ge(ge=-90), Le(le=90)]), 'log_level': FieldInfo(annotation=LogLevelEnum, required=False, default=<LogLevelEnum.INFO: 'INFO'>, description='Log verbosity', json_schema_extra={'ptm_level': 3}), 'lon': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_east'}, metadata=[Ge(ge=-180), Le(le=180)]), 'max_speed': FieldInfo(annotation=float, required=False, default=20.0, title='Maximum speed', description='Typical maximum speed of elements, used to estimate reader buffer size', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:max_speed', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'model': FieldInfo(annotation=ModelEnum, required=False, default=<ModelEnum.opendrift: 'opendrift'>, description='Lagrangian model software to use for simulation.', json_schema_extra={'ptm_level': 1}), 'number': FieldInfo(annotation=int, required=False, default=1, title='Number', description='The number of elements for the simulation.', json_schema_extra={'units': 1, 'ptm_level': 1, 'od_mapping': 'seed:number'}, metadata=[Ge(ge=1)]), 'ocean_model': FieldInfo(annotation=OceanModelEnum, required=False, default='CIOFSOP', description='Name of ocean model to use for driving drifter simulation.', json_schema_extra={'ptm_level': 1}), 'ocean_model_local': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use local version of known `ocean_model` instead of remote version.', json_schema_extra={'ptm_level': 3}), 'output_file': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Name of file to write output to. If None, default name is used.', json_schema_extra={'ptm_level': 3}), 'output_format': FieldInfo(annotation=OutputFormatEnum, required=False, default=<OutputFormatEnum.netcdf: 'netcdf'>, description='Output file format. Options are "netcdf", "parquet", or "both".', json_schema_extra={'ptm_level': 2}), 'plots': FieldInfo(annotation=Union[dict[str, dict], str, NoneType], required=False, default=None, description='Dictionary of plots to generate using OpenDrift.', json_schema_extra={'ptm_level': 1}), 'radius': FieldInfo(annotation=float, required=False, default=1000.0, description='Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.', json_schema_extra={'ptm_level': 2, 'units': 'm'}, metadata=[Ge(ge=0.0), Le(le=1000000)]), 'radius_type': FieldInfo(annotation=RadiusTypeEnum, required=False, default=<RadiusTypeEnum.gaussian: 'gaussian'>, description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.", json_schema_extra={'ptm_level': 3}), 'run_forward': FieldInfo(annotation=bool, required=False, default=True, description='Run forward in time.', json_schema_extra={'ptm_level': 2}), 'save_interpolator': FieldInfo(annotation=bool, required=False, default=False, description='Whether to save the interpolator.'), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=datetime.datetime(2022, 1, 1, 0, 0), description='Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'start_time_end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 2}), 'steps': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Maximum number of steps. End of simulation will be start_time + steps * time_step.', json_schema_extra={'ptm_level': 1}, metadata=[Ge(ge=1), Le(le=10000)]), 'stokes_drift': FieldInfo(annotation=bool, required=False, default=True, title='Stokes Drift', description='Advection elements with Stokes drift (wave orbital motion).', json_schema_extra={'ptm_level': 2, 'od_mapping': 'drift:stokes_drift'}), 'time_step': FieldInfo(annotation=float, required=False, default=300, description='Interval between particles updates, in seconds.', json_schema_extra={'ptm_level': 3, 'units': 'seconds'}, metadata=[Ge(ge=0.01), Le(le=1440)]), 'time_step_output_integer': FieldInfo(annotation=int, required=False, default=12, description='Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.', json_schema_extra={'ptm_level': 3, 'units': ''}, metadata=[Ge(ge=1), Le(le=300)]), 'use_auto_landmask': FieldInfo(annotation=bool, required=False, default=False, title='Use Auto Landmask', description='If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.', json_schema_extra={'od_mapping': 'general:use_auto_landmask', 'ptm_level': 3}), 'use_cache': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use cache for storing interpolators.', json_schema_extra={'ptm_level': 3}), 'use_static_masks': FieldInfo(annotation=bool, required=False, default=False, description="If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.", json_schema_extra={'ptm_level': 3}), 'wind_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Wind Uncertainty', description='Add gaussian perturbation with this standard deviation to wind components at each time step.', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:wind_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'z': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, title='Z', description='Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.', json_schema_extra={'units': 'm', 'ptm_level': 1, 'od_mapping': 'seed:z'}, metadata=[Ge(ge=-10000), Le(le=0)])}¶
- property model_fields_set¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params)¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(context, /)¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- number¶
- ocean_model¶
- property ocean_model_config¶
Select ocean model config based on ocean_model.
- ocean_model_local¶
- property ocean_model_simulation¶
Select ocean model simulation based on ocean_model.
- output_file¶
- output_format¶
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- classmethod parse_obj(obj)¶
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- plots¶
- radius¶
- radius_type¶
- remove_timezone_info()¶
Remove timezone information from datetime fields.
- run_forward¶
- save_interpolator¶
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')¶
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)¶
- property seed_flag¶
Determine seed_flag based on whether geojson is set.
- select_ocean_model_simulation_on_init()¶
Select ocean model simulation based on ocean_model.
- setup_TXLA_if_used()¶
Set up TXLA if used.
- start_time¶
- start_time_end¶
- steps¶
- stokes_drift¶
- time_step¶
- property time_step_output¶
Calculate time_step_output as time_step multiplied by time_step_output_integer.
- time_step_output_integer¶
- property timedir¶
Set timedir to 1 for forward, -1 for backward.
- classmethod update_forward_refs(**localns)¶
- use_auto_landmask¶
- use_cache¶
- use_static_masks¶
- classmethod validate(value)¶
- wind_uncertainty¶
- z¶
- class particle_tracking_manager.models.opendrift.config_opendrift.OpenOilModelConfig(*, model=ModelEnum.opendrift, lon=None, lat=None, geojson=None, start_time=datetime.datetime(2022, 1, 1, 0, 0), start_time_end=None, run_forward=True, time_step=300, time_step_output_integer=12, steps=None, duration=None, end_time=None, ocean_model='CIOFSOP', ocean_model_local=True, do3D=False, use_static_masks=False, output_file=None, output_format=OutputFormatEnum.netcdf, use_cache=True, log_level=LogLevelEnum.INFO, horizontal_diffusivity=None, stokes_drift=True, z=0, number=1, drift_model=DriftModelEnum.OpenOil, save_interpolator=False, interpolator_filename=None, export_variables=None, plots=None, radius=1000.0, radius_type=RadiusTypeEnum.gaussian, max_speed=20.0, use_auto_landmask=False, coastline_action=CoastlineActionEnum.stranding, current_uncertainty=0.0, wind_uncertainty=0.0, seed_seafloor=False, diffusivitymodel='windspeed_Large1994', mixed_layer_depth=20, seafloor_action=SeafloorActionEnum.lift_to_seafloor, wind_drift=True, wind_drift_depth=0.1, vertical_mixing_timestep=60, wind_drift_factor=0.03, vertical_mixing=True, vertical_mixing_at_surface=True, vertical_advection_at_surface=False, oil_type=OilTypeEnum.AD04012, m3_per_hour=1, oil_film_thickness=0.001, droplet_size_distribution=DropletSizeDistributionEnum.uniform, droplet_diameter_mu=0.001, droplet_diameter_sigma=0.0005, droplet_diameter_min_subsea=0.0005, droplet_diameter_max_subsea=0.005, emulsification=True, dispersion=True, evaporation=True, update_oilfilm_thickness=True, biodegradation=True)[source]¶
Bases:
OceanDriftModelConfigOpenOil model configuration for OpenDrift.
- Attributes:
drop_varsGather variables to drop based on PTMConfig and OpenDriftConfig.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
ocean_model_configSelect ocean model config based on ocean_model.
ocean_model_simulationSelect ocean model simulation based on ocean_model.
seed_flagDetermine seed_flag based on whether geojson is set.
time_step_outputCalculate time_step_output as time_step multiplied by time_step_output_integer.
timedirSet timedir to 1 for forward, -1 for backward.
Methods
Calculate horizontal diffusivity based on ocean model.
Calculate start_time, end_time, duration, and steps based on the other parameters.
If do3D is False, set vertical_mixing to False.
Descrive how ocean_model_local is set.
Check if exactly two of start_time, end_time, duration, and steps are set.
Check if interpolator_filename is set correctly.
Check if lon and lat are set when geojson is None, and vice versa.
Check if all plots are requested.
Check if oil budget plot is requested and drift model is OpenOil.
Check if plot keys start with a PlotTypeEnum.
If seed_seafloor True, z is set to None.
If do3D is False, vertical_advection_at_surface is also False.
If do3D is True, vertical_advection_at_surface is also True.
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
If wind_drift is False, set wind_drift_factor to 0.
copy(*[, include, exclude, update, deep])Returns a copy of the model.
If simulation is backward, make time_step negative.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
Remove timezone information from datetime fields.
Select ocean model simulation based on ocean_model.
Set up TXLA if used.
Setup interpolator.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- _abc_impl = <_abc._abc_data object>¶
- _calculate_keys(*args, **kwargs)¶
- _copy_and_set_values(*args, **kwargs)¶
- classmethod _get_value(*args, **kwargs)¶
- _iter(*args, **kwargs)¶
- _setattr_handler(name, value)¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- assign_horizontal_diffusivity()¶
Calculate horizontal diffusivity based on ocean model.
- biodegradation¶
- calculate_config_times()¶
Calculate start_time, end_time, duration, and steps based on the other parameters.
- check_config_do3D()¶
If do3D is False, set vertical_mixing to False.
- check_config_ocean_model_local()¶
Descrive how ocean_model_local is set.
- check_config_time_parameters()¶
Check if exactly two of start_time, end_time, duration, and steps are set.
- check_interpolator_filename()¶
Check if interpolator_filename is set correctly.
- check_lon_lat_geojson_consistency()¶
Check if lon and lat are set when geojson is None, and vice versa.
- check_plot_all()¶
Check if all plots are requested.
- check_plot_oil()¶
Check if oil budget plot is requested and drift model is OpenOil.
- check_plot_prefix_enum()¶
Check if plot keys start with a PlotTypeEnum.
- check_seed_seafloor()¶
If seed_seafloor True, z is set to None.
- check_vertical_advection_at_surface_False()¶
If do3D is False, vertical_advection_at_surface is also False.
- check_vertical_advection_at_surface_True()¶
If do3D is True, vertical_advection_at_surface is also True.
- check_vertical_mixing_at_surface_False()¶
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
- check_vertical_mixing_at_surface_True()¶
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
- check_wind_drift()¶
If wind_drift is False, set wind_drift_factor to 0.
- coastline_action¶
- classmethod construct(_fields_set=None, **values)¶
- copy(*, include=None, exclude=None, update=None, deep=False)¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- current_uncertainty¶
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)¶
- diffusivitymodel¶
- dispersion¶
- do3D¶
- drift_model¶
- property drop_vars¶
Gather variables to drop based on PTMConfig and OpenDriftConfig.
- droplet_diameter_max_subsea¶
- droplet_diameter_min_subsea¶
- droplet_diameter_mu¶
- droplet_diameter_sigma¶
- droplet_size_distribution¶
- duration¶
- emulsification¶
- end_time¶
- evaporation¶
- export_variables¶
- classmethod from_orm(obj)¶
- geojson¶
- horizontal_diffusivity¶
- interpolator_filename¶
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)¶
- lat¶
- log_level¶
- lon¶
- m3_per_hour¶
- match_time_step_sign_to_timedir_sign()¶
If simulation is backward, make time_step negative.
Sign of input time_step is ignored.
- max_speed¶
- mixed_layer_depth¶
- model¶
- model_computed_fields = {'ocean_model_config': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.ocean_model_registry.OceanModelConfig'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model config based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'ocean_model_simulation': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.config_ocean_model.OceanModelSimulation'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model simulation based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'seed_flag': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'str'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Determine seed_flag based on whether geojson is set.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'time_step_output': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Calculate time_step_output as time_step multiplied by time_step_output_integer.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'timedir': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'int'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Set timedir to 1 for forward, -1 for backward.', deprecated=None, examples=None, json_schema_extra=None, repr=True)}¶
- model_config = {'extra': 'forbid', 'use_enum_values': True, 'validate_default': True, 'validate_defaults': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'biodegradation': FieldInfo(annotation=bool, required=False, default=True, title='Biodegradation', description='If True, oil mass is biodegraded (eaten by bacteria).', json_schema_extra={'od_mapping': 'processes:biodegradation', 'ptm_level': 2}), 'coastline_action': FieldInfo(annotation=CoastlineActionEnum, required=False, default=<CoastlineActionEnum.stranding: 'stranding'>, title='Coastline Action', description='This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.', json_schema_extra={'od_mapping': 'general:coastline_action', 'ptm_level': 2}), 'current_uncertainty': FieldInfo(annotation=float, required=False, default=0.0, title='Current Uncertainty', description='Add gaussian perturbation with this standard deviation to current components at each time step', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:current_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'diffusivitymodel': FieldInfo(annotation=DiffusivityModelEnum, required=False, default='windspeed_Large1994', title='Diffusivity model', description='Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback. Parameterizations based on wind speed are also available.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:diffusivitymodel', 'ptm_level': 3}), 'dispersion': FieldInfo(annotation=bool, required=False, default=True, title='Dispersion', description='If True, oil is removed from simulation (dispersed), if entrained as very small droplets.', json_schema_extra={'od_mapping': 'processes:dispersion', 'ptm_level': 2}), 'do3D': FieldInfo(annotation=bool, required=False, default=False, description='Set to True to run drifters in 3D, by default False for most drift models.', json_schema_extra={'ptm_level': 1}), 'drift_model': FieldInfo(annotation=DriftModelEnum, required=False, default=<DriftModelEnum.OpenOil: 'OpenOil'>), 'droplet_diameter_max_subsea': FieldInfo(annotation=float, required=False, default=0.005, title='Droplet Diameter Max Subsea', description='The maximum diameter of oil droplet for a subsea release, used in uniform distribution.', json_schema_extra={'units': 'meters', 'od_mapping': 'seed:droplet_diameter_max_subsea', 'ptm_level': 3}, metadata=[Ge(ge=1e-08), Le(le=1)]), 'droplet_diameter_min_subsea': FieldInfo(annotation=float, required=False, default=0.0005, title='Droplet Diameter Min Subsea', description='The minimum diameter of oil droplet for a subsea release, used in uniform distribution.', json_schema_extra={'units': 'meters', 'od_mapping': 'seed:droplet_diameter_min_subsea', 'ptm_level': 3}, metadata=[Ge(ge=1e-08), Le(le=1)]), 'droplet_diameter_mu': FieldInfo(annotation=float, required=False, default=0.001, title='Droplet Diameter Mu', description='The mean diameter of oil droplet for a subsea release, used in normal/lognormal distributions.', json_schema_extra={'units': 'meters', 'od_mapping': 'seed:droplet_diameter_mu', 'ptm_level': 3}, metadata=[Ge(ge=1e-08), Le(le=1)]), 'droplet_diameter_sigma': FieldInfo(annotation=float, required=False, default=0.0005, title='Droplet Diameter Sigma', description='The standard deviation in diameter of oil droplet for a subsea release, used in normal/lognormal distributions.', json_schema_extra={'units': 'meters', 'od_mapping': 'seed:droplet_diameter_sigma', 'ptm_level': 3}, metadata=[Ge(ge=1e-08), Le(le=1)]), 'droplet_size_distribution': FieldInfo(annotation=DropletSizeDistributionEnum, required=False, default=<DropletSizeDistributionEnum.uniform: 'uniform'>, title='Droplet Size Distribution', description='Droplet size distribution used for subsea release.', json_schema_extra={'od_mapping': 'seed:droplet_size_distribution', 'ptm_level': 3}), 'duration': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.', json_schema_extra={'ptm_level': 1}), 'emulsification': FieldInfo(annotation=bool, required=False, default=True, title='Emulsification', description='If True, surface oil is emulsified, i.e. water droplets are mixed into oil due to wave mixing, with resulting increase of viscosity.', json_schema_extra={'od_mapping': 'processes:emulsification', 'ptm_level': 2}), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'evaporation': FieldInfo(annotation=bool, required=False, default=True, title='Evaporation', description='If True, surface oil is evaporated.', json_schema_extra={'od_mapping': 'processes:evaporation', 'ptm_level': 2}), 'export_variables': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, description="List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.", json_schema_extra={'ptm_level': 3}), 'geojson': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='GeoJSON describing a polygon within which to seed drifters; must contain "geometry". If this is set, `lon` and `lat` should be None.', json_schema_extra={'ptm_level': 1}), 'horizontal_diffusivity': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Horizontal Diffusivity', description='Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.', json_schema_extra={'units': 'm2/s', 'ptm_level': 2, 'od_mapping': 'environment:constant:horizontal_diffusivity'}, metadata=[Ge(ge=0), Le(le=100000)]), 'interpolator_filename': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).', json_schema_extra={'ptm_level': 3}), 'lat': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_north'}, metadata=[Ge(ge=-90), Le(le=90)]), 'log_level': FieldInfo(annotation=LogLevelEnum, required=False, default=<LogLevelEnum.INFO: 'INFO'>, description='Log verbosity', json_schema_extra={'ptm_level': 3}), 'lon': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_east'}, metadata=[Ge(ge=-180), Le(le=180)]), 'm3_per_hour': FieldInfo(annotation=float, required=False, default=1, title='M3 Per Hour', description='The amount (volume) of oil released per hour (or total amount if release is instantaneous).', json_schema_extra={'units': 'm3 per hour', 'od_mapping': 'seed:m3_per_hour', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'max_speed': FieldInfo(annotation=float, required=False, default=20.0, title='Maximum speed', description='Typical maximum speed of elements, used to estimate reader buffer size', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:max_speed', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'mixed_layer_depth': FieldInfo(annotation=float, required=False, default=20, title='Mixed Layer Depth', description='mixed_layer_depth controls how deep the vertical diffusivity profile reaches. This sets the fallback value for ocean_mixed_layer_thickness if not available from any reader.', json_schema_extra={'units': 'm', 'od_mapping': 'environment:constant:ocean_mixed_layer_thickness', 'ptm_level': 3}, metadata=[Ge(ge=0.0)]), 'model': FieldInfo(annotation=ModelEnum, required=False, default=<ModelEnum.opendrift: 'opendrift'>, description='Lagrangian model software to use for simulation.', json_schema_extra={'ptm_level': 1}), 'number': FieldInfo(annotation=int, required=False, default=1, title='Number', description='The number of elements for the simulation.', json_schema_extra={'units': 1, 'ptm_level': 1, 'od_mapping': 'seed:number'}, metadata=[Ge(ge=1)]), 'ocean_model': FieldInfo(annotation=OceanModelEnum, required=False, default='CIOFSOP', description='Name of ocean model to use for driving drifter simulation.', json_schema_extra={'ptm_level': 1}), 'ocean_model_local': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use local version of known `ocean_model` instead of remote version.', json_schema_extra={'ptm_level': 3}), 'oil_film_thickness': FieldInfo(annotation=float, required=False, default=0.001, title='Oil Film Thickness', description='Seeding value of oil_film_thickness. Values are calculated by OpenDrift starting from this initial value if `update_oilfilm_thickness==True`.', json_schema_extra={'units': 'm', 'od_mapping': 'seed:oil_film_thickness', 'ptm_level': 3}), 'oil_type': FieldInfo(annotation=OilTypeEnum, required=False, default=<OilTypeEnum.AD04012: 'AD04012'>, title='Oil Type', description='Oil type to be used for the simulation, from the NOAA ADIOS database.', json_schema_extra={'od_mapping': 'seed:oil_type', 'ptm_level': 1, 'oneOf': [{'const': 'EC02713', 'title': 'Alaska North Slope [2015]'}, {'const': 'AD02081', 'title': 'DIESEL FUEL OIL (ALASKA)'}, {'const': 'AD01621', 'title': 'BUNKER C FUEL OIL (ALASKA)'}, {'const': 'EC00561', 'title': 'Cook Inlet [2003]'}, {'const': 'AD02425', 'title': 'JET FUEL, TESORO'}, {'const': 'AD00010', 'title': 'ABU SAFAH, ARAMCO'}, {'const': 'AD00020', 'title': 'ALASKA NORTH SLOPE'}, {'const': 'AD00024', 'title': 'ALBERTA'}, {'const': 'AD00025', 'title': 'ALBERTA SWEET MIXED BLEND'}, {'const': 'AD00026', 'title': 'ALGERIAN BLEND'}, {'const': 'AD00028', 'title': 'ALGERIAN CONDENSATE, CITGO'}, {'const': 'AD00031', 'title': 'AMAULIGAK'}, {'const': 'AD00039', 'title': 'ARABIAN EXTRA LIGHT, PHILLIPS'}, {'const': 'AD00040', 'title': 'ARABIAN EXTRA LIGHT, STAR ENTERPRISE'}, {'const': 'AD00041', 'title': 'ARABIAN EXTRA LIGHT, ARAMCO'}, {'const': 'AD00042', 'title': 'ARABIAN HEAVY'}, {'const': 'AD00044', 'title': 'ARABIAN HEAVY, CITGO'}, {'const': 'AD00046', 'title': 'ARABIAN HEAVY, EXXON'}, {'const': 'AD00047', 'title': 'ARABIAN HEAVY, AMOCO'}, {'const': 'AD00049', 'title': 'ARABIAN HEAVY, STAR ENTERPRISE'}, {'const': 'AD00050', 'title': 'ARABIAN HEAVY, ARAMCO'}, {'const': 'AD00053', 'title': 'ARABIAN LIGHT, CITGO'}, {'const': 'AD00055', 'title': 'ARABIAN LIGHT, PHILLIPS'}, {'const': 'AD00057', 'title': 'ARABIAN LIGHT, STAR ENTERPRISE'}, {'const': 'AD00058', 'title': 'ARABIAN LIGHT, ARAMCO'}, {'const': 'AD00062', 'title': 'ARABIAN MEDIUM, EXXON'}, {'const': 'AD00063', 'title': 'ARABIAN MEDIUM, PHILLIPS'}, {'const': 'AD00064', 'title': 'ARABIAN MEDIUM, AMOCO'}, {'const': 'AD00065', 'title': 'ARABIAN MEDIUM, STAR ENTERPRISE'}, {'const': 'AD00066', 'title': 'ARABIAN MEDIUM, CHEVRON'}, {'const': 'AD00070', 'title': 'ARGYL'}, {'const': 'AD00080', 'title': 'ATKINSON'}, {'const': 'AD00084', 'title': 'AUTOMOTIVE GASOLINE, EXXON'}, {'const': 'AD00085', 'title': 'AVALON'}, {'const': 'AD00092', 'title': 'AVIATION GASOLINE 100LL, STAR ENTERPRISE'}, {'const': 'AD00094', 'title': 'AVIATION GASOLINE 80'}, {'const': 'AD00095', 'title': 'BACHAGUERO, CITGO'}, {'const': 'AD00099', 'title': 'BACHAQUERO 17, EXXON'}, {'const': 'AD00100', 'title': 'BACHEQUERO HEAVY'}, {'const': 'AD00101', 'title': 'BACHEQUERO MEDIUM'}, {'const': 'AD00102', 'title': 'BAHIA'}, {'const': 'AD00103', 'title': 'BAKR'}, {'const': 'AD00105', 'title': 'BANOCO ABU SAFAH, ARAMCO'}, {'const': 'AD00109', 'title': 'BASRAH'}, {'const': 'AD00110', 'title': 'BASRAH, EXXON'}, {'const': 'AD00115', 'title': 'BASS STRAIT'}, {'const': 'AD00121', 'title': 'BCF 13'}, {'const': 'AD00122', 'title': 'BCF 17'}, {'const': 'AD00124', 'title': 'BCF 22, CITGO'}, {'const': 'AD00127', 'title': 'BCF 17, AMOCO'}, {'const': 'AD00132', 'title': 'BELAYIM (MARINE)'}, {'const': 'AD00133', 'title': 'BELAYIM (LAND)'}, {'const': 'AD00138', 'title': 'BENT HORN A-02'}, {'const': 'AD00142', 'title': 'BERRI A-21, ARAMCO'}, {'const': 'AD00143', 'title': 'BERYL'}, {'const': 'AD00147', 'title': 'BFC 21.9, CITGO'}, {'const': 'AD00159', 'title': 'BONNY LIGHT, CITGO'}, {'const': 'AD00162', 'title': 'BONNY MEDIUM, CITGO'}, {'const': 'AD00163', 'title': 'BONNY MEDIUM, AMOCO'}, {'const': 'AD00165', 'title': 'BORHOLLA'}, {'const': 'AD00171', 'title': 'BOSCAN, AMOCO'}, {'const': 'AD00174', 'title': 'BOW RIVER BLENDED'}, {'const': 'AD00179', 'title': 'BRASS RIVER, CITGO'}, {'const': 'AD00181', 'title': 'BRASS RIVER, PHILLIPS'}, {'const': 'AD00185', 'title': 'BREGA, ARCO'}, {'const': 'AD00187', 'title': 'BRENT'}, {'const': 'AD00189', 'title': 'BRENT, CITGO'}, {'const': 'AD00190', 'title': 'BRENT, PHILLIPS'}, {'const': 'AD00196', 'title': 'BRENT MIX, EXXON'}, {'const': 'AD00197', 'title': 'BRENT SPAR'}, {'const': 'AD00204', 'title': 'BUCHAN'}, {'const': 'AD00208', 'title': 'BUNKER C FUEL OIL'}, {'const': 'AD00213', 'title': 'CABINDA, CITGO'}, {'const': 'AD00215', 'title': 'CABINDA, PHILLIPS'}, {'const': 'AD00224', 'title': 'CAMAR'}, {'const': 'AD00226', 'title': 'CANDON SEC, PHILLIPS'}, {'const': 'AD00227', 'title': 'CANO LIMON, CITGO'}, {'const': 'AD00228', 'title': 'CANO LIMON, PHILLIPS'}, {'const': 'AD00254', 'title': 'COBAN BLEND'}, {'const': 'AD00255', 'title': 'COBAN BLEND, PHILLIPS'}, {'const': 'AD00257', 'title': 'COHASSET'}, {'const': 'AD00259', 'title': 'COLD LAKE, EXXON'}, {'const': 'AD00262', 'title': 'COLD LAKE BLEND, ESSO'}, {'const': 'AD00263', 'title': 'COLD LAKE DILUENT, ESSO'}, {'const': 'AD00269', 'title': 'COOK INLET, DRIFT RIVER TERMINAL'}, {'const': 'AD00270', 'title': 'CORMORANT'}, {'const': 'AD00279', 'title': 'UNION, UNOCAL'}, {'const': 'AD00284', 'title': 'CYRUS, ITOPF'}, {'const': 'AD00289', 'title': 'DANMARK'}, {'const': 'AD00293', 'title': 'DF2 SUMMER (DIESEL), TESORO'}, {'const': 'AD00294', 'title': 'DF2 WINTER (DIESEL), TESORO'}, {'const': 'AD00297', 'title': 'DIESEL'}, {'const': 'AD00301', 'title': 'DJENO, PHILLIPS'}, {'const': 'AD00315', 'title': 'DUNLIN'}, {'const': 'AD00316', 'title': 'DURI, PHILLIPS'}, {'const': 'AD00319', 'title': 'EAST TEXAS'}, {'const': 'AD00322', 'title': 'EC 195-CONDENSATE, PHILLIPS'}, {'const': 'AD00328', 'title': 'EKOFISK'}, {'const': 'AD00329', 'title': 'EKOFISK, CITGO'}, {'const': 'AD00332', 'title': 'EKOFISK, EXXON'}, {'const': 'AD00333', 'title': 'EKOFISK, PHILLIPS'}, {'const': 'AD00346', 'title': 'ELECTRICAL INSULATING OIL (VIRGIN)'}, {'const': 'AD00354', 'title': 'EMPIRE ISLAND, AMOCO'}, {'const': 'AD00362', 'title': 'ESCALANTE, PHILLIPS'}, {'const': 'AD00365', 'title': 'ESCRAVOS, AMOCO'}, {'const': 'AD00366', 'title': 'ESCRAVOS, CHEVRON'}, {'const': 'AD00376', 'title': 'FAO, CITGO'}, {'const': 'AD00377', 'title': 'FCC HEAVY CYCLE OIL'}, {'const': 'AD00379', 'title': 'FEDERATED'}, {'const': 'AD00383', 'title': 'FLOTTA, CITGO'}, {'const': 'AD00384', 'title': 'FLOTTA'}, {'const': 'AD00385', 'title': 'FLOTTA, PHILLIPS'}, {'const': 'AD00386', 'title': 'FLOTTA MIX'}, {'const': 'AD00388', 'title': 'FORCADOS, CITGO'}, {'const': 'AD00389', 'title': 'FORCADOS, AMOCO'}, {'const': 'AD00391', 'title': 'FORKED ISLAND TERMINAL, AMOCO'}, {'const': 'AD00393', 'title': 'FORTIES'}, {'const': 'AD00397', 'title': 'FOSTERTON'}, {'const': 'AD00403', 'title': 'FUEL OIL NO.1 (AVJET A), STAR ENTERPRISE'}, {'const': 'AD00404', 'title': 'FUEL OIL NO.1 (DIESEL/HEATING FUEL), PETRO STAR'}, {'const': 'AD00412', 'title': 'FUEL OIL NO.1 (JET FUEL A)'}, {'const': 'AD00413', 'title': 'FUEL OIL NO.1 (JET FUEL A-1)'}, {'const': 'AD00414', 'title': 'FUEL OIL NO.1 (JET FUEL B)'}, {'const': 'AD00416', 'title': 'FUEL OIL NO.1 (KEROSENE) '}, {'const': 'AD00431', 'title': 'FUEL OIL NO.2 (DIESEL), STAR ENTERPRISE'}, {'const': 'AD00433', 'title': 'FUEL OIL NO.2 (HO/DIESEL), EXXON'}, {'const': 'AD00448', 'title': 'FURRIAL, CITGO'}, {'const': 'AD00449', 'title': 'FURRIAL/MESA 28, EXXON'}, {'const': 'AD00486', 'title': 'GIPPSLAND, EXXON'}, {'const': 'AD00487', 'title': 'GIPPSLAND MIX, ITOPF'}, {'const': 'AD00506', 'title': 'GUAFITA, CITGO'}, {'const': 'AD00513', 'title': 'GULF OF SUEZ, PHILLIPS'}, {'const': 'AD00516', 'title': 'GULLFAKS, EXXON'}, {'const': 'AD00530', 'title': 'HEAVY LAKE MIX'}, {'const': 'AD00531', 'title': 'HEAVY REFORMATE'}, {'const': 'AD00534', 'title': 'HI 317, PHILLIPS'}, {'const': 'AD00535', 'title': 'HI 330/349 CONDENSATE, PHILLIPS'}, {'const': 'AD00536', 'title': 'HI 561-GRAND CHENIER, PHILLIPS'}, {'const': 'AD00537', 'title': 'HI A-310-B/CONDENSATE, PHILLIPS'}, {'const': 'AD00540', 'title': 'HIGH ISLAND, AMOCO'}, {'const': 'AD00541', 'title': 'HIGH ISLAND BLOCK 154, PHILLIPS'}, {'const': 'AD00554', 'title': 'HUTTON'}, {'const': 'AD00563', 'title': 'INTERPROVINCIAL'}, {'const': 'AD00565', 'title': 'IPPL LIGHT SOUR BLEND'}, {'const': 'AD00573', 'title': 'ISSUNGNAK'}, {'const': 'AD00575', 'title': 'ISTHMUS, CITGO'}, {'const': 'AD00577', 'title': 'ISTHMUS, PHILLIPS'}, {'const': 'AD00579', 'title': 'ISTHMUS/MAYA BLEND'}, {'const': 'AD00580', 'title': 'ISTHMUS/REFORMA/CACTUS, API'}, {'const': 'AD00589', 'title': 'JOBO'}, {'const': 'AD00590', 'title': 'JOBO/MORICHAL, ITOPF'}, {'const': 'AD00602', 'title': 'KHAFJI'}, {'const': 'AD00610', 'title': 'KIRKUK'}, {'const': 'AD00611', 'title': 'KIRKUK, EXXON'}, {'const': 'AD00615', 'title': 'KOAKOAK 0-22'}, {'const': 'AD00619', 'title': 'KOLE MARINE, AMOCO'}, {'const': 'AD00622', 'title': 'KOPANOAR 2I-44'}, {'const': 'AD00623', 'title': 'KOPANOAR M-13'}, {'const': 'AD00624', 'title': 'KOPANOAR M-13A'}, {'const': 'AD00625', 'title': 'KUPARUK'}, {'const': 'AD00630', 'title': 'KUWAIT, ARCO'}, {'const': 'AD00631', 'title': 'KUWAIT CRUDE OIL (LITERATURE VALUES)'}, {'const': 'AD00633', 'title': 'KUWAIT LIGHT, PHILLIPS'}, {'const': 'AD00638', 'title': 'LA ROSA'}, {'const': 'AD00644', 'title': 'LAGO MEDIO'}, {'const': 'AD00647', 'title': 'LAGO TRECO, CITGO'}, {'const': 'AD00648', 'title': 'LAGOTRECO'}, {'const': 'AD00649', 'title': 'LAGUNA'}, {'const': 'AD00650', 'title': 'LAGUNA, CITGO'}, {'const': 'AD00651', 'title': 'LAGUNA 22, CITGO'}, {'const': 'AD00652', 'title': 'LAGUNA BLEND 24, CITGO'}, {'const': 'AD00665', 'title': 'LALANG'}, {'const': 'AD00667', 'title': 'LARG TRECO MEDIUM, CITGO'}, {'const': 'AD00672', 'title': 'LEDUC WOODBEND'}, {'const': 'AD00674', 'title': 'LEONA, CITGO'}, {'const': 'AD00680', 'title': 'LIGHT SOUR BLEND'}, {'const': 'AD00682', 'title': 'LIUHUA, AMOCO'}, {'const': 'AD00685', 'title': 'LOKELE, CITGO'}, {'const': 'AD00686', 'title': 'LOKELE, EXXON'}, {'const': 'AD00697', 'title': 'LUBRICATING OIL (AUTO ENGINE OIL, VIRGIN)'}, {'const': 'AD00716', 'title': 'MARALAGO 22, CITGO'}, {'const': 'AD00717', 'title': 'MARGHAM'}, {'const': 'AD00718', 'title': 'MARIB, PHILLIPS'}, {'const': 'AD00721', 'title': 'MARINE DIESEL FUEL OIL'}, {'const': 'AD00725', 'title': 'MARJAN/ZULUF, ARAMCO'}, {'const': 'AD00732', 'title': 'MAYA, CITGO'}, {'const': 'AD00734', 'title': 'MAYA, EXXON'}, {'const': 'AD00735', 'title': 'MAYA, PHILLIPS'}, {'const': 'AD00736', 'title': 'MAYA, AMOCO'}, {'const': 'AD00738', 'title': 'MAYOGIAK'}, {'const': 'AD00741', 'title': 'MCARTHUR RIVER'}, {'const': 'AD00748', 'title': 'MENEMOTA'}, {'const': 'AD00750', 'title': 'MENEMOTA, CITGO'}, {'const': 'AD00756', 'title': 'MESA 28, CITGO'}, {'const': 'AD00757', 'title': 'MESA 30, CITGO'}, {'const': 'AD00760', 'title': 'MIDDLE GROUND SHOAL'}, {'const': 'AD00778', 'title': 'MORICHAL'}, {'const': 'AD00809', 'title': 'NEKTORALIK K-59'}, {'const': 'AD00810', 'title': 'NEKTORALIK K-59A'}, {'const': 'AD00811', 'title': 'NERLERK'}, {'const': 'AD00812', 'title': 'NERLERK M-98B'}, {'const': 'AD00817', 'title': 'NIGERIAN EXP. B1'}, {'const': 'AD00818', 'title': 'NIGERIAN LGT G'}, {'const': 'AD00819', 'title': 'NIGERIAN LGT M'}, {'const': 'AD00820', 'title': 'NIGERIAN LIGHT'}, {'const': 'AD00823', 'title': 'NIGERIAN MEDIUM'}, {'const': 'AD00824', 'title': 'NIKISKI'}, {'const': 'AD00825', 'title': 'NINIAN'}, {'const': 'AD00827', 'title': 'NINIAN, CITGO'}, {'const': 'AD00834', 'title': 'NORTH EAST TEXAS'}, {'const': 'AD00836', 'title': 'NORTH SLOPE'}, {'const': 'AD00837', 'title': 'NORTH SLOPE, CITGO'}, {'const': 'AD00838', 'title': 'NORTH SLOPE, PHILLIPS'}, {'const': 'AD00839', 'title': 'NOWRUZ'}, {'const': 'AD00846', 'title': 'OGUENDJO, AMOCO'}, {'const': 'AD00849', 'title': 'OLMECA, CITGO'}, {'const': 'AD00852', 'title': 'OMAN'}, {'const': 'AD00853', 'title': 'OMAN, PHILLIPS'}, {'const': 'AD00855', 'title': 'OQUENDJO'}, {'const': 'AD00858', 'title': 'ORIENTE, CITGO'}, {'const': 'AD00859', 'title': 'OSEBERG'}, {'const': 'AD00860', 'title': 'OSEBERG, EXXON'}, {'const': 'AD00861', 'title': 'OSEBERG, PHILLIPS'}, {'const': 'AD00864', 'title': 'PALANCA'}, {'const': 'AD00868', 'title': 'PANUCO'}, {'const': 'AD00869', 'title': 'PANUKE'}, {'const': 'AD00875', 'title': 'PARENTIS'}, {'const': 'AD00880', 'title': 'PECAN ISLAND, AMOCO'}, {'const': 'AD00882', 'title': 'PEMBINA'}, {'const': 'AD00893', 'title': 'PILON'}, {'const': 'AD00894', 'title': 'PILON, CITGO'}, {'const': 'AD00896', 'title': 'PILON-ANACO WAX, CITGO'}, {'const': 'AD00897', 'title': 'PIPER'}, {'const': 'AD00898', 'title': 'PITAS POINT'}, {'const': 'AD00899', 'title': 'PL COMPOSITE, STAR ENTERPRISE'}, {'const': 'AD00900', 'title': 'PLATFORM B'}, {'const': 'AD00913', 'title': 'PREMIUM UNLEADED GASOLINE, STAR ENTERPRISE'}, {'const': 'AD00924', 'title': 'QUA IBOE, PHILLIPS'}, {'const': 'AD00932', 'title': 'RAGUSA'}, {'const': 'AD00935', 'title': 'RANGELAND-SOUTH LIGHT AND MEDIUM'}, {'const': 'AD00937', 'title': 'RAS LANUF'}, {'const': 'AD00938', 'title': 'RATNA'}, {'const': 'AD00940', 'title': 'REDWATER'}, {'const': 'AD00944', 'title': 'RESIDUAL FUEL 900, TESORO'}, {'const': 'AD00949', 'title': 'RIO ZULIA'}, {'const': 'AD00964', 'title': 'SAN JOACHIM'}, {'const': 'AD00971', 'title': 'SANTA CRUZ'}, {'const': 'AD00973', 'title': 'SANTA MARIA'}, {'const': 'AD00980', 'title': 'SARIR, ITOPF'}, {'const': 'AD00983', 'title': 'SCHOONEBEEK'}, {'const': 'AD00995', 'title': 'SHARJAH'}, {'const': 'AD00999', 'title': 'SHIP SHOAL 133, PHILLIPS'}, {'const': 'AD01006', 'title': 'SIRTICA'}, {'const': 'AD01008', 'title': 'SMI 147, PHILLIPS'}, {'const': 'AD01009', 'title': 'SMI 66, PHILLIPS'}, {'const': 'AD01022', 'title': 'SOUR BLEND'}, {'const': 'AD01025', 'title': 'SOUTH LOUISIANA'}, {'const': 'AD01030', 'title': 'SOUTH WEST TEXAS LIGHT'}, {'const': 'AD01031', 'title': 'SOYO'}, {'const': 'AD01046', 'title': 'SUEZ MIX'}, {'const': 'AD01050', 'title': 'SUNNILAND, EXXON'}, {'const': 'AD01054', 'title': 'SWEET BLEND'}, {'const': 'AD01058', 'title': 'TACHING'}, {'const': 'AD01059', 'title': 'TACHING'}, {'const': 'AD01062', 'title': 'TAKULA, API'}, {'const': 'AD01063', 'title': 'TAKULA, CITGO'}, {'const': 'AD01064', 'title': 'TAKULA, CHEVRON'}, {'const': 'AD01070', 'title': 'TARSIUT'}, {'const': 'AD01071', 'title': 'TARSIUT A-25'}, {'const': 'AD01076', 'title': 'TERRA NOVA'}, {'const': 'AD01077', 'title': 'TERRA NOVA K-08 DST #1'}, {'const': 'AD01078', 'title': 'TERRA NOVA K-08 DST #2'}, {'const': 'AD01079', 'title': 'TERRA NOVA K-08 DST #3'}, {'const': 'AD01080', 'title': 'TERRA NOVA K-08 DST #4'}, {'const': 'AD01081', 'title': 'TEXAS GULF COAST HEAVY'}, {'const': 'AD01082', 'title': 'TEXAS GULF COAST LIGHT'}, {'const': 'AD01083', 'title': 'TEXTRACT, STAR ENTERPRISE'}, {'const': 'AD01088', 'title': 'TIA JUANA'}, {'const': 'AD01094', 'title': 'TIA JUANA LIGHT, CITGO'}, {'const': 'AD01096', 'title': 'TIA JUANA MEDIUM'}, {'const': 'AD01097', 'title': 'TIA JUANA MEDIUM, CITGO'}, {'const': 'AD01098', 'title': 'TIA JUANA MEDIUM, ARCO'}, {'const': 'AD01100', 'title': 'TIA JUANA PESADO'}, {'const': 'AD01118', 'title': 'TRADING BAY (OFFSHORE COOK INLET)'}, {'const': 'AD01119', 'title': 'TRANSMOUNTAIN BLEND'}, {'const': 'AD01121', 'title': 'TRINIDAD'}, {'const': 'AD01133', 'title': 'ULA'}, {'const': 'AD01134', 'title': 'UMM SHAIF'}, {'const': 'AD01135', 'title': 'UMM SHARIF, PHILLIPS'}, {'const': 'AD01137', 'title': 'UNLEADED INTERM GASOLINE, STAR ENTERPRISE'}, {'const': 'AD01139', 'title': 'UPPER ZAKUM, PHILLIPS'}, {'const': 'AD01140', 'title': 'URAL'}, {'const': 'AD01141', 'title': 'UVILUK'}, {'const': 'AD01147', 'title': 'VENEZUELA MIX'}, {'const': 'AD01155', 'title': 'WAFRA EOCENE'}, {'const': 'AD01162', 'title': 'WC BLOCK 45 BEACH-CONDENSATE, PHILLIPS'}, {'const': 'AD01171', 'title': 'WEST GENERAL TEXAS'}, {'const': 'AD01172', 'title': 'WEST NEDERLAND'}, {'const': 'AD01175', 'title': 'WEST TEXAS ELLENBURGER'}, {'const': 'AD01177', 'title': 'WEST TEXAS LIGHT'}, {'const': 'AD01180', 'title': 'WEYBURN-MIDALE'}, {'const': 'AD01184', 'title': 'YANBU ARABIAN LIGHT, ARAMCO'}, {'const': 'AD01186', 'title': 'YOMBO, AMOCO'}, {'const': 'AD01189', 'title': 'ZAIRE, API'}, {'const': 'AD01191', 'title': 'ZAIRE, CHEVRON'}, {'const': 'AD01193', 'title': 'ZAKUA'}, {'const': 'AD01194', 'title': 'ZAKUM'}, {'const': 'AD01200', 'title': 'ZETA NORTH'}, {'const': 'AD01215', 'title': 'MARINE DIESEL F-76, MANCHESTER FUEL'}, {'const': 'AD01217', 'title': 'KERN COUNTY BLEND'}, {'const': 'AD01219', 'title': 'VENEZUELA RECON'}, {'const': 'AD01220', 'title': 'DAQIN'}, {'const': 'AD01221', 'title': 'SHIAN LI'}, {'const': 'AD01222', 'title': 'HUIZHOU'}, {'const': 'AD01223', 'title': 'WEST TEXAS INTERMEDIATE, OIL & GAS'}, {'const': 'AD01225', 'title': 'MAIN PASS 140, PENNZOIL'}, {'const': 'AD01232', 'title': 'JABIRU, BHP PETROLEUM'}, {'const': 'AD01233', 'title': 'JABIRU 1A, BHP PETROLEUM'}, {'const': 'AD01235', 'title': 'KUTUBU LIGHT, BHP PETROLEUM'}, {'const': 'AD01236', 'title': 'GIPPSLAND, BHP PETROLEUM'}, {'const': 'AD01258', 'title': 'UDANG, OIL & GAS'}, {'const': 'AD01262', 'title': 'DURI, OIL & GAS'}, {'const': 'AD01264', 'title': 'SOVIET EXPORT, OIL & GAS'}, {'const': 'AD01269', 'title': 'BARROW ISLAND, OIL & GAS'}, {'const': 'AD01301', 'title': 'BELAYIM, OIL & GAS'}, {'const': 'AD01326', 'title': 'SHARJAH, OIL & GAS'}, {'const': 'AD01345', 'title': 'LLOYDMINSTER, OIL & GAS'}, {'const': 'AD01346', 'title': 'ALASKA NORTH SLOPE, OIL & GAS'}, {'const': 'AD01357', 'title': 'STATJORD, OIL & GAS'}, {'const': 'AD01369', 'title': 'FLOTTA, OIL & GAS'}, {'const': 'AD01378', 'title': 'FORTIES, OIL & GAS'}, {'const': 'AD01392', 'title': 'ESCRAVOS, OIL & GAS'}, {'const': 'AD01401', 'title': 'BELIDA, OIL & GAS'}, {'const': 'AD01411', 'title': 'RABBI, COASTAL EAGLE POINT OIL'}, {'const': 'AD01412', 'title': 'SOLVENT NEUTRAL OIL 320, STAR ENTERPRISE'}, {'const': 'AD01413', 'title': 'ROSSIIELF, RUSSIAN JOINT STOCK CO'}, {'const': 'AD01419', 'title': 'KUTUBU, AMSA'}, {'const': 'AD01420', 'title': 'GRIFFIN, AMSA'}, {'const': 'AD01421', 'title': 'NSW CONDENSATE, AMSA'}, {'const': 'AD01424', 'title': 'KABINDA, GALLAGER MARINE'}, {'const': 'AD01425', 'title': 'NEMBA, GALLAGER MARINE'}, {'const': 'AD01427', 'title': 'FUEL OIL NO.2, AMOCO'}, {'const': 'AD01428', 'title': 'TEAK AND SAMAAN, AMOCO'}, {'const': 'AD01429', 'title': 'GALEOTA MIX, AMOCO'}, {'const': 'AD01430', 'title': 'POUI, AMOCO'}, {'const': 'AD01432', 'title': 'QATAR/DUKHAM, CHEVRON'}, {'const': 'AD01433', 'title': 'ALGERIAN CONDENSATE, SHELL OIL'}, {'const': 'AD01434', 'title': 'ARABIAN MEDIUM, SHELL OIL'}, {'const': 'AD01435', 'title': 'ARUN CONDENSATE, SHELL OIL'}, {'const': 'AD01436', 'title': 'BACHAQUERO, SHELL OIL'}, {'const': 'AD01437', 'title': 'BADAK, SHELL OIL'}, {'const': 'AD01438', 'title': 'BETA PRODUCTION, SHELL OIL'}, {'const': 'AD01439', 'title': 'BONITO P/L SOUR, SHELL OIL'}, {'const': 'AD01440', 'title': 'BONNY LIGHT, SHELL OIL'}, {'const': 'AD01441', 'title': 'BRASS RIVER, SHELL OIL'}, {'const': 'AD01442', 'title': 'CABINDA BLEND, SHELL OIL'}, {'const': 'AD01443', 'title': 'COGNAC-BLOCK 194, SHELL OIL'}, {'const': 'AD01444', 'title': 'DJENO, SHELL OIL'}, {'const': 'AD01445', 'title': 'ERAWAN CONDENSATE, SHELL OIL'}, {'const': 'AD01446', 'title': 'ESCRAVOS, SHELL OIL'}, {'const': 'AD01447', 'title': 'ETCHEGOIN, SHELL OIL'}, {'const': 'AD01448', 'title': 'FLOTTA, SHELL OIL'}, {'const': 'AD01449', 'title': 'FORCADOS, SHELL OIL'}, {'const': 'AD01450', 'title': 'FORTIES, SHELL OIL'}, {'const': 'AD01451', 'title': 'FURRIAL, SHELL OIL'}, {'const': 'AD01452', 'title': 'GIPPSLAND, SHELL OIL'}, {'const': 'AD01453', 'title': 'GREEN CANYON, SHELL OIL'}, {'const': 'AD01454', 'title': 'GULLFAKS, SHELL OIL'}, {'const': 'AD01455', 'title': 'HARDING, SHELL OIL'}, {'const': 'AD01456', 'title': 'HIGH ISLAND SWEET, SHELL OIL'}, {'const': 'AD01457', 'title': 'HUNTINGTON BEACH, SHELL OIL'}, {'const': 'AD01458', 'title': 'ISTHMUS, SHELL OIL'}, {'const': 'AD01460', 'title': 'JABIRU, SHELL OIL'}, {'const': 'AD01461', 'title': 'KERN RIVER-SWEPI, SHELL OIL'}, {'const': 'AD01462', 'title': 'KIRKUK, SHELL OIL'}, {'const': 'AD01463', 'title': 'KOLE, SHELL OIL'}, {'const': 'AD01464', 'title': 'KUTUBU, SHELL OIL'}, {'const': 'AD01465', 'title': 'LAGOCINCO, SHELL OIL'}, {'const': 'AD01466', 'title': 'LAGOMAR, SHELL OIL'}, {'const': 'AD01467', 'title': 'LAGOTRECO, SHELL OIL'}, {'const': 'AD01468', 'title': 'LOKELE, SHELL OIL'}, {'const': 'AD01469', 'title': 'LLOYDMINSTER, SHELL OIL'}, {'const': 'AD01470', 'title': 'ARABIAN LIGHT, SHELL OIL'}, {'const': 'AD01471', 'title': 'LORETO, SHELL OIL'}, {'const': 'AD01472', 'title': 'LUCINA, SHELL OIL'}, {'const': 'AD01473', 'title': 'MAIN PASS 49 CONDENSATE, SHELL OIL'}, {'const': 'AD01474', 'title': 'MAYA, SHELL OIL'}, {'const': 'AD01475', 'title': 'MANDJI, SHELL OIL'}, {'const': 'AD01476', 'title': 'MURBAN, SHELL OIL'}, {'const': 'AD01477', 'title': 'OLMECA, SHELL OIL'}, {'const': 'AD01478', 'title': 'OMAN, SHELL OIL'}, {'const': 'AD01479', 'title': 'ORIENTE, SHELL OIL'}, {'const': 'AD01480', 'title': 'OSEBERG, SHELL OIL'}, {'const': 'AD01481', 'title': 'PALANCA, SHELL OIL'}, {'const': 'AD01482', 'title': 'PECAN ISLAND, SHELL OIL'}, {'const': 'AD01483', 'title': 'QUA IBOE, SHELL OIL'}, {'const': 'AD01484', 'title': 'RABI BLEND, SHELL OIL'}, {'const': 'AD01485', 'title': 'RABI-KOUNGA, SHELL OIL'}, {'const': 'AD01486', 'title': 'SAHARAN BLEND BEJAIA, SHELL OIL'}, {'const': 'AD01487', 'title': 'SAHARAN BLEND ARZEW, SHELL OIL'}, {'const': 'AD01488', 'title': 'SKUA, SHELL OIL'}, {'const': 'AD01489', 'title': 'SOYO, SHELL OIL'}, {'const': 'AD01490', 'title': 'TIA JUANA LIGHT, SHELL OIL'}, {'const': 'AD01491', 'title': 'TIERRA DEL FUEGO, SHELL OIL'}, {'const': 'AD01492', 'title': 'VENTURA SHELL TAYLOR LEASE, SHELL OIL'}, {'const': 'AD01493', 'title': 'VIOSCA KNOLL 826, SHELL OIL'}, {'const': 'AD01494', 'title': 'WEST DELTA BLOCK 89, SHELL OIL'}, {'const': 'AD01495', 'title': 'WEST LAKE VERRET, SHELL OIL'}, {'const': 'AD01496', 'title': 'XIJIANG, SHELL OIL'}, {'const': 'AD01497', 'title': 'YORBA LINDA SHELL, SHELL OIL'}, {'const': 'AD01498', 'title': 'YOWLUMNE, SHELL OIL'}, {'const': 'AD01499', 'title': 'ZAIRE, SHELL OIL'}, {'const': 'AD01500', 'title': 'JET A-1, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01501', 'title': 'DUAL PURPOSE KEROSINE, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01507', 'title': 'MCKEE BLEND, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01508', 'title': 'MAUI F SAND, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01510', 'title': 'MCKEE BLEND 50%, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01511', 'title': 'MCKEE BLEND 25%, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01512', 'title': 'MCKEE BLEND 10% NGAT-1, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01513', 'title': 'MCKEE BLEND 10% NGAT-2, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01514', 'title': 'MCKEE BLEND 10% NGAT-3, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01515', 'title': 'HANDIL, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01517', 'title': 'BARROW ISLAND, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01519', 'title': 'BRASS RIVER, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01520', 'title': 'DUBAI, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01521', 'title': 'MURBAN, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01522', 'title': 'MAUI B, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01524', 'title': 'KUTUBU, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01525', 'title': 'GRIFFIN, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01528', 'title': 'MIRI LIGHT, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01529', 'title': 'SYNGAS, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01530', 'title': 'LABUAN, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01533', 'title': 'OMAN, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01535', 'title': 'THEVENARD, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01536', 'title': 'WIDURI, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01537', 'title': 'KHAFJI, MARITIME SAFETY AUTHORITY OF NEW ZEALAND'}, {'const': 'AD01552', 'title': 'FORCADOS, BP'}, {'const': 'AD01553', 'title': 'WEST TEXAS SOUR, BP'}, {'const': 'AD01554', 'title': 'LIGHT LOUISIANNA SWEET, BP'}, {'const': 'AD01556', 'title': 'RINCON DE LOS SAUCES, OIL & GAS'}, {'const': 'AD01557', 'title': 'MEDANITO, OIL & GAS'}, {'const': 'AD01561', 'title': 'ESCRAVOS SWAMP BLEND, CHEVRON'}, {'const': 'AD01562', 'title': 'BENIN RIVER, CHEVRON'}, {'const': 'AD01567', 'title': 'NORTHWEST CHARGE STOCK, CHEVRON'}, {'const': 'AD01577', 'title': 'ARABIAN EXTRA LIGHT, BOUCHARD'}, {'const': 'AD01579', 'title': 'BRENT, SUN'}, {'const': 'AD01581', 'title': 'MONTEREY, TORCH'}, {'const': 'AD01585', 'title': 'ODUDU, EXXON'}, {'const': 'AD01612', 'title': 'BELIDA'}, {'const': 'AD01614', 'title': 'BINTULU'}, {'const': 'AD01622', 'title': 'BUNKER C FUEL OIL (IRVING WHALE)'}, {'const': 'AD01627', 'title': 'CANO LIMON'}, {'const': 'AD01634', 'title': 'CUSIANA'}, {'const': 'AD01652', 'title': 'FCC FEED'}, {'const': 'AD01654', 'title': 'FCC MEDIUM CYCLE OIL'}, {'const': 'AD01676', 'title': 'IFO 180'}, {'const': 'AD01705', 'title': 'ORIENTE'}, {'const': 'AD01706', 'title': 'ORIMULSION'}, {'const': 'AD01707', 'title': 'PENNINGTON'}, {'const': 'AD01726', 'title': 'SARIR'}, {'const': 'AD01732', 'title': 'SIBERIAN BLEND'}, {'const': 'AD01739', 'title': 'SOUTH PASS BLOCK 67'}, {'const': 'AD01758', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXPERIMENT'}, {'const': 'AD01765', 'title': 'FUEL OIL NO.1 (JET B, ALASKA)'}, {'const': 'AD01774', 'title': 'DIESEL/HEATING OIL NO.2, CHEVRON'}, {'const': 'AD01775', 'title': 'DESTIN DOME CIS, MMS'}, {'const': 'AD01776', 'title': 'MOTOR GASOLINE-PREMIUM UNLEADED, SHELL REFINING PTY '}, {'const': 'AD01777', 'title': 'MOTOR GASOLINE-UNLEADED, SHELL REFINING PTY '}, {'const': 'AD01778', 'title': 'MOTOR GASOLINE-LEADED, SHELL REFINING PTY '}, {'const': 'AD01779', 'title': 'AUTOMOTIVE DIESEL FUEL, SHELL REFINING PTY '}, {'const': 'AD01786', 'title': 'AVIATION TURBINE FUEL, SHELL REFINING PTY '}, {'const': 'AD01800', 'title': 'WHITE SPIRIT, SHELL REFINING PTY '}, {'const': 'AD01804', 'title': 'NKOSSA, SHELL REFINING PTY '}, {'const': 'AD01805', 'title': 'MURBAN, SHELL REFINING PTY '}, {'const': 'AD01806', 'title': 'OMAN, SHELL REFINING PTY '}, {'const': 'AD01809', 'title': 'GIPPSLAND, SHELL REFINING PTY '}, {'const': 'AD01811', 'title': 'THEVENARD, SHELL REFINING PTY '}, {'const': 'AD01812', 'title': 'XI-JANG, SHELL REFINING PTY '}, {'const': 'AD01813', 'title': 'ATTAKA, SHELL REFINING PTY '}, {'const': 'AD01814', 'title': 'ARDJUNA, SHELL REFINING PTY '}, {'const': 'AD01815', 'title': 'CINTA, SHELL REFINING PTY '}, {'const': 'AD01816', 'title': 'WIDURI, SHELL REFINING PTY '}, {'const': 'AD01817', 'title': 'LALANG, SHELL REFINING PTY '}, {'const': 'AD01818', 'title': 'MINAS, SHELL REFINING PTY '}, {'const': 'AD01819', 'title': 'MAUI, SHELL REFINING PTY '}, {'const': 'AD01820', 'title': 'MCKEE, SHELL REFINING PTY '}, {'const': 'AD01822', 'title': 'BACH HO, SHELL REFINING PTY '}, {'const': 'AD01823', 'title': 'CHALLIS, BHP PETROLEUM'}, {'const': 'AD01824', 'title': 'GRIFFIN, BHP PETROLEUM'}, {'const': 'AD01826', 'title': 'HARRIET, APACHE ENERGY LTD'}, {'const': 'AD01827', 'title': 'STAG, APACHE ENERGY LTD'}, {'const': 'AD01830', 'title': 'COOPER BASIN, SANTOS LTD'}, {'const': 'AD01834', 'title': 'GIPPSLAND, AMSA'}, {'const': 'AD01850', 'title': 'ALASKA NORTH SLOPE-PUMP STATION #9, BP'}, {'const': 'AD01851', 'title': 'QATAR NORTH FIELD CONDENSATE (NFR-1), MOBIL'}, {'const': 'AD01853', 'title': 'AIRILE, BP'}, {'const': 'AD01854', 'title': 'BARROW, BP'}, {'const': 'AD01855', 'title': 'BLINA, BP'}, {'const': 'AD01856', 'title': 'JACKSON, BP'}, {'const': 'AD01857', 'title': 'SURAT BASIN, BP'}, {'const': 'AD01858', 'title': 'THEVENAND, BP'}, {'const': 'AD01859', 'title': 'VARANUS, BP'}, {'const': 'AD01860', 'title': 'WANDO, BP'}, {'const': 'AD01861', 'title': 'UMM SHAIF, BP'}, {'const': 'AD01862', 'title': 'UPPER ZAKUM, BP'}, {'const': 'AD01863', 'title': 'MARGHAM, BP'}, {'const': 'AD01864', 'title': 'KUWAIT, BP'}, {'const': 'AD01865', 'title': 'KHAFJI, BP'}, {'const': 'AD01866', 'title': 'AL RAYYAN, BP'}, {'const': 'AD01868', 'title': 'SAJAA CONDENSATE, BP'}, {'const': 'AD01869', 'title': 'NANNAI LIGHT, BP'}, {'const': 'AD01870', 'title': 'BELIDA, BP'}, {'const': 'AD01872', 'title': 'BONTANG MIX, BP'}, {'const': 'AD01873', 'title': 'HANDIL, BP'}, {'const': 'AD01874', 'title': 'KERAPU, BP'}, {'const': 'AD01876', 'title': 'MIRI LIGHT, BP'}, {'const': 'AD01877', 'title': 'CHERVIL, NOVUS WA PTY LTD'}, {'const': 'AD01882', 'title': 'ARABIAN EXTRA LIGHT, MOBIL OIL AUSTRALIA'}, {'const': 'AD01884', 'title': 'BASRAH LIGHT, MOBIL OIL AUSTRALIA'}, {'const': 'AD01885', 'title': 'BELIDA, MOBIL OIL AUSTRALIA '}, {'const': 'AD01887', 'title': 'EAST SPAB, MOBIL OIL AUSTRALIA'}, {'const': 'AD01888', 'title': 'ERAWAN, MOBIL OIL AUSTRALIA '}, {'const': 'AD01889', 'title': 'KUTUBU LIGHT, MOBIL OIL AUSTRALIA '}, {'const': 'AD01891', 'title': 'QATAR LAND, MOBIL OIL AUSTRALIA '}, {'const': 'AD01892', 'title': 'QATAR MARINE, MOBIL OIL AUSTRALIA'}, {'const': 'AD01893', 'title': 'THAMMAMA, MOBIL OIL AUSTRALIA '}, {'const': 'AD01894', 'title': 'UPPER ZAKUM, MOBIL OIL AUSTRALIA '}, {'const': 'AD01895', 'title': 'WANDOO, MOBIL OIL AUSTRALIA'}, {'const': 'AD01896', 'title': 'BELIDA, CALTEX'}, {'const': 'AD01897', 'title': 'KUKAPU, CALTEX'}, {'const': 'AD01898', 'title': 'BEKOPAI, CALTEX'}, {'const': 'AD01899', 'title': 'SENIPAH, CALTEX'}, {'const': 'AD01900', 'title': 'IMA, CALTEX'}, {'const': 'AD01904', 'title': 'ORIENTE, OIL & GAS'}, {'const': 'AD01906', 'title': 'MAYA, OIL & GAS'}, {'const': 'AD01907', 'title': 'OLMECA, OIL & GAS'}, {'const': 'AD01911', 'title': 'BOSCAN, OIL & GAS'}, {'const': 'AD01912', 'title': 'LA ROSA MEDIUM, OIL & GAS'}, {'const': 'AD01913', 'title': 'MEREY, OIL & GAS'}, {'const': 'AD01916', 'title': 'MURBAN, OIL & GAS'}, {'const': 'AD01922', 'title': 'BASRAH, OIL & GAS'}, {'const': 'AD01924', 'title': 'KIRKUK, OIL & GAS'}, {'const': 'AD01925', 'title': 'KUWAIT EXPORT, OIL & GAS'}, {'const': 'AD01927', 'title': 'ARABIAN LIGHT, OIL & GAS'}, {'const': 'AD01929', 'title': 'SEPINGGAN-YAKIN MIXED, OIL & GAS'}, {'const': 'AD01930', 'title': 'SAHARAN BLEND, OIL & GAS'}, {'const': 'AD01938', 'title': 'RAINBOW LIGHT AND MEDIUM, OIL & GAS'}, {'const': 'AD01939', 'title': 'RANGELAND-SOUTH, OIL & GAS'}, {'const': 'AD01944', 'title': 'EKOFISK, OIL & GAS'}, {'const': 'AD01945', 'title': 'GULLFAKS, OIL & GAS'}, {'const': 'AD01946', 'title': 'OSEBERG, OIL & GAS'}, {'const': 'AD01947', 'title': 'ARGYLL, OIL & GAS'}, {'const': 'AD01950', 'title': 'BRENT, OIL & GAS'}, {'const': 'AD01970', 'title': 'MIX GEISUM, GEISUM OIL'}, {'const': 'AD01971', 'title': 'NORTH GEISUM, GEISUM OIL'}, {'const': 'AD01972', 'title': 'TAWILA, GEISUM OIL'}, {'const': 'AD01973', 'title': 'SOUTH GEISUM, GEISUM OIL'}, {'const': 'AD01978', 'title': 'VIOSCA KNOLL BLOCK 990'}, {'const': 'AD01981', 'title': 'POSIDEN, EQUILON'}, {'const': 'AD01983', 'title': 'ABOOZAR'}, {'const': 'AD01984', 'title': 'ABU AL BU KHOOSH'}, {'const': 'AD01985', 'title': 'ADGO'}, {'const': 'AD01986', 'title': 'ALASKA NORTH SLOPE'}, {'const': 'AD01987', 'title': 'ALASKA NORTH SLOPE (MIDDLE PIPELINE)'}, {'const': 'AD01988', 'title': 'ALASKA NORTH SLOPE (NORTHERN PIPELINE)'}, {'const': 'AD01989', 'title': 'ALASKA NORTH SLOPE (SOCSEX)'}, {'const': 'AD01990', 'title': 'ALASKA NORTH SLOPE (SOUTHERN PIPELINE)'}, {'const': 'AD01991', 'title': 'ALBA'}, {'const': 'AD01993', 'title': 'ALBERTA SWEET MIXED BLEND (PETAWAWA)'}, {'const': 'AD01994', 'title': 'ALBERTA SWEET MIXED BLEND (REFERENCE #2)'}, {'const': 'AD01995', 'title': 'ALBERTA SWEET MIXED BLEND (REFERENCE #3)'}, {'const': 'AD01998', 'title': 'AMAULIGAK'}, {'const': 'AD01999', 'title': 'AMNA'}, {'const': 'AD02000', 'title': 'ARABIAN'}, {'const': 'AD02002', 'title': 'ARABIAN LIGHT'}, {'const': 'AD02003', 'title': 'ARABIAN MEDIUM'}, {'const': 'AD02006', 'title': 'ARIMBI'}, {'const': 'AD02007', 'title': 'ASHTART'}, {'const': 'AD02012', 'title': 'ATTAKA'}, {'const': 'AD02014', 'title': 'AVALON'}, {'const': 'AD02015', 'title': 'AVIATION GASOLINE 100'}, {'const': 'AD02018', 'title': 'BACH HO'}, {'const': 'AD02019', 'title': 'BACHAQUERO'}, {'const': 'AD02020', 'title': 'BADAK'}, {'const': 'AD02021', 'title': 'BAHRGANSAR/NOWRUZ'}, {'const': 'AD02022', 'title': 'BARROW ISLAND'}, {'const': 'AD02023', 'title': 'BASRAH HEAVY'}, {'const': 'AD02024', 'title': 'BASRAH LIGHT'}, {'const': 'AD02025', 'title': 'BASRAH MEDIUM'}, {'const': 'AD02026', 'title': 'BCF 24'}, {'const': 'AD02027', 'title': 'BEATRICE'}, {'const': 'AD02028', 'title': 'BEKAPAI'}, {'const': 'AD02029', 'title': 'BEKOK'}, {'const': 'AD02030', 'title': 'BELAYIM'}, {'const': 'AD02032', 'title': 'BELRIDGE HEAVY'}, {'const': 'AD02033', 'title': 'BENT HORN'}, {'const': 'AD02035', 'title': 'BERRI'}, {'const': 'AD02037', 'title': 'BETA'}, {'const': 'AD02039', 'title': 'BOMBAY HIGH'}, {'const': 'AD02040', 'title': 'BONNY LIGHT'}, {'const': 'AD02041', 'title': 'BONNY MEDIUM'}, {'const': 'AD02042', 'title': 'BOSCAN'}, {'const': 'AD02044', 'title': 'BOW RIVER HEAVY'}, {'const': 'AD02045', 'title': 'BRAE'}, {'const': 'AD02046', 'title': 'BRASS RIVER'}, {'const': 'AD02047', 'title': 'BREGA'}, {'const': 'AD02051', 'title': 'BUNKER C FUEL OIL'}, {'const': 'AD02052', 'title': 'BUNKER C FUEL OIL (ALASKA)'}, {'const': 'AD02053', 'title': 'BUNK FUEL OIL (IRVING WHALE)'}, {'const': 'AD02054', 'title': 'BUNYU'}, {'const': 'AD02055', 'title': 'BURGAN'}, {'const': 'AD02056', 'title': 'CABINDA'}, {'const': 'AD02057', 'title': 'CALIFORNIA (API 11)'}, {'const': 'AD02058', 'title': 'CALIFORNIA (API 15)'}, {'const': 'AD02059', 'title': 'CANADON SECO'}, {'const': 'AD02060', 'title': 'CANO LIMON'}, {'const': 'AD02061', 'title': 'CARPINTERIA'}, {'const': 'AD02063', 'title': 'CATALYTIC CRACKING FEED'}, {'const': 'AD02064', 'title': 'CEUTA'}, {'const': 'AD02065', 'title': 'CHAMPION EXPORT'}, {'const': 'AD02066', 'title': 'CINTA'}, {'const': 'AD02067', 'title': 'COAL OIL POINT SEEP OIL'}, {'const': 'AD02068', 'title': 'COHASSET'}, {'const': 'AD02069', 'title': 'COLD LAKE BITUMEN'}, {'const': 'AD02070', 'title': 'COLD LAKE BLEND'}, {'const': 'AD02072', 'title': 'COOPER BASIN'}, {'const': 'AD02073', 'title': 'CORMORANT NORTH'}, {'const': 'AD02074', 'title': 'CORMORANT SOUTH'}, {'const': 'AD02076', 'title': 'COSSACK'}, {'const': 'AD02077', 'title': 'CUSIANA'}, {'const': 'AD02079', 'title': 'DAN'}, {'const': 'AD02080', 'title': 'DANISH NORTH SEA'}, {'const': 'AD02083', 'title': 'DIESEL FUEL OIL (SOUTHERN USA 1994)'}, {'const': 'AD02084', 'title': 'DIESEL FUEL OIL (SOUTHERN USA 1997)'}, {'const': 'AD02086', 'title': 'DJENO BLEND'}, {'const': 'AD02087', 'title': 'DORROOD'}, {'const': 'AD02088', 'title': 'DOS CUADRAS'}, {'const': 'AD02089', 'title': 'DUBAI'}, {'const': 'AD02090', 'title': 'DUKHAN'}, {'const': 'AD02093', 'title': 'EAST ZEIT MIX'}, {'const': 'AD02094', 'title': 'EKOFISK'}, {'const': 'AD02098', 'title': 'ELECTRICAL INSULATING OIL (VOLTESSO 35)'}, {'const': 'AD02099', 'title': 'EMERALD'}, {'const': 'AD02100', 'title': 'EMPIRE'}, {'const': 'AD02101', 'title': 'FORCADOS'}, {'const': 'AD02102', 'title': 'KOME'}, {'const': 'AD02103', 'title': 'MIANDOUM'}, {'const': 'AD02104', 'title': 'BOLOBO'}, {'const': 'AD02105', 'title': 'CUSIANA, MOTIVA ENTERPRISES LLC'}, {'const': 'AD02107', 'title': 'RABI, MOTIVA ENTERPRISES LLC'}, {'const': 'AD02108', 'title': "N'KOSSA EXP BLEND, CHEVRON"}, {'const': 'AD02109', 'title': 'ANTAN, HUVENSA'}, {'const': 'AD02110', 'title': 'ENDICOTT'}, {'const': 'AD02111', 'title': 'EOCENE'}, {'const': 'AD02112', 'title': 'ES SIDER'}, {'const': 'AD02113', 'title': 'ESCALANTE'}, {'const': 'AD02114', 'title': 'ESCRAVOS'}, {'const': 'AD02115', 'title': 'ESPOIR'}, {'const': 'AD02116', 'title': 'EUGENE ISLAND BLOCK 32'}, {'const': 'AD02117', 'title': 'EUGENE ISLAND BLOCK 43'}, {'const': 'AD02118', 'title': 'EVERDELL'}, {'const': 'AD02119', 'title': 'FEDERATED (1994)'}, {'const': 'AD02120', 'title': 'FEDERATED (1998)'}, {'const': 'AD02121', 'title': 'FEDERATED (SOCSEX)'}, {'const': 'AD02122', 'title': 'FEDERATED LIGHT AND MEDIUM'}, {'const': 'AD02123', 'title': 'FLOTTA'}, {'const': 'AD02124', 'title': 'FLUID CATALYTIC CRACKER FEED'}, {'const': 'AD02125', 'title': 'FLUID CATALYTIC CRACKER HEAVY CYCLE OIL'}, {'const': 'AD02126', 'title': 'FLUID CATALYTIC CRACKER LIGHT CYCLE OIL'}, {'const': 'AD02127', 'title': 'FLUID CATALYTIC CRACKER MEDIUM CYCLE OIL'}, {'const': 'AD02129', 'title': 'FORCADOS BLEND'}, {'const': 'AD02130', 'title': 'FOROOZAN'}, {'const': 'AD02131', 'title': 'FORTIES BLEND'}, {'const': 'AD02136', 'title': 'FUEL OIL NO.1 (JP-6)'}, {'const': 'AD02139', 'title': 'FUEL OIL NO.2 (HIGH AROMATIC CONTENT HEATING OIL)'}, {'const': 'AD02144', 'title': 'FULMAR'}, {'const': 'AD02145', 'title': 'GALEOTA MIX'}, {'const': 'AD02146', 'title': 'GAMBA'}, {'const': 'AD02147', 'title': 'GARDEN BANKS BLOCK 387'}, {'const': 'AD02148', 'title': 'GARDEN BANKS BLOCK 426'}, {'const': 'AD02153', 'title': 'GASOLINE (UNLEADED), SHELL'}, {'const': 'AD02156', 'title': 'GENESIS'}, {'const': 'AD02157', 'title': 'GIPPSLAND'}, {'const': 'AD02158', 'title': 'GORM'}, {'const': 'AD02159', 'title': 'GRANITE POINT'}, {'const': 'AD02160', 'title': 'GREEN CANYON BLOCK 109'}, {'const': 'AD02161', 'title': 'GREEN CANYON BLOCK 184'}, {'const': 'AD02162', 'title': 'GREEN CANYON BLOCK 65'}, {'const': 'AD02163', 'title': 'GRIFFIN'}, {'const': 'AD02164', 'title': 'GULF OF SUEZ MIX'}, {'const': 'AD02165', 'title': 'GULLFAKS'}, {'const': 'AD02166', 'title': 'HANDIL'}, {'const': 'AD02168', 'title': 'HEBRON'}, {'const': 'AD02169', 'title': 'HEIDRUN'}, {'const': 'AD02170', 'title': 'HIBERNIA'}, {'const': 'AD02171', 'title': 'HIBERNIA (EPA 86)'}, {'const': 'AD02172', 'title': 'HIGH VISCOSITY FUEL OIL'}, {'const': 'AD02174', 'title': 'HONDO BLEND'}, {'const': 'AD02175', 'title': 'HONDO MONTEREY'}, {'const': 'AD02176', 'title': 'HONDO SANDSTONE'}, {'const': 'AD02177', 'title': 'HOUT'}, {'const': 'AD02178', 'title': 'HYDRA'}, {'const': 'AD02179', 'title': 'IF-30 FUEL OIL'}, {'const': 'AD02180', 'title': 'IF-30 FUEL OIL (SVALBARD)'}, {'const': 'AD02181', 'title': 'IF-30 FUEL OIL 180'}, {'const': 'AD02182', 'title': 'INTERMEDIATE FUEL OIL 180 (SOCSEX)'}, {'const': 'AD02183', 'title': 'INTERMEDIATE FUEL OIL 300'}, {'const': 'AD02184', 'title': 'INTERMEDIATE FUEL OIL 300 (SOCSEX)'}, {'const': 'AD02186', 'title': 'IRANIAN HEAVY'}, {'const': 'AD02187', 'title': 'IRANIAN LIGHT'}, {'const': 'AD02189', 'title': 'ISTHMUS'}, {'const': 'AD02192', 'title': 'JATIBARANG'}, {'const': 'AD02197', 'title': 'KHALDA'}, {'const': 'AD02198', 'title': 'KIMKOL'}, {'const': 'AD02199', 'title': 'KIRKUK BLEND'}, {'const': 'AD02200', 'title': 'KITTIWAKE'}, {'const': 'AD02201', 'title': 'KOAKOAK'}, {'const': 'AD02202', 'title': 'KOLE MARINE BLEND'}, {'const': 'AD02203', 'title': 'KOMINEFT'}, {'const': 'AD02204', 'title': 'KOPANOAR'}, {'const': 'AD02207', 'title': 'KUWAIT'}, {'const': 'AD02209', 'title': 'LABUAN BLEND'}, {'const': 'AD02210', 'title': 'LAGO'}, {'const': 'AD02211', 'title': 'LAGO TRECO'}, {'const': 'AD02212', 'title': 'LAGOMEDIO'}, {'const': 'AD02213', 'title': 'LEONA'}, {'const': 'AD02214', 'title': 'LIVERPOOL BAY'}, {'const': 'AD02215', 'title': 'LLOYDMINSTER'}, {'const': 'AD02216', 'title': 'LORETO'}, {'const': 'AD02217', 'title': 'LOUISIANA'}, {'const': 'AD02220', 'title': 'LUBRICATING OIL (AIR COMPRESSOR) NEW'}, {'const': 'AD02221', 'title': 'LUBRICATING OIL (AIR COMPRESSOR) USED'}, {'const': 'AD02240', 'title': 'LUCULA'}, {'const': 'AD02241', 'title': 'MAGNUS'}, {'const': 'AD02242', 'title': 'MAIN PASS BLOCK 306'}, {'const': 'AD02243', 'title': 'MAIN PASS BLOCK 37'}, {'const': 'AD02244', 'title': 'MALONGO'}, {'const': 'AD02245', 'title': 'MANDJI'}, {'const': 'AD02246', 'title': 'MARGHAM LIGHT'}, {'const': 'AD02247', 'title': 'MARINE DIESEL FUEL OIL'}, {'const': 'AD02250', 'title': 'MARINE INTERMEDIATE FUEL OIL'}, {'const': 'AD02251', 'title': 'MARS BLEND'}, {'const': 'AD02252', 'title': 'MARS TLP'}, {'const': 'AD02253', 'title': 'MAUREEN'}, {'const': 'AD02254', 'title': 'MAYA'}, {'const': 'AD02255', 'title': 'MAYA (1997)'}, {'const': 'AD02256', 'title': 'MEDANITO'}, {'const': 'AD02257', 'title': 'MEREY'}, {'const': 'AD02259', 'title': 'MIRI LIGHT'}, {'const': 'AD02260', 'title': 'MISSISSIPPI CANYON BLOCK 194'}, {'const': 'AD02261', 'title': 'MISSISSIPPI CANYON BLOCK 72'}, {'const': 'AD02263', 'title': 'MONTROSE'}, {'const': 'AD02264', 'title': 'MOUSSE MIX (PETAWAWA)'}, {'const': 'AD02266', 'title': 'MURBAN'}, {'const': 'AD02267', 'title': 'MURCHISON'}, {'const': 'AD02273', 'title': 'NEPTUNE SPAR'}, {'const': 'AD02275', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXP SAMPLE #1'}, {'const': 'AD02276', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXP SAMPLE #12'}, {'const': 'AD02277', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXP SAMPLE #15'}, {'const': 'AD02278', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXP SAMPLE #4'}, {'const': 'AD02279', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXP SAMPLE #5'}, {'const': 'AD02280', 'title': 'NEWFOUNDLAND OFFSHORE BURN EXP SAMPLE #7'}, {'const': 'AD02281', 'title': 'NINIAN BLEND'}, {'const': 'AD02282', 'title': 'NORMAN WELLS'}, {'const': 'AD02284', 'title': 'POINT ARGUELLO COMINGLED'}, {'const': 'AD02286', 'title': 'POINT ARGUELLO HEAVY'}, {'const': 'AD02287', 'title': 'OMAN EXPORT'}, {'const': 'AD02289', 'title': 'ORIENTE'}, {'const': 'AD02290', 'title': 'ORIMULSION-100'}, {'const': 'AD02293', 'title': 'OSEBERG'}, {'const': 'AD02294', 'title': 'PANUKE'}, {'const': 'AD02297', 'title': 'PITAS POINT'}, {'const': 'AD02298', 'title': 'PLATFORM GAIL'}, {'const': 'AD02299', 'title': 'PLATFORM HOLLY'}, {'const': 'AD02300', 'title': 'PLATFORM IRENE'}, {'const': 'AD02301', 'title': 'POINT ARGUELLO LIGHT'}, {'const': 'AD02302', 'title': 'PORT HUENEME'}, {'const': 'AD02304', 'title': 'PRUDHOE BAY'}, {'const': 'AD02305', 'title': 'PRUDHOE BAY (1995)'}, {'const': 'AD02306', 'title': 'PULAI'}, {'const': 'AD02307', 'title': 'QATAR MARINE'}, {'const': 'AD02308', 'title': 'QUA IBOE'}, {'const': 'AD02311', 'title': 'RANGELY'}, {'const': 'AD02312', 'title': 'RINCON DE LOS SAUCES'}, {'const': 'AD02314', 'title': 'ROSTAM'}, {'const': 'AD02315', 'title': 'SABLE ISLAND CONDENSATE'}, {'const': 'AD02316', 'title': 'SAHARAN BLEND'}, {'const': 'AD02317', 'title': 'SAKHALIN'}, {'const': 'AD02318', 'title': 'SALADIN'}, {'const': 'AD02319', 'title': 'SALAWATI'}, {'const': 'AD02320', 'title': 'SALMON'}, {'const': 'AD02322', 'title': 'SANGA SANGA'}, {'const': 'AD02323', 'title': 'SANTA CLARA'}, {'const': 'AD02325', 'title': 'SCOTIAN LIGHT'}, {'const': 'AD02326', 'title': 'SEPINGGAN-YAKIN MIXED (4:1)'}, {'const': 'AD02327', 'title': 'SERIA LIGHT'}, {'const': 'AD02329', 'title': 'SHENGLI'}, {'const': 'AD02330', 'title': 'SHIP SHOAL BLOCK 239'}, {'const': 'AD02331', 'title': 'SHIP SHOAL BLOCK 269'}, {'const': 'AD02332', 'title': 'SIBERIAN LIGHT'}, {'const': 'AD02333', 'title': 'SIRRI'}, {'const': 'AD02335', 'title': 'SKUA'}, {'const': 'AD02336', 'title': 'SOCKEYE'}, {'const': 'AD02337', 'title': 'SOCKEYE COMINGLED'}, {'const': 'AD02338', 'title': 'SOCKEYE SOUR'}, {'const': 'AD02339', 'title': 'SOCKEYE SWEET'}, {'const': 'AD02340', 'title': 'SOROOSH'}, {'const': 'AD02341', 'title': 'SOUEDIE'}, {'const': 'AD02344', 'title': 'SOUTH PASS BLOCK 60'}, {'const': 'AD02345', 'title': 'SOUTH PASS BLOCK 67'}, {'const': 'AD02346', 'title': 'SOUTH PASS BLOCK 93'}, {'const': 'AD02347', 'title': 'SOUTH TIMBALIER BLOCK 130'}, {'const': 'AD02349', 'title': 'SOYO BLEND'}, {'const': 'AD02351', 'title': 'STATFJORD'}, {'const': 'AD02352', 'title': 'SUMATRAN HEAVY'}, {'const': 'AD02353', 'title': 'SUMATRAN LIGHT'}, {'const': 'AD02354', 'title': 'SWANSON RIVER'}, {'const': 'AD02356', 'title': 'SYNTHETIC'}, {'const': 'AD02358', 'title': 'TAKULA'}, {'const': 'AD02359', 'title': 'TAPIS'}, {'const': 'AD02360', 'title': 'TAPIS BLEND'}, {'const': 'AD02362', 'title': 'TARTAN'}, {'const': 'AD02363', 'title': 'TEMBUNGO'}, {'const': 'AD02364', 'title': 'TERRA NOVA'}, {'const': 'AD02365', 'title': 'TERRA NOVA (1994)'}, {'const': 'AD02366', 'title': 'TERRA NOVA (PETAWAWA)'}, {'const': 'AD02367', 'title': 'TERRA NOVA (SOCSEX)'}, {'const': 'AD02368', 'title': 'THEVENARD ISLAND'}, {'const': 'AD02369', 'title': 'THISTLE'}, {'const': 'AD02370', 'title': 'TIA JUANA HEAVY'}, {'const': 'AD02371', 'title': 'TIA JUANA LIGHT'}, {'const': 'AD02373', 'title': 'TRADING BAY'}, {'const': 'AD02374', 'title': 'TRANSMOUNTAIN BLEND'}, {'const': 'AD02376', 'title': 'UDANG'}, {'const': 'AD02381', 'title': 'VASCONIA'}, {'const': 'AD02382', 'title': 'VIOSCA KNOLL BLOCK 826'}, {'const': 'AD02383', 'title': 'VIOSCA KNOLL BLOCK 990'}, {'const': 'AD02384', 'title': 'WABASCA BITUMEN'}, {'const': 'AD02385', 'title': 'WAINWRIGHT-KINSELLA'}, {'const': 'AD02386', 'title': 'WALIO'}, {'const': 'AD02387', 'title': 'WAXY LIGHT HEAVY BLEND'}, {'const': 'AD02388', 'title': 'WEST DELTA BLOCK 30'}, {'const': 'AD02390', 'title': 'WEST SAK'}, {'const': 'AD02391', 'title': 'WEST TEXAS INTERMEDIATE'}, {'const': 'AD02392', 'title': 'WEST TEXAS SOUR'}, {'const': 'AD02394', 'title': 'ZAIRE'}, {'const': 'AD02395', 'title': 'ZAKUM'}, {'const': 'AD02396', 'title': 'ZARZITINE'}, {'const': 'AD02397', 'title': 'ZUEITINA'}, {'const': 'AD02398', 'title': 'ZULUF/MARJAN'}, {'const': 'AD02401', 'title': 'GULF ALBERTA LIGHT AND MEDIUM'}, {'const': 'AD02402', 'title': 'KOAKOAK 0-22A'}, {'const': 'AD02403', 'title': 'LUCINA MARINE'}, {'const': 'AD02408', 'title': 'BELINDA, AMSA'}, {'const': 'AD02417', 'title': 'UPPER ZAKUM, AMSA'}, {'const': 'AD02426', 'title': 'HOME HEATING OIL'}, {'const': 'AD02428', 'title': 'IFO 300'}, {'const': 'AD02430', 'title': 'JP-5'}, {'const': 'AD02431', 'title': 'FUEL OIL NO.6'}, {'const': 'AD02433', 'title': 'JP-8'}, {'const': 'AD02434', 'title': 'JP-8'}, {'const': 'AD02435', 'title': 'KUWAIT'}, {'const': 'AD02436', 'title': 'DIESEL FUEL OIL NO.2 (BONDED), TESORO'}, {'const': 'AD02437', 'title': 'STAR 4, EQUILON'}, {'const': 'AD02438', 'title': 'STAR 5, EQUILON'}, {'const': 'AD02439', 'title': 'STAR 12, EQUILON'}, {'const': 'AD02440', 'title': 'SAKHALIN II'}, {'const': 'AD02441', 'title': 'ESCALANTE, ITS'}, {'const': 'AD02447', 'title': 'MARINE DIESEL, U.S. NAVY'}, {'const': 'AD02448', 'title': 'LUCKENBACH FUEL OIL'}, {'const': 'AD02450', 'title': 'SCHIEHALLION BLEND, STATOIL'}, {'const': 'AD02452', 'title': 'TROLL, STATOIL'}, {'const': 'AD02454', 'title': 'GLITNE, STATOIL'}, {'const': 'AD02455', 'title': 'NORNE, STATOIL'}, {'const': 'AD02456', 'title': 'LUFENG, STATOIL'}, {'const': 'AD02458', 'title': 'VARG, STATOIL'}, {'const': 'AD02459', 'title': 'GULLFAKS C, STATOIL'}, {'const': 'AD02460', 'title': 'GULLFAKS A, STATOIL'}, {'const': 'AD02462', 'title': 'OSEBERG BLEND, STATOIL'}, {'const': 'AD02463', 'title': 'EKOFISK BLEND, STATOIL'}, {'const': 'AD02464', 'title': 'STATFJORD BLEND, STATOIL'}, {'const': 'AD02466', 'title': 'ASGARD, STATOIL'}, {'const': 'AD02467', 'title': 'NJORD, STATOIL'}, {'const': 'AD02470', 'title': 'GIRASSOL'}, {'const': 'AD02471', 'title': 'JOTUN, OIL & GAS JOURNAL'}, {'const': 'AD02472', 'title': 'PIERCE, OIL & GAS JOURNAL'}, {'const': 'AD02473', 'title': 'TEMPA ROSSA, OIL & GAS JOURNAL'}, {'const': 'AD02474', 'title': 'ZUATA SWEET, OIL & GAS JOURNAL'}, {'const': 'AD02477', 'title': 'MILNE POINT'}, {'const': 'AD02478', 'title': 'LISBURNE'}, {'const': 'AD02479', 'title': 'ALPINE SALES OIL'}, {'const': 'AD02480', 'title': 'NORTHSTAR'}, {'const': 'AD02481', 'title': 'WEST SAK'}, {'const': 'AD02482', 'title': 'BACHAQUERO-DELAWARE RIVER, CITGO'}, {'const': 'AD02483', 'title': 'CONDENSATE (SWEET), ENCANA CORP.'}, {'const': 'AD02538', 'title': 'EAGLE FORD SHALE'}, {'const': 'AD02539', 'title': 'NAPO'}, {'const': 'AD02540', 'title': 'U.S. HIGH SWEET-CLEARBROOK'}, {'const': 'AD02541', 'title': 'ULTRA LOW SULFUR DIESEL'}, {'const': 'AD02542', 'title': 'ALPINE'}, {'const': 'AD02547', 'title': 'HOOPS BLEND, ExxonMobil'}, {'const': 'AD02548', 'title': 'AGBAMI, STATOIL'}, {'const': 'AD02549', 'title': 'ALBA'}, {'const': 'AD02550', 'title': 'ALGERIAN CONDENSATE, STATOIL'}, {'const': 'AD02551', 'title': 'ALVHEIM BLEND, STATOIL'}, {'const': 'AD02552', 'title': 'AASGARD BLEND, STATOIL'}, {'const': 'AD02553', 'title': 'AZERI BTC, STATOIL'}, {'const': 'AD02554', 'title': 'AZERI LIGHT, STATOIL'}, {'const': 'AD02555', 'title': 'CLOV, STATOIL'}, {'const': 'AD02556', 'title': 'DALIA, STATOIL'}, {'const': 'AD02557', 'title': 'DRAUGEN, STATOIL'}, {'const': 'AD02558', 'title': 'EKOFISK, STATOIL'}, {'const': 'AD02559', 'title': 'FORTIES, STATOIL'}, {'const': 'AD02560', 'title': 'GIMBO, STATOIL'}, {'const': 'AD02561', 'title': 'GIRASSOL, STATOIL'}, {'const': 'AD02562', 'title': 'GOLIAT BLEND, STATOIL'}, {'const': 'AD02563', 'title': 'GRANE BLEND, STATOIL'}, {'const': 'AD02564', 'title': 'GUDRUN BLEND, STATOIL'}, {'const': 'AD02565', 'title': 'GULLFAKS, STATOIL'}, {'const': 'AD02566', 'title': 'HEIDRUN, STATOIL'}, {'const': 'AD02567', 'title': 'HIBERNIA BLEND, STATOIL'}, {'const': 'AD02569', 'title': 'HUNGO BLEND, STATOIL'}, {'const': 'AD02570', 'title': 'ALASKA NORTH SLOPE, BP'}, {'const': 'AD02572', 'title': 'ARABIAN LIGHT'}, {'const': 'AD02579', 'title': 'ALASKA NORTH SLOPE 2019'}, {'const': 'AD02580', 'title': 'AMSA Average Very Low Sulfur Fuel Oil (VLSFO)'}, {'const': 'AD02582', 'title': 'VLSFO O-1 (AMSA)'}, {'const': 'AD02583', 'title': 'VLSFO O-2 (AMSA)'}, {'const': 'AD02584', 'title': 'VLSFO O-3 (AMSA)'}, {'const': 'AD02585', 'title': 'VLSFO O-4 (AMSA)'}, {'const': 'AD02586', 'title': 'VLSFO O-5 (AMSA)'}, {'const': 'AD02587', 'title': 'VLSFO O-6 (AMSA)'}, {'const': 'AD02588', 'title': 'VLSFO O-7 (AMSA)'}, {'const': 'AD02589', 'title': 'VLSFO O-8 (AMSA)'}, {'const': 'AD02590', 'title': 'VLSFO O-9 (AMSA)'}, {'const': 'AD02591', 'title': 'VLSFO O-10 (AMSA)'}, {'const': 'AD02592', 'title': 'VLSFO IM-5 (IMAROS)'}, {'const': 'AD02596', 'title': 'VLSFO IM-3 (IMAROS)'}, {'const': 'AD02597', 'title': 'VLSFO IM-4 (IMAROS)'}, {'const': 'AD02598', 'title': 'VLSFO IM-6 (IMAROS)'}, {'const': 'AD02600', 'title': 'VLSFO IM-8 (IMAROS)'}, {'const': 'AD02602', 'title': 'VLSFO IM-10 (IMAROS)'}, {'const': 'AD02603', 'title': 'VLSFO IM-11 (IMAROS)'}, {'const': 'AD02604', 'title': 'VLSFO IM-12 (IMAROS)'}, {'const': 'AD02605', 'title': 'VLSFO IM-13 (IMAROS)'}, {'const': 'AD02606', 'title': 'ULSFO Gas Oil (SINTEF)'}, {'const': 'AD02607', 'title': 'ULSFO Marine Gas Oil (SINTEF)'}, {'const': 'AD02608', 'title': 'ULSFO Rotterdam Diesel (SINTEF)'}, {'const': 'AD02609', 'title': 'VLSFO WRG oil, DMZ-RMA quality (SINTEF)'}, {'const': 'AD02610', 'title': 'ULSFO Heavy Distillate Marine ECA 50 (SINTEF)'}, {'const': 'AD02611', 'title': 'Ultra Low Sulphur Fuel Oil (ULSFO), RMA-quality oil (SINTEF)'}, {'const': 'AD02612', 'title': 'Nile Blend'}, {'const': 'AD02613', 'title': 'Nile Blend'}, {'const': 'EC00506', 'title': 'Alaminos Canyon Block 25'}, {'const': 'EC00507', 'title': 'Alaska North Slope [2002]'}, {'const': 'EC00511', 'title': 'Alberta Sweet Mixed Blend #4'}, {'const': 'EC00512', 'title': 'Alberta Sweet Mixed Blend #5'}, {'const': 'EC00515', 'title': 'Amauligak'}, {'const': 'EC00517', 'title': 'Anadarko HIA-376'}, {'const': 'EC00519', 'title': 'Arabian Heavy [2004]'}, {'const': 'EC00523', 'title': 'Arabian Light [2002]'}, {'const': 'EC00527', 'title': 'Atkinson'}, {'const': 'EC00539', 'title': 'Bunker C [1987]'}, {'const': 'EC00540', 'title': 'Bunker C - IFO-300 [1994]'}, {'const': 'EC00552', 'title': 'Chayvo'}, {'const': 'EC00567', 'title': 'Diesel [2002]'}, {'const': 'EC00586', 'title': 'Fuel Oil # 5'}, {'const': 'EC00593', 'title': 'Green Canyon Block 200'}, {'const': 'EC00599', 'title': 'Hebron M-04 [2005]'}, {'const': 'EC00601', 'title': 'HFO 6303 [2002]'}, {'const': 'EC00604', 'title': 'Hibernia [1999]'}, {'const': 'EC00616', 'title': 'Issungnak'}, {'const': 'EC00638', 'title': 'Mars TLP [2000]'}, {'const': 'EC00643', 'title': 'Maya [2004]'}, {'const': 'EC00647', 'title': 'Mississippi Canyon Block 807 [2002]'}, {'const': 'EC00648', 'title': 'Morpeth Block EW921'}, {'const': 'EC00654', 'title': 'Norman Wells'}, {'const': 'EC00658', 'title': 'Odoptu'}, {'const': 'EC00668', 'title': 'Petronius Block VK786A'}, {'const': 'EC00670', 'title': 'Platform Elly'}, {'const': 'EC00679', 'title': 'Prudhoe Bay [2004]'}, {'const': 'EC00690', 'title': 'Sockeye Sour'}, {'const': 'EC00696', 'title': 'South Louisiana'}, {'const': 'EC00698', 'title': 'South Louisiana'}, {'const': 'EC00721', 'title': 'Troll'}, {'const': 'EC00734', 'title': 'West Delta Block 143'}, {'const': 'EC00736', 'title': 'West Texas Intermediate [2001]'}, {'const': 'EC00738', 'title': 'White Rose [2000]'}, {'const': 'EC01172', 'title': 'Albian Heavy Synthetic'}, {'const': 'EC01346', 'title': 'Wabiska Heavy'}, {'const': 'EC01456', 'title': 'Independent Hub'}, {'const': 'EC01459', 'title': 'Neptune BHP [2009]'}, {'const': 'EC01464', 'title': 'Platform Irene'}, {'const': 'EC01465', 'title': 'Platform Irene Comingled'}, {'const': 'EC01466', 'title': 'Gail Well E010'}, {'const': 'EC01467', 'title': 'Gail Well E019'}, {'const': 'EC01482', 'title': 'Platform Ellen A038'}, {'const': 'EC01483', 'title': 'Platform Ellen A040'}, {'const': 'EC01497', 'title': 'Alaska North Slope [2010]'}, {'const': 'EC01499', 'title': 'Heritage HE 05'}, {'const': 'EC01500', 'title': 'Heritage HE 26'}, {'const': 'EC01822', 'title': 'Dos Cuadros HE-05 [2011]'}, {'const': 'EC01823', 'title': 'Dos Cuadros HE-26 [2011]'}, {'const': 'EC01950', 'title': 'Alaska North Slope [2011]'}, {'const': 'EC01951', 'title': 'DOBA'}, {'const': 'EC01952', 'title': 'Endicott'}, {'const': 'EC01953', 'title': 'Harmony'}, {'const': 'EC01955', 'title': 'IFO 180'}, {'const': 'EC01956', 'title': 'North Star'}, {'const': 'EC01957', 'title': 'Rock'}, {'const': 'EC01958', 'title': 'Terra Nova [2011]'}, {'const': 'EC01969', 'title': 'Bakken'}, {'const': 'EC02152', 'title': 'Alaska North Slope [2012]'}, {'const': 'EC02234', 'title': 'Access West Blend Winter'}, {'const': 'EC02235', 'title': 'Cold Lake Blend Winter [2013]'}, {'const': 'EC02427', 'title': 'Cold Lake Blend Summer [2014]'}, {'const': 'EC02664', 'title': 'Synthetic Bitumen Blend'}, {'const': 'EC02681', 'title': 'Sweet Synthetic Crude Oil [2015b]'}, {'const': 'EC02695', 'title': 'Sweet Synthetic Crude Oil [2015a]'}, {'const': 'EC02709', 'title': 'Western Canadian Select'}, {'const': 'EC02712', 'title': 'Cold Lake Blend Winter [2015]'}, {'const': 'EC02932', 'title': 'Bunker C MV Manolis 2015-May operation'}, {'const': 'EC03048', 'title': 'MV Arrow [2015]'}, {'const': 'EC03126', 'title': 'Rail Bitumen'}, {'const': 'EC03288', 'title': 'Husky Energy SGS'}, {'const': 'EC03629', 'title': 'Diesel Echo Bay (B5 Biodiesel)'}, {'const': 'EC04016', 'title': 'Terra Nova [2018]'}, {'const': 'EC04026', 'title': 'Marine Diesel [2018]'}, {'const': 'EC04028', 'title': 'Hibernia [2018]'}, {'const': 'EC04029', 'title': 'Hebron [2018]'}, {'const': 'EC04030', 'title': 'White Rose [2018]'}, {'const': 'EX00001', 'title': 'Aasgard Blend'}, {'const': 'EX00002', 'title': 'Alaska North Slope'}, {'const': 'EX00003', 'title': 'Azeri Light'}, {'const': 'EX00004', 'title': 'Balder Blend'}, {'const': 'EX00005', 'title': 'Banyu Urip'}, {'const': 'EX00006', 'title': 'Basrah'}, {'const': 'EX00007', 'title': 'Basrah Heavy'}, {'const': 'EX00008', 'title': 'Bonga'}, {'const': 'EX00009', 'title': 'Brent Blend'}, {'const': 'EX00010', 'title': 'CLOV'}, {'const': 'EX00011', 'title': 'Cold Lake Blend'}, {'const': 'EX00012', 'title': 'Curlew'}, {'const': 'EX00013', 'title': 'Dalia'}, {'const': 'EX00014', 'title': 'Doba Blend'}, {'const': 'EX00015', 'title': 'Ebok'}, {'const': 'EX00016', 'title': 'Ekofisk'}, {'const': 'EX00017', 'title': 'Erha'}, {'const': 'EX00018', 'title': 'Forties Blend'}, {'const': 'EX00019', 'title': 'Gindungo'}, {'const': 'EX00020', 'title': 'Gippsland Blend'}, {'const': 'EX00021', 'title': 'Girassol'}, {'const': 'EX00022', 'title': 'Gorgon'}, {'const': 'EX00023', 'title': 'Grane'}, {'const': 'EX00024', 'title': 'Gudrun Blend'}, {'const': 'EX00025', 'title': 'Gullfaks Blend'}, {'const': 'EX00026', 'title': 'HOOPS Blend'}, {'const': 'EX00027', 'title': 'Hebron'}, {'const': 'EX00028', 'title': 'Hibernia Blend'}, {'const': 'EX00029', 'title': 'Hungo Blend'}, {'const': 'EX00030', 'title': 'Jotun Blend'}, {'const': 'EX00031', 'title': 'Kearl'}, {'const': 'EX00032', 'title': 'Kissanje Blend'}, {'const': 'EX00033', 'title': 'Kutubu'}, {'const': 'EX00034', 'title': 'Marib Light'}, {'const': 'EX00035', 'title': 'Mondo'}, {'const': 'EX00036', 'title': 'Mostarda'}, {'const': 'EX00037', 'title': 'Ormen Lange'}, {'const': 'EX00038', 'title': 'Oseberg Blend'}, {'const': 'EX00039', 'title': 'Oso Condensate'}, {'const': 'EX00040', 'title': 'Pazflor'}, {'const': 'EX00041', 'title': 'Qua Iboe'}, {'const': 'EX00042', 'title': 'Sable Island'}, {'const': 'EX00043', 'title': 'Saxi Batuque'}, {'const': 'EX00044', 'title': 'Sokol'}, {'const': 'EX00045', 'title': 'Statfjord Blend'}, {'const': 'EX00046', 'title': 'Tapis'}, {'const': 'EX00047', 'title': 'Terengganu Condensate'}, {'const': 'EX00048', 'title': 'Terra Nova'}, {'const': 'EX00049', 'title': 'Thunder Horse'}, {'const': 'EX00050', 'title': 'Triton Blend'}, {'const': 'EX00051', 'title': 'Troll Blend'}, {'const': 'EX00052', 'title': 'Upper Zakum'}, {'const': 'EX00053', 'title': 'Usan'}, {'const': 'EX00054', 'title': 'Volve'}, {'const': 'EX00055', 'title': 'Woollybutt'}, {'const': 'EX00056', 'title': 'Yoho'}, {'const': 'EX00057', 'title': 'Zafiro Blend'}, {'const': 'EX00058', 'title': 'Liza'}, {'const': 'GN00001', 'title': 'Generic Condensate'}, {'const': 'GN00002', 'title': 'Generic Diesel'}, {'const': 'GN00003', 'title': 'Generic Gasoline'}, {'const': 'GN00004', 'title': 'Generic Heavy Crude'}, {'const': 'GN00005', 'title': 'Generic Jet Fuel'}, {'const': 'GN00006', 'title': 'Generic Light Crude'}, {'const': 'GN00007', 'title': 'Generic Medium Crude'}, {'const': 'LS00009', 'title': 'DMA (ULSFO)'}, {'const': 'LS00010', 'title': 'DMB (ULSFO)'}, {'const': 'NO00001', 'title': 'ALVE 2010'}, {'const': 'NO00002', 'title': 'ALVHEIM BLEND 2009'}, {'const': 'NO00003', 'title': 'ALVHEIM BOA 2009'}, {'const': 'NO00004', 'title': 'ALVHEIM KAMELEON 2009'}, {'const': 'NO00005', 'title': 'ALVHEIM KNELER 2009'}, {'const': 'NO00006', 'title': 'AVALDSNES 2012'}, {'const': 'NO00007', 'title': 'BALDER 2002'}, {'const': 'NO00008', 'title': 'BALDER BLEND 2010'}, {'const': 'NO00009', 'title': 'BRAGE 2013'}, {'const': 'NO00010', 'title': 'BREAM 2011'}, {'const': 'NO00011', 'title': 'CAURUS 2011'}, {'const': 'NO00012', 'title': 'DRAUGEN 2008'}, {'const': 'NO00013', 'title': 'EKOFISK 2002'}, {'const': 'NO00014', 'title': 'EKOFISK BLEND 2000'}, {'const': 'NO00015', 'title': 'EKOFISK BLEND 2011'}, {'const': 'NO00016', 'title': 'EKOFISK J 2015'}, {'const': 'NO00017', 'title': 'ELDFISK 2002'}, {'const': 'NO00018', 'title': 'ELDFISK B 2015'}, {'const': 'NO00019', 'title': 'ELDFISK BLEND 2011'}, {'const': 'NO00020', 'title': 'ELDFISK KOMPLEKS 2015'}, {'const': 'NO00021', 'title': 'ELLI 1999'}, {'const': 'NO00022', 'title': 'ELLI SOUTH 1999'}, {'const': 'NO00023', 'title': 'EMBLA 2002'}, {'const': 'NO00024', 'title': 'FORSETI 2002'}, {'const': 'NO00025', 'title': 'FOSSEKALL 2013'}, {'const': 'NO00026', 'title': 'FRAM 2013'}, {'const': 'NO00027', 'title': 'FROY 1996'}, {'const': 'NO00028', 'title': 'GARANTIANA 2013'}, {'const': 'NO00029', 'title': 'GAUPE 2011'}, {'const': 'NO00030', 'title': 'GJOA 2011'}, {'const': 'NO00031', 'title': 'GLITNE 2002'}, {'const': 'NO00032', 'title': 'GOLIAT BLEND 50/50 2008'}, {'const': 'NO00033', 'title': 'GOLIAT BLEND 70/30 2008'}, {'const': 'NO00034', 'title': 'GOLIAT KOBBE 2008'}, {'const': 'NO00035', 'title': 'GOLIAT REALGRUNNEN 2008'}, {'const': 'NO00036', 'title': 'GRANE 1997'}, {'const': 'NO00037', 'title': 'GROSBEAK 2012'}, {'const': 'NO00038', 'title': 'GUDRUN 2012'}, {'const': 'NO00039', 'title': 'GULLFAKS A BLEND 2010'}, {'const': 'NO00040', 'title': 'GULLFAKS C BLEND 2010'}, {'const': 'NO00041', 'title': 'GULLFAKS SOR 1996'}, {'const': 'NO00042', 'title': 'GYDA 2002'}, {'const': 'NO00043', 'title': 'HAVIS 2013'}, {'const': 'NO00044', 'title': 'HEIDRUN EXPORT BLEND 2004'}, {'const': 'NO00045', 'title': 'HEIDRUN TILJE 2004'}, {'const': 'NO00046', 'title': 'HEIDRUN AaRE 2004'}, {'const': 'NO00047', 'title': 'HULDRA KONDENSAT 1998'}, {'const': 'NO00048', 'title': 'IFO-180LS 2014'}, {'const': 'NO00049', 'title': 'IFO-180NS 2014'}, {'const': 'NO00050', 'title': 'IFO-80LS 2014'}, {'const': 'NO00051', 'title': 'IFO-380LS 2014'}, {'const': 'NO00052', 'title': 'IVAR AASEN 2012'}, {'const': 'NO00053', 'title': 'JORDBAER 2011'}, {'const': 'NO00054', 'title': 'KRISTIN 2006'}, {'const': 'NO00055', 'title': 'KVITEBJORN 2009'}, {'const': 'NO00056', 'title': 'LAVRANS 1997'}, {'const': 'NO00057', 'title': 'LILLEFRIGG KONDENSAT 1996'}, {'const': 'NO00058', 'title': 'LINERLE 2005'}, {'const': 'NO00059', 'title': 'LUNO 2011'}, {'const': 'NO00060', 'title': 'LUNO II 2014'}, {'const': 'NO00061', 'title': 'MARIA 2013'}, {'const': 'NO00062', 'title': 'MIDGARD 1991'}, {'const': 'NO00063', 'title': 'MORVIN 2008'}, {'const': 'NO00064', 'title': 'NJORD 1997'}, {'const': 'NO00065', 'title': 'NORNE 1997'}, {'const': 'NO00066', 'title': 'NORNE BLEND 2010'}, {'const': 'NO00067', 'title': 'ORMEN LANGE KONDENSAT 2008'}, {'const': 'NO00068', 'title': 'OSEBERG A 2013'}, {'const': 'NO00069', 'title': 'OSEBERG SOR 2013'}, {'const': 'NO00070', 'title': 'OSEBERG OST 2013'}, {'const': 'NO00071', 'title': 'OSELVAR 2012'}, {'const': 'NO00072', 'title': 'RINGHORNE 2002'}, {'const': 'NO00073', 'title': 'SKARFJELL 2014'}, {'const': 'NO00074', 'title': 'SKARV 2004'}, {'const': 'NO00075', 'title': 'SKARV KONDENSAT 2014'}, {'const': 'NO00076', 'title': 'SKRUGARD 2012'}, {'const': 'NO00077', 'title': 'SLEIPNER KONDENSAT 2002'}, {'const': 'NO00078', 'title': 'SLEIPNER VEST 1998'}, {'const': 'NO00079', 'title': 'SMORBUKK 2003'}, {'const': 'NO00080', 'title': 'SMORBUKK KONDENSAT 2003'}, {'const': 'NO00081', 'title': 'SMORBUKK SOR 2003'}, {'const': 'NO00082', 'title': 'SNORRE B 2004'}, {'const': 'NO00083', 'title': 'SNORRE TLP 2004'}, {'const': 'NO00084', 'title': 'SNOHVIT KONDENSAT 2001'}, {'const': 'NO00085', 'title': 'STATFJORD A 2001'}, {'const': 'NO00086', 'title': 'STATFJORD B 2001'}, {'const': 'NO00087', 'title': 'STATFJORD C 2001'}, {'const': 'NO00088', 'title': 'STAER 2010'}, {'const': 'NO00089', 'title': 'TAMBAR 2002'}, {'const': 'NO00090', 'title': 'TAU 1999'}, {'const': 'NO00091', 'title': 'TOR 2002'}, {'const': 'NO00092', 'title': 'TORDIS 2002'}, {'const': 'NO00093', 'title': 'TRESTAKK 2008'}, {'const': 'NO00094', 'title': 'TRYM KONDENSAT 2011'}, {'const': 'NO00095', 'title': 'TYRIHANS NORD 2004'}, {'const': 'NO00096', 'title': 'TYRIHANS SOR 2004'}, {'const': 'NO00097', 'title': 'ULA 1999'}, {'const': 'NO00098', 'title': 'VALE 2014'}, {'const': 'NO00099', 'title': 'VALHALL 2002'}, {'const': 'NO00100', 'title': 'VARG 2000'}, {'const': 'NO00101', 'title': 'VESLEFRIKK 2012'}, {'const': 'NO00102', 'title': 'VIGDIS 2004'}, {'const': 'NO00103', 'title': 'VILJE 2009'}, {'const': 'NO00104', 'title': 'VISUND 2009'}, {'const': 'NO00105', 'title': 'VOLUND 2010'}, {'const': 'NO00106', 'title': 'VOLVE 2006'}, {'const': 'NO00107', 'title': 'WISTING 2015'}, {'const': 'NO00108', 'title': 'AASGARD A 2003'}, {'const': 'NO00109', 'title': 'SVALIN 2014'}, {'const': 'NO00110', 'title': 'ALTA 2016'}, {'const': 'NO00111', 'title': 'DRIVIS 2017'}, {'const': 'NO00112', 'title': 'MARTIN LINGE CRUDE 2016'}, {'const': 'NO00113', 'title': 'MARTIN LINGE CONDENSATE 2016'}, {'const': 'NO00114', 'title': 'BRYNHILD CRUDE 2015'}, {'const': 'NO00115', 'title': 'BOYLA CRUDE 2016'}, {'const': 'NO00116', 'title': 'WISTING CENTRAL 2017'}, {'const': 'NO00117', 'title': 'SIGYN CONDENSATE 2017'}, {'const': 'NO00118', 'title': 'NORNE CRUDE 2017'}, {'const': 'NO00119', 'title': 'MARINE GAS OIL 500 ppm S 2017'}, {'const': 'NO00120', 'title': 'ULTRA LOW SULFUR FUEL OIL 2017'}, {'const': 'NO00121', 'title': 'HEAVY DISTILLATE MARINE ECA 50 2017'}, {'const': 'NO00122', 'title': 'ROTTERDAM DIESEL 2017'}, {'const': 'NO00123', 'title': 'GAS OIL 10 ppm S 2017'}, {'const': 'NO00124', 'title': 'WIDE RANGE GAS OIL 2017'}, {'const': 'NO00125', 'title': 'OSEBERG BLEND 2007'}, {'const': 'NO00126', 'title': 'BRASSE 2018'}, {'const': 'NO00127', 'title': 'OSEBERG C 2013'}, {'const': 'NO00128', 'title': 'VEGA CONDENSATE 2015'}, {'const': 'NO00129', 'title': 'FENJA (PIL) 2015'}, {'const': 'NO00130', 'title': 'MARULK 2014'}, {'const': 'NO00131', 'title': 'GINA KROG CRUDE 2018'}, {'const': 'NO00132', 'title': 'GUDRUN 2019'}, {'const': 'NO00133', 'title': 'ATLA KONDENSAT 2013'}, {'const': 'NO00134', 'title': 'OSEBERG SOR 2000'}, {'const': 'NO00135', 'title': 'KVITEBJORN 2019'}, {'const': 'NO00136', 'title': 'ODA 2019'}, {'const': 'NO00137', 'title': 'IRIS CONDENSATE 2020'}, {'const': 'NO00138', 'title': 'AASTA HANSTEEN BLEND 2020'}, {'const': 'NO00139', 'title': 'VISUND SOR CONDENSATE 2020'}, {'const': 'NO00140', 'title': 'VISUND CRUDE OIL 2020'}, {'const': 'NO00141', 'title': 'OSEBERG OST 1998'}, {'const': 'NO00142', 'title': 'FROSK 2020'}, {'const': 'NO00143', 'title': 'DVALIN 2020'}, {'const': 'NO00144', 'title': 'SKOGUL 2020'}, {'const': 'NO00145', 'title': 'FOGELBERG CONDENSATE 2021'}, {'const': 'NO00146', 'title': 'UTGARD CONDENSATE 2021'}, {'const': 'NO00147', 'title': 'NJORD 2003'}, {'const': 'NO00148', 'title': 'DUVA 2021'}, {'const': 'NO00149', 'title': 'VALHALL 2021'}, {'const': 'NO00150', 'title': 'SF NORD BRENT 2021'}, {'const': 'NO00151', 'title': 'SYGNA BRENT 2021'}, {'const': 'NO00152', 'title': 'ALVE 2014'}, {'const': 'NO00153', 'title': 'OSEBERG C 1995'}, {'const': 'NO00154', 'title': 'DUGONG 2022'}, {'const': 'NO00155', 'title': 'LILLE PRINSEN 2022'}, {'const': 'NO00156', 'title': 'TOR II 2022'}, {'const': 'NO00157', 'title': 'VALE 2001'}, {'const': 'NO00158', 'title': 'GOLIAT REALGRUNNEN 2001'}, {'const': 'NO00159', 'title': 'SVALE 2010'}, {'const': 'NO00160', 'title': 'BREIDABLIKK 2023'}, {'const': 'NO00162', 'title': 'YME 2023'}, {'const': 'NO00163', 'title': 'OFELIA 2023'}, {'const': 'NO00164', 'title': 'HEIDRUN AARE 2023'}, {'const': 'NO00165', 'title': 'LANGFJELLET 2023'}, {'const': 'NO00166', 'title': 'CALYPSO 2024'}, {'const': 'AD04000', 'title': 'GENERIC LIGHT CRUDE'}, {'const': 'AD04001', 'title': 'GENERIC MEDIUM CRUDE'}, {'const': 'AD04002', 'title': 'GENERIC HEAVY CRUDE'}, {'const': 'AD04003', 'title': 'GENERIC GASOLINE'}, {'const': 'AD04006', 'title': 'GENERIC FUEL OIL No.2'}, {'const': 'AD04007', 'title': 'GENERIC DIESEL'}, {'const': 'AD04008', 'title': 'GENERIC HOME HEATING OIL'}, {'const': 'AD04009', 'title': 'GENERIC INTERMEDIATE FUEL OIL 180'}, {'const': 'AD04010', 'title': 'GENERIC INTERMEDIATE FUEL OIL 300'}, {'const': 'AD04011', 'title': 'GENERIC FUEL OIL No. 6'}, {'const': 'AD04012', 'title': 'GENERIC BUNKER C'}, {'const': 'AD04013', 'title': 'GENERIC HEAVY FUEL OIL'}]}), 'output_file': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Name of file to write output to. If None, default name is used.', json_schema_extra={'ptm_level': 3}), 'output_format': FieldInfo(annotation=OutputFormatEnum, required=False, default=<OutputFormatEnum.netcdf: 'netcdf'>, description='Output file format. Options are "netcdf", "parquet", or "both".', json_schema_extra={'ptm_level': 2}), 'plots': FieldInfo(annotation=Union[dict[str, dict], str, NoneType], required=False, default=None, description='Dictionary of plots to generate using OpenDrift.', json_schema_extra={'ptm_level': 1}), 'radius': FieldInfo(annotation=float, required=False, default=1000.0, description='Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.', json_schema_extra={'ptm_level': 2, 'units': 'm'}, metadata=[Ge(ge=0.0), Le(le=1000000)]), 'radius_type': FieldInfo(annotation=RadiusTypeEnum, required=False, default=<RadiusTypeEnum.gaussian: 'gaussian'>, description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.", json_schema_extra={'ptm_level': 3}), 'run_forward': FieldInfo(annotation=bool, required=False, default=True, description='Run forward in time.', json_schema_extra={'ptm_level': 2}), 'save_interpolator': FieldInfo(annotation=bool, required=False, default=False, description='Whether to save the interpolator.'), 'seafloor_action': FieldInfo(annotation=SeafloorActionEnum, required=False, default=<SeafloorActionEnum.lift_to_seafloor: 'lift_to_seafloor'>, title='Seafloor Action', description='This controls particle behavior at the seafloor. Use `deactivate` to stick particles to the seafloor at the point of interaction. Use `lift_to_seafloor` to elevate particles up to seabed if below. User `previous` to move elements back to previous position. Use None to ignore seafloor.', json_schema_extra={'od_mapping': 'general:seafloor_action', 'ptm_level': 2}), 'seed_seafloor': FieldInfo(annotation=bool, required=False, default=False, title='Seed Seafloor', description='Elements are seeded at seafloor, and seeding depth (z) is neglected and must be None.', json_schema_extra={'od_mapping': 'seed:seafloor', 'ptm_level': 2}), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=datetime.datetime(2022, 1, 1, 0, 0), description='Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'start_time_end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 2}), 'steps': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Maximum number of steps. End of simulation will be start_time + steps * time_step.', json_schema_extra={'ptm_level': 1}, metadata=[Ge(ge=1), Le(le=10000)]), 'stokes_drift': FieldInfo(annotation=bool, required=False, default=True, title='Stokes Drift', description='Advection elements with Stokes drift (wave orbital motion).', json_schema_extra={'ptm_level': 2, 'od_mapping': 'drift:stokes_drift'}), 'time_step': FieldInfo(annotation=float, required=False, default=300, description='Interval between particles updates, in seconds.', json_schema_extra={'ptm_level': 3, 'units': 'seconds'}, metadata=[Ge(ge=0.01), Le(le=1440)]), 'time_step_output_integer': FieldInfo(annotation=int, required=False, default=12, description='Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.', json_schema_extra={'ptm_level': 3, 'units': ''}, metadata=[Ge(ge=1), Le(le=300)]), 'update_oilfilm_thickness': FieldInfo(annotation=bool, required=False, default=True, title='Update Oilfilm Thickness', description='If True, Oil film thickness is calculated at each time step. If False, oil film thickness is kept constant with value provided at seeding.', json_schema_extra={'od_mapping': 'processes:update_oilfilm_thickness', 'ptm_level': 2}), 'use_auto_landmask': FieldInfo(annotation=bool, required=False, default=False, title='Use Auto Landmask', description='If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.', json_schema_extra={'od_mapping': 'general:use_auto_landmask', 'ptm_level': 3}), 'use_cache': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use cache for storing interpolators.', json_schema_extra={'ptm_level': 3}), 'use_static_masks': FieldInfo(annotation=bool, required=False, default=False, description="If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.", json_schema_extra={'ptm_level': 3}), 'vertical_advection_at_surface': FieldInfo(annotation=bool, required=False, default=False, title='Vertical Advection At Surface', description='If vertical advection is activated, surface elements (z=0) can only be advected (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_advection_at_surface', 'ptm_level': 2}), 'vertical_mixing': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing', description='Activate vertical mixing scheme. Vertical mixing includes movement due to buoyancy and turbulent mixing.', json_schema_extra={'od_mapping': 'drift:vertical_mixing', 'ptm_level': 2}), 'vertical_mixing_at_surface': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing At Surface', description='If vertical mixing is activated, surface elements (z=0) can only be mixed (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_mixing_at_surface', 'ptm_level': 2}), 'vertical_mixing_timestep': FieldInfo(annotation=float, required=False, default=60, title='Vertical Mixing Timestep', description='Time step used for inner (fast) loop of the vertical mixing model. Set this smaller to increase frequency of vertical mixing calculation; number of loops is calculated as int(self.time_step/vertical_mixing_timestep) so vertical_mixing_timestep must be smaller than time_step.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:timestep', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=3600)]), 'wind_drift': FieldInfo(annotation=bool, required=False, default=True, title='Wind Drift', description='If on, elements at surface are moved with a fraction, the wind draft factor, of the wind speed from the surface down to the wind drift depth.', json_schema_extra={'ptm_level': 1}), 'wind_drift_depth': FieldInfo(annotation=float, required=False, default=0.1, title='Wind Drift Depth', description='The direct wind drift (windage) is linearly decreasing from the surface value (wind_drift_factor) until 0 at this depth.', json_schema_extra={'units': 'meters', 'od_mapping': 'drift:wind_drift_depth', 'ptm_level': 3}, metadata=[Ge(ge=0), Le(le=1)]), 'wind_drift_factor': FieldInfo(annotation=float, required=False, default=0.03, title='Wind Drift Factor', description='Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift. Multiply by 100 to get the percent windage.', json_schema_extra={'units': '1', 'od_mapping': 'seed:wind_drift_factor', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=0.1)]), 'wind_uncertainty': FieldInfo(annotation=float, required=False, default=0.0, title='Wind Uncertainty', description='Add gaussian perturbation with this standard deviation to wind components at each time step.', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:wind_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'z': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, title='Z', description='Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.', json_schema_extra={'units': 'm', 'ptm_level': 1, 'od_mapping': 'seed:z'}, metadata=[Ge(ge=-10000), Le(le=0)])}¶
- property model_fields_set¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params)¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(context, /)¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- number¶
- ocean_model¶
- property ocean_model_config¶
Select ocean model config based on ocean_model.
- ocean_model_local¶
- property ocean_model_simulation¶
Select ocean model simulation based on ocean_model.
- oil_film_thickness¶
- oil_type¶
- output_file¶
- output_format¶
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- classmethod parse_obj(obj)¶
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- plots¶
- radius¶
- radius_type¶
- remove_timezone_info()¶
Remove timezone information from datetime fields.
- run_forward¶
- save_interpolator¶
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')¶
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)¶
- seafloor_action¶
- property seed_flag¶
Determine seed_flag based on whether geojson is set.
- seed_seafloor¶
- select_ocean_model_simulation_on_init()¶
Select ocean model simulation based on ocean_model.
- setup_TXLA_if_used()¶
Set up TXLA if used.
- setup_interpolator()¶
Setup interpolator.
- start_time¶
- start_time_end¶
- steps¶
- stokes_drift¶
- time_step¶
- property time_step_output¶
Calculate time_step_output as time_step multiplied by time_step_output_integer.
- time_step_output_integer¶
- property timedir¶
Set timedir to 1 for forward, -1 for backward.
- classmethod update_forward_refs(**localns)¶
- update_oilfilm_thickness¶
- use_auto_landmask¶
- use_cache¶
- use_static_masks¶
- classmethod validate(value)¶
- vertical_advection_at_surface¶
- vertical_mixing¶
- vertical_mixing_at_surface¶
- vertical_mixing_timestep¶
- wind_drift¶
- wind_drift_depth¶
- wind_drift_factor¶
- wind_uncertainty¶
- z¶
- class particle_tracking_manager.models.opendrift.config_opendrift.PhytoplanktonModelConfig(*, model=ModelEnum.opendrift, lon=None, lat=None, geojson=None, start_time=datetime.datetime(2022, 1, 1, 0, 0), start_time_end=None, run_forward=True, time_step=300, time_step_output_integer=12, steps=None, duration=None, end_time=None, ocean_model='CIOFSOP', ocean_model_local=True, do3D=True, use_static_masks=False, output_file=None, output_format=OutputFormatEnum.netcdf, use_cache=True, log_level=LogLevelEnum.INFO, horizontal_diffusivity=None, stokes_drift=False, z=0, number=1, drift_model=DriftModelEnum.Phytoplankton, save_interpolator=False, interpolator_filename=None, export_variables=None, plots=None, radius=1000.0, radius_type=RadiusTypeEnum.gaussian, max_speed=20.0, use_auto_landmask=False, coastline_action=CoastlineActionEnum.stranding, current_uncertainty=0, wind_uncertainty=0, seed_seafloor=False, diffusivitymodel='windspeed_Large1994', mixed_layer_depth=20, seafloor_action=SeafloorActionEnum.lift_to_seafloor, wind_drift=True, wind_drift_depth=0.1, vertical_mixing_timestep=60, wind_drift_factor=0.0, vertical_mixing=True, vertical_mixing_at_surface=True, vertical_advection_at_surface=False, vertical_behavior_mode=VerticalBehaviorModeEnum.dvm, w_active=0.001, z_pref=-10.0, z_day=-25.0, z_night=-5.0, dz_min=1.0, dz_rel=0.1, dz_max=15.0)[source]¶
Bases:
OceanDriftModelConfigPhytoplankton (HAB) model configuration for OpenDrift.
Uses the OpenDrift LarvalFish model internally but configured for phytoplankton particle tracking (no egg stage, no growth/weight). Transport-focused with optional vertical behavior (depth or DVM).
- Attributes:
drop_varsGather variables to drop based on PTMConfig and OpenDriftConfig.
model_extraGet extra fields set during validation.
model_fields_setReturns the set of fields that have been explicitly set on this model instance.
ocean_model_configSelect ocean model config based on ocean_model.
ocean_model_simulationSelect ocean model simulation based on ocean_model.
seed_flagDetermine seed_flag based on whether geojson is set.
time_step_outputCalculate time_step_output as time_step multiplied by time_step_output_integer.
timedirSet timedir to 1 for forward, -1 for backward.
Methods
Calculate horizontal diffusivity based on ocean model.
Calculate start_time, end_time, duration, and steps based on the other parameters.
If do3D is False, set vertical_mixing to False.
Descrive how ocean_model_local is set.
Check if exactly two of start_time, end_time, duration, and steps are set.
Check if interpolator_filename is set correctly.
Check if lon and lat are set when geojson is None, and vice versa.
Check if all plots are requested.
Check if oil budget plot is requested and drift model is OpenOil.
Check if plot keys start with a PlotTypeEnum.
If seed_seafloor True, z is set to None.
If do3D is False, vertical_advection_at_surface is also False.
If do3D is True, vertical_advection_at_surface is also True.
Validate that appropriate depth parameters are set for the chosen mode.
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
If wind_drift is False, set wind_drift_factor to 0.
copy(*[, include, exclude, update, deep])Returns a copy of the model.
If simulation is backward, make time_step negative.
model_construct([_fields_set])Creates a new instance of the Model class with validated data.
model_copy(*[, update, deep])!!! abstract "Usage Documentation"
model_dump(*[, mode, include, exclude, ...])!!! abstract "Usage Documentation"
model_dump_json(*[, indent, ensure_ascii, ...])!!! abstract "Usage Documentation"
model_json_schema([by_alias, ref_template, ...])Generates a JSON schema for a model class.
model_parametrized_name(params)Compute the class name for parametrizations of generic classes.
model_post_init(context, /)Override this method to perform additional initialization after __init__ and model_construct.
model_rebuild(*[, force, raise_errors, ...])Try to rebuild the pydantic-core schema for the model.
model_validate(obj, *[, strict, extra, ...])Validate a pydantic model instance.
model_validate_json(json_data, *[, strict, ...])!!! abstract "Usage Documentation"
model_validate_strings(obj, *[, strict, ...])Validate the given object with string data against the Pydantic model.
Remove timezone information from datetime fields.
Select ocean model simulation based on ocean_model.
Set up TXLA if used.
Setup interpolator.
construct
dict
from_orm
json
parse_file
parse_obj
parse_raw
schema
schema_json
update_forward_refs
validate
- _abc_impl = <_abc._abc_data object>¶
- _calculate_keys(*args, **kwargs)¶
- _copy_and_set_values(*args, **kwargs)¶
- classmethod _get_value(*args, **kwargs)¶
- _iter(*args, **kwargs)¶
- _setattr_handler(name, value)¶
Get a handler for setting an attribute on the model instance.
- Returns:
A handler for setting an attribute on the model instance. Used for memoization of the handler. Memoizing the handlers leads to a dramatic performance improvement in __setattr__ Returns None when memoization is not safe, then the attribute is set directly.
- assign_horizontal_diffusivity()¶
Calculate horizontal diffusivity based on ocean model.
- calculate_config_times()¶
Calculate start_time, end_time, duration, and steps based on the other parameters.
- check_config_do3D()¶
If do3D is False, set vertical_mixing to False.
- check_config_ocean_model_local()¶
Descrive how ocean_model_local is set.
- check_config_time_parameters()¶
Check if exactly two of start_time, end_time, duration, and steps are set.
- check_interpolator_filename()¶
Check if interpolator_filename is set correctly.
- check_lon_lat_geojson_consistency()¶
Check if lon and lat are set when geojson is None, and vice versa.
- check_plot_all()¶
Check if all plots are requested.
- check_plot_oil()¶
Check if oil budget plot is requested and drift model is OpenOil.
- check_plot_prefix_enum()¶
Check if plot keys start with a PlotTypeEnum.
- check_seed_seafloor()¶
If seed_seafloor True, z is set to None.
- check_vertical_advection_at_surface_False()¶
If do3D is False, vertical_advection_at_surface is also False.
- check_vertical_advection_at_surface_True()¶
If do3D is True, vertical_advection_at_surface is also True.
- check_vertical_behavior_parameters()[source]¶
Validate that appropriate depth parameters are set for the chosen mode.
- check_vertical_mixing_at_surface_False()¶
If vertical_mixing is False, vertical_mixing_at_surface must also be False.
- check_vertical_mixing_at_surface_True()¶
If vertical_mixing is True, vertical_mixing_at_surface must also be True.
- check_wind_drift()¶
If wind_drift is False, set wind_drift_factor to 0.
- coastline_action¶
- classmethod construct(_fields_set=None, **values)¶
- copy(*, include=None, exclude=None, update=None, deep=False)¶
Returns a copy of the model.
- !!! warning “Deprecated”
This method is now deprecated; use model_copy instead.
If you need include or exclude, use:
`python {test="skip" lint="skip"} data = self.model_dump(include=include, exclude=exclude, round_trip=True) data = {**data, **(update or {})} copied = self.model_validate(data) `- Parameters:
include – Optional set or mapping specifying which fields to include in the copied model.
exclude – Optional set or mapping specifying which fields to exclude in the copied model.
update – Optional dictionary of field-value pairs to override field values in the copied model.
deep – If True, the values of fields that are Pydantic models will be deep-copied.
- Returns:
A copy of the model with included, excluded and updated fields as specified.
- current_uncertainty¶
- dict(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False)¶
- diffusivitymodel¶
- do3D¶
- drift_model¶
- property drop_vars¶
Gather variables to drop based on PTMConfig and OpenDriftConfig.
- duration¶
- dz_max¶
- dz_min¶
- dz_rel¶
- end_time¶
- export_variables¶
- classmethod from_orm(obj)¶
- geojson¶
- horizontal_diffusivity¶
- interpolator_filename¶
- json(*, include=None, exclude=None, by_alias=False, exclude_unset=False, exclude_defaults=False, exclude_none=False, encoder=PydanticUndefined, models_as_dict=PydanticUndefined, **dumps_kwargs)¶
- lat¶
- log_level¶
- lon¶
- match_time_step_sign_to_timedir_sign()¶
If simulation is backward, make time_step negative.
Sign of input time_step is ignored.
- max_speed¶
- mixed_layer_depth¶
- model¶
- model_computed_fields = {'ocean_model_config': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.ocean_model_registry.OceanModelConfig'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model config based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'ocean_model_simulation': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'particle_tracking_manager.config_ocean_model.OceanModelSimulation'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Select ocean model simulation based on ocean_model.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'seed_flag': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'str'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Determine seed_flag based on whether geojson is set.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'time_step_output': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Calculate time_step_output as time_step multiplied by time_step_output_integer.', deprecated=None, examples=None, json_schema_extra=None, repr=True), 'timedir': ComputedFieldInfo(wrapped_property=<property object>, return_type=<class 'int'>, alias=None, alias_priority=None, title=None, field_title_generator=None, description='Set timedir to 1 for forward, -1 for backward.', deprecated=None, examples=None, json_schema_extra=None, repr=True)}¶
- model_config = {'extra': 'forbid', 'use_enum_values': True, 'validate_default': True, 'validate_defaults': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod model_construct(_fields_set=None, **values)¶
Creates a new instance of the Model class with validated data.
Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed.
- !!! note
model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == ‘allow’, then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == ‘ignore’ (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == ‘forbid’ does not result in an error if extra values are passed, but they will be ignored.
- Parameters:
_fields_set – A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
values – Trusted or pre-validated data dictionary.
- Returns:
A new instance of the Model class with validated data.
- model_copy(*, update=None, deep=False)¶
- !!! abstract “Usage Documentation”
[model_copy](../concepts/models.md#model-copy)
Returns a copy of the model.
- !!! note
The underlying instance’s [__dict__][object.__dict__] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
- Parameters:
update – Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
deep – Set to True to make a deep copy of the model.
- Returns:
New model instance.
- model_dump(*, mode='python', include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump](../concepts/serialization.md#python-mode)
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- model_dump_json(*, indent=None, ensure_ascii=False, include=None, exclude=None, context=None, by_alias=None, exclude_unset=False, exclude_defaults=False, exclude_none=False, exclude_computed_fields=False, round_trip=False, warnings=True, fallback=None, serialize_as_any=False)¶
- !!! abstract “Usage Documentation”
[model_dump_json](../concepts/serialization.md#json-mode)
Generates a JSON representation of the model using Pydantic’s to_json method.
- Parameters:
indent – Indentation to use in the JSON output. If None is passed, the output will be compact.
ensure_ascii – If True, the output is guaranteed to have all incoming non-ASCII characters escaped. If False (the default), these characters will be output as-is.
include – Field(s) to include in the JSON output.
exclude – Field(s) to exclude from the JSON output.
context – Additional context to pass to the serializer.
by_alias – Whether to serialize using field aliases.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
exclude_computed_fields – Whether to exclude computed fields. While this can be useful for round-tripping, it is usually recommended to use the dedicated round_trip parameter instead.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
fallback – A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A JSON string representation of the model.
- property model_extra¶
Get extra fields set during validation.
- Returns:
A dictionary of extra fields, or None if config.extra is not set to “allow”.
- model_fields = {'coastline_action': FieldInfo(annotation=CoastlineActionEnum, required=False, default=<CoastlineActionEnum.stranding: 'stranding'>, title='Coastline Action', description='This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.', json_schema_extra={'od_mapping': 'general:coastline_action', 'ptm_level': 2}), 'current_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Current Uncertainty', description='Add gaussian perturbation with this standard deviation to current components at each time step', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:current_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'diffusivitymodel': FieldInfo(annotation=DiffusivityModelEnum, required=False, default='windspeed_Large1994', title='Diffusivity model', description='Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback. Parameterizations based on wind speed are also available.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:diffusivitymodel', 'ptm_level': 3}), 'do3D': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to run drifters in 3D, by default False for most drift models.', json_schema_extra={'ptm_level': 1}), 'drift_model': FieldInfo(annotation=DriftModelEnum, required=False, default=<DriftModelEnum.Phytoplankton: 'Phytoplankton'>), 'duration': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, description='Duration should be input as a string of ISO 8601. The length of the simulation. steps, end_time, or duration must be input by user.', json_schema_extra={'ptm_level': 1}), 'dz_max': FieldInfo(annotation=float, required=False, default=15.0, title='Max Band Half-Width', description='Maximum half-width for depth bands (internal parameter).', json_schema_extra={'units': 'm', 'od_mapping': 'biology:dz_max', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=1000)]), 'dz_min': FieldInfo(annotation=float, required=False, default=1.0, title='Min Band Half-Width', description='Minimum half-width for depth bands (internal parameter).', json_schema_extra={'units': 'm', 'od_mapping': 'biology:dz_min', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=100)]), 'dz_rel': FieldInfo(annotation=float, required=False, default=0.1, title='Relative Band Factor', description='Relative depth band expansion factor (internal parameter).', json_schema_extra={'units': 'fraction', 'od_mapping': 'biology:dz_rel', 'ptm_level': 3}, metadata=[Ge(ge=0.0), Le(le=1.0)]), 'end_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'export_variables': FieldInfo(annotation=Union[list[str], NoneType], required=False, default=None, description="List of variables to export. Options available with `m.all_export_variables` for a given `drift_model`. ['lon', 'lat', 'ID', 'status', 'z'] will always be exported. Default of None means all possible variables are exported.", json_schema_extra={'ptm_level': 3}), 'geojson': FieldInfo(annotation=Union[dict, NoneType], required=False, default=None, description='GeoJSON describing a polygon within which to seed drifters; must contain "geometry". If this is set, `lon` and `lat` should be None.', json_schema_extra={'ptm_level': 1}), 'horizontal_diffusivity': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, title='Horizontal Diffusivity', description='Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.', json_schema_extra={'units': 'm2/s', 'ptm_level': 2, 'od_mapping': 'environment:constant:horizontal_diffusivity'}, metadata=[Ge(ge=0), Le(le=100000)]), 'interpolator_filename': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Filename to save interpolator to or read interpolator from. Exclude suffix (which should be .pickle).', json_schema_extra={'ptm_level': 3}), 'lat': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central latitude for seeding drifters. If this is set, `lon` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_north'}, metadata=[Ge(ge=-90), Le(le=90)]), 'log_level': FieldInfo(annotation=LogLevelEnum, required=False, default=<LogLevelEnum.INFO: 'INFO'>, description='Log verbosity', json_schema_extra={'ptm_level': 3}), 'lon': FieldInfo(annotation=Union[float, NoneType], required=False, default=None, description='Central longitude for seeding drifters. If this is set, `lat` should also be set, and `geojson` should be None.', json_schema_extra={'ptm_level': 1, 'units': 'degrees_east'}, metadata=[Ge(ge=-180), Le(le=180)]), 'max_speed': FieldInfo(annotation=float, required=False, default=20.0, title='Maximum speed', description='Typical maximum speed of elements, used to estimate reader buffer size', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:max_speed', 'ptm_level': 1}, metadata=[Gt(gt=0)]), 'mixed_layer_depth': FieldInfo(annotation=float, required=False, default=20, title='Mixed Layer Depth', description='mixed_layer_depth controls how deep the vertical diffusivity profile reaches. This sets the fallback value for ocean_mixed_layer_thickness if not available from any reader.', json_schema_extra={'units': 'm', 'od_mapping': 'environment:constant:ocean_mixed_layer_thickness', 'ptm_level': 3}, metadata=[Ge(ge=0.0)]), 'model': FieldInfo(annotation=ModelEnum, required=False, default=<ModelEnum.opendrift: 'opendrift'>, description='Lagrangian model software to use for simulation.', json_schema_extra={'ptm_level': 1}), 'number': FieldInfo(annotation=int, required=False, default=1, title='Number', description='The number of elements for the simulation.', json_schema_extra={'units': 1, 'ptm_level': 1, 'od_mapping': 'seed:number'}, metadata=[Ge(ge=1)]), 'ocean_model': FieldInfo(annotation=OceanModelEnum, required=False, default='CIOFSOP', description='Name of ocean model to use for driving drifter simulation.', json_schema_extra={'ptm_level': 1}), 'ocean_model_local': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use local version of known `ocean_model` instead of remote version.', json_schema_extra={'ptm_level': 3}), 'output_file': FieldInfo(annotation=Union[PathLike[str], NoneType], required=False, default=None, description='Name of file to write output to. If None, default name is used.', json_schema_extra={'ptm_level': 3}), 'output_format': FieldInfo(annotation=OutputFormatEnum, required=False, default=<OutputFormatEnum.netcdf: 'netcdf'>, description='Output file format. Options are "netcdf", "parquet", or "both".', json_schema_extra={'ptm_level': 2}), 'plots': FieldInfo(annotation=Union[dict[str, dict], str, NoneType], required=False, default=None, description='Dictionary of plots to generate using OpenDrift.', json_schema_extra={'ptm_level': 1}), 'radius': FieldInfo(annotation=float, required=False, default=1000.0, description='Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.', json_schema_extra={'ptm_level': 2, 'units': 'm'}, metadata=[Ge(ge=0.0), Le(le=1000000)]), 'radius_type': FieldInfo(annotation=RadiusTypeEnum, required=False, default=<RadiusTypeEnum.gaussian: 'gaussian'>, description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.", json_schema_extra={'ptm_level': 3}), 'run_forward': FieldInfo(annotation=bool, required=False, default=True, description='Run forward in time.', json_schema_extra={'ptm_level': 2}), 'save_interpolator': FieldInfo(annotation=bool, required=False, default=False, description='Whether to save the interpolator.'), 'seafloor_action': FieldInfo(annotation=SeafloorActionEnum, required=False, default=<SeafloorActionEnum.lift_to_seafloor: 'lift_to_seafloor'>, title='Seafloor Action', description='This controls particle behavior at the seafloor. Use `deactivate` to stick particles to the seafloor at the point of interaction. Use `lift_to_seafloor` to elevate particles up to seabed if below. User `previous` to move elements back to previous position. Use None to ignore seafloor.', json_schema_extra={'od_mapping': 'general:seafloor_action', 'ptm_level': 2}), 'seed_seafloor': FieldInfo(annotation=bool, required=False, default=False, title='Seed Seafloor', description='Elements are seeded at seafloor, and seeding depth (z) is neglected and must be None.', json_schema_extra={'od_mapping': 'seed:seafloor', 'ptm_level': 2}), 'start_time': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=datetime.datetime(2022, 1, 1, 0, 0), description='Start time for drifter simulation. start_time or end_time must be input. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 1}), 'start_time_end': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None, description='If used, this creates a range of start times for drifters, starting with `start_time` and ending with `start_time_end`. Drifters will be initialized linearly between the two start times. If a timezone is included, it will be used and the time will be converted to UTC which is the same timezone as the models.', json_schema_extra={'ptm_level': 2}), 'steps': FieldInfo(annotation=Union[int, NoneType], required=False, default=None, description='Maximum number of steps. End of simulation will be start_time + steps * time_step.', json_schema_extra={'ptm_level': 1}, metadata=[Ge(ge=1), Le(le=10000)]), 'stokes_drift': FieldInfo(annotation=bool, required=False, default=False, title='Stokes Drift', description='Advection elements with Stokes drift (wave orbital motion).', json_schema_extra={'ptm_level': 2, 'od_mapping': 'drift:stokes_drift'}), 'time_step': FieldInfo(annotation=float, required=False, default=300, description='Interval between particles updates, in seconds.', json_schema_extra={'ptm_level': 3, 'units': 'seconds'}, metadata=[Ge(ge=0.01), Le(le=1440)]), 'time_step_output_integer': FieldInfo(annotation=int, required=False, default=12, description='Time step at which element properties are stored and eventually written to file, calculated as time_step*time_step_output_integer. This must be an integer multiple of this.', json_schema_extra={'ptm_level': 3, 'units': ''}, metadata=[Ge(ge=1), Le(le=300)]), 'use_auto_landmask': FieldInfo(annotation=bool, required=False, default=False, title='Use Auto Landmask', description='If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.', json_schema_extra={'od_mapping': 'general:use_auto_landmask', 'ptm_level': 3}), 'use_cache': FieldInfo(annotation=bool, required=False, default=True, description='Set to True to use cache for storing interpolators.', json_schema_extra={'ptm_level': 3}), 'use_static_masks': FieldInfo(annotation=bool, required=False, default=False, description="If True, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to False) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.", json_schema_extra={'ptm_level': 3}), 'vertical_advection_at_surface': FieldInfo(annotation=bool, required=False, default=False, title='Vertical Advection At Surface', description='If vertical advection is activated, surface elements (z=0) can only be advected (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_advection_at_surface', 'ptm_level': 2}), 'vertical_behavior_mode': FieldInfo(annotation=VerticalBehaviorModeEnum, required=False, default=<VerticalBehaviorModeEnum.dvm: 'dvm'>, title='Vertical Behavior Mode', description='Vertical behavior mode. none: passive. depth: maintain preferred depth band. dvm: diel vertical migration.', json_schema_extra={'od_mapping': 'biology:vertical_behavior_mode', 'ptm_level': 1}), 'vertical_mixing': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing', description='Activate vertical mixing scheme. Vertical mixing includes movement due to buoyancy and turbulent mixing.', json_schema_extra={'od_mapping': 'drift:vertical_mixing', 'ptm_level': 2}), 'vertical_mixing_at_surface': FieldInfo(annotation=bool, required=False, default=True, title='Vertical Mixing At Surface', description='If vertical mixing is activated, surface elements (z=0) can only be mixed (downwards) if this setting it True.', json_schema_extra={'od_mapping': 'drift:vertical_mixing_at_surface', 'ptm_level': 2}), 'vertical_mixing_timestep': FieldInfo(annotation=float, required=False, default=60, title='Vertical Mixing Timestep', description='Time step used for inner (fast) loop of the vertical mixing model. Set this smaller to increase frequency of vertical mixing calculation; number of loops is calculated as int(self.time_step/vertical_mixing_timestep) so vertical_mixing_timestep must be smaller than time_step.', json_schema_extra={'units': 'seconds', 'od_mapping': 'vertical_mixing:timestep', 'ptm_level': 3}, metadata=[Ge(ge=0.1), Le(le=3600)]), 'w_active': FieldInfo(annotation=float, required=False, default=0.001, title='Vertical Speed', description='Maximum active vertical positioning speed (effective swimming/buoyancy regulation).', json_schema_extra={'units': 'm/s', 'od_mapping': 'biology:w_active', 'ptm_level': 1}, metadata=[Ge(ge=0.0), Le(le=1.0)]), 'wind_drift': FieldInfo(annotation=bool, required=False, default=True, title='Wind Drift', description='If on, elements at surface are moved with a fraction, the wind draft factor, of the wind speed from the surface down to the wind drift depth.', json_schema_extra={'ptm_level': 1}), 'wind_drift_depth': FieldInfo(annotation=float, required=False, default=0.1, title='Wind Drift Depth', description='The direct wind drift (windage) is linearly decreasing from the surface value (wind_drift_factor) until 0 at this depth.', json_schema_extra={'units': 'meters', 'od_mapping': 'drift:wind_drift_depth', 'ptm_level': 3}, metadata=[Ge(ge=0), Le(le=1)]), 'wind_drift_factor': FieldInfo(annotation=float, required=False, default=0.0, title='Wind Drift Factor', description='Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift. Multiply by 100 to get the percent windage.', json_schema_extra={'units': '1', 'od_mapping': 'seed:wind_drift_factor', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=0.1)]), 'wind_uncertainty': FieldInfo(annotation=float, required=False, default=0, title='Wind Uncertainty', description='Add gaussian perturbation with this standard deviation to wind components at each time step.', json_schema_extra={'units': 'm/s', 'od_mapping': 'drift:wind_uncertainty', 'ptm_level': 2}, metadata=[Ge(ge=0), Le(le=5)]), 'z': FieldInfo(annotation=Union[float, NoneType], required=False, default=0, title='Z', description='Depth below sea level where elements are released. This depth is neglected if seafloor seeding is set selected.', json_schema_extra={'units': 'm', 'ptm_level': 1, 'od_mapping': 'seed:z'}, metadata=[Ge(ge=-10000), Le(le=0)]), 'z_day': FieldInfo(annotation=float, required=False, default=-25.0, title='Day Depth', description="Target depth during daytime for DVM mode (negative down from surface). Used when vertical_behavior_mode is 'dvm'.", json_schema_extra={'units': 'm', 'od_mapping': 'biology:z_day', 'ptm_level': 1}, metadata=[Ge(ge=-10000), Le(le=0.0)]), 'z_night': FieldInfo(annotation=float, required=False, default=-5.0, title='Night Depth', description="Target depth during nighttime for DVM mode (negative down from surface). Used when vertical_behavior_mode is 'dvm'.", json_schema_extra={'units': 'm', 'od_mapping': 'biology:z_night', 'ptm_level': 1}, metadata=[Ge(ge=-10000), Le(le=0.0)]), 'z_pref': FieldInfo(annotation=float, required=False, default=-10.0, title='Preferred Depth', description="Preferred depth for depth mode (negative down from surface). Used when vertical_behavior_mode is 'depth'.", json_schema_extra={'units': 'm', 'od_mapping': 'biology:z_pref', 'ptm_level': 1}, metadata=[Ge(ge=-10000), Le(le=0.0)])}¶
- property model_fields_set¶
Returns the set of fields that have been explicitly set on this model instance.
- Returns:
- A set of strings representing the fields that have been set,
i.e. that were not filled from defaults.
- classmethod model_json_schema(by_alias=True, ref_template='#/$defs/{model}', schema_generator=<class 'pydantic.json_schema.GenerateJsonSchema'>, mode='validation', *, union_format='any_of')¶
Generates a JSON schema for a model class.
- Parameters:
by_alias – Whether to use attribute aliases or not.
ref_template – The reference template.
union_format –
The format to use when combining schemas from unions together. Can be one of:
’any_of’: Use the [anyOf](https://json-schema.org/understanding-json-schema/reference/combining#anyOf)
keyword to combine schemas (the default). - ‘primitive_type_array’: Use the [type](https://json-schema.org/understanding-json-schema/reference/type) keyword as an array of strings, containing each type of the combination. If any of the schemas is not a primitive type (string, boolean, null, integer or number) or contains constraints/metadata, falls back to any_of.
schema_generator – To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
mode – The mode in which to generate the schema.
- Returns:
The JSON schema for the given model class.
- classmethod model_parametrized_name(params)¶
Compute the class name for parametrizations of generic classes.
This method can be overridden to achieve a custom naming scheme for generic BaseModels.
- Parameters:
params – Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
- Returns:
String representing the new class where params are passed to cls as type variables.
- Raises:
TypeError – Raised when trying to generate concrete names for non-generic models.
- model_post_init(context, /)¶
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- classmethod model_rebuild(*, force=False, raise_errors=True, _parent_namespace_depth=2, _types_namespace=None)¶
Try to rebuild the pydantic-core schema for the model.
This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
- Parameters:
force – Whether to force the rebuilding of the model schema, defaults to False.
raise_errors – Whether to raise errors, defaults to True.
_parent_namespace_depth – The depth level of the parent namespace, defaults to 2.
_types_namespace – The types namespace, defaults to None.
- Returns:
Returns None if the schema is already “complete” and rebuilding was not required. If rebuilding _was_ required, returns True if rebuilding was successful, otherwise False.
- classmethod model_validate(obj, *, strict=None, extra=None, from_attributes=None, context=None, by_alias=None, by_name=None)¶
Validate a pydantic model instance.
- Parameters:
obj – The object to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
from_attributes – Whether to extract data from object attributes.
context – Additional context to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Raises:
ValidationError – If the object could not be validated.
- Returns:
The validated model instance.
- classmethod model_validate_json(json_data, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
- !!! abstract “Usage Documentation”
[JSON Parsing](../concepts/json.md#json-parsing)
Validate the given JSON data against the Pydantic model.
- Parameters:
json_data – The JSON data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- Raises:
ValidationError – If json_data is not a JSON string or the object could not be validated.
- classmethod model_validate_strings(obj, *, strict=None, extra=None, context=None, by_alias=None, by_name=None)¶
Validate the given object with string data against the Pydantic model.
- Parameters:
obj – The object containing string data to validate.
strict – Whether to enforce types strictly.
extra – Whether to ignore, allow, or forbid extra data during model validation. See the [extra configuration value][pydantic.ConfigDict.extra] for details.
context – Extra variables to pass to the validator.
by_alias – Whether to use the field’s alias when validating against the provided input data.
by_name – Whether to use the field’s name when validating against the provided input data.
- Returns:
The validated Pydantic model.
- number¶
- ocean_model¶
- property ocean_model_config¶
Select ocean model config based on ocean_model.
- ocean_model_local¶
- property ocean_model_simulation¶
Select ocean model simulation based on ocean_model.
- output_file¶
- output_format¶
- classmethod parse_file(path, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- classmethod parse_obj(obj)¶
- classmethod parse_raw(b, *, content_type=None, encoding='utf8', proto=None, allow_pickle=False)¶
- plots¶
- radius¶
- radius_type¶
- remove_timezone_info()¶
Remove timezone information from datetime fields.
- run_forward¶
- save_interpolator¶
- classmethod schema(by_alias=True, ref_template='#/$defs/{model}')¶
- classmethod schema_json(*, by_alias=True, ref_template='#/$defs/{model}', **dumps_kwargs)¶
- seafloor_action¶
- property seed_flag¶
Determine seed_flag based on whether geojson is set.
- seed_seafloor¶
- select_ocean_model_simulation_on_init()¶
Select ocean model simulation based on ocean_model.
- setup_TXLA_if_used()¶
Set up TXLA if used.
- setup_interpolator()¶
Setup interpolator.
- start_time¶
- start_time_end¶
- steps¶
- stokes_drift¶
- time_step¶
- property time_step_output¶
Calculate time_step_output as time_step multiplied by time_step_output_integer.
- time_step_output_integer¶
- property timedir¶
Set timedir to 1 for forward, -1 for backward.
- classmethod update_forward_refs(**localns)¶
- use_auto_landmask¶
- use_cache¶
- use_static_masks¶
- classmethod validate(value)¶
- vertical_advection_at_surface¶
- vertical_behavior_mode¶
- vertical_mixing¶
- vertical_mixing_at_surface¶
- vertical_mixing_timestep¶
- w_active¶
- wind_drift¶
- wind_drift_depth¶
- wind_drift_factor¶
- wind_uncertainty¶
- z¶
- z_day¶
- z_night¶
- z_pref¶