From 2b4fbba7ff27adb76ff0389f55abe0012d5a81e5 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Fri, 23 Jul 2021 12:28:02 +0200
Subject: [PATCH] Move inquire statement before the call to config

Preparing to add exist as an argument of config.
---
 Inst_eddies/inst_eddies.f90 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Inst_eddies/inst_eddies.f90 b/Inst_eddies/inst_eddies.f90
index abf5b600..85c2862a 100644
--- a/Inst_eddies/inst_eddies.f90
+++ b/Inst_eddies/inst_eddies.f90
@@ -74,6 +74,7 @@ program inst_eddies
 
   call assert(IEEE_SUPPORT_DATATYPE(0.), ieee_support_nan(0.), &
        "inst_eddies: not enough IEEE support")
+  inquire(file = "SHPC_cyclo/extremum.shp", exist = exist)
   call config ! We need main_nml before looking at the input files.
   call nf95_open("h.nc", nf90_nowrite, ncid)
   call find_coord(ncid, varid = varid, std_name = "time")
@@ -179,8 +180,6 @@ program inst_eddies
 
   ! Write snapshot:
 
-  inquire(file = "SHPC_cyclo/extremum.shp", exist = exist)
-  
   if (exist) then
      call shpc_open(hshpc_cyclo, shpc_dir = "SHPC_cyclo", rank = 0, &
           pszaccess = "rb+")
-- 
GitLab