From f5e0f59eaca1035b690bec54d2e0555406512395 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Wed, 18 Jan 2023 21:34:49 +0100
Subject: [PATCH] Write to standard output instead of standard error

I do not remember why I chose to write to standard error. First it is
clearer to write only error messages to standard error. Second the
order of messages on standard error coming from the Fortran code and
from the shapelib C library does not seem deterministic, and this is
annoying to compare runs.
---
 Inst_eddies/Tests/test_get_1_outerm.f90 | 7 ++-----
 Overlap/config_graph.F90                | 6 ++----
 Overlap/eddy_graph.f90                  | 6 ++----
 3 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/Inst_eddies/Tests/test_get_1_outerm.f90 b/Inst_eddies/Tests/test_get_1_outerm.f90
index 9bbe0000..4ca44ff4 100644
--- a/Inst_eddies/Tests/test_get_1_outerm.f90
+++ b/Inst_eddies/Tests/test_get_1_outerm.f90
@@ -1,7 +1,5 @@
 program test_get_1_outerm
 
-  use, intrinsic:: ISO_FORTRAN_ENV
-
   ! Libraries:
   use jumble, only: csvread, deg_to_rad
 
@@ -58,9 +56,8 @@ program test_get_1_outerm
 
   !----------------------------------------------------------------
 
-  write(unit = error_unit, nml = main_nml)
-  write(unit = error_unit, fmt = *) &
-       "test_get_1_outerm: Enter namelist main_nml."
+  write(unit = *, nml = main_nml)
+  print  *, "test_get_1_outerm: Enter namelist main_nml."
   read(unit = *, nml = main_nml)
   write(unit = *, nml = main_nml)
   call config
diff --git a/Overlap/config_graph.F90 b/Overlap/config_graph.F90
index a938de48..c05c68ec 100644
--- a/Overlap/config_graph.F90
+++ b/Overlap/config_graph.F90
@@ -19,8 +19,6 @@ contains
 
   subroutine config_graph(rank)
 
-    use, intrinsic:: ISO_FORTRAN_ENV
-
     ! Libraries:
 #ifndef CPP_SEQUENTIAL
     use ezmpi, only: ezmpi_bcast
@@ -38,8 +36,8 @@ contains
 
     if (rank == 0) then
        ! config_graph_nml:
-       write(unit = error_unit, nml = config_graph_nml)
-       write(unit = error_unit, fmt = *) "Enter namelist config_graph_nml."
+       write(unit = *, nml = config_graph_nml)
+       print *, "Enter namelist config_graph_nml."
        read(unit = *, nml = config_graph_nml)
        write(unit = *, nml = config_graph_nml)
        call assert(max_delta >= 1, "config_graph max_delta")
diff --git a/Overlap/eddy_graph.f90 b/Overlap/eddy_graph.f90
index 43041658..da7154e2 100644
--- a/Overlap/eddy_graph.f90
+++ b/Overlap/eddy_graph.f90
@@ -1,7 +1,5 @@
 program eddy_graph
 
-  use, intrinsic:: ISO_FORTRAN_ENV
-
   ! Libraries:
   use ezmpi, only: ezmpi_bcast
   use jumble, only: get_command_arg_dyn, new_unit, ediff1d, assert, &
@@ -65,8 +63,8 @@ program eddy_graph
      end if
 
      ! main_nml:
-     write(unit = error_unit, nml = main_nml)
-     write(unit = error_unit, fmt = *) "Enter namelist 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 " &
-- 
GitLab