Observations¶
py-eddy-tracker is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
py-eddy-tracker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle Email: emason@imedea.uib-csic.es ===========================================================================
observation.py
Version 3.0.0
-
class
py_eddy_tracker.observations.observation.
EddiesObservations
(size=0, track_extra_variables=None, track_array_variables=0, array_variables=None, only_variables=None, raw_data=False)[source]¶ Bases:
object
Class to hold eddy properties amplitude and counts of local maxima/minima within a closed region of a sea level anomaly field.
-
ELEMENTS
= ['lon', 'lat', 'radius_s', 'radius_e', 'amplitude', 'speed_average', 'time', 'shape_error_e', 'shape_error_s', 'nb_contour_selected', 'num_point_e', 'num_point_s', 'height_max_speed_contour', 'height_external_contour', 'height_inner_contour']¶
-
array_variables
¶
-
static
basic_formula_ellips_major_axis
(lats, cmin=1.5, cmax=10.0, c0=1.5, lat1=13.5, lat2=5.0, degrees=False)[source]¶ Give major axis in km with a given latitude
-
classmethod
cost_function_common_area
(xy_in, xy_out, distance, intern=False)[source]¶ How does it work on x bound ?
Parameters: - xy_in –
- xy_out –
- distance –
- intern (bool) –
-
create_variable
(handler_nc, kwargs_variable, attr_variable, data, scale_factor=None, add_offset=None, **kwargs)[source]¶
-
create_variable_zarr
(handler_zarr, kwargs_variable, attr_variable, data, scale_factor=None, add_offset=None, filters=None, compressor=None)[source]¶
-
distance
(other)[source]¶ Use haversine distance for distance matrix between every self and other eddies
-
dtype
¶ Return dtype to build numpy array
-
elements
¶ Return all variable name
-
global_attr
¶
-
latitude
¶
-
classmethod
load_from_netcdf
(filename, raw_data=False, remove_vars=None, include_vars=None)[source]¶
-
longitude
¶
-
obs
¶ return an array observations
-
observation_number
¶
-
observations
¶
-
only_variables
¶
-
propagate
(previous_obs, current_obs, obs_to_extend, dead_track, nb_next, model)[source]¶ Filled virtual obs (C)
Parameters: - previous_obs – previous obs from current (A)
- current_obs – previous obs from virtual (B)
- obs_to_extend –
- dead_track –
- nb_next –
- model –
Returns: New position C = B + AB
-
raw_data
¶
-
shape
¶
-
sign_legend
¶
-
sign_type
¶
-
time
¶
-
track_array_variables
¶
-
track_extra_variables
¶
-
tracks
¶
-
-
class
py_eddy_tracker.observations.observation.
VirtualEddiesObservations
(size=0, track_extra_variables=None, track_array_variables=0, array_variables=None, only_variables=None, raw_data=False)[source]¶ Bases:
py_eddy_tracker.observations.observation.EddiesObservations
Class to work with virtual obs
-
elements
¶ Return all variable name
-
-
py_eddy_tracker.observations.observation.
shifted_ellipsoid_degrees_mask2
[source]¶ work only if major is an array but faster * 6
py-eddy-tracker is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
py-eddy-tracker is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with py-eddy-tracker. If not, see <http://www.gnu.org/licenses/>.
Copyright (c) 2014-2017 by Evan Mason and Antoine Delepoulle Email: emason@imedea.uib-csic.es ===========================================================================
tracking.py
Version 3.0.0
-
class
py_eddy_tracker.observations.tracking.
TrackEddiesObservations
(*args, **kwargs)[source]¶ Bases:
py_eddy_tracker.observations.observation.EddiesObservations
Class to practice Tracking on observations
-
ELEMENTS
= ['lon', 'lat', 'radius_s', 'radius_e', 'amplitude', 'speed_average', 'time', 'shape_error_e', 'shape_error_s', 'nb_contour_selected', 'num_point_e', 'num_point_s', 'height_max_speed_contour', 'height_external_contour', 'height_inner_contour', 'cost_association']¶
-
NOGROUP
= 0¶
-
elements
¶ Return all variable name
-
extract_longer_eddies
(nb_min, nb_obs, compress_id=True)[source]¶ Select eddies which are longer than nb_min
-
extract_with_area
(area, **kwargs)[source]¶ Extract with a bounding box
Parameters: area (dict) – 4 coordinates in a dictionary to specify bounding box (lower left corner and upper right corner)
-
extract_with_period
(period, **kwargs)[source]¶ Extract with a period
Parameters: period ((datetime.datetime,datetime.datetime)) – two date to define period, must be specify from 1/1/1950 Returns: same object with selected data
-
index_from_track
¶
-
nb_obs_by_track
¶
-
period
¶ Give time coverage Returns: 2 date
-
-
py_eddy_tracker.observations.tracking.
track_loess_filter
[source]¶ Apply a loess filter on y field
Parameters: Returns: Array smoothed
Return type: array_like