From 1c47657899f8122466492639431af9f370f672d2 Mon Sep 17 00:00:00 2001
From: Lionel GUEZ <guez@lmd.ens.fr>
Date: Thu, 17 Sep 2020 14:22:50 +0200
Subject: [PATCH] Move window before the keyword-only arguments

Move argument window before the keyword-only arguments. Preparing for
using the function in an animation.
---
 Analysis/plot_snapshot.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Analysis/plot_snapshot.py b/Analysis/plot_snapshot.py
index 9de42137..1b2ac0cf 100755
--- a/Analysis/plot_snapshot.py
+++ b/Analysis/plot_snapshot.py
@@ -28,9 +28,9 @@ import cartopy.crs as ccrs
 from os import path
 from cartopy.mpl import geoaxes
 
-def snapshot(k, shp_tr_dir, *, dashed = False, light = False,
+def snapshot(k, shp_tr_dir, window = None, *, dashed = False, light = False,
              new_figure = False, src_crs = ccrs.PlateCarree(),
-             projection = ccrs.PlateCarree(), window = None):
+             projection = ccrs.PlateCarree()):
     """Plots extrema, outermost contours and max-speed contours.
 
     shp_tr_dir: containing the three shapefiles.
@@ -227,8 +227,8 @@ if __name__ == "__main__":
                 marker = "+", color = "gray", linestyle = "None")
 
     if args.window is None: plot_grid_bb(args.shp_tr_dir, ax)
-    snapshot(args.k, args.shp_tr_dir, dashed = args.dashed,
-             light = args.light, window = args.window)
+    snapshot(args.k, args.shp_tr_dir, args.window, dashed = args.dashed,
+             light = args.light)
 
     if args.velocity:
         with netCDF4.Dataset("uv.nc") as f:
-- 
GitLab