oasislmf.pytools.cdftocsv ========================= .. py:module:: oasislmf.pytools.cdftocsv Attributes ---------- .. autoapisummary:: oasislmf.pytools.cdftocsv.parser Functions --------- .. autoapisummary:: oasislmf.pytools.cdftocsv.print_cdftocsv oasislmf.pytools.cdftocsv.run oasislmf.pytools.cdftocsv.main Module Contents --------------- .. py:data:: parser .. py:function:: print_cdftocsv(event_id, damagecdf, Nbins, rec) Print the cdf produced by getmodel to csv file. Note that the input arrays are lists of cdf entries, namely the shape on axis=0 is the number of entries. Args: event_id (int): event_id damagecdf (array-like, damagecdf): damage cdf record Nbins (array-like, int): number of damage bins rec (array-like, rec): cdf record Returns: list[str]: list of csv lines .. py:function:: run(run_dir, skip_header, file_in=None) Run cdftocsv command: convert the cdf output from getmodel into csv format. The binary data is read from an input stream, and the csv file is streamed to stdout. Args: run_dir ([str]): Path to the run directory. skip_header ([bool]): If True, does not print the csv header. Raises: ValueError: If the stream type is not 1. .. py:function:: main()