Skip to content

Commit ec9d56a

Browse files
author
emason
committed
Updated copyright headers. New version will be 3.0.0
1 parent a775661 commit ec9d56a

File tree

10 files changed

+131
-43
lines changed

10 files changed

+131
-43
lines changed

share/eddy_identification.yaml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
1+
12
# Two diagnostics, based on SLA (e.g., Chelton et al, 2011)
23
DIAGNOSTIC_TYPE: 'SLA'
34

45
# Specify domain
56
DOMAIN:
6-
#~ THE_DOMAIN: 'Global'
77
THE_DOMAIN: 'Regional'
8-
LONMIN: -100
9-
LONMAX: -5
10-
LATMIN: 10
11-
LATMAX: 45
12-
DATE_STR: 2014-12-27
13-
DATE_END: 2014-12-31
8+
LONMIN: -40
9+
LONMAX: -10
10+
LATMIN: 18
11+
LATMAX: 34
12+
DATE_STR: 2007-06-27
13+
DATE_END: 2009-12-31
1414

1515
DATASET:
1616
# Path to data
17-
#~ DATA_DIR: '/data/PVA/Externe/global/delayed-time/grids/msla/all-sat-merged/h/2014/'
18-
DATA_DIR: '/home/adelepoulle/2014/'
17+
DATA_DIR: '/marula/emason/data/altimetry/global/delayed-time/grids/msla/all-sat-merged/h/'
1918
# Model to select file
2019
FILES_MODEL: dt_global_allsat_msla_h_????????_????????.nc
2120
# Model to extract date (regular expression)
2221
DATE_REGEXP: dt_global_allsat_msla_h_([0-9]*)_[0-9]*.nc
2322
# Model to transfer date to python datetime
2423
DATE_MODEL: '%Y%m%d'
2524
# Grid Name to compute analysis
26-
VAR_NAME: Grid_0001
25+
VAR_NAME: sla
2726
# Longitude variable
28-
LON_NAME: NbLongitudes
27+
LON_NAME: lon
2928
# Latitude variable
30-
LAT_NAME: NbLatitudes
29+
LAT_NAME: lat
3130
# Step to do SUBSAMPLING (1 no subsampling)
3231
SUBSAMPLING: 1
3332

3433
PATHS:
3534
# Obtain file from:
3635
# http://www-po.coas.oregonstate.edu/research/po/research/rossby_radius/
37-
RW_PATH: 'rossrad.dat'
36+
RW_PATH: '/home/emason/Dropbox/rossrad.dat'
3837
# Path for saving of outputs
39-
SAVE_DIR: 'test/'
38+
SAVE_DIR: '/home/emason/toto/'
4039

4140
# Reference Julian day (Julian date at Jan 1, 1992)
4241
JDAY_REFERENCE: 2448623.
@@ -46,10 +45,11 @@ CONTOUR_PARAMETER:
4645
# Set SLA contour spacing (cm)
4746
CONTOUR_PARAMETER_SLA:
4847
MAX_SLA: 100.
49-
INTERVAL: 0.5
48+
INTERVAL: 0.25
49+
#~ INTERVAL: 1
5050

5151
# Shape error (see Kurian et al 2011)
52-
SHAPE_ERROR: 55. # % (Mason et al 2014 use 55%)
52+
SHAPE_ERROR: 95. # % (Mason et al 2014 use 55%)
5353

5454
# Filtering
5555
SMOOTHING: Yes
@@ -60,9 +60,9 @@ SMOOTHING_SLA:
6060

6161
# Min and max permitted eddy radii [degrees] and amplitudes (cm)
6262
# 0.4 for DT10, 0.35 for DT14
63-
RADMIN: 0.35
63+
RADMIN: 0.15
6464
RADMAX: 4.461
65-
AMPMIN: 0.
65+
AMPMIN: 0.005
6666
AMPMAX: 150.
6767

6868
# MPM14 use 1; CSS11 have no limit
@@ -81,6 +81,7 @@ EVOLVE_AREA_MAX: 500 # max change in area
8181
# - speed-based contour points
8282
# - shape test values
8383
# - profiles of swirl velocity from effective contour inwards
84+
# Useful for working with ARGO data
8485
TRACK_EXTRA_VARIABLES:
8586
- shape_error
8687
- shape_error_s

share/tracking.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ DIAGNOSTIC_TYPE: 'SLA'
44

55
PATHS:
66
# Files produces with EddyIdentification
7-
FILES_PATTERN: id_track/acyc_eddy_stat_19930*.nc
7+
FILES_PATTERN: /data/adelepoulle/Test/Test_eddy/20160330_brasilia_comparaison/brasil/Anticyclonic_*.nc
8+
FILES_PATTERN: /home/emason/toto/Anticyclonic_*.nc
89
# Path and filename of Chelton et al (1998) Rossby radius data
910
# Obtain file from:
1011
# http://www-po.coas.oregonstate.edu/research/po/research/rossby_radius/
11-
RW_PATH: 'rossrad.dat'
12+
RW_PATH: '/home/emason/Dropbox/rossrad.dat'
1213
# Path for saving of outputs
13-
SAVE_DIR: 'tracks_acyc_test/'
14+
SAVE_DIR: '/home/emason/toto/'
1415

1516
# Minimum number of observations to store eddy
1617
TRACK_DURATION_MIN: 4

src/py_eddy_tracker/__init__.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
# -*- coding: utf-8 -*-
2+
"""
3+
===========================================================================
4+
This file is part of py-eddy-tracker.
5+
6+
py-eddy-tracker is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
py-eddy-tracker is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
18+
19+
Copyright (c) 2014-2017 by Antoine Delepoulle and Evan Mason
20+
21+
===========================================================================
22+
23+
__init__.py
24+
25+
Version 3.0.0
26+
27+
===========================================================================
28+
29+
"""
230
from argparse import ArgumentParser
331
import logging
432

src/py_eddy_tracker/grid/__init__.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,32 @@
11
# -*- coding: utf-8 -*-
2+
"""
3+
===========================================================================
4+
This file is part of py-eddy-tracker.
5+
6+
py-eddy-tracker is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
py-eddy-tracker is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
18+
19+
Copyright (c) 2014-2017 by Antoine Delepoulle and Evan Mason
20+
21+
===========================================================================
22+
23+
__init__.py
24+
25+
Version 3.0.0
26+
27+
===========================================================================
28+
"""
29+
230
from netCDF4 import Dataset
331
from scipy import interpolate
432
from scipy import spatial
@@ -347,6 +375,11 @@ def get_aviso_f_pm_pn(self):
347375
lonv = self.half_interp(self.lonpad[:-1], self.lonpad[1:])
348376
latv = self.half_interp(self.latpad[:-1], self.latpad[1:])
349377

378+
print 'self.lonpad.shape',self.lonpad.shape
379+
print 'self.latpad.shape',self.latpad.shape
380+
print 'self.lon.shape',self._lon.shape
381+
print 'self.lat.shape',self._lat.shape
382+
350383
# Get p_m and p_n
351384
p_m = zeros(self.lonpad.shape)
352385
p_m[:, 1:-1] = self.haversine_dist(lonu[:, :-1], latu[:, :-1],

src/py_eddy_tracker/grid/aviso.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,31 @@
11
# -*- coding: utf-8 -*-
2+
"""
3+
===========================================================================
4+
This file is part of py-eddy-tracker.
5+
6+
py-eddy-tracker is free software: you can redistribute it and/or modify
7+
it under the terms of the GNU General Public License as published by
8+
the Free Software Foundation, either version 3 of the License, or
9+
(at your option) any later version.
10+
11+
py-eddy-tracker is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
GNU General Public License for more details.
15+
16+
You should have received a copy of the GNU General Public License
17+
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
18+
19+
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle
20+
21+
===========================================================================
22+
23+
aviso.py
24+
25+
Version 3.0.0
26+
27+
===========================================================================
28+
"""
229
from matplotlib.dates import date2num
330
from scipy import ndimage
431
from scipy import spatial

src/py_eddy_tracker/observations.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
You should have received a copy of the GNU General Public License
1717
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
1818
19-
Copyright (c) 2014-2015 by Evan Mason
19+
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle
2020
2121
===========================================================================
2222
23+
observations.py
2324
24-
py_eddy_tracker_amplitude.py
25-
26-
Version 2.0.3
25+
Version 3.0.0
2726
2827
===========================================================================
2928
@@ -392,6 +391,7 @@ def mask_function(self, other):
392391

393392
@staticmethod
394393
def cost_function(records_in, records_out, distance):
394+
m = EddiesObservations.across_ground(records_in, records_out, distance)
395395
cost = ((records_in['amplitude'] - records_out['amplitude']
396396
) / records_in['amplitude']
397397
) ** 2
@@ -401,7 +401,7 @@ def cost_function(records_in, records_out, distance):
401401
cost += (distance / 125) ** 2
402402
cost **= 0.5
403403
# Mask value superior at 60 % of variation
404-
# return ma.array(cost, mask=m)
404+
return ma.array(cost, mask=m)
405405
return cost
406406

407407
def circle_mask(self, other, radius=100):

src/py_eddy_tracker/property_functions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
You should have received a copy of the GNU General Public License
1818
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
1919
20-
Copyright (c) 2014-2015 by Evan Mason
20+
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle
2121
2222
===========================================================================
2323
24-
py_eddy_tracker_classes.py
24+
property_functions.py
2525
26-
Version 2.0.3
26+
Version 3.0.0
2727
===========================================================================
2828
2929
@@ -206,7 +206,7 @@ def get_uavg(eddy, contours, centlon_e, centlat_e, poly_eff, grd,
206206
poly_eff.vertices[:, 1].copy())
207207

208208
theseglon, theseglat = uniform_resample(
209-
theseglon, theseglat, method='akima')
209+
theseglon, theseglat, method='interp1d')
210210

211211
if 'RectBivariate' in eddy.interp_method:
212212
uavg = eddy.uspd_coeffs.ev(theseglat[1:], theseglon[1:]).mean()
@@ -261,7 +261,7 @@ def get_uavg(eddy, contours, centlon_e, centlat_e, poly_eff, grd,
261261
continue
262262
any_inner_contours = True
263263

264-
seglon, seglat = (poly_i.vertices[:, 0], poly_i.vertices[:, 1])
264+
seglon, seglat = (poly_i.vertices[:, 0].copy(), poly_i.vertices[:, 1].copy())
265265
seglon, seglat = uniform_resample(seglon, seglat, method='interp1d')
266266

267267
# Interpolate uspd to seglon, seglat, then get mean

src/py_eddy_tracker/property_objects.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
You should have received a copy of the GNU General Public License
1717
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
1818
19-
Copyright (c) 2014-2015 by Evan Mason
19+
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle
2020
2121
===========================================================================
2222
23+
property_objects.py
2324
24-
py_eddy_tracker_amplitude.py
25-
26-
Version 2.0.3
25+
Version 3.0.0
2726
2827
===========================================================================
2928
@@ -55,7 +54,7 @@ class Amplitude (object):
5554
grd:
5655
A grid object
5756
"""
58-
___slots__ = (
57+
__slots__ = (
5958
'eddy',
6059
'sla',
6160
'h_0',

src/py_eddy_tracker/tracking.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
You should have received a copy of the GNU General Public License
1717
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
1818
19-
Copyright (c) 2014-2015 by Evan Mason
19+
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle
2020
2121
===========================================================================
2222
23+
tracking.py
2324
24-
py_eddy_tracker_amplitude.py
25-
26-
Version 2.0.3
25+
Version 3.0.0
2726
2827
===========================================================================
2928

src/py_eddy_tracker/tracking_objects.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
You should have received a copy of the GNU General Public License
1818
along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
1919
20-
Copyright (c) 2014-2015 by Evan Mason
20+
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle
2121
2222
===========================================================================
2323
2424
25-
make_eddy_tracker_list_obj.py
25+
tracking_objects.py
2626
27-
Version 2.0.3
27+
Version 3.0.0
2828
2929
3030
===========================================================================

0 commit comments

Comments
 (0)