Changeset 13468
- Timestamp:
- 2020-09-15T11:48:27+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/STATION_ASF/EXPREF/plot_station_asf.py
r13264 r13468 1 #!/usr/bin/env python 1 #!/usr/bin/env python3 2 2 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- 3 3 4 # Post-diagnostic of STATION_ASF / L. Brodeau, 20 194 # Post-diagnostic of STATION_ASF / L. Brodeau, 2020 5 5 6 6 import sys 7 7 from os import path as path 8 #from string import replace9 8 import math 10 9 import numpy as nmp 11 #import scipy.signal as signal12 10 from netCDF4 import Dataset 13 11 import matplotlib as mpl … … 15 13 import matplotlib.pyplot as plt 16 14 import matplotlib.dates as mdates 17 #from string import find18 #import warnings19 #warnings.filterwarnings("ignore")20 #import time21 22 #import barakuda_plot as bp23 #import barakuda_tool as bt24 25 reload(sys)26 sys.setdefaultencoding('utf8')27 15 28 16 cy1 = '2018' ; # First year … … 68 56 narg = len(sys.argv) 69 57 if narg != 2: 70 print 'Usage: '+sys.argv[0]+' <DIR_OUT_SASF>'; sys.exit(0)58 print('Usage: '+sys.argv[0]+' <DIR_OUT_SASF>'); sys.exit(0) 71 59 cdir_data = sys.argv[1] 72 60 … … 78 66 def chck4f(cf): 79 67 cmesg = 'ERROR: File '+cf+' does not exist !!!' 80 if not path.exists(cf): print cmesg; sys.exit(0)68 if not path.exists(cf): print(cmesg); sys.exit(0) 81 69 82 70 ###cf_in = nmp.empty((), dtype="S10") … … 176 164 rmlt = 10.**(int(romagn)) / 2. 177 165 yrng = math.copysign( math.ceil(abs(rmax)/rmlt)*rmlt , rmax) 178 #print 'yrng = ', yrng ; #sys.exit(0)179 166 180 167 fig = plt.figure(num = 10+jv, figsize=size_fig, facecolor='w', edgecolor='k') … … 225 212 rmlt = 10.**(int(romagn)) / 2. 226 213 yrng = math.copysign( math.ceil(abs(rmax)/rmlt)*rmlt , rmax) 227 print 'yrng = ', yrng ; #sys.exit(0) 228 229 230 231 214 215 232 216 for ja in range(nb_algos-1): 233 217
Note: See TracChangeset
for help on using the changeset viewer.