Function adas.adas404_get_adf10

def adas404_get_adf10(root=None, year=None, prefix=None, iz0=None, zlow=None, zhigh=None)

Generates a numpy string array of adf10->adf11 filename templates.

Parameters

root : str
directory of adf10 files
year : int
year of adf10 data
prefix : str
prefix of adf10 set (usually 'pj' but must be set)
iz0 : int
atomic number
zlow : int
lowest Z required in adf11 file (0=neutral)
zhigh : int
highest Z required in adf11 file

Returns

files : str array
the set of adf10 filename templates as a numpy string array of dimension (zhigh - zlow + 2, 10)

Notes

A helper routine for adas404 but it may be helpful to edit the set of adf10 template filenames rather than producing it from scratch.

References

ADAS manual description of adas404: http://www.adas.ac.uk/man/chap4-04.pdf

Version History

  • Martin O'Mullane, 21-04-2021
    • First version

Examples

Which adf10 files are required to make helium GCR data?

>>> import adas as adas
>>> files = adas.adas404_get_adf10(root='/home/adas/adas/adf10/',
                                   year=96, prefix='pj',
                                   iz0=2, zlow=0, zhigh=1)
>>> files.shape
(3, 10)
>>> files[0,:]
array(['/home/adas/adas/adf10/acd96/pj#acd96_he##.dat',
       '/home/adas/adas/adf10/scd96/pj#scd96_he##.dat',
       '/home/adas/adas/adf10/ccd96/pj#ccd96_he##.dat',
       '/home/adas/adas/adf10/prb96/pj#prb96_he##.dat',
       '/home/adas/adas/adf10/prc96/pj#prc96_he##.dat',
       '/home/adas/adas/adf10/qcd96/pj#qcd96_he##.dat',
       '/home/adas/adas/adf10/xcd96/pj#xcd96_he##.dat',
       '/home/adas/adas/adf10/plt96/pj#plt96_he##.dat', ' ',
       '/home/adas/adas/adf10/met96/pj#met96_he##.dat'], dtype='<U45')