Skip to content

Commit 7ad31a2

Browse files
authored
Merge pull request #1731 from knutfrode/dev
[run-ex] Leeway: Avoid reading stokes drift variables if stokes drift…
2 parents 66f005a + 18353ca commit 7ad31a2

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies:
1010
- pyproj>=2.3
1111
- libgdal>=3.1
1212
- gdal>=3.1
13-
- xarray
13+
- xarray<=2025.9.0
1414
- dask
1515
- geopandas
1616
- cfgrib

opendrift/models/basemodel/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,8 @@ def run(self,
19401940

19411941
# Store expected simulation extent, to check if new readers have coverage
19421942
self.simulation_extent = simulation_extent
1943-
self.env.finalize(self.simulation_extent)
1943+
self.env.finalize(simulation_extent=self.simulation_extent,
1944+
start=self.start_time, end=self.expected_end_time)
19441945

19451946
####################################################################
19461947
# Preparing history array for storage in memory and eventually file

opendrift/models/leeway.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,12 @@ class Leeway(OpenDriftSimulation):
156156
},
157157
'sea_surface_wave_stokes_drift_x_velocity': {
158158
'fallback': 0,
159+
'skip_if': ['drift:stokes_drift', 'is', False],
159160
'important': False
160161
},
161162
'sea_surface_wave_stokes_drift_y_velocity': {
162163
'fallback': 0,
164+
'skip_if': ['drift:stokes_drift', 'is', False],
163165
'important': False
164166
},
165167

0 commit comments

Comments
 (0)