-
Notifications
You must be signed in to change notification settings - Fork 55
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
The question about the data #214
Comments
Dear authors, |
could you share ncdump -h of your file? |
Of course, this is our file. Now, the new error that was Cannot convert from 'dimensionless' (dimensionless) to 'meter' ([length])..I'm sorry to trouble you again. Would you please see what the problem is? |
This is the code which we changed. """
Eddy detection on SLA
=============================
"""
from datetime import datetime
from matplotlib import pyplot as plt
from py_eddy_tracker import data
from py_eddy_tracker.dataset.grid import RegularGridDataset
def start_axes(title):
fig = plt.figure(figsize=(13, 5))
ax = fig.add_axes([0.03, 0.03, 0.90, 0.94])
# ax.set_xlim(-6, 36.5), ax.set_ylim(30, 46)
ax.set_aspect("equal")
ax.set_title(title)
return ax
def update_axes(ax, mappable=None):
ax.grid()
if mappable:
plt.colorbar(mappable, cax=ax.figure.add_axes([0.95, 0.05, 0.01, 0.9]))
g = RegularGridDataset(
data.get_demo_path("/Users/Maybe/Desktop/pred_mra5_20190101_zos.nc"),
"longitude",
"latitude",
)
g.add_uv("prediction", "ugosa", "vgosa")
wavelength = 400
print('here')
g.copy("prediction", "sla_raw")
g.bessel_high_filter("prediction", wavelength)
date = datetime(2019, 1, 1)
kwargs_a_sla = dict(
lw=0.5, label="Anticyclonic SLA ({nb_obs} eddies)", ref=-10, color="g"
)
kwargs_c_sla = dict(lw=0.5, label="Cyclonic SLA ({nb_obs} eddies)", ref=-10, color="b")
a_sla, c_sla = g.eddy_identification("prediction", "ugosa", "vgosa", date, 0.002)
ax = start_axes(f"SLA (m) filtered ({wavelength}km)" + str(date.date()))
m = g.display(ax, "sla", vmin=-0.15, vmax=0.15)
a_sla.display(ax, **kwargs_a_sla), c_sla.display(ax, **kwargs_c_sla)
ax.legend(), update_axes(ax, m)
ax = start_axes("SLA (m)")
m = g.display(ax, "sla_raw", vmin=-0.15, vmax=0.15)
a_sla.display(ax, **kwargs_a_sla), c_sla.display(ax, **kwargs_c_sla)
ax.legend(), update_axes(ax, m)
ax = start_axes("Eddies detected")
a_sla.display(ax, **kwargs_a_sla)
c_sla.display(ax, **kwargs_c_sla)
ax.legend()
update_axes(ax)
plt.show() |
First |
No description provided.
The text was updated successfully, but these errors were encountered: