Json is a lightweight data exchange file format.
In pcdl output from the TimeSeries mcdsts.get_conc_attribute() and mcdsts.get_cell_attribute() can store, and output from the pcdl command line command pcdl_get_conc_attribute and pcdl_get_cell_attribute store into a json file.
The json library is a part of core python.
Json is the ideal data format for unstructured data constructs that not can be stored in csv file format, like a dictionary of lists. Please note, python objects are not per se json comaptible. For example: Python dictionary keys can be of almost any data type, but json object keys have to be strings. Complex numbers are a standard data type in python, but complex numbers cannot be stored in json.
pcdl_get_conc_attribute output 2pcdl_get_cell_attribute output 2import json
import pcdl
mcdsts = pcdl.TimeSeries('output/')
dl_conc = mcdsts.get_conc_attribute(values=2)
fp = open('output/timeseries_conc_attribute_minmax.json', 'w')
json.dump(dl_conc, fp)
f.close()import json
import pcdl
mcdsts = pcdl.TimeSeries('output/')
dl_cell = mcdsts.get_cell_attribute(values=2)
fp = open('output/timeseries_cell_attribute_minmax.json', 'w')
json.dump(dl_cell, fp)
f.close()import json
dl_conc = json.load('output/timeseries_conc_attribute_minmax.json')import json
dl_cell = json.load('output/timeseries_cell_attribute_minmax.json')The python object we retrieve from this pcdl conc attribute and cell attribute files is a dictionary of lists.
That's it. The rest is analysis!