src/main.f90: give priority to cli over beamdata.txt

This commit is contained in:
Michele Guerini Rocco 2023-04-02 16:18:43 +02:00
parent 62c3045a7f
commit a27e56933c
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -57,16 +57,20 @@ program main
call exit(1)
end if
! Apply CLI overrides and copy the parameters into
! global variables exported by the gray_params module
! Initialise antenna parameters before parsing the
! cli arguments, so antenna%pos can be overriden
call init_antenna(params%antenna, err)
if (err /= 0) call exit(err)
! Apply CLI overrides to the parameters
call parse_param_overrides(params)
! Copy the parameters into global variables
! exported by the gray_params module
call params_set_globals(params)
! Read the input data and set the global variables
! of the respective module. Note: order matters.
call init_antenna(params%antenna, err)
if (err /= 0) call exit(err)
call init_equilibrium(params, data, err)
if (err /= 0) call exit(err)