-
Notifications
You must be signed in to change notification settings - Fork 6
Setting up tidal models for DE Africa Coastlines
This repository has been updated to model tides using functions and tools from the pyTMD Python package. To set up this for the first time, follow the instructions below.
Getting started with the FES2014 Finite Element Solution tide model
-
Register with AVISO+, and select
FES2014 / FES2012 (Oceanic Tides Heights)
from thePRODUCT SELECTION
section:
- Once your registration is complete, login to MY AVISO+.
- Once logged in, select My products in the left-hand menu:
-
FES2014 / FES2012 (Oceanic Tides Heights)
should appear underYour current subscriptions.
Right click onFtp
, and copy the FTP address.
- Using an FTP client like FileZilla, log in to the FTP using your AVISO+ username and password:
- 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
(orfes2014b_elevations_extrapolated/ocean_tide_extrapolated.tar.xz
; this extrapolated version includes additional coverage of the coastal zone, which can be useful for coastal applications)
- 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. Extractload_tide.tar.xz
andocean_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 extractedocean_tide_extrapolated
folder toocean_tide
.
If the pyTMD
Python package is not installed on your system, this can be installed using:
pip install pytmd
Tides from FES2014 can now be modelled using the model_tides
function in this repository:
import pandas as pd
from coastlines.raster 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 DE Africa 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.