PolygonStats2D_ageBased#
Doc: Counts particles inside given polygons as a histogram binned by particle age, useful in tracking ages class of larvae. The particles counted can be subsetted by status, water depth etc, default is all alive particles not outside open boundaries. Alive particles have stationary, no_bottom, stranded or moving status Output in netcdf file split into release groups and age bins for the entire run ( or user given start to end times) has at least - counts of particles in the requested subset - counts of all alive particles inside the domain, whether in the subset or not - counts of all released particles inside the domain, whether in the subset or not
short class_name: PolygonStats2D_ageBased
full class_name : oceantracker.particle_statistics.polygon_statistics.PolygonStats2D_ageBased
Warning
Class is under development may not yet work in all cases, if errors contact developer
Inheritance: > ParameterBaseClass> _BaseParticleLocationStats> _BasePolygonStats> _BaseAgeStats> PolygonStats2D_ageBased
Parameters:#
age_bin_size<class 'float'><isrequired>Description: Size of bins to count ages into
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
secmin:
1
class_name<class 'str'><optional>Description: Class name as string A.B.C, used to import this class from python path
default:
Nonedata_type:
<class 'str'>deprecated:
False
connectivity_denominator<class 'str'><optional>Description: Denominator used to compute connectivity_matrix written to the output file. “all_alive” (default): divide by count_all_alive_particles (particles alive at each time step / age bin). “all_released”: divide by count_all_released_age_bins (age-based) or num_released (time-based), i.e. total unique particles released — useful for settlement-probability-style connectivity.
default:
all_alivedata_type:
<class 'str'>deprecated:
Falsepossible_values:
['all_alive', 'all_released']
counting_probability<class 'float'><optional>Description: Probability [0,1] that an eligible particle is counted at each update interval. E.g. 0.1 gives a ~10%% chance of counting per update, useful for settlement probability.
default:
1.0data_type:
<class 'float'>deprecated:
Falsemin:
0.0max:
1.0
duration<class 'float'><optional>Description: How long to do counting after start time, can be used instead of “end” parameter
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
secmin:
0.0
end['str', 'float', 'datetime64', 'int', 'float64', 'float32']<optional>Description: Stop particle counting from this iso date-time, default is end of model run
default:
Nonepossible_types:
[<class 'str'>, <class 'float'>, <class 'numpy.datetime64'>, <class 'int'>, <class 'numpy.float64'>, <class 'numpy.float32'>]deprecated:
Falseunits:
ISO8601 date as string eg. "2017-01-01T00:30:00",np.datetime64, or float of seconds since 1/1/1970
kill_when_max_counted<class 'bool'><optional>Description: When max_count_per_particle is set: True (default) = set particle status to dead once max count is reached; False = exclude the particle from future counting in this stats instance but leave it alive.
default:
Truedata_type:
<class 'bool'>deprecated:
Falsepossible_values:
[True, False]
max_age_to_bin<class 'float'><isrequired>Description: Max. particle age to count
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
secmin:
1.0
max_count_per_particle<class 'int'><optional>Description: Maximum number of times each particle can be counted by this stats instance. Default None = unlimited. See also kill_when_max_counted.
default:
Nonedata_type:
<class 'int'>deprecated:
Falsemin:
1
min_age_to_bin<class 'float'><optional>Description: Min. particle age to count
default:
0.0data_type:
<class 'float'>deprecated:
Falseunits:
secmin:
0.0
name<class 'str'><optional>Description: Name used to refer to class in code and output, = None for core claseses
default:
Nonedata_type:
<class 'str'>deprecated:
False
near_seabed<class 'float'><optional>Description: Count only those particles within this distance of bottom
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
meters above seabedmin:
0.001
near_seasurface<class 'float'><optional>Description: Count only those particles within this distance of tidal sea surface
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
meters below sea surfacemin:
0.001
output_file_base<class 'str'><optional>
default:
stats_polygon_agedata_type:
<class 'str'>deprecated:
False
particle_property_list: <optional>Description: - Create statistics for these named particle properties, list = [“water_depth”], for average of water depth at particle locations inside the counted regions
a list containing type:
[]default list :
Nonedata_type:
<class 'str'>deprecated:
Falsepossible_types:
[]make_list_unique:
Truemin_len:
0
start['str', 'float', 'datetime64', 'int', 'float64', 'float32']<optional>Description: Start particle counting from this date-time, default is start of model run
default:
Nonepossible_types:
[<class 'str'>, <class 'float'>, <class 'numpy.datetime64'>, <class 'int'>, <class 'numpy.float64'>, <class 'numpy.float32'>]deprecated:
Falseunits:
ISO8601 date as string eg. "2017-01-01T00:30:00",np.datetime64, or float of seconds since 1/1/1970
status_list: <optional>Description: - List of particle status types to count,eg [“on_bottom”,”moving”], other status types will be ignored in statistcs
a list containing type:
[]default list :
['stationary', 'stranded_by_tide', 'on_bottom', 'moving']data_type:
<class 'str'>deprecated:
Falsepossible_values:
['notReleased', 'dead', 'outside_domain', 'outside_open_boundary', 'stationary', 'stranded_by_tide', 'on_bottom', 'moving']possible_types:
[]make_list_unique:
Falsemin_len:
0
update_interval<class 'float'><optional>Description: Time in seconds between calculating statistics, wil be rounded to be a multiple of the particle tracking time step
default:
3600.0data_type:
<class 'float'>deprecated:
Falseunits:
sec
use_release_group_polygons<class 'bool'><optional>Description: Omit polygon_list param and use all polygon release polygons as statistics/counting polygons, useful for building release group polygon to polygon connectivity matrix.
default:
Falsedata_type:
<class 'bool'>deprecated:
Falsepossible_values:
[True, False]
user_note<class 'str'><optional>
default:
Nonedata_type:
<class 'str'>deprecated:
False
water_depth_max<class 'float'><optional>Description: Count only those particles in water depths less than this value
default:
Nonedata_type:
<class 'float'>deprecated:
Falsemin:
0.0
water_depth_min<class 'float'><optional>Description: Count only those particles in water depths greater than this value
default:
Nonedata_type:
<class 'float'>deprecated:
Falsemin:
0.0
write<class 'bool'><optional>Description: Write statistcs to disk
default:
Truedata_type:
<class 'bool'>deprecated:
Falsepossible_values:
[True, False]
write_connectivity<class 'bool'><optional>Description: Write connectivity_matrix to the output file. Set to False to reduce file size when connectivity is not needed.
default:
Truedata_type:
<class 'bool'>deprecated:
Falsepossible_values:
[True, False]
z_max<class 'float'><optional>Description: Count only those particles with vertical position <= to this value
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
meters above mean water level, so is < 0 at depth
z_min<class 'float'><optional>Description: Count only those particles with vertical position >= to this value
default:
Nonedata_type:
<class 'float'>deprecated:
Falseunits:
meters above mean water level, so is < 0 at depth