Menu

OtpsTides Log in to Edit

Jesper Larsen Bjarne Büchmann Karsten Bolding

GETM Tidal Boundary Conditions

Introduction

Remote sensing from satelite has provided enough data to estimate tidal constituents. The group by Lana Erofeeva & Gary Egbert (Oregon State University, OSU) has worked intensively with the data using a so-called inverse model. In short, they set up a (numerical) hydrodynamic model and match the observations as well as possible. From this they extract a gridded data set of bathymetry as well as tidal constituents for elevation and (depth averaged) velocities.

The present utility can interface with the inverse modeled netCDF data provided at OSU, which contains tidal constituents for both elevation and (2D) velocities. Thus, it is feasible to extract directly tidal data for Flather boundary conditions in GETM. At present time, DaMSA already use this utility to generate tidal conditions operationally. The utility is really a modified version of a Fortran program coded by Lana, so the code has not been free for me to share. However, Lana has generously allowed to share the code on GETM-utils, and she has even provided a link to getm-utils from their own page:
http://volkov.oce.orst.edu/tides/outreach.html

Instructions

First, read [PreRequisites] and [BuildInstructions], unless you have done so already. Be aware of stuff like differences between bash and csh. The present instructions are for BASH on a LINUX system.

Note that to use this utility, additional code will be downloaded from OSU. The make-process will do this by itself, if you set "export FETCHDATA=true", but it is disabled by default. You should not have to download the OSU-code manually.

Here is a short starter.

Compile getm-utils with "export FETCHDATA=true". Make sure that src/otps-tides compiles. You need to set FORTRAN_COMPILER and possibly NETCDF_LIB and NETCDF_INC as usual.

Example:

export FETCHDATA=true
export FORTRAN_COMPILER=IFORT

Using version 3 of the NetCDF library it might be necessary to set:

export NETCDFLIBDIR=/opt/netcdf-3.6.2/lib
export NETCDFINC=/opt/netcdf-3.6.2/include

Using version 4 of the NetCDF library be sure that 'nc-config' is in your path.

Go to your downloaded git clone of the repository. Then run make. You can compile either all the utilities or just the present utility by something like:

export BINDIR=$(pwd)/bin
export FETCHDATA=true
make -C src/otps-tides

This will download needed source code from OSU, along with a larger data package, which you may (or may not) have to use. As OSU distributes source code and data together, the download of data cannot be avoided.

If all goes well, then the binary should show up as bin/predict_euv.

Additional tidal models

The build process of the opts-tides utility fetches a single tidal model from OSU along with the necessary source code. However, OSU provides data for more areas. The present section show how to get data for a few of these. See the OSU site for information on additional data packages.

Select your own places for additional tidal data...

PROJDIR=$HOME/Projects/TidalFlatherBC
WGETDIR=$PROJDIR/OSU
mkdir -pv $WGETDIR
cd $WGETDIR

The first is already downloaded with the getm-utils installation, you may want to relocate it, or you can get it again.

cd $WGETDIR
wget -nd ftp://ftp.oce.orst.edu/dist/tides/OTPSnc.tar.Z
wget -nd ftp://ftp.oce.orst.edu/dist/tides/regional/ES_netcdf.tar.Z 
tar xvzf OTPSnc.tar.Z    # Unpacks OTPSnc/
tar xvzf ES_netcdf.tar.Z # Unpacks DATA/

Consolidate data to single dir

mv DATA/* OTPSnc/DATA/
rmdir DATA
rm -vf OTPSnc.tar.Z ES_netcdf.tar.Z

There is code with these data, but do not compile. You already have what you need with getm-utils.

cd $PROJDIR
ln -sv $WGETDIR/OTPSnc/DATA DATA

Basically, I move DATA to ~/OSU-DATA and make symlinks DATA -> ~/OSU-DATA as necessary.
The point is, you likely need DATA to point to the location of the downloaded files.

There are some tricks to know.

1: The program (predict_euv) reads an input file from STDIN. The format is very specific, as written by Lara & Gary.
2: I have changed the format slightly, so that it is possible to give two input files separated by a vertical bar.

Three files are in the test dir under otps-tides folder (in getm-utils source): setup-ES2008-test01.inp, tide.dates-test01, and lat_lon_test01. Put all three in $PROJDIR for testing, then try to run

cd $PROJDIR
predict_euv<setup-ES2008-test01.inp

The short story is, that setup-ES2008-test01.inp is the main config file, and it references the two other files as well as some tidal data. The lat_lon file can be output from the ncbathy2kml.py script, which is already on getm-utils, but you have to be careful with data near land.

Missing values near land

If the OSU model that you use does not have four water cells as nearest neighbours the output values will be invalid and cannot be used for input to GETM for these points. The reason is that the OTPS tides program interpolates values from the four nearest neighbours to the points that you supply in lat_lon file. You then have to re-locate the points in the lat_lon file (slightly) to make sure that they are detected as water by the OSU-module.

Bathymetry discrepancies

TODO: More information/howto needed for points where local model bathymetry differs significantly from the OSU bathymetry.

TODO: More elaborate example showing "real case" with model setup, boundary condition specification and generation of data for boundary conditions. Also use of tool for flux-correction (interpolation of fluxes rather than velocities from OSU-data).


Related

Wiki: BuildInstructions
Wiki: GETM Utils
Wiki: PreRequisites

Discussion

Anonymous
Anonymous

Add attachments
Cancel