Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

When you need to add tides to your simulation


In ADCIRC, confusingly, tidal forcing is separated from elevation boundary conditions and put into the .15 control file. Tidal constituents are understood to be the low frequency waves in the ocean caused by highly periodic forcings. Of these, eight are considered major. The following is written for OM2D 5.0. 

Step-by-step guide

This will assume you have some working knowledge of the object-oriented design of OM2D. A crash course can be found in Locally Refined Mesh from Raw Data in OceanMesh2D.

  1. Download TPXO9 from OSU TPXO Tide Models - TPXO Global Tidal Solutions. It's currently restricted to research purposes only, so you have to register ahead of time. 
  2. Unzip and place the tpx files in /datasets
  3. Load your .14 into your msh object using the msh() constructor. You can also add in your .15 file if you want to modify an already build control file.
    1. The primary option fname is for your mesh data. This could also be a .grd file, or the like. 
  4. Use the Make_f15() utility to create a new msh object with your tidal forcings. The tool automatically calculates based on your start time. 
  5. Write the .15 file out. Confusingly, write() does not obey the name-value scheme of the rest of OM2D. Reference the manual to be sure. 

Or, you can just cheat and copy paste this. 

mesh2tides.m
%Short script to add tides to your .14 and .15 using TPXO9 
%Author: Kenton Wu
%Date: Jan 23rd, 2023 
%In: .14, .14 & .15 files
%Out: .15 file with 

clear; clc; 

addpath('..')
addpath(genpath('../utilities/'))
addpath(genpath('../datasets/'))

%Load mesh - option 'fname' is your mesh data, 'aux' is extras
mesh = msh('fname','datasets/fort.14','aux',{'original.15'}); 


%Write tidal information  
start_time = '13-Aug-2017 12:00'; 
final_time = '15-Sep-2017 00:00';  
mesh = Make_f15(mesh, start_time, final_time, 2, 'const', 'major8','tidal_database','datasets/Tpxo9/h_tpxo9.v1.nc');

%Write out 15 control file 
write(mesh,'harvey2017_08_13_12','15')


Remember to run adcprep on your 15 file after if you're doing a parallel run! 



  • No labels