diff --git a/src/main.f90 b/src/main.f90 index 20293b8..2575b33 100644 --- a/src/main.f90 +++ b/src/main.f90 @@ -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)