AntSimi / py-eddy-tracker

Eddy identification and tracking
https://py-eddy-tracker.readthedocs.io/en/latest/
GNU General Public License v3.0
120 stars 48 forks source link

About tracking eddy files #191

Closed hanyangliu1002 closed 1 year ago

hanyangliu1002 commented 1 year ago

Dear Dr.AntSimi,

  1. I can output the one day cyclonic/ Anticyclonic .nc file, but how to output for more long time, such as month, year.... (e.g. example(Track in python))
  2. I download the data (MESOSCALE EDDY TRAJECTORY ATLAS PRODUCT) from AVISO, can we use this data to track and analyze eddies(e.g. plot the Lifetime Histogarm or tracking eddies). the data period is 1993/01/01 to 2020/03/07, Can we extract the time we want to study from this data
    1. When I use the example (Lifetime Histogram) ,show the flowing error :

File was created with py-eddy-tracker version 'None' but software version is '3.6' File was created with py-eddy-tracker version 'None' but software version is '3.6' x:\MasterStudent_HY\PET-Method\Lifetime\pet_lifetime.py:57: RuntimeWarning: invalid value encountered in true_divide ax_ratio_cum.plot(x, cum_c / cum_a) x:\MasterStudent_HY\PET-Method\Lifetime\pet_lifetime.py:58: RuntimeWarning: divide by zero encountered in true_divide ax_ratio.plot(x, nb_c / nb_a) x:\MasterStudent_HY\PET-Method\Lifetime\pet_lifetime.py:58: RuntimeWarning: invalid value encountered in true_divide ax_ratio.plot(x, nb_c / nb_a)

what should I do ?

Many thanks for your help!!!

H.Y.

AntSimi commented 1 year ago

This is not error but warning which are also visible on example

hanyangliu1002 commented 1 year ago
  1. Thank you for your answer, I can plot the example (Lifetime histogram) successfully.
  2. I try the data (META3.1exp_DT_allsat_Anticyclonic_long_19930101_20200307 and META3.1exp_DT_allsat_Cyclonic_long_19930101_20200307.nc) to plot the Lifetime histogram but show the following error : File was created with py-eddy-tracker version '3.3.1' but software version is '3.6' Traceback (most recent call last): File "x:\MasterStudent_HY\PET-Method\Lifetime\lifetime.py", line 9, in a = TrackEddiesObservations.load_file(Ant_path) File "C:\Users\Justin\AppData\Local\Programs\Python\Python37\lib\site-packages\py_eddy_tracker\observations\observation.py", line 754, in load_file return cls.load_from_netcdf(filename, *kwargs) File "C:\Users\Justin\AppData\Local\Programs\Python\Python37\lib\site-packages\py_eddy_tracker\observations\observation.py", line 1000, in load_from_netcdf eddies.obs[var_inv] = h_nc.variables[variable][var_sl] File "netCDF4_netCDF4.pyx", line 4508, in netCDF4._netCDF4.Variable.getitem File "C:\Users\Justin\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\ma\core.py", line 4135, in add return add(self, other) File "C:\Users\Justin\AppData\Local\Programs\Python\Python37\lib\site-packages\numpy\ma\core.py", line 1015, in call result = self.f(da, db, args, **kwargs) numpy.core._exceptions.MemoryError: Unable to allocate 11.9 GiB for an array with shape (32054678, 50) and data type float64

How to solve this problem ? Do I need to modify the data ((MESOSCALE EDDY TRAJECTORY ATLAS PRODUCT) to a smaller time period ?

Many thanks for your help!!!

H.Y.

AntSimi commented 1 year ago

To reduce memory comsumption you could select field loaded, or do a subset of atlas with EddySubSetter on various criterions.

hanyangliu1002 commented 1 year ago

Dear Dr.AntSimi,

Thank you for your answer. How do I select field loaded and What instruction can use ?

Can we use this indexs=dict(variable=silce(,))

AntSimi commented 1 year ago

You could look at the documentation here