- Add missing array allocations
- Add parameter for varying number of columns in input files
- Change output unit numbers (dirty fix. Original units created an empty
named file, but wrote in default named fort.* files)
1. Fix the mismatch between the psnbnd in coreprofiles and gray_core.
This happens whenever gray overrides the externally provided one
(i.e. the density tail would become negative before psnbnd and is so
rescaled to end exactly on the zero).
2. Make psnbnd no longer required by always computing it as in 1.
It hasn't been removed, because gray_params.data is sacrosant,
but it no longer has any effect.
3. Cleanup: mark public functions, restructure the global variables into
three categories; add comments explaining the analytical profiles
format, formulae and how the polynomial tail is computed.
This adds a new configuration file based on the INI format.
The new format will allow adding GRAY parameters without breaking
compatibility with existing configurations, unlike as of the old
gray_params.data.
This change structures the arguments of most functions, in particular
gray_main, into well-defined categories using derived types.
All types are defined in the gray_params.f90 (location subject to
change) and are organised as follows:
gray_parameters (statically allocated data)
├── antenna_parameters
├── ecrh_cd_parameters
├── equilibrium_parameters
├── misc_parameters
├── output_parameters
├── profiles_parameters
└── raytracing_parameters
gray_data - inputs of gray_main (dynamically-allocated arrays)
├── equilibrium_data
└── profiles_data
gray_results - outputs of gray_main (dynamically-allocated arrays)