Function adas.xxscript_416

def xxscript_416(file=None)

Reads an ADAS416 script file and returns parent emissivity files, partition specification data lines and child output emissivity file names in a dictionary.

Parameters

file : str
full name of ADAS416 script file

Returns

fulldata : dict
contents of the ADAS416 script file
    'filename'    :  adas416 script file name
    'dsngcr_p'    :  parent gcr template file name from script
    'dsna_p'      :  parent emissivity source file template
                        1st dim: emissivity type
    'lfilea_p'    :  True => parent emissivity type exists
                     False => file does not exist
                        1st dim: emissivity type
    'ipl_p'       :  position of parent partition in iptnla
    'dsngcr_c'    :  child gcr template file name from script
    'dsna_c'      :  child emissivity source file template
                        1st dim: emissivity type
    'lfilea_c'    :  True => child emissivity type required
                     False => file not required
                        1st dim: emissivity type
    'ipl_c'       :  position of child partition in iptnla
    'nptnl'       :  number of partition levels in block
    'nptn'        :  number of partitions in partition level
                        1st dim: number of partitions
    'nptnc'       :  number of components in partition
                        1st dim: number of partitions
                        2nd dim: number of partitions in level
    'iptnla'      :  partition level index
                        1st dim: number of partitions
    'iptna'       :  partition index
                        1st dim: number of partitions
                        2nd dim: number of partitions in level
    'iptnca'      :  component index
                        1st dim: number of partitions
                        2nd dim: number of partitions in level
                        3rd dim: number of components in a partition
    'ncptn_stack' :  number of text lines in partition stack
    'cptn_stack'  :  stack of partition text lines
    'lres'        :  True => script file resolved
                     False => script file unresolved

Notes

Calls a fortran based shared object file - not pure python.

References

ADAS manual description of adf40: http://www.adas.ac.uk/man/appxa-40.pdf

Version History

  • Martin O'Mullane, 06-04-2019
    • First version

Example

instruction to bundle argon inot 10 super-stages.

>>> import adas as adas
>>> file='/home/adas/adas/scripts416/partition_02_argon_89.dat'
>>> fulldata = adas.xxscript_416(file)
>>> fulldata['nptn']
array([10, 19,  0,  0], dtype=int32)