Skip to content

Commit 534e882

Browse files
committed
add missing requirements
1 parent 5c05cc6 commit 534e882

File tree

3 files changed

+51
-61
lines changed

3 files changed

+51
-61
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pint
77
polygon3
88
pyproj
99
pyyaml
10+
requests
1011
scipy
1112
zarr
1213
# for binder

setup.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
with open("README.md", "r") as fh:
66
long_description = fh.read()
7+
with open("requirements.txt", "r") as fh:
8+
requirements = fh.read().split("\n")
79

810
setup(
911
name="pyEddyTracker",
@@ -44,17 +46,5 @@
4446
"py_eddy_tracker.featured_tracking": ["*.nc"],
4547
"py_eddy_tracker": ["data/*.nc"],
4648
},
47-
install_requires=[
48-
"matplotlib",
49-
"netCDF4>=1.1.0",
50-
"numba",
51-
"numpy>=1.14",
52-
"opencv-python",
53-
"pint",
54-
"polygon3",
55-
"pyproj",
56-
"pyyaml",
57-
"scipy>=0.15.1",
58-
"zarr",
59-
],
49+
install_requires=requirements,
6050
)

share/fig.py

Lines changed: 47 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,55 @@
66
"longitude",
77
"latitude",
88
)
9-
if False:
109

11-
h = RegularGridDataset(grid_name, lon_name, lat_name)
10+
h = RegularGridDataset(grid_name, lon_name, lat_name)
1211

13-
fig = plt.figure(figsize=(14, 12))
14-
ax = fig.add_axes([0.02, 0.51, 0.9, 0.45])
15-
ax.set_title("ADT (m)")
16-
ax.set_ylim(-75, 75)
17-
ax.set_aspect("equal")
18-
m = h.display(ax, name="adt", vmin=-1, vmax=1)
19-
ax.grid(True)
20-
plt.colorbar(m, cax=fig.add_axes([0.94, 0.51, 0.01, 0.45]))
21-
h = RegularGridDataset(grid_name, lon_name, lat_name)
22-
h.bessel_high_filter("adt", 500, order=3)
23-
ax = fig.add_axes([0.02, 0.02, 0.9, 0.45])
24-
ax.set_title("ADT Filtered (m)")
25-
ax.set_aspect("equal")
26-
ax.set_ylim(-75, 75)
27-
m = h.display(ax, name="adt", vmin=-0.1, vmax=0.1)
28-
ax.grid(True)
29-
plt.colorbar(m, cax=fig.add_axes([0.94, 0.02, 0.01, 0.45]))
30-
fig.savefig("png/filter.png")
12+
fig = plt.figure(figsize=(14, 12))
13+
ax = fig.add_axes([0.02, 0.51, 0.9, 0.45])
14+
ax.set_title("ADT (m)")
15+
ax.set_ylim(-75, 75)
16+
ax.set_aspect("equal")
17+
m = h.display(ax, name="adt", vmin=-1, vmax=1)
18+
ax.grid(True)
19+
plt.colorbar(m, cax=fig.add_axes([0.94, 0.51, 0.01, 0.45]))
20+
h = RegularGridDataset(grid_name, lon_name, lat_name)
21+
h.bessel_high_filter("adt", 500, order=3)
22+
ax = fig.add_axes([0.02, 0.02, 0.9, 0.45])
23+
ax.set_title("ADT Filtered (m)")
24+
ax.set_aspect("equal")
25+
ax.set_ylim(-75, 75)
26+
m = h.display(ax, name="adt", vmin=-0.1, vmax=0.1)
27+
ax.grid(True)
28+
plt.colorbar(m, cax=fig.add_axes([0.94, 0.02, 0.01, 0.45]))
29+
fig.savefig("png/filter.png")
3130

32-
if True:
33-
import logging
3431

35-
logging.getLogger().setLevel("DEBUG") # Values: ERROR, WARNING, INFO, DEBUG
36-
from datetime import datetime
32+
import logging
3733

38-
h = RegularGridDataset(grid_name, lon_name, lat_name)
39-
h.bessel_high_filter("adt", 500, order=3)
40-
# h.bessel_high_filter('adt', 300, order=1)
41-
date = datetime(2019, 2, 23)
42-
a, c = h.eddy_identification(
43-
"adt",
44-
"ugos",
45-
"vgos", # Variable to use for identification
46-
date, # Date of identification
47-
0.002, # step between two isolines of detection (m)
48-
# 0.02, # step between two isolines of detection (m)
49-
pixel_limit=(5, 2000), # Min and max of pixel can be include in contour
50-
shape_error=55, # Error maximal of circle fitting over contour to be accepted
51-
)
52-
fig = plt.figure(figsize=(15, 7))
53-
ax = fig.add_axes([0.03, 0.03, 0.94, 0.94])
54-
ax.set_title("Eddies detected -- Cyclonic(red) and Anticyclonic(blue)")
55-
ax.set_ylim(-75, 75)
56-
ax.set_xlim(0, 360)
57-
ax.set_aspect("equal")
58-
a.display(ax, color="b", linewidth=0.5)
59-
c.display(ax, color="r", linewidth=0.5)
60-
ax.grid()
61-
fig.savefig("png/eddies.png")
34+
logging.getLogger().setLevel("DEBUG") # Values: ERROR, WARNING, INFO, DEBUG
35+
from datetime import datetime
36+
37+
h = RegularGridDataset(grid_name, lon_name, lat_name)
38+
h.bessel_high_filter("adt", 500, order=3)
39+
# h.bessel_high_filter('adt', 300, order=1)
40+
date = datetime(2019, 2, 23)
41+
a, c = h.eddy_identification(
42+
"adt",
43+
"ugos",
44+
"vgos", # Variable to use for identification
45+
date, # Date of identification
46+
0.002, # step between two isolines of detection (m)
47+
# 0.02, # step between two isolines of detection (m)
48+
pixel_limit=(5, 2000), # Min and max of pixel can be include in contour
49+
shape_error=55, # Error maximal of circle fitting over contour to be accepted
50+
)
51+
fig = plt.figure(figsize=(15, 7))
52+
ax = fig.add_axes([0.03, 0.03, 0.94, 0.94])
53+
ax.set_title("Eddies detected -- Cyclonic(red) and Anticyclonic(blue)")
54+
ax.set_ylim(-75, 75)
55+
ax.set_xlim(0, 360)
56+
ax.set_aspect("equal")
57+
a.display(ax, color="b", linewidth=0.5)
58+
c.display(ax, color="r", linewidth=0.5)
59+
ax.grid()
60+
fig.savefig("png/eddies.png")

0 commit comments

Comments
 (0)