Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for help #216

Open
RandomlyHuman opened this issue Oct 3, 2023 · 3 comments
Open

Request for help #216

RandomlyHuman opened this issue Oct 3, 2023 · 3 comments

Comments

@RandomlyHuman
Copy link

RandomlyHuman commented Oct 3, 2023

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()

1
2

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/

3
4

@RandomlyHuman
Copy link
Author

Additionally, if you look at both graphs, only one eddy is identified between the coordinates y = -40 and X = -25 approximately. Also I forgot to give you the version of python that is running the Python 3.10.12 system.

@AntSimi
Copy link
Owner

AntSimi commented Oct 4, 2023

To get isoline with use matplotlib contour function, and this method change in last version.
Use a version of matplotlib < 3.8.0, until we manage this issue.

@RandomlyHuman
Copy link
Author

I thank you immensely for your valuable help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants