:py:mod:`gnome.outputters.kmz` ============================== .. py:module:: gnome.outputters.kmz .. autoapi-nested-parse:: kmz outputter Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: gnome.outputters.kmz.KMZOutput Attributes ~~~~~~~~~~ .. autoapisummary:: gnome.outputters.kmz.DOT gnome.outputters.kmz.X .. py:class:: KMZOutput(filename, **kwargs) Bases: :py:obj:`gnome.outputters.outputter.OutputterFilenameMixin`, :py:obj:`gnome.outputters.outputter.Outputter` class that outputs GNOME results in a kmz format. Suitable for Google Earth, and semi-suitable for MarPlot :param str output_dir=None: output directory for kmz files. uses super to pass optional ``**kwargs`` to base class ``__init__`` method .. py:attribute:: _schema .. py:attribute:: time_formatter :value: '%m/%d/%Y %H:%M' .. py:method:: prepare_for_model_run(model_start_time, spills, **kwargs) .. function:: prepare_for_model_run(model_start_time, cache=None, uncertain=False, spills=None, **kwargs) Write the headers, png files, etc for the KMZ file This must be done in prepare_for_model_run because if model _state changes, it is rewound and re-run from the beginning. If there are existing output files, they are deleted here. This takes more than standard 'cache' argument. Some of these are required arguments - they contain None for defaults because non-default argument cannot follow default argument. Since cache is already 2nd positional argument for Renderer object, the required non-default arguments must be defined following 'cache'. 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 to the KMZ file. .. note:: Does not take any other input arguments; however, to keep the interface the same for all outputters, define kwargs in case future outputters require different arguments. .. py:method:: write_output(step_num, islast_step=False) dump a timestep's data into the kmz file .. py:method:: rewind() reset a few parameter and call base class rewind to reset internal variables. .. py:data:: DOT :value: 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAJOgAACToB8GSSSgAAA...' .. py:data:: X :value: 'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAA...'