AntSimi / py-eddy-tracker

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

Problems encountered during eddy identification process. #245

Open ttddpsj opened 1 week ago

ttddpsj commented 1 week ago

Hello, I am trying to use your publicly available code for eddy identification, but I encountered a problem while running the identification code. The process of calculating u, v, and drawing the counter went smoothly, but when identifying eddies, I obtained the following results:

d49079bd-1883-4bd8-9ef7-34b01af6d049

As shown in the figure, the code has identified the number of cyclonic and anticyclonic vortices, but there was an unclosed situation during drawing. Can you provide me with some problem-solving ideas? Here is the information for my input data:

dimensions: bounds = 2; longitude = 561; latitude = 201; time = 1; variables: int sla(time=1, latitude=201, longitude=561); :_FillValue = -2147483647; // int :ancillary_variables = "err_sla"; :comment = "The sea level anomaly is the sea surface height above mean sea surface; it is referenced to the [1993, 2012] period; see the product user manual for details"; :grid_mapping = "crs"; :long_name = "Sea level anomaly"; :standard_name = "sea_surface_height_above_sea_level"; :units = "m"; :coordinates = "longitude latitude"; :scale_factor = 1.0E-4; // double :_ChunkSizes = 1U, 201U, 561U; // uint

double longitude(longitude=561);
  :axis = "X";
  :long_name = "Longitude";
  :units = "degrees_east";
  :valid_max = 350.0; // double
  :valid_min = 280.0; // double
  :bounds = "lon_bnds";
  :standard_name = "longitude";

float latitude(latitude=201);
  :axis = "Y";
  :bounds = "lat_bnds";
  :long_name = "Latitude";
  :standard_name = "latitude";
  :units = "degrees_north";
  :valid_max = 50.0; // double
  :valid_min = 25.0; // double
  :_ChunkSizes = 201U; // uint

float time(time=1);
  :axis = "T";
  :long_name = "Time";
  :standard_name = "time";
  :units = "days since 1950-01-01";
  :calendar = "gregorian";
  :_ChunkSizes = 1U; // uint

int ugosa(time=1, latitude=201, longitude=561);
  :_FillValue = -2147483647; // int
  :ancillary_variables = "err_ugosa";
  :comment = "The geostrophic velocity anomalies are referenced to the [1993, 2012] period";
  :grid_mapping = "crs";
  :long_name = "Geostrophic velocity anomalies: zonal component";
  :standard_name = "surface_geostrophic_eastward_sea_water_velocity_assuming_sea_level_for_geoid";
  :units = "m/s";
  :coordinates = "longitude latitude";
  :scale_factor = 1.0E-4; // double
  :_ChunkSizes = 1U, 201U, 561U; // uint

int vgosa(time=1, latitude=201, longitude=561);
  :_FillValue = -2147483647; // int
  :ancillary_variables = "err_vgosa";
  :comment = "The geostrophic velocity anomalies are referenced to the [1993, 2012] period";
  :grid_mapping = "crs";
  :long_name = "Geostrophic velocity anomalies: meridian component";
  :standard_name = "surface_geostrophic_northward_sea_water_velocity_assuming_sea_level_for_geoid";
  :units = "m/s";
  :coordinates = "longitude latitude";
  :scale_factor = 1.0E-4; // double
  :_ChunkSizes = 1U, 201U, 561U; // uint

int relative_vorticity(time=1, latitude=201, longitude=561);
  :_FillValue = -2147483647; // int
  :coordinates = "longitude latitude";
  :scale_factor = 1.0E-4; // double
  :_ChunkSizes = 1U, 201U, 561U; // uint

int adt(time=1, latitude=201, longitude=561);
  :_FillValue = -2147483647; // int
  :comment = "The absolute dynamic topography is the sea surface height above geoid; the adt is obtained as follows: adt=sla+mdt where mdt is the mean dynamic topography; see the product user manual for details";
  :grid_mapping = "crs";
  :long_name = "Absolute dynamic topography";
  :standard_name = "sea_surface_height_above_geoid";
  :units = "m";
  :coordinates = "longitude latitude";
  :scale_factor = 1.0E-4; // double
  :_ChunkSizes = 1U, 201U, 561U; // uint

int ugos(time=1, latitude=201, longitude=561);
  :_FillValue = -2147483647; // int
  :grid_mapping = "crs";
  :long_name = "Absolute geostrophic velocity: zonal component";
  :standard_name = "surface_geostrophic_eastward_sea_water_velocity";
  :units = "m/s";
  :coordinates = "longitude latitude";
  :scale_factor = 1.0E-4; // double
  :_ChunkSizes = 1U, 201U, 561U; // uint

int vgos(time=1, latitude=201, longitude=561);
  :_FillValue = -2147483647; // int
  :grid_mapping = "crs";
  :long_name = "Absolute geostrophic velocity: meridian component";
  :standard_name = "surface_geostrophic_northward_sea_water_velocity";
  :units = "m/s";
  :coordinates = "longitude latitude";
  :scale_factor = 1.0E-4; // double
  :_ChunkSizes = 1U, 201U, 561U; // uint

double longitude_bounds(longitude=561, bounds=2);
  :_FillValue = NaN; // double

double latitude_bounds(latitude=201, bounds=2);
  :_FillValue = NaN; // double

// global attributes: :description = " 4DvarNET analysis "; :Conventions = "CF-1.6"; :Metadata_Conventions = "Unidata Dataset Discovery v1.0"; :cdm_data_type = "Grid"; :comment = "Sea Surface Height measured by Altimetry and derived variables"; :contact = ""; :creator_email = ""; :creator_name = ""; :creator_url = "https://www.aviso.altimetry.fr/en/home.html"; :date_created = "2024-05-21T00:00:00Z"; :date_issued = "2024-05-21T00:00:00Z"; :date_modified = "2024-05-21T00:00:00Z"; :geospatial_lat_max = 50.0; // double :geospatial_lat_min = 25.0; // double :geospatial_lat_resolution = 0.125; // double :geospatial_lat_units = "degrees_north"; :geospatial_lon_max = 350.0; // double :geospatial_lon_min = 280.0; // double :geospatial_lon_resolution = 0.125; // double :geospatial_lon_units = "degrees_east"; :geospatial_vertical_max = 0.0; // double :geospatial_vertical_min = 0.0; // double :geospatial_vertical_positive = "down"; :geospatial_vertical_resolution = "point"; :geospatial_vertical_units = "m"; :history = "2024-05-21T00:00:00Z: Creation"; :institution = "CLS, CNES"; :keywords = "Oceans > Ocean Topography > Sea Surface Height"; :keywords_vocabulary = "NetCDF COARDS Climate and Forecast Standard Names"; :license = ""; :platform = "Altika Drifting Phase, Cryosat-2, Haiyang-2B, Jason-3, Sentinel-3A, Sentinel-3B, Sentinel-6A, SWOT"; :processing_level = "L4"; :product_version = "v0.3"; :project = "DUACS R&D"; :references = "https://www.aviso.altimetry.fr/en/home.html"; :software_version = "v2024.CNES"; :source = "Altimetry measurements"; :ssalto_duacs_comment = "The reference mission used for the altimeter inter-calibration processing is Topex/Poseidon between 1993-01-01 and 2002-04-23, Jason-1 between 2002-04-24 and 2008-10-18, OSTM/Jason-2 between 2008-10-19 and 2016-06-25, Jason-3 since 2016-06-25."; :standard_name_vocabulary = "NetCDF Climate and Forecast (CF) Metadata Convention Standard Name Table v37"; :summary = "Experimental SSALTO/DUACS Delayed-Time Level-4 sea surface height and derived variables measured by multi-satellite altimetry observations over the North Atlantic Ocean."; :time_coverage_duration = "P1D"; :time_coverage_resolution = "P1D"; :title = "DT merged all satellites North Atlantic Ocean Gridded Experimental SSALTO/DUACS Sea Surface Height L4 product (4DvarNET) and derived variables"; :coordinates = "latitude_bounds longitude_bounds"; :time_coverage_start = "2023-07-27T12:00:00Z"; :time_coverage_end = "2023-07-27T12:00:00Z"; }

ttddpsj commented 6 days ago

This is my input file: dt_north-atlantic_allsat_phy_l4_20230727_20240521.zip

My Python version is:3.9.10 My numpy version is:1.22.4 My matplotlib version is:3.7.0 I am using the Windows system.

ttddpsj commented 6 days ago

Perhaps there was an issue with the latitude and longitude settings during the eddy identification process, as I obtained the following image: 6f2d5b85-fb7c-4c00-b48b-a3291cfc1f2e Based on this image, it can be seen that the eddy has indeed been identified, but the longitude and latitude do not correspond to the longitude and latitude of the input file. How should I adjust the code to obtain the correct output?