Skip to content

Setting up tidal models for DEA Coastlines

Robbi Bishop-Taylor edited this page Mar 24, 2023 · 7 revisions
  1. Register with AVISO+, and select FES2014 / FES2012 (Oceanic Tides Heights) from the PRODUCT SELECTION section:

image

  1. Once your registration is complete, login to MY AVISO+.
  2. Once logged in, select My products in the left-hand menu:

image

  1. FES2014 / FES2012 (Oceanic Tides Heights) should appear under Your current subscriptions. Right click on Ftp, and copy the FTP address.

image

  1. Using an FTP client like FileZilla, log in to the FTP using your AVISO+ username and password:

image

  1. Navigate to /auxiliary/tide_model/fes2014_elevations_and_load/, and download the following files:
  • fes2014a_loadtide/load_tide.tar.xz
  • fes2014b_elevations/ocean_tide.tar.xz (or fes2014b_elevations_extrapolated/ocean_tide_extrapolated.tar.xz; this extrapolated version includes additional coverage of the coastal zone, which can be useful for coastal applications)
  1. Create a new folder (i.e. tide_models/fes2014/) to store the model files in a location that will be accessible to the DEA Coastlines code. Extract load_tide.tar.xz and ocean_tide.tar.xz into this folder (e.g. tar -xf load_tide.tar.xz). You should end up with the following directory structure containing the extracted NetCDF files:
tide_models/fes2014/load_tide/
    |- 2n2.nc
    |- ...
    |- t2.nc
tide_models/fes2014/ocean_tide/
    |- 2n2.nc
    |- ...
    |- t2.nc

Note: If you downloaded ocean_tide_extrapolated.tar.xz, you will need to rename the extracted ocean_tide_extrapolated folder to ocean_tide.

Modelling tides

If the pyTMD Python package is not installed on your system, this can be installed using:

pip install pytmd

Tides can now be modelled using the model_tides function from the dea_tools.coastal package:

import pandas as pd
from dea_tools.coastal import model_tides

lons=[155, 160] 
lats=[-35, -36] 
example_times = pd.date_range("2022-01-01", "2022-01-04", freq="1D")

model_tides(
        x=lons,
        y=lats,
        time=example_times.values,
        directory='tide_models'
)

In the DEA Coastlines code, this function is used in the raster module as part of the annual water index composite generation process.

Depending on where you created the tide_models directory, you may need to update the directory parameter of the model_tide_points function to point to the location of the FES2014 model files.