gnome.outputters.binary ======================= .. py:module:: gnome.outputters.binary .. autoapi-nested-parse:: Binary Outputter For use in Gnome Analyst Attributes ---------- .. autoapisummary:: gnome.outputters.binary.le_dtype gnome.outputters.binary.header_dtype Classes ------- .. autoapisummary:: gnome.outputters.binary.BinaryOutput Module Contents --------------- .. py:data:: le_dtype .. py:data:: header_dtype .. py:class:: BinaryOutput(filename, zip_output=True, **kwargs) Bases: :py:obj:`gnome.outputters.outputter.OutputterFilenameMixin`, :py:obj:`gnome.outputters.outputter.Outputter` class that outputs GNOME trajectory results on a time step by time step basis this is the format output by desktop GNOME for use in Gnome Analyst :param str filename: full path and basename of the zip file :param zip_output=True: whether to zip up the output binary files other arguments as defined in the Outputter class .. py:attribute:: name define as property in base class so all objects will have a name by default .. py:attribute:: output_dir .. py:attribute:: zip_output :value: True .. py:attribute:: filedir .. py:attribute:: file_num :value: 0 .. py:attribute:: cleaned_up :value: False .. py:method:: prepare_for_model_run(model_start_time, spills, uncertain=False, **kwargs) .. function:: prepare_for_model_run(model_start_time, cache=None, uncertain=False, spills=None, **kwargs) Reset file_num and uncertainty 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 separate files. .. 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) Write data from time step to binary file .. py:method:: output_to_file(filename, sc) dump a timestep's data into binary files for Gnome Analyst .. py:method:: clean_output_files() deletes output files that may be around called by prepare_for_model_run here in case it needs to be called from elsewhere .. py:method:: post_model_run() This is where to clean up -- close files, etc.