You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added test to make sure CIOFSOP_max is updated without closing kernel
* enforce if hatched==1, stage_fraction=None (initially, for seeding)
* updated config descriptions
* updated some default values in config classes
* updated version number for new release
Copy file name to clipboardExpand all lines: particle_tracking_manager/config_the_manager.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ class TheManagerConfig(BaseModel):
110
110
)
111
111
start_time: datetime|None=Field(
112
112
datetime(2022, 1, 1),
113
-
description="Start time for drifter simulation.",
113
+
description="Start time for drifter simulation. start_time or end_time must be input.",
114
114
json_schema_extra=dict(ptm_level=1),
115
115
)
116
116
start_time_end: datetime|None=Field(
@@ -149,7 +149,7 @@ class TheManagerConfig(BaseModel):
149
149
)
150
150
end_time: datetime|None=Field(
151
151
None,
152
-
description="The end of the simulation. steps, end_time, or duration must be input by user.",
152
+
description="The end of the simulation. steps, end_time, or duration must be input by user. start_time or end_time must be input.",
153
153
json_schema_extra=dict(ptm_level=1),
154
154
)
155
155
# OceanModelEnum was created dynamically and will trigger an issue with mypy, so we suppress it
@@ -170,7 +170,7 @@ class TheManagerConfig(BaseModel):
170
170
)
171
171
use_static_masks: bool=Field(
172
172
True,
173
-
description="Set to True to use static masks for known models instead of wetdry masks.",
173
+
description="If False, use static ocean model land masks. This saves some computation time but since the available ocean models run in wet/dry mode, it is inconsistent with the ROMS output files in some places since the drifters may be allowed (due to the static mask) to enter a cell they wouldn't otherwise. However, it doesn't make much of a difference for simulations that aren't in the tidal flats. Use the time-varying wet/dry masks (set to True) if drifters are expected to run in the tidal flats. This costs some more computational time but is fully consistent with the ROMS output files.",
174
174
json_schema_extra=dict(ptm_level=3),
175
175
)
176
176
output_file: PathLike[str] |None=Field(
@@ -197,7 +197,7 @@ class TheManagerConfig(BaseModel):
description="Add horizontal diffusivity (random walk). For known ocean models, the value is calculated as the approximate horizontal grid resolution for the selected ocean model times an estimate of the scale of sub-gridscale velocity of 0.1 m/s.",
Copy file name to clipboardExpand all lines: particle_tracking_manager/models/opendrift/config_opendrift.py
+43-82Lines changed: 43 additions & 82 deletions
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ class OpenDriftConfig(TheManagerConfig):
35
35
36
36
drift_model: DriftModelEnum=Field(
37
37
default=DriftModelEnum.OceanDrift, # .value,
38
-
description="Drift model to use for simulation.",
38
+
description="Scenario to use for simulation.",
39
39
)
40
40
41
41
save_interpolator: bool=Field(
@@ -65,7 +65,7 @@ class OpenDriftConfig(TheManagerConfig):
65
65
default=1000.0,
66
66
ge=0.0,
67
67
le=1000000,
68
-
description="Radius around each lon-lat pair, within which particles will be randomly seeded.",
68
+
description="Radius around each lon-lat pair, within which particles will be seeded according to `radius_type`.",
69
69
json_schema_extra=dict(
70
70
ptm_level=2,
71
71
units="m",
@@ -74,7 +74,7 @@ class OpenDriftConfig(TheManagerConfig):
74
74
75
75
radius_type: RadiusTypeEnum=Field(
76
76
default=RadiusTypeEnum.gaussian, # .value,
77
-
description="Radius type. Options: 'gaussian' or 'uniform'.",
77
+
description="Distribution for seeding particles around location. Options: 'gaussian' or 'uniform'.",
78
78
json_schema_extra=dict(
79
79
ptm_level=3,
80
80
),
@@ -83,7 +83,7 @@ class OpenDriftConfig(TheManagerConfig):
83
83
# OpenDriftSimulation parameters
84
84
85
85
max_speed: float=Field(
86
-
default=5.0,
86
+
default=7.0,
87
87
description="Typical maximum speed of elements, used to estimate reader buffer size",
88
88
gt=0,
89
89
title="Maximum speed",
@@ -95,15 +95,15 @@ class OpenDriftConfig(TheManagerConfig):
95
95
)
96
96
97
97
use_auto_landmask: bool=Field(
98
-
default=True,
99
-
description="A built-in GSHHG global landmask is used if True, otherwise landmask is taken from reader or fallback value.",
98
+
default=False,
99
+
description="If True, use a global-scale land mask from https://www.generic-mapping-tools.org/remote-datasets/earth-mask.html. Dataset scale selected is `auto`. If False, use the land mask from the ocean model.",
description="None means that objects may also move over land. stranding means that objects are deactivated if they hit land. previous means that objects will move back to the previous location if they hit land",
106
+
description="This controls particle behavior at the coastline. Use `previous` for a particle to move back to its previous location if it hits land. Use `stranding` to have a particle stick (that is, become deactivated) where it interacts with land. With None, objects may also move over land.",
default=ObjectTypeEnum("Person-in-water (PIW), unknown state (mean values)"),
375
-
description="Leeway object category for this simulation",
365
+
description="Leeway object category for this simulation. List is originally from USCG technical reports. More details here: https://github.com/OpenDrift/opendrift/blob/master/opendrift/models/OBJECTPROP.DAT.",
description="Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback.",
405
+
default="windspeed_Large1994",
406
+
description="Algorithm/source used for profile of vertical diffusivity. Environment means that diffusivity is acquired from readers or environment constants/fallback. Parameterizations based on wind speed are also available.",
417
407
title="Diffusivity model",
418
408
json_schema_extra={
419
409
"units": "seconds",
@@ -423,8 +413,8 @@ class OceanDriftModelConfig(OpenDriftConfig):
423
413
)
424
414
425
415
mixed_layer_depth: float=Field(
426
-
default=50,
427
-
description="Fallback value for ocean_mixed_layer_thickness if not available from any reader",
416
+
default=10,
417
+
description="mixed_layer_depth controls how deep the vertical diffusivity profile reaches. This sets the fallback value for ocean_mixed_layer_thickness if not available from any reader.",
428
418
title="Mixed Layer Depth",
429
419
ge=0.0,
430
420
json_schema_extra={
@@ -436,7 +426,7 @@ class OceanDriftModelConfig(OpenDriftConfig):
description="deactivate: elements are deactivated; lift_to_seafloor: elements are lifted to seafloor level; previous: elements are moved back to previous position; none; seafloor is ignored.",
429
+
description="This controls particle behavior at the seafloor. Use `deactivate` to stick particles to the seafloor at the point of interaction. Use `lift_to_seafloor` to elevate particles up to seabed if below. User `previous` to move elements back to previous position. Use None to ignore seafloor.",
440
430
title="Seafloor Action",
441
431
json_schema_extra={
442
432
"od_mapping": "general:seafloor_action",
@@ -459,7 +449,7 @@ class OceanDriftModelConfig(OpenDriftConfig):
459
449
460
450
vertical_mixing_timestep: float=Field(
461
451
default=60,
462
-
description="Time step used for inner loop of vertical mixing.",
452
+
description="Time step used for inner (fast) loop of the vertical mixing model. Set this smaller to increase frequency of vertical mixing calculation; number of loops is calculated as int(self.time_step/vertical_mixing_timestep) so vertical_mixing_timestep must be smaller than time_step.",
463
453
title="Vertical Mixing Timestep",
464
454
ge=0.1,
465
455
le=3600,
@@ -472,7 +462,7 @@ class OceanDriftModelConfig(OpenDriftConfig):
472
462
473
463
wind_drift_factor: float=Field(
474
464
default=0.02,
475
-
description="Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift",
465
+
description="Elements at surface are moved with this fraction of the wind vector, in addition to currents and Stokes drift.",
476
466
title="Wind Drift Factor",
477
467
ge=0,
478
468
json_schema_extra={
@@ -484,7 +474,7 @@ class OceanDriftModelConfig(OpenDriftConfig):
484
474
485
475
vertical_mixing: bool=Field(
486
476
default=False,
487
-
description="Activate vertical mixing scheme with inner loop",
477
+
description="Activate vertical mixing scheme. Vertical mixing includes movement due to buoyancy and turbulent mixing.",
488
478
title="Vertical Mixing",
489
479
json_schema_extra={
490
480
"od_mapping": "drift:vertical_mixing",
@@ -507,7 +497,7 @@ class OpenOilModelConfig(OceanDriftModelConfig):
507
497
508
498
m3_per_hour: float=Field(
509
499
default=1,
510
-
description="The amount (volume) of oil released per hour (or total amount if release is instantaneous)",
500
+
description="The amount (volume) of oil released per hour (or total amount if release is instantaneous).",
511
501
title="M3 Per Hour",
512
502
gt=0,
513
503
json_schema_extra={
@@ -592,7 +582,7 @@ class OpenOilModelConfig(OceanDriftModelConfig):
592
582
593
583
emulsification: bool=Field(
594
584
default=True,
595
-
description="Surface oil is emulsified, i.e. water droplets are mixed into oil due to wave mixing, with resulting increase of viscosity.",
585
+
description="If True, surface oil is emulsified, i.e. water droplets are mixed into oil due to wave mixing, with resulting increase of viscosity.",
596
586
title="Emulsification",
597
587
json_schema_extra={
598
588
"od_mapping": "processes:emulsification",
@@ -602,7 +592,7 @@ class OpenOilModelConfig(OceanDriftModelConfig):
602
592
603
593
dispersion: bool=Field(
604
594
default=True,
605
-
description="Oil is removed from simulation (dispersed), if entrained as very small droplets.",
595
+
description="If True, oil is removed from simulation (dispersed), if entrained as very small droplets.",
606
596
title="Dispersion",
607
597
json_schema_extra={
608
598
"od_mapping": "processes:dispersion",
@@ -612,7 +602,7 @@ class OpenOilModelConfig(OceanDriftModelConfig):
612
602
613
603
evaporation: bool=Field(
614
604
default=True,
615
-
description="Surface oil is evaporated.",
605
+
description="If True, surface oil is evaporated.",
616
606
title="Evaporation",
617
607
json_schema_extra={
618
608
"od_mapping": "processes:evaporation",
@@ -621,7 +611,7 @@ class OpenOilModelConfig(OceanDriftModelConfig):
621
611
)
622
612
623
613
update_oilfilm_thickness: bool=Field(
624
-
default=False,
614
+
default=True,
625
615
description="If True, Oil film thickness is calculated at each time step. If False, oil film thickness is kept constant with value provided at seeding.",
626
616
title="Update Oilfilm Thickness",
627
617
json_schema_extra={
@@ -631,8 +621,8 @@ class OpenOilModelConfig(OceanDriftModelConfig):
631
621
)
632
622
633
623
biodegradation: bool=Field(
634
-
default=False,
635
-
description="Oil mass is biodegraded (eaten by bacteria).",
624
+
default=True,
625
+
description="If True, oil mass is biodegraded (eaten by bacteria).",
636
626
title="Biodegradation",
637
627
json_schema_extra={
638
628
"od_mapping": "processes:biodegradation",
@@ -643,57 +633,17 @@ class OpenOilModelConfig(OceanDriftModelConfig):
643
633
# overwrite the defaults from OceanDriftModelConfig for a few inherited parameters,
644
634
# but don't want to have to repeat the full definition
@@ -739,9 +689,9 @@ class LarvalFishModelConfig(OceanDriftModelConfig):
739
689
},
740
690
)
741
691
742
-
stage_fraction: float=Field(
692
+
stage_fraction: float|None=Field(
743
693
default=0.0,
744
-
description="Seeding value of stage_fraction. stage_fraction tracks percentage of development time completed, from 0 to 1, where a value of 1 means the egg has hatched. If `hatched==1` then `stage_fraction` is ignored.",
694
+
description="Seeding value of stage_fraction. stage_fraction tracks percentage of development time completed, from 0 to 1, where a value of 1 means the egg has hatched. If `hatched==1` then `stage_fraction` is ignored in `OpenDrift`, but has to be None.",
0 commit comments