[aspect-devel] read parameter file with Python

Wolfgang Bangerth bangerth at colostate.edu
Tue Feb 20 23:34:00 PST 2018


Hi Marine,


> Is there any already existing script that would take the parameter file and 
> process it to use the variables in Python? Like a dictionary with everything?

There probably isn't, but it would be relatively easy to make this easy for 
you. At the very beginning of running ASPECT, we output *all* run-time 
parameters (not just the ones that you list in the input file) to a .prm file 
in the output directory, as well as to a latex file. It would be trivial to 
also output all of these parameters to a JSON file -- the function for this 
already exists, we just don't call it -- and I'm pretty sure there are JSON 
readers for Python that would then make it easy for you to read all of these 
parameters in again.

Do you think this would help?


> And is there any place with interesting Python scripts to use with ASPECT? (or 
> any interest if I start to put mine somewhere? I have a notebook for reading 
> the statistics file that I made for a student working with me on ASPECT)
We would definitely appreciate to have workflows documented somewhere in the 
manual. Corresponding files can then be put into some appropriate directory in 
the repository.

Best
  W.

-- 
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bangerth at colostate.edu
                            www: http://www.math.colostate.edu/~bangerth/



More information about the Aspect-devel mailing list