Closed doge-py closed 11 months ago
after changing acess data method from MOTU to ftp, got the same errors from here Unit error block EddyId #2.
July 27, 2023 after some research, problem solved when I add force_speed_unit="m/s" to eddy_identification, but I still want to know how to apply data obtained from MOTU because it seems that ftp can't subset data variables? (not quite sure about it)
#Activate verbose
from py_eddy_tracker import start_logger
start_logger().setLevel("DEBUG") # Available options: ERROR, WARNING, INFO, DEBUG
#Run identification
from datetime import datetime
from py_eddy_tracker.dataset.grid import RegularGridDataset
grid_name = "mercatorglorys12v1_gl12_mean_20110101_R20110105_subset.nc"
lon_name = "longitude"
lat_name = "latitude"
h = RegularGridDataset(grid_name, lon_name, lat_name)
h.bessel_high_filter("zos", 500, order=3)
date = datetime(2011, 1, 1)
h.add_uv("zos","ugos","vgos")
a, c = h.eddy_identification(
"zos",
"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
force_speed_unit="m/s"
)
#Save identification data
from netCDF import Dataset
with Dataset(date.strftime("Anticyclonic_%Y%m%d.nc"), "w") as h:
a.to_netcdf(h)
with Dataset(date.strftime("Cyclonic_%Y%m%d.nc"), "w") as h:
c.to_netcdf(h)
Best regards,
doge
MOTU do some modifications from original file, last time i check this tools create a mix of nan and masked value. Maybe you could try to use 'nan_masking' options https://github.com/AntSimi/py-eddy-tracker/issues/111#issuecomment-947071363
I followed your suggestions and add "nan_masking=True" to the code, but unfortunately, the issue still persists and got exactly same error message. I'm thankful for your assistance.
could you share your file in order to reproduce bug?
I subsetted it as following: time: 2020,12,31 ~ 2020,12,31 lon: 67 ~ 105 lat: -37 ~ -29 elevation: -0.49 ~ -0.49 variable: uo, vo, zos
with latest version you must avoid this exception with& without nan_masking option
It worked; I really appreciate your help!
Hello, I'm trying to apply adt data from cmems GLOBAL_MULTIYEAR_PHY_001_030 to py-eddy-tracker identification, but encounter error as following:
error:
my code:
other information:
numpy version : 1.24.4 numba version : 0.57.1 python version : 3.11.3
Best regards,
doge