Function adas.write_adf07
def write_adf07(file=None, fulldata=None, comments=None)
-
Write an adf07 ionization rate file from a user supplied fulldata dictionary.
Parameters
file
:str
- full name of adf07 file.
fulldata
:dict
- contents of the adf07 file
'nblock' : number of ionisation rates in file 'esym' : element symbol 'iz0' : nuclear charge 'iz' : number of ionisation rates 'iz1' : initial charge int array(nblock) 'cicode' : initial state metastable index string array(nblock) 'cfcode' : final state metastable index string array(nblock) 'ciion' : initial ion (as <esym>+(iz[nblock]> ) string array(nblock) 'cfion' : final ion (as <esym>+(iz[nblock]> ) string array(nblock) 'bwno' : effective ionization potential (cm-1) float array(nblock) 'nte' : number of temperatures in each block float array(nblock) 'te' : temperatures (eV) float array(max(nte), nblock) 'szd' : ionization rates (cm3 s-1) float array(max(nte), nblock)
comments
:list
, optional- comments for the end of the file as a list of strings.
Notes
References
ADAS manual description of adf07: http://www.adas.ac.uk/man/appxa-01.pdf
Version History
- Martin O'Mullane,
22-08-2022
- First version
Example
Round trip of fluorine rates from Dere's recommendation.
>>> import adas as adas >>> file='/home/adas/adas/adf07/dere/dere07#f.dat' >>> fulldata=adas.xxdata_07(file) >>> my_comments=['C Testing write_adf07', 'C By me, today'] >>> my_file='/tmp/fluorine.pass' >>> adas.write_adf07(file=my_file, fulldata=fulldata, comments=my_comments)