py-eddy-tracker
py-eddy-tracker copied to clipboard
Request for help
Hello dear Antoine,
I tell you that I have been trying to run this code in various ways for several days.
import os
from datetime import datetime
from matplotlib import pyplot as plt
from py_eddy_tracker.dataset.grid import RegularGridDataset
from netCDF4 import Dataset
#path of the example images
directory = r'/home/user/scripts/eddies/imagen'
#sample file name
file_example = r'nrt_global_allsat_phy_l4_20190223_20190226.nc'
complete_path = os.path.join(directory, file_example)
h = RegularGridDataset(complete_path, "longitude", "latitude")
h.bessel_high_filter("adt", 500, order=3)
date = datetime(2019, 2, 23)
a, c = h.eddy_identification(
"adt",
"ugos",
"vgos", # Variables used for identification
date, # Date of identification
0.002, # step between two isolines of detection (m)
pixel_limit=(5, 2000), # Min and max pixel count for valid contour
shape_error=55, # Error max (%) between ratio of circle fit and contour
)
fig = plt.figure(figsize=(15, 7))
ax = fig.add_axes([0.03, 0.03, 0.94, 0.94])
ax.set_title("Eddies detected -- Cyclonic(red) and Anticyclonic(blue)")
ax.set_ylim(-75, 75)
ax.set_xlim(0, 360)
ax.set_aspect("equal")
a.display(ax, color="b", linewidth=0.5)
c.display(ax, color="r", linewidth=0.5)
ax.grid()
I am a novice, but I have followed the instructions step by step, even with virtual environment in all executions. I installed it in Windows 10 without any error, but it does not give any result in the graph nor in the output in the file. I also tested with WSL on Windows 10 and got the same results.
Because of this I installed Linux mint on from scratch and got the same results. Nothing in the graphical output nor in the files. Please, I find myself quite thoughtful and sad because I don't know how to fix it.
Finally I also entered Binder and ran the same example and i get this.
https://mybinder.org/v2/gh/AntSimi/py-eddy-tracker/master?urlpath=lab/tree/notebooks/python_module/