From a376e7d73604789c2163b0f254e98c29b9d59a28 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Fri, 16 Jul 2021 18:15:24 +0200
Subject: [PATCH] Move `shpc_close` after `write_aux`

Preparing for using hshpc as argument of `write_aux`.
---
 Inst_eddies/inst_eddies.f90 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Inst_eddies/inst_eddies.f90 b/Inst_eddies/inst_eddies.f90
index 3467b804..c6e24b96 100644
--- a/Inst_eddies/inst_eddies.f90
+++ b/Inst_eddies/inst_eddies.f90
@@ -204,13 +204,13 @@ program inst_eddies
      end if
   end do
 
-  CALL shpc_close(hshpc_cyclo)
-  CALL shpc_close(hshpc_anti)
-  print *, 'inst_eddies: Created shapefile collections in SHPC_cyclo and ', &
-       'SHPC_anti.'
   call write_aux(corner_deg, step_deg, nlon, nlat, n_cyclo, &
        shpc_dir = "SHPC_cyclo")
   call write_aux(corner_deg, step_deg, nlon, nlat, n_anti, &
        shpc_dir = "SHPC_anti")
+  CALL shpc_close(hshpc_cyclo)
+  CALL shpc_close(hshpc_anti)
+  print *, 'inst_eddies: Created shapefile collections in SHPC_cyclo and ', &
+       'SHPC_anti.'
 
 end program inst_eddies
-- 
GitLab