The file format parsed by read_beam2 also includes the polarisation,
unlike those of read_beam0 and read_beam1.
When running gray standalone, however, we expect the mode to be set by
`antenna.iox` in gray.ini, not by the beam file.
- Replace the `get_free_unit` subroutine with the built-in
`newutin` option of the `open` statement.
- Replace `locatex` with just `locate` + an index offset.
- Replace `inside` with `contour%contains`.
- Merge `vmaxmin` and `vmaxmini` into a single subroutine
with optional arguments.
- Remove unused `range2rect`, `bubble`.
This adds a new `splines` module which implements a high-level interface
for creating and evaluating splines and rewrite almost all modules to
use it. Also, notably:
1. both `simplespline` and DIERCKX splines can now used with a uniform
interface
2. most complexity due to handling working space arrays is gone
3. memory management has been significantly simplified too
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)