gnome.weatherers.roc

oil removal from various cleanup options add these as weatherers

Module Contents

Classes

Response

Base Weathering agent. This is almost exactly like the base Mover

Platform

A class for assigning a unique ID for an object

Disperse

Base Weathering agent. This is almost exactly like the base Mover

Burn

Base Weathering agent. This is almost exactly like the base Mover

Skim

Base Weathering agent. This is almost exactly like the base Mover

Attributes

_valid_dist_units

_valid_vel_units

_valid_vol_units

_valid_dis_units

_valid_time_units

_valid_oil_concentration_units

_valid_concentration_units

d

gnome.weatherers.roc._valid_dist_units
gnome.weatherers.roc._valid_vel_units
gnome.weatherers.roc._valid_vol_units
gnome.weatherers.roc._valid_dis_units
gnome.weatherers.roc._valid_time_units
gnome.weatherers.roc._valid_oil_concentration_units
gnome.weatherers.roc._valid_concentration_units
class gnome.weatherers.roc.Response(timeseries=None, **kwargs)

Bases: gnome.weatherers.Weatherer

Base Weathering agent. This is almost exactly like the base Mover in the way that it acts upon the model. It contains the same API as the mover as well. Not Serializable since it does is partial implementation

Base weatherer class; defines the API for all weatherers Passes optional arguments to base (Process) class via super. See base class for optional arguments: gnome.movers.mover.Process

adds ‘mass_components’, ‘mass’ to array_types since all weatherers need these.

property units
_oc_list = ['timeseries']
_schema
_get_thickness(sc)
get(attr, unit=None)
set(attr, value, unit)
_is_active(model_time, time_step)
_setup_report(sc)
_get_substance(sc)

return a single substance - recovery options only know about the total amount removed. Unclear how to assign this to multiple substances for now, just log an error if more than one substance is present

_remove_mass_simple(data, amount)
_remove_mass_indices(data, amounts, indices)
index_of(time)

Returns the index of the timeseries entry that the time specified is within. If it is not in one of the intervals, -1 will be returned

next_interval_index(time)

returns the index of the next interval, even if outside interval. returns None if there is no next interval

time_to_next_interval(time)

if within an interval, returns time left in the interval. if between intervals, returns time until start of next interval if past end, or response deactivated, return None

is_operating(time)
_no_op_step()
class gnome.weatherers.roc.Platform(units=None, type='Platform', **kwargs)

Bases: gnome.gnomeobject.GnomeId

A class for assigning a unique ID for an object

_attr
_si_units
_units_type
base_dir
_schema
get(attr, unit=None)
set(attr, value, unit)
release_rate(dosage, unit='gal/acre')

return unit = gal/min

one_way_transit_time(dist, unit='nm', payload=False)

return unit = sec

max_dosage()

return unit = gal/acre

min_dosage()

return unit = gal/acre

cascade_time(dist, unit='nm', payload=False)

return unit = sec

max_onsite_time(dist, simul=False)

return time in sec

num_passes_possible(time, pass_len, pass_type)

In a given time (sec) compute maximum number of complete passes before needing to return to base.

A pass consists of an approach, spray, u-turn, and reposition.

refuel_reload(simul=False)

return unit = sec

pass_duration(pass_len, pass_type, units='nm')

pass_len in nm return in sec

pass_duration_tuple(pass_len, pass_type, units='nm')
sortie_possible(time_avail, transit, pass_len)
eff_pump_rate(dosage, unit='gal/acre')

given a dosage, determine the pump rate necessary given the airspeed and area covered in a pass

return value = m^3/s

spray_time_fraction(pass_len, pass_type, units='nm')
class gnome.weatherers.roc.Disperse(transit=None, pass_length=4, dosage=None, dosage_type='auto', cascade_on=False, cascade_distance=None, loading_type='simultaneous', pass_type='bidirectional', disp_oil_ratio=None, disp_eff=None, platform=None, units=None, wind=None, onsite_reload_refuel=False, **kwargs)

Bases: Response

Base Weathering agent. This is almost exactly like the base Mover in the way that it acts upon the model. It contains the same API as the mover as well. Not Serializable since it does is partial implementation

Base weatherer class; defines the API for all weatherers Passes optional arguments to base (Process) class via super. See base class for optional arguments: gnome.movers.mover.Process

adds ‘mass_components’, ‘mass’ to array_types since all weatherers need these.

_attr
_si_units
_units_type
_ref_as = 'roc_disperse'
_req_refs = ['wind']
_schema
wind_eff_list = [15, 30, 45, 60, 70, 78, 80, 82, 83, 84, 84, 84, 84, 84, 83, 83, 82, 80, 79, 78, 77, 75, 73, 71,...
visc_eff_table
get_mission_data(dosage=None, area=None, pass_len=None, efficiency=None, units=None)

Given a dosage and an area to spray, will return a tuple of information as follows: Minimize number of passes by using high swath_width. If pump rate cannot get to the dosage necessary, reduce the swath width until it can. Default units are (‘gal/acre’, ‘m^3, ‘nm’, percent)

Return tuple is as below (num_passes, disp/pass, oil/pass) (number, gal, ft, gal/min)

prepare_for_model_run(sc)

Override for weatherers so they can initialize correct ‘mass_balance’ key and set initial value to 0.0

dosage_from_thickness(sc)
get_disp_eff_avg(sc, model_time)
get_disp_eff(sc, model_time)
prepare_for_model_step(sc, time_step, model_time)
simulate_boat(sc, time_step, model_time)
simulate_plane(sc, time_step, model_time)
reset_for_return_to_base(model_time, message)
update_time(time_remaining, model_time, time_step)
dispersable_oil_idxs(sc)
dispersable_oil_amount(sc, units='gal')
weather_elements(sc, time_step, model_time)

Run the equivalent of get_move for weathering processes. It modifies the SpillContainer’s data arrays; most weatherers update ‘mass_components’ and ‘mass’

Some objects do not implement this since they update arrays like ‘area’ in model_step_is_done()

class gnome.weatherers.roc.Burn(offset=None, boom_length=None, boom_draft=None, speed=None, throughput=None, burn_efficiency_type=None, units=_si_units, **kwargs)

Bases: Response

Base Weathering agent. This is almost exactly like the base Mover in the way that it acts upon the model. It contains the same API as the mover as well. Not Serializable since it does is partial implementation

Base weatherer class; defines the API for all weatherers Passes optional arguments to base (Process) class via super. See base class for optional arguments: gnome.movers.mover.Process

adds ‘mass_components’, ‘mass’ to array_types since all weatherers need these.

_si_units
_units_type
_ref_as = 'roc_burn'
_schema
prepare_for_model_run(sc)

Override for weatherers so they can initialize correct ‘mass_balance’ key and set initial value to 0.0

prepare_for_model_step(sc, time_step, model_time)
  1. set ‘active’ flag based on timeseries and model_time

  2. Mark LEs to be burned, do them in order right now. assume all LEs that are released together will be burned together since they would be closer to each other in position.

_collect(sc, time_step, model_time)
_transit(sc, time_step, model_time)
_burn(sc, time_step, model_time)
_clean(sc, time_step, model_time)
weather_elements(sc, time_step, model_time)

Remove mass from each le equally for now, no flagging for not just make sure it’s from floating oil.

class gnome.weatherers.roc.Skim(speed=None, storage=None, swath_width=None, group=None, throughput=None, nameplate_pump=None, skim_efficiency_type=None, recovery=None, recovery_ef=None, decant=None, decant_pump=None, discharge_pump=None, rig_time=None, transit_time=None, units=_si_units, **kwargs)

Bases: Response

Base Weathering agent. This is almost exactly like the base Mover in the way that it acts upon the model. It contains the same API as the mover as well. Not Serializable since it does is partial implementation

Base weatherer class; defines the API for all weatherers Passes optional arguments to base (Process) class via super. See base class for optional arguments: gnome.movers.mover.Process

adds ‘mass_components’, ‘mass’ to array_types since all weatherers need these.

_si_units
_units_type
_schema
prepare_for_model_run(sc)

Override for weatherers so they can initialize correct ‘mass_balance’ key and set initial value to 0.0

prepare_for_model_step(sc, time_step, model_time)

sets active flag based on time_span and on flag. Object is active if following hold and ‘on’ is True:

  1. active start <= (model_time + time_step/2) so object is on for more than half the timestep

  2. (model_time + time_step/2) <= active_stop so again the object is on for at least half the time step flag to true.

Parameters:
  • sc – an instance of gnome.spill_container.SpillContainer class

  • time_step – time step in seconds

  • model_time_datetime – current model time as datetime object

_collect(sc, time_step, model_time)
_transit(sc, time_step, model_time)
_offload(sc, time_step, model_time)
weather_elements(sc, time_step, model_time)

Remove mass from each le equally for now, no flagging for now just make sure the mass is from floating oil.

_getRecoveryEfficiency()
gnome.weatherers.roc.d