Tidal Forcing

From WikiROMS
Jump to navigationJump to search
Description of Tidal Forcing in ROMS




Tidal Forcing Files in ROMS

Once the appropriate cpp options have been set (e.g. SSH_TIDES, UV_TIDES, RAMP_TIDES), a netcdf file of tidal constituents must be generated.

  1. Download the desired tidal constituent database and associated software. There are many tidal constituent databases available for download and the choice of databases depends on the desired constituents and location of the ROMS grid. Two possibilities which have broad geographic range and generally the dominant constituents are the OSU Tidal Data Inversion Software(OTIS) and the ADCIRC tidal database. Remember to download the associated software with each data base as there ire typically routines which facilitate the extraction and interpolation of the database to the ROMS grid.
  2. Interpolate the tidal constituent database to the desired ROMS grid. See the above comment. While it is possible to write code (e.g. MATLAB, FORTRAN) to perform this task, it is typically easier to use the provided packages.
  3. Verify all open boundary grid cells contain valid data. During the interpolation process, depending on the land mask for the ROMS grid and the tidal database grid, it is possible to have grid cells near land points which the ROMS grid may define as water, but the tidal grid defines as land. Should this occur a 180 degree phase shift along the open boundary near land points is possible. As ROMS is tidally forced on the open boundary, this could be problematic.
  4. The phase of the u/ v/ zeta components of the tidal constituents should be shifted to the appropriate reference time(t=to).It is typical for tidal constituent databases to be stored with the phase shifted by the equilibrium tidal argument. Consequently the reference time for the tide is not the desired time, as set in ocean.in using the variable TIDE_START. In addition, nodal corrections need to be made due to long period tides. The equilibrium argument and nodal corrections can be calculated using the tidal database software or Rich Pawlowicz's T_TIDE MATLAB package
  5. Convert the amplitude/phase information to tidal ellipse parameters, if necessary. ROMS requires tidal information to be stored as ellipse parameters for use. One tidal ellipse package is ap2ep.m from Zhigang Xu.MATLAB tidal ellipse code is available.
  6. Export tidal ellipse parameters to a ROMS netcdf forcing file.

Two examples of this process are described below.

OSU Tidal Prediction Software Example

The processing in this example was carried out in MATLAB using routines found in http://marine.rutgers.edu/~hunter/roms/tides/otps/. It has been tested on a SUN and requires T_TIDE.

  1. Download the OSU tidal processing software(OTPS.tar.Z) to the the working directory e.g. OTPS/. Extract the OTPS routines.
    • cd OTPS/
    • uncompress OTPS.tar.Z
    • tar xvf OTPS.tar
  2. Download the appropriate regional or global model database with respect to the ROMS domain. e.g. For a model of the East coast of the United states, download EC.tar.Z. Uncompressing and extracting this file should great a subdirectory called DATA/
    • uncompress EC.tar.Z
    • tar xvf EC.tar
  3. Compile extract_HC.f into the executable extract_HC. There is a makefile included in the OTPS.tar.Z archive. It requires an f90 compiler.
    • make extract_HC
  4. Now the tidal constituents are ready to be extracted and saved to a ROMS forcing file. An example (using MATLAB) of how to do this is given in otps2frc_v3.m. In the following example, t is the reference date for the tide (i.e. TIDE_START), tpred is the nodal corrections reference time (usually the midpoint of range of the prediction time), and gfile is the ROMS grid file. Also included are and output file and the path the OTIS database.
    • >> t=datenum(2005,1,1);
    • >> tpred=datenum(2006,1,1);
    • >> gfile='/home/hunter/roms/in/roms_latte_grid_3c.nc';
    • >> otps2frc_v3(gfile,t,tpred,'test_EC.nc','DATA/Model_EC')


Note otps2frc_v3 calls extract_HC and generates several intermediate files. It also generates the file setup.inp as input to extract_HC. The format of setup.inp is:

DATA/Model_NA  ! 1. tidal model control file ../ll.dat  ! 2. latitude/longitude/time file z  ! 3. z/U/V/u/v o1,k1,n2,m2,s2  ! 4. tidal constituents to include AP  ! 5. AP/RI oce  ! 6. oce/geo 0  ! 7. 1/0 correct for minor constituents ../nena_8g_z.out  ! 8. output file (ASCII)

Details of the format are found in the OTPS.tar.Z README file.

Note It is also hard-coded into otps2frc_v3 to only look for the constituents m2,s2,k1,o1. If you want more constituents(and they exist in the regional or global database of your choice) you will have to edit otps2frc_v3.m.

Warning If you attempt to extract constituents that don't exist in the database, extract_HC MAY fill in data for those constituents, usually by filling in with data from a constituent that exists. So verify the constituent is part of the database.




ADCIRC Tidal Database Example

The processing in this example was carried out in MATLAB using routines found in http://marine.rutgers.edu/~hunter/roms/tides/adcirc/. It has been tested on a SUN and requires T_TIDE.

  1. Download the file tide_fac.f(from the ADCIRC website and put it in the working directory. e.g. ADCIRC/.
  2. Compile tide_fac.f using and f77 compiler.
    • f77 -g -o tide_fac.out tided_fac.f
  3. Download the desired ADCIRC tidal database. e.g. Download ec_95d.zip. Unzip this file into the worlikng direcotry.
    • unzip ec_95d.zip
  4. Compile tides_v1.05a.f into the executabletides_v1.05a.out
    • f77 -g -o tides_v1.05a.out tides_v1.05a.f
  5. Now the tidal constituents are ready to be extracted and saved to a ROMS forcing file. An example (using MATLAB) of how to do this is given in adcirc2frc_v1.m. In the following example, t is the reference date for the tide (i.e. TIDE_START) and gfile is the ROMS grid file. Also included are an output filename and a processing flag.
    • >> t=datenum(2005,1,1);
    • >> gfile='/home/hunter/roms/in/roms_latte_grid_3c.nc';
    • >> adcirc2frc_v1(gfile,t,'test_adcirc.nc',1)