# ADAS Subroutine Library adas4xx

- Subroutine bnd404a: To fetch data from resolved adf10 files, spline them onto the requested temperature/density grid, bundle them into unresolved data using the input metastable fractions, and write the result to adf11 files.
- Subroutine bnd404b: To fetch data from resolved adf10 files, spline them onto the requested temperature/density grid, bundle them into unresolved data using the input metastable fractions, and write the result to adf11 files.
- Subroutine c1u2lc: Returns lower case character
- Subroutine cnv404a: To fetch data from resolved adf10 files, spline them onto the requested temperature/density grid, and write the result to adf11 files.
- Subroutine cnv404b: To fetch data from resolved adf10 files, spline them onto the requested temperature/density grid, and write the result to adf11 files.
- Subroutine cstrl: Returns character code for l value
- Subroutine d1spln: To interpolate/extrapolated data from master condensed file to the user entered temperature/density pairs for the selec- ted recombining ion charge.
- Subroutine d1titl: To create the descriptive title for selected data.
- Subroutine d2data: To extract adf11 collisional dielectronic data
- Subroutine d2tdin: To extract temperature and density from adf11 file for display on ADAS402 processing screen
- Subroutine d4data: To open/acquire data from std.master condensed collisional- dielectronic files, obtain interpolated collisional- dielectronic recombination and ionisation coefficients, and prepare element master file if required.
- Subroutine d4ibal: To calculate ionisation balances at fixed density
- Subroutine d4lbal: To identify the temperatures and density for which the calculation of ionisation balances involved the use of extrapolated data.
- Subroutine d4open: To inquire & open input data file & allocate to unit `iunit' (read only) - if it does not exists a message is sent to the screen and lexist is returned as false.
- Subroutine d4spln: To interpolate/extrapolated data from master condensed file to the user entered temperature/density array for the selec- ted recombining ion charge. Based on ADAS9140.fort(d1spln)
- Subroutine d4tlog: To convert an array of log10(temperatures) from: (kelvin to electron volts) or (electron volts to kelvin)
- Subroutine d4wmet: Write the number of metastables for each ionisation stage to the top of resolved adf11 files.
- Subroutine d4znel: To return the maximum and minimum chosen for the ionic charge (+1) and the number of electrons in each case.
- Subroutine d5data: To extract a complete set of collisional dielectronic data for a temp/density model from either partial (metastable/parent resolved) or standard (unresolved) isonuclear master files
- Subroutine d5diag: Calculation of prime diagonal of metastable rate coefficient matrix
- Subroutine d5mfsp: To perform the main matrix algebra which calculates the level populations-including metastable states
- Subroutine d5mpop: Calculation of metastable resolved ionisation stage populations of a particular element for a given temperature and density
- Subroutine d5scrp: To read script file and access emissivity data on spectral lines requested for further processing in equilibrium ionisation codes.
- Subroutine d5sgcf: To assemble gcf functions and their components using fractional metastable abundances.
- Subroutine d5spc2: To extract and interpolate photon emissivities for emitting ions.
- Subroutine d5spec: To calculate photon emissivity coefficients for spectral lines identified in script file
- Subroutine d5spow: To assemble radiated power functions using fractional metastable abundances. Generate standard isonuclear master data from partial data.
- Subroutine d5wr11: To output data to gcf passing file.
- Subroutine d6data: To extract a complete set of collisional dielectronic data for a temp/density model from either partial (metastable/parent resolved) or standard (unresolved) isonuclear master files
- Subroutine d6mfll: Fills matrix with recombination, ionisation and metastable cross-coupling coefficients ready for eigenvector solution
- Subroutine d6mpop: Calculation of metastable resolved ionisation stage populations of a particular element for a given temperature and density
- Subroutine d6scrp: To read script file and access emissivity data on spectral lines requested for further processing in equilibrium ionisation codes.
- Subroutine d6sgcf: To assemble gcf functions and their components using fractional metastable abundances.
- Subroutine d6spec: To calculate photon emissivity coefficients for spectral lines identified in script file
- Subroutine d6spow: To assemble radiated energy excess functions using fractional metastable abundances integral excesses
- Subroutine d7alfs: (1) caclulates radiative and dielectronic values and parameters from specific ion files which have Eissner configuration notation (2) considers metastable level indices and evaluates ncut identifies dipole transition of type dn=0 and dn>0 evaluates oscillator strengths and average energy of transition (3) separates transition arrays for each metastable and evaluates wavelength ranges of transition arrays (4) evaluates power in each transtion array (5) calculates ionisation, radiative & dielectronic recombination values and parameters.
- Subroutine d7auts: Calculates ionisation rates from given specific ion file using Burgess/Chidichimo formula resolved into parent and spin system components.
- Subroutine d7bndl: Subroutine to discard transitions with an oscillator strength below a certain input value. Gets some values
- Subroutine d7clos: To write terminator sequences and close files on unit11 (maincl file) and unit12 (atompars file)
- Subroutine d7cors: Correct ex90 output to better data. For a given iso-electronic sequence, uses interpolation between values of z0.
- Subroutine d7data: To fetch level data from input copase data set.
- Subroutine d7datr: To fetch data from input copase data set. the subroutine is an extension to bxdata to obtain orbital quantum defects. in all other respects it is identical to bxdata.
- Subroutine d7exps: (1) generates approximate form parameters and numerical values for ionisation and recombination rates from specific ion files (2) returns data required for a maincl input file resolved into parent/spin system components. (3) returns parameters required for an atompars file
- Subroutine d7grps: Puts wavelengths into a 5 bin histogram for automating effective line selection in ADAS407.
- Subroutine d7link: Returns a truth table of links between parents and recombined ion metastables for radiative recombination and ionisation. also supplies the decimal orbital number for the position of the shell of the recombined electron.
- Subroutine d7lotz: (1) returns Lotz parameters for a given z and ion stage
- Subroutine d7pyvr: Calculates van Regemorter's P factor for electron collisions with atoms and ions.
- Subroutine d7spln: 1) performs cubic spline on log(temperature) versus log(pow) input data. (`scef' versus `ptot' , nv data pairs)
- Subroutine d7wr11: To output data to mainbn passing file. Data for initiating a mainbns bundle-ns calculation
- Subroutine d7wr12: To output data to atompars passing file. Data for initiating an ADAS408 data preparation run
- Subroutine d8data: To fetch data from input atompars data set of type adf03.
- Subroutine d8eval: To calculate tables of values of ionisation, recombination and radiated power rates for non-coronal impurity studies over a given temperature and density range with atomic data parameters from files of format adf03
- Subroutine d8gpca: Routine to provide Burgess general program results at a given temperatures and at zero density.
- Subroutine d8intg: To integrate between a and b with an interval of step the integrand f(x)exp(-x) * exp(+a) where f(x) is the filter function.
- Subroutine d8part: To integrate between x(1) and x(num) the integrand f(x)exp(-x) * exp(+a) where f(x) is the filter function.
- Subroutine d8tran: To determine transmission fraction at energy ein.
- Subroutine d8vgol: Routine to evaluate total radiative recombination rate coefficients at zero density using the von goeler type formula with modified capture to the lowest accessible principal quantum shell.
- Subroutine d8wzcd: To create zcd, ycd and ecd files for unresolved baseline.
- Subroutine d9data: To extract a complete set of collisional dielectronic data for a (temperature, density) grid from either partial (metastable/parent resolved) or standard (unresolved) isonuclear master files
- Subroutine d9mpop: Calculation of metastable resolved ionisation stage populations of a particular element for a given temperature and density. Extension to the 2d (temperature, density) case.
- Subroutine d9rdnm: To extract collisional dielectronic data for a (temperature, density) grid from either partial (metastable/parent resolved) or standard (unresolved) isonuclear master files
- Subroutine d9scrp: To read script file and access emissivity data on spectral lines requested for further processing in equilibrium ionisation codes.
- Subroutine d9sgcf: To assemble gcf functions and their components using fractional metastable abundances. 2d (temperature, density) version.
- Subroutine d9spc2: To extract and interpolate photon emissivities for emitting ions.
- Subroutine d9spec: To calculate photon emissivity coefficients for spectral lines identified in script file
- Subroutine d9spln: Performs cubic spline of log(photon emissivity coefficients) on 2d grid (log(temperature), log(density)) input data for a given wavelength data-block.
- Subroutine d9spow: To assemble radiated power functions using fractional metastable abundances. Generate standard isonuclear master data from partial data. 2d (temperature, density) version.
- Subroutine d9wr11: To output data to gcf passing file.
- Subroutine dadata: To fetch data from input adf09 data set.
- Subroutine daspln: 1) performs cubic spline on log(temperature) versus log(qdrin) input data. (`tfile' versus `qdrin' , ita data pairs)
- Subroutine dasumd: To sum Badnell dielectronic rate coefficient data over the representative set to give zero density total rate from satellite lines.
- Subroutine datitl: To create the descriptive title for selected data-block.
- Subroutine dbspln: 1) performs cubic spline on log(temperature) versus log(qdrin) input data. (`tfile' versus `qdrin' , ita data pairs)
- Subroutine dclnorm: To normalise line emissivity adapted from b6norm
- Subroutine dcpopm: To construct metastable level populations.
- Subroutine dcpopo: To construct ordinary/non-metastable level populations.
- Subroutine dcstka: To stack up in `stck' the non-metastable/ordinary excited level population dependence on metastable level for a given temperature and density.
- Subroutine dcstkc: To stack up in `cred' the transition rate between metasta- ble levels for a given temperature stable level for a given temperature and density.
- Subroutine dddata: To fetch data from input adf23 data set.
- Subroutine ddspln: 1) performs cubic spline on log(temperature) versus log(qdrin) input data. (`tfile' versus `qdrin' , ita data pairs)
- Subroutine ddtitl: To create the descriptive title for selected data-block.
- Subroutine dhdata: To extract `sanc0' collisional dielectronic data
- Subroutine dxcomp: Compares parent and recombine ion metastable configuration expanded orbital vectors. returns .true. If one difference and gives differing orbital.
- Subroutine dxexcf: Returns vector of occupancies for standard shell indices 1-15 from an Eissner hexadecimal character configuration specification
- Subroutine dxmadd: Calculates the sum of two rectangular matrices with arbitrary integer multipliers
- Subroutine dxmmul: Calculates the product of two rectangular matrices
- Subroutine dxrdnm: To extract collisional dielectronic data from either partial (metastable/parent resolved) or standard (unresolved) isonuclear master files
- Subroutine dxspl1: Performs the first part of a three way spline on input data. Generates a table of log10(scaled coef/pwrs) covering `ite' temperatures and `ide' densities for the element recombining ion charge given by `iz1'.
- Subroutine dxspl2: Performs the second part of a 3 way spline on input data. Generates a table of log10( coeffts./powers ) covering `ite' temperatures and `maxd' densities for the element recombining ion charge given by `iz1'.
- Subroutine dxspl3: Performs the third part of a three way spline on input data. Generates a table of log10( coeffts./powers ) covering `maxt' temperatures and `maxd' densities for the element recombining ion charge given by `iz1'.
- Subroutine fmin: Find an approximation x to the point where f(x) attains a minimum on the interval (ax,bx).
- Subroutine gpcalc: Routine to provide Burgess general program results at a series of temperatures and at zero density.
- Subroutine gpcalcx: Routine to provide Burgess general program results at a series of temperatures and at zero density.
- Subroutine gpcall: Provide Burgess general formula results at a series of temperatures, and also to produce Burgess general program results at zero density at the same temperatures.
- Subroutine init: Detrmination of charge of the selected ion and obtain
- Subroutine ioadas1: To write ADAS data which is dependent on density and has no separate `neutral' stage.
- Subroutine ioadas2: To write ADAS data which is dependent on density and has separate `neutral' stage.
- Subroutine ionbal: To evaluate equilibrium ionis. Balance in a plasma of fixed electron temperature, electron density and neutral hydrogen density.
- Subroutine lh404rr: To fetch data from master condensed parent/metastable resolved collisional dielectronic files and prepare resolved isonuclear (adf11) master files.
- Subroutine lh404ru: To fetch data from master condensed parent/metastable resolved collisional dielectronic files, bundle them, and prepare unresolved isonuclear (adf11) master files.
- Subroutine lmdif1_all: Minimize the sum of the squares of m nonlinear functions in n variables by a modification of the Levenberg-Marquardt algorithm.
- Subroutine lsfun1: Program to evaluate functionals for least squares to line power in Gaunt factor approximation.
- Subroutine metrd: To fetch data from adf10 `met' files and spline onto the requested temperature/density grid.
- Subroutine nvgoel: Evaluate total radiative recombination rate coefficients at zero density using the von goeler type formula with modified capture to the lowest accessible principal quantum shell.
- Subroutine rbchid: Evaluates a shell contribution to the ionisation rate coefficient in the Burgess-Chidichimo approximation
- Subroutine xcoef: To calculate complete sets of spectrum line emissivities for the ions of an element