From ac2b171ed4356c352e8b4f3b950508e9d7043bcd Mon Sep 17 00:00:00 2001 From: Lionel GUEZ <guez@lmd.ens.fr> Date: Tue, 4 Apr 2023 22:53:05 +0200 Subject: [PATCH] Read `main_nml` before `n_slices` Because we are going to introduce the choice of a slice in the namelist. --- Overlap/eddy_graph.f90 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Overlap/eddy_graph.f90 b/Overlap/eddy_graph.f90 index da7154e2..9d255a95 100644 --- a/Overlap/eddy_graph.f90 +++ b/Overlap/eddy_graph.f90 @@ -47,6 +47,12 @@ program eddy_graph call config_graph(rank) if (rank == 0) then + ! main_nml: + write(unit = *, nml = main_nml) + print *, "Enter namelist main_nml." + read(unit = *, nml = main_nml) + write(unit = *, nml = main_nml) + ! n_slices: call new_unit(unit) @@ -62,11 +68,6 @@ program eddy_graph n_slices = 1 end if - ! main_nml: - write(unit = *, nml = main_nml) - print *, "Enter namelist main_nml." - read(unit = *, nml = main_nml) - write(unit = *, nml = main_nml) call assert(n_dates == huge(0) .or. n_slices == 1, "If we have several " & // "slices then we read all the dates from them") end if -- GitLab