Particle properties¶
Particle properties can easily add to computation via parameters, eg decaying concentrations, by listing in particle_properties parameters. Standard properties include, status, tide, water_depth and particle age.
Decaying particle¶
Decaying particle property used to size and colour particles. decay_time_scale
parameter = 3.5 hours.
particle_properties.age_decay.AgeDecay
demo60_SCHISM_3D_decaying_particle.py
json parameters
{
"output_file_base": "demo60_SCHISM_3D_decaying_particle",
"debug": true,
"time_step": 120,
"reader": {
"input_dir": "E:\\H_Local_drive\\ParticleTracking\\oceantracker\\demos\\demo_hindcast",
"file_mask": "demoHindcastSchism3D.nc",
"field_variables": {
"water_temperature": "temp"
}
},
"dispersion": {
"A_H": 0.2,
"A_V": 0.001
},
"release_groups": {
"P1": {
"points": [
[
1594500,
5487000,
-1
],
[
1594500,
5483000,
-1
],
[
1598000,
5486100,
-1
]
],
"pulse_size": 1,
"release_interval": 150.0,
"max_age": 17280.000000000004
}
},
"particle_properties": {
"age_decay": {
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 25714.28571428571
}
},
"root_output_dir": "output"
}
yaml parameters
debug: true
dispersion:
A_H: 0.2
A_V: 0.001
output_file_base: demo60_SCHISM_3D_decaying_particle
particle_properties:
age_decay:
class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 25714.28571428571
reader:
field_variables:
water_temperature: temp
file_mask: demoHindcastSchism3D.nc
input_dir: E:\H_Local_drive\ParticleTracking\oceantracker\demos\demo_hindcast
release_groups:
P1:
max_age: 17280.000000000004
points:
- - 1594500
- 5487000
- -1
- - 1594500
- 5483000
- -1
- - 1598000
- 5486100
- -1
pulse_size: 1
release_interval: 150.0
root_output_dir: output
time_step: 120
Polygon aware particles¶
Particles with additional inside polygon property, with optional logging of polygon entry and exit events
class:
particle_properties.inside_polygons.InsidePolygonsNonOverlapping2D
class:
event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit
json parameters
{
"output_file_base": "demo07_inside_polygon_events",
"add_date_to_run_output_dir": false,
"time_step": 600,
"debug": true,
"reader": {
"class_name": "oceantracker.reader.generic_unstructured_reader.GenericUnstructuredReader",
"input_dir": "E:\\H_Local_drive\\ParticleTracking\\oceantracker\\demos\\demo_hindcast",
"file_mask": "demoHindcast2D*.nc",
"search_sub_dirs": true,
"dimension_map": {
"time": "time",
"node": "nodes"
},
"grid_variables": {
"time": "time_sec",
"x": [
"east",
"north"
],
"triangles": "tri"
},
"field_variables": {
"water_velocity": [
"east_vel",
"north_vel"
],
"water_depth": "depth",
"tide": "tide"
},
"time_buffer_size": 15,
"isodate_of_hindcast_time_zero": "2020-06-01"
},
"user_note": "test of notes",
"dispersion_miss-spelt": {
"A_H": 0.1
},
"dispersion": {
"A_H": 0.1
},
"tracks_writer": {
"write_dry_cell_index": true,
"convert": true
},
"release_groups": {
"P1": {
"points": [
[
1594500,
5490000
],
[
1598000,
5488500
]
],
"pulse_size": 10,
"release_interval": 10800
}
},
"particle_properties ": {
"Oxygen": {
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 86400.0,
"initial_value": 20.0
},
"distance_travelled": {
"class_name": "oceantracker.particle_properties.distance_travelled.DistanceTravelled"
}
},
"particle_properties": {
"age_decay": {
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 86400.0
}
},
"block_dry_cells": true,
"event_loggers": {
"in_out_poly": {
"class_name": "oceantracker.event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit",
"particle_prop_to_write_list": [
"ID",
"x",
"IDrelease_group",
"status",
"age"
],
"polygon_list": [
{
"user_polygon_name": "A",
"points": [
[
1592682.1237,
5489972.7479
],
[
1593604.1667,
5490275.5488
],
[
1593886.4247,
5489464.0424
],
[
1592917.3387,
5489000.0
],
[
1592300.0,
5489000.0
],
[
1592682.1237,
5489972.7479
]
]
},
{
"user_polygon_name": "B",
"points": [
[
1597682.1237,
5489972.7479
],
[
1598604.1667,
5490275.5488
],
[
1598886.4247,
5489464.0424
],
[
1597917.3387,
5487000
],
[
1597300,
5487000
],
[
1597682.1237,
5489972.7479
]
]
}
]
}
},
"root_output_dir": "output"
}
yaml parameters
add_date_to_run_output_dir: false
block_dry_cells: true
debug: true
dispersion:
A_H: 0.1
dispersion_miss-spelt:
A_H: 0.1
event_loggers:
in_out_poly:
class_name: oceantracker.event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit
particle_prop_to_write_list:
- ID
- x
- IDrelease_group
- status
- age
polygon_list:
- points:
- - 1592682.1237
- 5489972.7479
- - 1593604.1667
- 5490275.5488
- - 1593886.4247
- 5489464.0424
- - 1592917.3387
- 5489000.0
- - 1592300.0
- 5489000.0
- - 1592682.1237
- 5489972.7479
user_polygon_name: A
- points:
- - 1597682.1237
- 5489972.7479
- - 1598604.1667
- 5490275.5488
- - 1598886.4247
- 5489464.0424
- - 1597917.3387
- 5487000
- - 1597300
- 5487000
- - 1597682.1237
- 5489972.7479
user_polygon_name: B
output_file_base: demo07_inside_polygon_events
particle_properties:
age_decay:
class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 86400.0
'particle_properties ':
Oxygen:
class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 86400.0
initial_value: 20.0
distance_travelled:
class_name: oceantracker.particle_properties.distance_travelled.DistanceTravelled
reader:
class_name: oceantracker.reader.generic_unstructured_reader.GenericUnstructuredReader
dimension_map:
node: nodes
time: time
field_variables:
tide: tide
water_depth: depth
water_velocity:
- east_vel
- north_vel
file_mask: demoHindcast2D*.nc
grid_variables:
time: time_sec
triangles: tri
x:
- east
- north
input_dir: E:\H_Local_drive\ParticleTracking\oceantracker\demos\demo_hindcast
isodate_of_hindcast_time_zero: '2020-06-01'
search_sub_dirs: true
time_buffer_size: 15
release_groups:
P1:
points:
- - 1594500
- 5490000
- - 1598000
- 5488500
pulse_size: 10
release_interval: 10800
root_output_dir: output
time_step: 600
tracks_writer:
convert: true
write_dry_cell_index: true
user_note: test of notes
Particle Status¶
Particles coloured by their status property. Status can be one of following strings
['unknown', 'bad_cord', 'cell_search_failed', 'notReleased', 'dead', 'outside_open_boundary', 'frozen', 'stranded_by_tide', 'on_bottom', 'moving']
json parameters
{
"output_file_base": "demo56_SCHISM_3D_resupend_crtitical_friction_vel",
"debug": true,
"time_step": 120,
"reader": {
"input_dir": "E:\\H_Local_drive\\ParticleTracking\\oceantracker\\demos\\demo_hindcast",
"file_mask": "demoHindcastSchism3D.nc",
"field_variables": {
"water_temperature": "temp"
},
"depth_average": false,
"field_variables_to_depth_average": [
"water_velocity",
"salt",
"water_temperature"
]
},
"dispersion": {
"A_H": 0.2,
"A_V": 0.001
},
"release_groups": {
"P1": {
"points": [
[
1594500,
5487000,
-1
],
[
1594500,
5483000,
-1
],
[
1598000,
5486100,
-1
]
],
"pulse_size": 10,
"release_interval": 3600
},
"poly1": {
"class_name": "oceantracker.release_groups.polygon_release.PolygonRelease",
"points": [
[
1597682.1237,
5489972.7479
],
[
1598604.1667,
5490275.5488
],
[
1598886.4247,
5489464.0424
],
[
1597917.3387,
5489000
],
[
1597300,
5489000
],
[
1597682.1237,
5489972.7479
]
],
"z_range": [
-2,
-4.0
],
"pulse_size": 10,
"release_interval": 3600
}
},
"particle_properties": {
"age_decay": {
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 86400.0
}
},
"event_loggers": {
"inoutpoly": {
"class_name": "oceantracker.event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit",
"particle_prop_to_write_list": [
"ID",
"x",
"IDrelease_group",
"status",
"age"
],
"polygon_list": [
{
"user_polygon_name": "A",
"points": [
[
1592682.1237,
5489972.7479
],
[
1593604.1667,
5490275.5488
],
[
1593886.4247,
5489464.0424
],
[
1592917.3387,
5489000.0
],
[
1592300.0,
5489000.0
],
[
1592682.1237,
5489972.7479
]
]
},
{
"user_polygon_name": "B",
"points": [
[
1597682.1237,
5489972.7479
],
[
1598604.1667,
5490275.5488
],
[
1598886.4247,
5489464.0424
],
[
1597917.3387,
5487000
],
[
1597300,
5487000
],
[
1597682.1237,
5489972.7479
]
]
}
]
}
},
"velocity_modifiers": {
"terminal_velocity": {
"class_name": "oceantracker.velocity_modifiers.terminal_velocity.TerminalVelocity",
"value": -0.001
}
},
"particle_statistics": {
"grid1": {
"class_name": "oceantracker.particle_statistics.gridded_statistics.GriddedStats2D_timeBased",
"update_interval": 3600,
"particle_property_list": [
"water_depth"
],
"status_min": "moving",
"z_min": -2,
"grid_size": [
120,
121
]
}
},
"resuspension": {
"critical_friction_velocity": 0.005
},
"root_output_dir": "output"
}
yaml parameters
debug: true
dispersion:
A_H: 0.2
A_V: 0.001
event_loggers:
inoutpoly:
class_name: oceantracker.event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit
particle_prop_to_write_list:
- ID
- x
- IDrelease_group
- status
- age
polygon_list:
- points:
- - 1592682.1237
- 5489972.7479
- - 1593604.1667
- 5490275.5488
- - 1593886.4247
- 5489464.0424
- - 1592917.3387
- 5489000.0
- - 1592300.0
- 5489000.0
- - 1592682.1237
- 5489972.7479
user_polygon_name: A
- points:
- - 1597682.1237
- 5489972.7479
- - 1598604.1667
- 5490275.5488
- - 1598886.4247
- 5489464.0424
- - 1597917.3387
- 5487000
- - 1597300
- 5487000
- - 1597682.1237
- 5489972.7479
user_polygon_name: B
output_file_base: demo56_SCHISM_3D_resupend_crtitical_friction_vel
particle_properties:
age_decay:
class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 86400.0
particle_statistics:
grid1:
class_name: oceantracker.particle_statistics.gridded_statistics.GriddedStats2D_timeBased
grid_size:
- 120
- 121
particle_property_list:
- water_depth
status_min: moving
update_interval: 3600
z_min: -2
reader:
depth_average: false
field_variables:
water_temperature: temp
field_variables_to_depth_average:
- water_velocity
- salt
- water_temperature
file_mask: demoHindcastSchism3D.nc
input_dir: E:\H_Local_drive\ParticleTracking\oceantracker\demos\demo_hindcast
release_groups:
P1:
points:
- - 1594500
- 5487000
- -1
- - 1594500
- 5483000
- -1
- - 1598000
- 5486100
- -1
pulse_size: 10
release_interval: 3600
poly1:
class_name: oceantracker.release_groups.polygon_release.PolygonRelease
points:
- - 1597682.1237
- 5489972.7479
- - 1598604.1667
- 5490275.5488
- - 1598886.4247
- 5489464.0424
- - 1597917.3387
- 5489000
- - 1597300
- 5489000
- - 1597682.1237
- 5489972.7479
pulse_size: 10
release_interval: 3600
z_range:
- -2
- -4.0
resuspension:
critical_friction_velocity: 0.005
root_output_dir: output
time_step: 120
velocity_modifiers:
terminal_velocity:
class_name: oceantracker.velocity_modifiers.terminal_velocity.TerminalVelocity
value: -0.001