From 7902a18d603249a58349158d23b6d385b39c7028 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Mon, 24 Apr 2023 23:26:34 +0200
Subject: [PATCH] Polish

---
 Inst_eddies/Analysis/plot_velocity.py              | 9 +++++----
 Inst_eddies/Documentation_texfol/documentation.tex | 2 +-
 Inst_eddies/Tests/short_tests.json                 | 6 +-----
 Inst_eddies/Tests/test_get_1_outerm.f90            | 1 -
 Inst_eddies/inst_eddies.py.in                      | 3 ++-
 5 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/Inst_eddies/Analysis/plot_velocity.py b/Inst_eddies/Analysis/plot_velocity.py
index c5e9a06a..8bd6ff8a 100755
--- a/Inst_eddies/Analysis/plot_velocity.py
+++ b/Inst_eddies/Analysis/plot_velocity.py
@@ -53,15 +53,17 @@ else:
     # (in [llcrnrlon, llcrnrlon + 2 pi[)
 
     lon_mask = longitude <= urcrnrlon
-    lat_mask = np.logical_and(latitude >= llcrnrlat,
-                              latitude <= urcrnrlat)
+    lat_mask = np.logical_and(latitude >= llcrnrlat, latitude <= urcrnrlat)
 
 longitude = longitude[lon_mask]
 latitude = latitude[lat_mask]
 src_crs = ccrs.PlateCarree()
+
+# Use a conformal projection for quiver:
 projection = ccrs.Stereographic(central_latitude = latitude.mean(),
                                 central_longitude = longitude.mean())
 ##projection = ccrs.NorthPolarStereo()
+
 fig = plt.figure()
 ax = plt.axes(projection = projection)
 
@@ -75,8 +77,7 @@ else:
     quiver_return = wind_cartopy.plot(ax, longitude, latitude,
                                       ugos[lat_mask][:, lon_mask],
                                       vgos[lat_mask][:, lon_mask],
-                                      scale = args.scale,
-                                      scale_units = "width")
+                                      scale = args.scale, scale_units = "width")
     ax.quiverkey(quiver_return, 0.9, 0.9, 1, r"1 m s$^{-1}$",
                  coordinates = "figure")
 
diff --git a/Inst_eddies/Documentation_texfol/documentation.tex b/Inst_eddies/Documentation_texfol/documentation.tex
index 804222ee..51fe0c11 100644
--- a/Inst_eddies/Documentation_texfol/documentation.tex
+++ b/Inst_eddies/Documentation_texfol/documentation.tex
@@ -1279,7 +1279,7 @@ Minimum cible pour le test \verb+Get_1_outerm+ en :
 Indices dans le domaine global, base 1, de ce minimum : 39, 225. SSH
 en ce mimimum : \np{0.2759}. Cyclone numéro 4 dans ce cadre. Contour
 le plus intérieur : SSH = \np{0.293300003} m. Contour le plus
-extérieur : SSH = \np{0.460744} m. Contour de vitesse maximale : SSH =
+extérieur : SSH = \np{0.460504} m. Contour de vitesse maximale : SSH =
 \np{0.3815} m. Cf. figures (\ref{fig:test_get_eddy}) et
 (\ref{fig:test_get_snapshot}).
 \begin{figure}[htbp]
diff --git a/Inst_eddies/Tests/short_tests.json b/Inst_eddies/Tests/short_tests.json
index ca4065aa..8fdcd70e 100644
--- a/Inst_eddies/Tests/short_tests.json
+++ b/Inst_eddies/Tests/short_tests.json
@@ -245,11 +245,7 @@
             "&config_nml /\n"
 	],
 	"commands": [
-            [
-		"mkdir",
-		"-p",
-		"SHPC/Slice_0/Cyclones"
-            ],
+            ["mkdir", "-p", "SHPC/Slice_0/Cyclones"],
             [
 		"$build_dir/Inst_eddies/Tests/test_set_max_speed",
 		"$src_dir/Inst_eddies/Tests/Input/Region_1/huv_region_1_2006_01_01.nc",
diff --git a/Inst_eddies/Tests/test_get_1_outerm.f90 b/Inst_eddies/Tests/test_get_1_outerm.f90
index a17e9d7a..581144ba 100644
--- a/Inst_eddies/Tests/test_get_1_outerm.f90
+++ b/Inst_eddies/Tests/test_get_1_outerm.f90
@@ -57,7 +57,6 @@ program test_get_1_outerm
 
   integer n_cont ! number of good contours found and stored in cont_list
   TYPE(shpfileobject) hshp_cont_list
-
   namelist /main_nml/ ind_targ_extr, innermost_level, cyclone, date, &
        grid_lon_lat
 
diff --git a/Inst_eddies/inst_eddies.py.in b/Inst_eddies/inst_eddies.py.in
index 90aa30e9..c951df16 100644
--- a/Inst_eddies/inst_eddies.py.in
+++ b/Inst_eddies/inst_eddies.py.in
@@ -32,7 +32,8 @@ def loop_inst_eddies(files, bbox, d, my_slice):
     if os.access("config_nml.txt", os.R_OK):
         print("inst_eddies.loop_inst_eddies: Will use config_nml.txt.")
     else:
-        sys.exit('inst_eddies.loop_inst_eddies: "config_nml.txt" not found')
+        sys.exit('inst_eddies.loop_inst_eddies: "config_nml.txt" not found '
+                 '-- Aborting')
 
     nco_instance = nco.Nco()
 
-- 
GitLab