Closed robbibt closed 1 year ago
Hey @2320sharon @dbuscombe-usgs, this might be of interested! 🌊
This looks awesome! I'm definitely going to try these optimizations out. Thanks for this!
Hey @2320sharon @dbuscombe-usgs, this might be of interested! 🌊
Proposed changes
This PR implements a major refactor of the
model_tides
andpixel_tides
functions to improve performance when modelling large numbers of points/timesteps with multiple models by adding parallelisation usingconcurrent.futures
and Dask.Parallelisation in
model_tides
is applied both across each individual tide model, as well as (optionally) by splitting tide modelling points into smaller chunks that are run in parallel. These are configurable via theparallel
andparallel_splits
params.For modelling 10,000 timesteps, 1000 lat/lon points and 6 tide models on the 16XL DEA Sandbox server with
parallel_splits=10
, this improves runtimes by more than an order of magnitude:The
pixel_tides
function has additionally been updated to use new Dask reproject functionality fromodc-geo
, used to reproject low-res tide outputs to each higher res satellite pixel (@Kirill888).Other updates:
DEA_TOOLS_TIDE_MODELS
(thanks to a suggestion by @omad in #1109)model_tides
to be returned in wide or long dataframe formatcoastal.py
test coverage to include newly added multiple tide modelling functionalityCloses issues
Closes #1109