crunchflow.output.timeseries.TimeSeries ======================================= .. py:class:: crunchflow.output.timeseries.TimeSeries(tsfile, folder='.') The timeseries class for working with CrunchFlow time series output files. :Attributes: **coords** : tuple of int x, y and z coordinates of the time series **timeunit** : str time unit used in the CrunchFlow input **unit** : str Concentration units included in the file. Automatically set to the default CrunchFlow concentration units (mol/kgw) **species** : list of str list of aqueous species in the file **data** : ndarray of float Numpy array of all data. First col is the time step and remaining cols are species in the same order as self.species list **df** : dataframe of float Pandas dataframe of all data. Index is the time step and columns are the aqueous species .. rubric:: Methods =================================================== ========== **convert_mgL(database='datacom.dbs', folder='.')** Convert time series concentrations from mol/kgw to mg/L (ppm). **plot(species, units='mg/L', **kwargs)** Plot the time series of one or more species. =================================================== ========== .. rubric:: Examples >>> ts = TimeSeries('Well1-1.txt') >>> ts.convert_mgL() >>> calcium = ts.df['Ca++'] >>> ts.plot('Ca++') .. !! processed by numpydoc !! .. py:method:: convert_mgL(database='datacom.dbs', folder='.', warnings=True) Convert time series concentrations from mol/kgw to mg/L (ppm). Note that this assumes that 1 kg water = 1 L water. :Parameters: **database** : str name of the CrunchFlow database. The default is 'datacom.dbs' **folder** : str path to the database. The default is current directory. **warnings** : bool whether to print warnings for species not found in the database. :Returns: None. Modifies timeseries object in place. .. .. !! processed by numpydoc !! .. py:method:: plot(species, units='mg/L', **kwargs) Plot the time series of one or more species. :Parameters: **species** : str or list of str Either single species or list of species to be plotted **units** : str Concentration units to use for plotting. The default is 'mg/L' **\*\*kwargs** : dict keyword arguments passed to plt.subplots (e.g., figsize) :Returns: **fig** : pyplot object figure handle for current plot **ax** : pyplot object axis handle for current plot .. !! processed by numpydoc !!