gnome.weatherers.roc

oil removal from various cleanup options add these as weatherers

Attributes

d

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

Module Contents

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.

timeseries = None
property units
get(attr, unit=None)
set(attr, value, unit)
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)
class gnome.weatherers.roc.Platform(units=None, type='Platform', **kwargs)

Bases: gnome.gnomeobject.GnomeId

A class for assigning a unique ID for an object

base_dir
js
units = None
type = 'Platform'
disp_remaining = 0
cur_pump_rate = 0
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.

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
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 = 20
onsite_reload_refuel = False
disp_eff = None
wind = None
cur_state = None
oil_treated_this_timestep = 0
report = []
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.

units
offset = None
boom_length = None
boom_draft = None
speed = None
throughput = None
burn_efficiency_type = None
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.

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.

speed = None
storage = None
swath_width = None
group = None
throughput = None
nameplate_pump = None
recovery = None
recovery_ef = None
decant = None
decant_pump = None
rig_time = None
discharge_pump = None
skim_efficiency_type = None
transit_time = None
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

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.

gnome.weatherers.roc.d