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,
"NUMBA_cache_code": false,
"use_A_Z_profile": false,
"regrid_z_to_uniform_sigma_levels": true,
"reader": {
"input_dir": "F:\\H_Local_drive\\ParticleTracking\\oceantracker\\demos\\demo_hindcast",
"file_mask": "demo_hindcast_schisim3D_00.nc",
"load_fields": [
"water_temperature"
]
},
"dispersion": {
"A_H": 0.2,
"A_V": 0.001
},
"release_groups": [
{
"name": "P1",
"points": [
[
1594500,
5487000,
-1
],
[
1594500,
5483000,
-1
],
[
1598000,
5486100,
-1
]
],
"pulse_size": 1,
"release_interval": 150.0,
"max_age": 17280.000000000004
}
],
"particle_properties": [
{
"name": "age_decay",
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 25714.28571428571
}
],
"root_output_dir": "output"
}
yaml parameters
NUMBA_cache_code: false
debug: true
dispersion:
A_H: 0.2
A_V: 0.001
output_file_base: demo60_SCHISM_3D_decaying_particle
particle_properties:
- class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 25714.28571428571
name: age_decay
reader:
file_mask: demo_hindcast_schisim3D_00.nc
input_dir: F:\H_Local_drive\ParticleTracking\oceantracker\demos\demo_hindcast
load_fields:
- water_temperature
regrid_z_to_uniform_sigma_levels: true
release_groups:
- max_age: 17280.000000000004
name: P1
points:
- - 1594500
- 5487000
- -1
- - 1594500
- 5483000
- -1
- - 1598000
- 5486100
- -1
pulse_size: 1
release_interval: 150.0
root_output_dir: output
time_step: 120
use_A_Z_profile: false
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,
"NUMBA_cache_code": false,
"time_step": 600,
"debug": true,
"reader": {
"input_dir": "F:\\H_Local_drive\\ParticleTracking\\oceantracker\\demos\\demo_hindcast",
"file_mask": "Random_order_*.nc",
"time_buffer_size": 15
},
"user_note": "test of notes",
"dispersion": {
"A_H": 0.1
},
"tracks_writer": {
"write_dry_cell_flag": true
},
"release_groups": [
{
"name": "P1",
"points": [
[
1594500,
5490000
],
[
1598000,
5488500
]
],
"pulse_size": 10,
"release_interval": 10800
}
],
"particle_properties": [
{
"name": "age_decay",
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 86400.0
}
],
"block_dry_cells": true,
"event_loggers": [
{
"name": "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
NUMBA_cache_code: false
add_date_to_run_output_dir: false
block_dry_cells: true
debug: true
dispersion:
A_H: 0.1
event_loggers:
- class_name: oceantracker.event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit
name: in_out_poly
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:
- class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 86400.0
name: age_decay
reader:
file_mask: Random_order_*.nc
input_dir: F:\H_Local_drive\ParticleTracking\oceantracker\demos\demo_hindcast
time_buffer_size: 15
release_groups:
- name: P1
points:
- - 1594500
- 5490000
- - 1598000
- 5488500
pulse_size: 10
release_interval: 10800
root_output_dir: output
time_step: 600
tracks_writer:
write_dry_cell_flag: 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,
"NUMBA_cache_code": false,
"use_A_Z_profile": false,
"regrid_z_to_uniform_sigma_levels": true,
"reader": {
"input_dir": "F:\\H_Local_drive\\ParticleTracking\\oceantracker\\demos\\demo_hindcast",
"file_mask": "demo_hindcast_schisim3D_00.nc",
"load_fields": [
"water_temperature"
]
},
"dispersion": {
"A_H": 0.2,
"A_V": 0.001
},
"release_groups": [
{
"name": "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_min": -1,
"z_max": -1,
"release_interval": 3660,
"start": "2017-01-01T00:31:30",
"pulse_size": 10
},
{
"name": "P1",
"points": [
[
1594500,
5487000,
-1
],
[
1594500,
5483000,
-1
],
[
1598000,
5486100,
-1
]
],
"release_interval": 3600,
"pulse_size": 10
}
],
"particle_properties": [
{
"name": "age_decay",
"class_name": "oceantracker.particle_properties.age_decay.AgeDecay",
"decay_time_scale": 86400.0
}
],
"event_loggers": [
{
"name": "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
]
]
}
]
}
],
"particle_statistics": [
{
"name": "grid1",
"class_name": "oceantracker.particle_statistics.gridded_statistics2D.GriddedStats2D_timeBased",
"update_interval": 3600,
"particle_property_list": [
"water_depth"
],
"status_list": [
"moving"
],
"z_min": -2,
"grid_span": [
10000,
10000
],
"grid_size": [
120,
121
]
}
],
"resuspension": {
"critical_friction_velocity": 0.005
},
"velocity_modifiers": [
{
"name": "terminal_velocity",
"class_name": "oceantracker.velocity_modifiers.terminal_velocity.TerminalVelocity",
"value": -0.001
}
],
"root_output_dir": "output"
}
yaml parameters
NUMBA_cache_code: false
debug: true
dispersion:
A_H: 0.2
A_V: 0.001
event_loggers:
- class_name: oceantracker.event_loggers.log_polygon_entry_and_exit.LogPolygonEntryAndExit
name: inoutpoly
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:
- class_name: oceantracker.particle_properties.age_decay.AgeDecay
decay_time_scale: 86400.0
name: age_decay
particle_statistics:
- class_name: oceantracker.particle_statistics.gridded_statistics2D.GriddedStats2D_timeBased
grid_size:
- 120
- 121
grid_span:
- 10000
- 10000
name: grid1
particle_property_list:
- water_depth
status_list:
- moving
update_interval: 3600
z_min: -2
reader:
file_mask: demo_hindcast_schisim3D_00.nc
input_dir: F:\H_Local_drive\ParticleTracking\oceantracker\demos\demo_hindcast
load_fields:
- water_temperature
regrid_z_to_uniform_sigma_levels: true
release_groups:
- class_name: oceantracker.release_groups.polygon_release.PolygonRelease
name: poly1
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: 3660
start: '2017-01-01T00:31:30'
z_max: -1
z_min: -1
- name: P1
points:
- - 1594500
- 5487000
- -1
- - 1594500
- 5483000
- -1
- - 1598000
- 5486100
- -1
pulse_size: 10
release_interval: 3600
resuspension:
critical_friction_velocity: 0.005
root_output_dir: output
time_step: 120
use_A_Z_profile: false
velocity_modifiers:
- class_name: oceantracker.velocity_modifiers.terminal_velocity.TerminalVelocity
name: terminal_velocity
value: -0.001