Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ensemble tide modelling functionality to model_tides #1231

Merged
merged 11 commits into from
Jun 17, 2024

Conversation

robbibt
Copy link
Collaborator

@robbibt robbibt commented Jun 7, 2024

Proposed changes

This PR implements some major changes to our coastal tide modelling functions, to support new "ensemble" tide modelling functionality that combines multiple input tide models into a single higher quality output.

Key changes include:

  1. Support for a new "ensemble" tide model option to the existing dea_tools.coastal.model_tides function, that combines multiple tide models using external model ranking data to identify the best performing models locally (the "ensemble" model generation can be customised by providing custom functions via the ensemble_func param). By implementing "ensemble" functionality in model_tides, it automatically becomes available in pixel_tides and other downstream functions we use for generating coastal datasets.
  2. Added extensive automated tests forthe new ensemble functionality (for both model_tides and pixel_tides

@robbibt robbibt changed the title Add ensemble tide modelling functionality to model_tides Add ensemble tide modelling functionality to model_tides Jun 12, 2024
@robbibt robbibt marked this pull request as ready for review June 12, 2024 03:22
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@robbibt robbibt marked this pull request as draft June 13, 2024 02:06
Copy link
Collaborator

@BexDunn BexDunn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the test data to the PR: ../Supplementary_data/Interpolation/interpolation_points.geojson

@robbibt robbibt marked this pull request as ready for review June 14, 2024 06:15
lambda x: pd.Series({"start": start_point, "end": x})
if x.type == "Point"
else pd.Series({"start": None, "end": None})
lambda x: (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just Black formatting stuff, can ignore this

lambda x: pd.Series({"start": x.geoms[0], "end": x.geoms[-1]})
if x.type == "MultiPoint"
else pd.Series({"start": None, "end": None})
lambda x: (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just Black formatting stuff, can ignore this

@@ -542,25 +717,26 @@ def model_tides(
results stacked vertically along "tide_model" and "tide_m"
columns), or wide format (with a column for each tide model).
Defaults to "long".
epsg : int, DEPRECATED
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this deprecated param

Copy link
Collaborator

@erialC-P erialC-P left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great Robbi! It's very thoroughly documented and easy to read. Nice job!

@robbibt robbibt merged commit b800a1c into develop Jun 17, 2024
1 check passed
@robbibt robbibt deleted the ensemble_tide_model branch June 17, 2024 03:57
erialC-P pushed a commit that referenced this pull request Jun 17, 2024
* Add updated `xr_regression` function for multi-dimensional linear regression (#1226)

* Add updated xr_regression function

* Add dask support for lazy computation

* Set dtypes

* Update docstring

* Update docstring

* Add MAD outliers

* Update docstring

* Remove lag functionality

* Update docstrings

* Add better error handling

* Update stream gauge corr notebook to use new func

* Adding DEAfrica Wetland Turbidity notebook for Australian study site (#1175)

* Adding DEAfrica Wetland Turbidity notebook for Australian study site

* change all instances of NDTI to NDTI2 to reflect usage at top of notebook

* update notebook to use Collection 3 WO Statistics

* rerun notebook

---------

Co-authored-by: BexDunn <bex.dunn@ga.gov.au>

* Add spatial interpolation with `xr_interpolate` notebook (#1233)

* Add ensemble tide modelling functionality to model_tides

* Update test_coastal.py

* Remove test

* Updates to IDW, xr_interpolate and ensemble tide modelling code"

* Doco updates

* Switch ensemble rankings from high to low = good

* Update docstring

* Fix doco

* Add interpolation notebook

* Remove coastal files from branch

* Add points data

* Review feedback;

* Add p param to IDW

* Fix test

* Updates to product notebook Knowledge Hub links and DEA notebook content (#1221)

* Move KH links into consistent alert box format

* Update DEA notebook

* Minor wording updates

* Minor wording

* Temporarily remove STAC notebook from tests

* Add ensemble tide modelling functionality to `model_tides` (#1231)

* Add ensemble tide modelling functionality to model_tides

* Update test_coastal.py

* Remove test

* Updates to IDW, xr_interpolate and ensemble tide modelling code"

* Doco updates

* Switch ensemble rankings from high to low = good

* Update docstring

* Fix doco

* Add interpolation notebook

---------

Co-authored-by: Matt-dea <129345253+Matt-dea@users.noreply.github.com>
Co-authored-by: BexDunn <bex.dunn@ga.gov.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants