Skip to content

Commit 6d4ad39

Browse files
committed
updates
* updated to use appropriote branch of opendrift * changed hatch_time_hours to hatch_time_days
1 parent 0cd7929 commit 6d4ad39

10 files changed

Lines changed: 18 additions & 18 deletions

File tree

ci/environment-py3.11.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ dependencies:
3333
- pytest
3434
- pip:
3535
# - adios_db
36-
- git+https://github.com/kthyng/opendrift.git@start_habs
36+
- git+https://github.com/kthyng/opendrift.git@larvalfish_with_phytoplankton
3737
# - git+https://github.com/fsspec/kerchunk
3838
# - xroms # can't be found on conda-forge for CI, but don't need since in runslow tests?

ci/environment-py3.12.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies:
3232
- pip
3333
- pytest
3434
- pip:
35-
- git+https://github.com/kthyng/opendrift.git@start_habs
35+
- git+https://github.com/kthyng/opendrift.git@larvalfish_with_phytoplankton
3636
# - adios_db
3737
# - git+https://github.com/OpenDrift/opendrift
3838
# - git+https://github.com/fsspec/kerchunk

ci/environment-py3.13.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies:
3232
- pip
3333
- pytest
3434
- pip:
35-
- git+https://github.com/kthyng/opendrift.git@start_habs
35+
- git+https://github.com/kthyng/opendrift.git@larvalfish_with_phytoplankton
3636
# - adios_db
3737
# - git+https://github.com/OpenDrift/opendrift
3838
# - git+https://github.com/fsspec/kerchunk

docs/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies:
2929
- recommonmark
3030
- pip
3131
- pip:
32-
- git+https://github.com/kthyng/opendrift.git@start_habs
32+
- git+https://github.com/kthyng/opendrift.git@larvalfish_with_phytoplankton
3333
- particle-tracking-manager
3434
- docstring-inheritance
3535
- docrep<=0.2.7

docs/whats_new.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# What's New
22

3-
## Unreleased
3+
## v2.4.0 (March 5, 2026)
44

55
* Changed default value of `use_static_masks` to False from True, so that wet/dry masks from ocean models are used by default.
66
* Added `time_step_output_integer` to the schema which is a multiplier on `time_step` to calculate `time_step_output`. `time_step_output` is calculated in a field and input to the `OpenDrift` model.
@@ -18,7 +18,7 @@
1818
* Added new depth-targeting parameters: `z_pref`, `z_day`, `z_night`, `w_active`
1919
* Added band expansion parameters: `dz_min`, `dz_rel`, `dz_max`
2020
* Added `hatching_method` parameter: `temperature` (default, legacy) or `fixed_time`
21-
* Added `hatch_time_hours` parameter for fixed-time hatching method
21+
* Added `hatch_time_days` parameter for fixed-time hatching method
2222
* Updated test suite to use `Phytoplankton` instead of `HarmfulAlgalBloom` and added comprehensive tests for new `LarvalFish` features
2323

2424
## v2.3.0 (January 15, 2026)

particle_tracking_manager/models/opendrift/config_opendrift.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -832,15 +832,15 @@ class LarvalFishModelConfig(OceanDriftModelConfig):
832832
},
833833
)
834834

835-
hatch_time_hours: float = Field(
836-
default=48.0,
835+
hatch_time_days: float = Field(
836+
default=2.0,
837837
description="Fixed time to hatching when hatching_method is fixed_time.",
838838
title="Hatch Time",
839-
ge=0.1,
840-
le=10000,
839+
ge=0.004,
840+
le=416,
841841
json_schema_extra={
842-
"units": "hours",
843-
"od_mapping": "egg:hatch_time_hours",
842+
"units": "days",
843+
"od_mapping": "egg:hatch_time_days",
844844
"ptm_level": 2,
845845
},
846846
)

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ install_requires =
6464
matplotlib
6565
netcdf4
6666
numpy
67-
opendrift
67+
opendrift @ git+https://github.com/kthyng/opendrift.git@larvalfish_with_phytoplankton
6868
pandas
6969
pip
7070
pydantic

tests/test_config_opendrift.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ def test_LarvalFish_fixed_time_hatching():
366366
drift_model="LarvalFish",
367367
steps=1,
368368
hatching_method=HatchingMethodEnum.fixed_time,
369-
hatch_time_hours=72.0,
369+
hatch_time_days=3.0,
370370
)
371371
assert m.hatching_method == HatchingMethodEnum.fixed_time
372-
assert m.hatch_time_hours == 72.0
372+
assert m.hatch_time_days == 3.0
373373

374374

375375
def test_LarvalFish_dvm_mode():

tests/test_opendrift.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def test_LarvalFish_hatching_seeding():
355355
m = OpenDriftModel(
356356
drift_model="LarvalFish",
357357
hatching_method="fixed_time",
358-
hatch_time_hours=72.0,
358+
hatch_time_days=3.0,
359359
lon=-151,
360360
lat=60,
361361
do3D=True,
@@ -365,7 +365,7 @@ def test_LarvalFish_hatching_seeding():
365365
)
366366
m.setup_for_simulation() # creates m.o
367367
assert m.o._config["egg:hatching_method"]["value"] == "fixed_time"
368-
assert m.o._config["egg:hatch_time_hours"]["value"] == 72.0
368+
assert m.o._config["egg:hatch_time_days"]["value"] == 3.0
369369

370370

371371
def test_wind_drift():

tests/test_realistic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def test_run_LarvalFish_hatching_fixed_time():
367367
ocean_model_local=False,
368368
drift_model="LarvalFish",
369369
hatching_method="fixed_time",
370-
hatch_time_hours=0.99, # Set to 1 hour for quick test but isn't exact
370+
hatch_time_days=0.04, # Set to ~1 hour for quick test
371371
hatched=0, # Start as egg
372372
do3D=True,
373373
)

0 commit comments

Comments
 (0)