OutputHipims
- To do:
Process output files from HiPIMS
- class IO.OutputHipims.OutputHipims(input_obj=None, case_folder=None, num_of_sections=1, header_file_tag=None)
To read and analyze otuput files from a HiPIMS flood model
- case_folder
(str) the absolute path of the case folder
- input_folder
(str|list of strings) the absolute path of the input folder(s)
- output_folder
(str|list of strings) the absolute path of the output folder(s)
- number_of_sections
(int) the number of subdomains of the model
- header
(dict or list of dict) provide the header information
- header_list
a list of sub headers [only for multi-gpu model]
- ref_datetime
- times_simu
(dataframe) with variable ‘times’ (simulated time in seconds) and ‘date_times’ if ref_datetime is defined.
- gauge_values_all
(dict) ‘h’, ‘eta’, ‘hU’, array with values of all gauge positions, not time column
- gauge_values
gauge timeseries summarized from a series of gauge points
- grid_results
a list of Raster objects for gridded results
- __init__(input_obj=None, case_folder=None, num_of_sections=1, header_file_tag=None)
- Initialize the object with a InputHiPIMS object or a case folder and
the number of sections
- Parameters
header_file_tag – the output file to read grid header, e.g. ‘h_0’
- add_gauge_results(var_name, gauge_name='All', gauge_ind=None, compressed=False)
add simulated value to the object gauge by gauge
- Parameters
var_name – ‘h’, ‘hU’, ‘eta’
gauge_name – ‘All’ add all gauges, then gauge_ind not needed
- add_grid_results(result_names, compressed=False)
Read and return Raster object to attribute ‘grid_results’
- Parameters
result_names – string or list of string, gives the name of grid file
- read_gauges_file(file_tag='h', compressed=False)
Read gauges files for time seires of values at the monitored gauges
- Parameters
file_tag – h, hU, eta, corresponding to h_gauges.dat, hU_gauges.dat, and eta_gauges.dat, respectively
- Returns
gauges_pos, the coordinates of gauges within the model domain
times, time in seconds
values, gauge values corresponding to the gauges position
- read_grid_file(file_tag='h_0', compressed=False)
Read asc grid files from output
- Returns
a raster object of the grid
- Return type
- save_object(file_name)
Save the object to a pickle file
- set_ref_datetime(date_time, str_format='%Y-%m-%d %H:%M:%S')
Set the refernce datetime of the simulation
- IO.OutputHipims.load_output_object(filename)
load object from a dictionary and return as an OutputHipims object
- Parameters
filename – a string giving the object file name
- Returns
An object of OutputHipims