py-eddy-tracker icon indicating copy to clipboard operation
py-eddy-tracker copied to clipboard

Problem while tracking eddies: NetCDF: Filter error: bad id or parameters or duplicate filter

Open amarux opened this issue 3 years ago • 1 comments

Hi @AntSimi,

I am trying to use py-eddy-tracker which was installed on Linux Ubuntu 22.04 with a Python 3.9.12 from Anaconda3-2022.05-Linux-x86_64.

Specifically , I used the following commands to install py-eddy-tracker:

pip install numpy scipy netCDF4 matplotlib opencv-python pyyaml pint polygon3
git clone https://github.com/AntSimi/py-eddy-tracker
python setup.py install

Eddy identification on individual time steps does not generates any error. However, I got an error when I trying to track eddies with the below yaml file specifications:

PATHS:
  # Files produces with EddyIdentification
  FILES_PATTERN: /home/amarquez/Documents/GMOG/SATELLITE/AVISO/EDDY_IDENTIFICATION/UNFILTERED/Cyclonic_GoM*.nc
  SAVE_DIR: /home/amarquez/Documents/GMOG/SATELLITE/AVISO/EDDY_TRACKING/UNFILTERED/

# Number of timestep for missing detection
VIRTUAL_LENGTH_MAX: 5
# Minimal time to consider as a full track
TRACK_DURATION_MIN: 10

The error I got is:

INFO 2022-07-22 21:01:24,858 tracking.to_netcdf :
	Create correspondance file
	DEBUG 2022-07-22 21:01:24,859 	tracking.	to_netcdf :
		Create Dimensions "Nlink" : 26
	DEBUG 2022-07-22 21:01:24,859 	tracking.	to_netcdf :
		Create Dimensions "Nstep" : 1460
Traceback (most recent call last):
  File "/home/amarquez/anaconda3/bin/EddyTracking", line 33, in <module>
    sys.exit(load_entry_point('pyEddyTracker==3.6.0+9.g5b2f6ff', 'console_scripts', 'EddyTracking')())
  File "/home/amarquez/anaconda3/lib/python3.9/site-packages/pyEddyTracker-3.6.0+9.g5b2f6ff-py3.9.egg/py_eddy_tracker/appli/eddies.py", line 211, in eddies_tracking
    track(
  File "/home/amarquez/anaconda3/lib/python3.9/site-packages/pyEddyTracker-3.6.0+9.g5b2f6ff-py3.9.egg/py_eddy_tracker/appli/eddies.py", line 337, in track
    c.save(c_out, kw_save)
  File "/home/amarquez/anaconda3/lib/python3.9/site-packages/pyEddyTracker-3.6.0+9.g5b2f6ff-py3.9.egg/py_eddy_tracker/tracking.py", line 494, in save
    self.to_netcdf(h_nc)
  File "/home/amarquez/anaconda3/lib/python3.9/site-packages/pyEddyTracker-3.6.0+9.g5b2f6ff-py3.9.egg/py_eddy_tracker/tracking.py", line 412, in to_netcdf
    var_file_in = handler.createVariable(
  File "src/netCDF4/_netCDF4.pyx", line 2838, in netCDF4._netCDF4.Dataset.createVariable
  File "src/netCDF4/_netCDF4.pyx", line 4003, in netCDF4._netCDF4.Variable.__init__
  File "src/netCDF4/_netCDF4.pyx", line 1965, in netCDF4._netCDF4._ensure_nc_success
RuntimeError: NetCDF: Filter error: bad id or parameters or duplicate filter

Could you help to find the problem?

Thanks a lot

amarux avatar Jul 23 '22 04:07 amarux

I wrote small changes in the [netcdf_filter branch] (https://github.com/AntSimi/py-eddy-tracker/tree/netcdf_filter), can you try it and tell me if it solves your problem? If the result is positive, I will release a new version.

This is related to https://github.com/Unidata/netcdf4-python/issues/1175#issuecomment-1173142506

AntSimi avatar Jul 25 '22 07:07 AntSimi