Currently, the model_tides function operates in "one-to-many" mode, which will model tides for every requested timestep, at every requested location. For example, if we provided five x, y coordinates and five timesteps, the function would return:
5 locations * 5 timesteps = 25 modelled tides
However, often a user may want to model tides for a list of locations, each with a unique timesteps.
This change adds a new "one-to-one" mode, allowing users to model tides for only these exact pairs of locations and times. Using the previous example (five x, y coordinates and five timesteps) in "one-to-one" mode:
5 timesteps at 5 locations = 5 modelled tides
Example from notebook:
Other changes:
Updated How_to_guides/Tidal_modelling.ipynb to document new functionality
[x] Remove any unused Python packages from Load packages
[x] Remove any unused/empty code cells
[x] Remove any guidance cells (e.g. General advice)
[x] Ensure that all code cells follow the PEP8 standard for code. The jupyterlab_code_formatter tool can be used to format code cells to a consistent style: select each code cell, then click Edit and then one of the Apply X Formatter options (YAPF or Black are recommended).
[x] Include relevant tags in the final notebook cell (refer to the DEA Tags Index, and re-use tags if possible)
[x] Clear all outputs, run notebook from start to finish, and save the notebook in the state where all cells have been sequentially evaluated
[ ] Test notebook on both the NCI and DEA Sandbox (flag if not working as part of PR and ask for help to solve if needed)
[ ] If applicable, update the Notebook currently compatible with the NCI|DEA Sandbox environment only line below the notebook title to reflect the environments the notebook is compatible with
Proposed changes
Currently, the
model_tides
function operates in "one-to-many" mode, which will model tides for every requested timestep, at every requested location. For example, if we provided five x, y coordinates and five timesteps, the function would return:However, often a user may want to model tides for a list of locations, each with a unique timesteps.
This change adds a new "one-to-one" mode, allowing users to model tides for only these exact pairs of locations and times. Using the previous example (five x, y coordinates and five timesteps) in "one-to-one" mode:
Example from notebook:
Other changes:
How_to_guides/Tidal_modelling.ipynb
to document new functionalityCloses issues (optional)
Checklist (replace
[ ]
with[x]
to check off)Load packages
General advice
)jupyterlab_code_formatter
tool can be used to format code cells to a consistent style: select each code cell, then clickEdit
and then one of theApply X Formatter
options (YAPF
orBlack
are recommended).NCI
andDEA Sandbox
(flag if not working as part of PR and ask for help to solve if needed)Notebook currently compatible with the NCI|DEA Sandbox environment only
line below the notebook title to reflect the environments the notebook is compatible with