Skip to content

Commit d4c9647

Browse files
Allow additional modelling args (#138)
* Allow additional modelling args * Automatically update integration test validation results --------- Co-authored-by: lars-fillmore <lars-fillmore@users.noreply.github.com>
1 parent b400b8f commit d4c9647

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

intertidal/exposure.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def exposure(
242242
run_id=None,
243243
log=None,
244244
return_tide_modelling=False,
245+
**model_tides_kwargs,
245246
):
246247
"""
247248
Calculate intertidal exposure, indicating the proportion of time
@@ -330,6 +331,12 @@ def exposure(
330331
exposure_ds, modelledtides_ds, modelledtides_1d,timeranges.
331332
If false, set the function call to return exposure_ds and
332333
modelledtides_ds only. Default = False.
334+
**model_tides_kwargs :
335+
Optional parameters passed to the `eo_tides.model.model_tides`
336+
function. Important parameters include `cutoff` (used to
337+
extrapolate modelled tides away from the coast; defaults to
338+
`np.inf`), `crop` (whether to crop tide model constituent files
339+
on-the-fly to improve performance) etc.
333340
334341
Returns
335342
-------
@@ -446,6 +453,7 @@ def exposure(
446453
model=tide_model,
447454
directory=tide_model_dir,
448455
resample=False,
456+
**model_tides_kwargs,
449457
)
450458

451459
# Calculate a 1D tide height time series to use with filtered exposure calc's

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Integration tests
1010
1111
This directory contains tests that are run to verify that DEA Intertidal code runs correctly. The ``test_intertidal.py`` file runs a small-scale full workflow analysis over an intertidal flat in the Gulf of Carpentaria using the DEA Intertidal [Command Line Interface (CLI) tools](../notebooks/Intertidal_CLI.ipynb), and compares these results against a LiDAR validation DEM to produce some simple accuracy metrics.
1212

13-
The latest integration test completed at **2025-06-23 15:23**. Compared to the previous run, it had an:
13+
The latest integration test completed at **2025-07-02 09:42**. Compared to the previous run, it had an:
1414
- RMSE accuracy of **0.14 m ( :heavy_minus_sign: no change)**
1515
- MAE accuracy of **0.12 m ( :heavy_minus_sign: no change)**
1616
- Bias of **0.12 m ( :heavy_minus_sign: no change)**

tests/validation.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@ time,Correlation,RMSE,MAE,R-squared,Bias,Regression slope
113113
2025-05-05 01:48:26.455865+00:00,0.975,0.145,0.123,0.95,0.117,1.119
114114
2025-06-23 01:25:05.874000+00:00,0.975,0.145,0.123,0.95,0.117,1.119
115115
2025-06-23 05:23:05.398537+00:00,0.975,0.145,0.123,0.95,0.117,1.119
116+
2025-07-01 23:42:45.999052+00:00,0.975,0.145,0.123,0.95,0.117,1.119

tests/validation.jpg

-69 Bytes
Loading

0 commit comments

Comments
 (0)