gnome.outputters.shape

Shapefile Outputter

Classes

ShapeOutput

class that outputs GNOME results (particles) in a shapefile format.

Module Contents

class gnome.outputters.shape.ShapeOutput(filename, zip_output=True, include_certain_boundary=False, certain_boundary_separate_by_spill=True, certain_boundary_hull_ratio=0.5, certain_boundary_hull_allow_holes=False, include_uncertain_boundary=True, include_certain_in_uncertain_boundary=True, uncertain_boundary_separate_by_spill=True, uncertain_boundary_hull_ratio=0.5, uncertain_boundary_hull_allow_holes=False, timeoffset=None, surface_conc='kde', **kwargs)

Bases: gnome.outputters.outputter.Outputter

class that outputs GNOME results (particles) in a shapefile format.

Parameters:
  • filename – Full path and basename of the shape file.

  • zip_output=True – Whether to zip up the output shape files.

  • surface_conc="kde" – Method to use to compute surface concentration current options are: ‘kde’ and None

time_formatter = '%m/%d/%Y %H:%M'
filenamestem
filedir = ''
tempdir
shapefile_name_certain
shapefile_name_certain_boundary
shapefile_name_uncertain
shapefile_name_uncertain_boundary
timeoffset = None
zip_output = True
include_certain_boundary = False
certain_boundary_separate_by_spill = True
certain_boundary_hull_ratio = 0.5
certain_boundary_hull_allow_holes = False
include_uncertain_boundary = True
include_certain_in_uncertain_boundary = True
uncertain_boundary_separate_by_spill = True
uncertain_boundary_hull_ratio = 0.5
uncertain_boundary_hull_allow_holes = False
shapefile_builder_certain
shapefile_builder_certain_boundary
shapefile_builder_uncertain
shapefile_builder_uncertain_boundary
prepare_for_model_run(model_start_time, spills, uncertain=False, **kwargs)

If uncertainty is on, then SpillContainerPair object contains identical _data_arrays in both certain and uncertain SpillContainer’s, the data itself is different, but they contain the same type of data arrays. If uncertain, then data arrays for uncertain spill container are written.

write_output(step_num, islast_step=False)

Dump a timestep’s data into the shapefile

post_model_run()

The final step to wrap everything up

create_bundle(uncertain)

Create a shapefile bundle including both certain and uncertain shapefiles

rewind()

reset a few parameter and call base class rewind to reset internal variables.

clean_output_files()

deletes ouput files that may be around called by prepare_for_model_run here in case it needs to be called from elsewhere