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

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

Closed
amarux opened this issue Jul 23, 2022 · 1 comment

Comments

@amarux
Copy link

amarux commented Jul 23, 2022

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

@AntSimi
Copy link
Owner

AntSimi commented Jul 25, 2022

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 Unidata/netcdf4-python#1175 (comment)

@AntSimi AntSimi closed this as completed Dec 16, 2022
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