Tidal Forcing File

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Tidal Forcing File

#1 Unread post by JDTilley »

I am just starting to create my first tidal forcing file and I have a few questions. I have created a blank file based off of frc_tides.cdl. Where is time in this file? Do I need to add it manually? To me it seems a tidal forcing file should contain spatial arrays of tidal heights over time. Is this not how it works? I also would be interested to hear any suggestions as to which sites to download data from. Thanks.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Tidal Forcing File

#2 Unread post by kate »

I believe most people get their tides from TPXO.
There's matlab software and other options for extracting them into ROMS format. ROMS wants the tidal constituents, not a time-series. ROMS is not expecting to do the long-period tidal corrections, so it's probably best to have matlab take care of that and then run for up to a year or two for each tidal file (there's a challenging 18-year cycle).

JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Re: Tidal Forcing File

#3 Unread post by JDTilley »

Great. I was looking at TPXO Atlas 8. Unfortunately, I do not have a Matlab license available. I have seen a Python script here:

https://github.com/ESMG/pyroms/blob/mas ... ke_tide.py

Also, I see another package that may be of use here:

https://ocefpaf.github.io/python4oceano ... 7/pytides/

But basically, for each grid point I should end up with several time-invariant tidal components?

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: Tidal Forcing File

#4 Unread post by kate »

Yes, tidal elevation and phase. There's no reason not to do the tidal currents as well, which involve four fields per tidal constituent.

JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Re: Tidal Forcing File

#5 Unread post by JDTilley »

So you mean the UV data? I have found a DAP server for the hf data:

http://geoport.whoi.edu/thredds/dodsC/u ... talog.html

But unfortunately, I don't see the UV data. Would you happen to know any DAP servers for TPXO8? I would like to avoid downloading 20 GB of data if possible.

JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Re: Tidal Forcing File

#6 Unread post by JDTilley »

So I decided to go with ADCIRC. It gives me higher resolution, required less hard drive space to install, and has decent documentation online. I created the dataset, and now I just need to get the data into my forcing file. I get two output files, elev_hc.out and vel_hc.out. In elev_hc.out the first couple lines look like this:

Code: Select all

M(2)     
    0.021839  190.317454
The columns represent amplitude and phase angle of the M2 tidal component, respectively. For vel_hc.out, the first couple lines look like:

Code: Select all

 M(2)     
      0.025250    51.880      0.018063   233.536
The fours columns represent the u and v velocities and phase angles, respectively. Hopefully, this is in meters, but the included documentation doesn't seem to mention that.

The elevation and phase angle are straightforward enough. I assume I put the vector sum of the O1, K1, N2, M2, S2, M4, and M6 components into the variables tide_Eamp and tide_Ephase. I'm not quite as sure with velocities. Would I also just do the vector sums of the velocity components and put those into tide_Cangle and tide_Cphase? If this is the case, what am I supposed to put into tide_Cmin and tide_Cmax?

EDIT: hmm, it appears the default tide CDL provided is missing tide_Uamp, tide_Uphase, tide_Vamp, and tide_Vphase, but those may should be calculated internally. I have come across this... https://www.myroms.org/documentation/tidal_ellipse.ps. I hope I can find an easier solution than having to make the calculations manually.

JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Re: Tidal Forcing File

#7 Unread post by JDTilley »

I managed to get the data I needed by translating the MATLAB code from here into Python:

https://www.myroms.org/index.php?page=forcing

I can't make any guarantees, but it seems to work.

Code: Select all

def ap2ep(Au, PHIu, Av, PHIv):
    PHIu = PHIu / 180. * np.pi
    PHIv = PHIv / 180. * np.pi
    # Make complex amplitudes for u and v
    i = np.sqrt(-1+0j)
    u = Au * np.exp(-i * PHIu)
    v = Av * np.exp(-i * PHIv)
    # Calculate complex radius of anticlockwise and clockwise circles
    wp = (u + i * v) / 2. # for anticlockwise circles
    wm = np.conj(u - i * v) / 2. # for clockwise circles
    # and thier amplitudes and angles
    Wp = np.abs(wp)
    Wm = np.abs(wm)
    THETAp = np.angle(wp)
    THETAm = np.angle(wm)
    # calculate the ellipse parameters
    SEMA = Wp + Wm
    SEMI = Wp - Wm
    ECC = SEMI / SEMA
    PHA = (THETAm - THETAp) / 2.
    INC = (THETAm + THETAp) / 2.
    PHA = PHA / np.pi * 180
    INC = INC / np.pi * 180
    THETAp = THETAp / np.pi * 180
    THETAm = THETAm / np.pi * 180
    THETAp[THETAp < 0] = THETAp[THETAp < 0] + 360
    THETAm[THETAm < 0] = THETAm[THETAm < 0] + 360
    PHA[PHA < 0] = PHA[PHA < 0] + 360
    INC[INC < 0] = INC[INC < 0] + 360
    return(PHA, INC, SEMI, SEMA)

JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Re: Tidal Forcing File

#8 Unread post by JDTilley »

So something is wrong with my tidal forcing. I am getting an extremely tidally dominated system, when in reality, my system is mixed between wind and tide. Do I need to adjust viscosity if I add tides? I think it is a units problem. Something is way off. My tidal forcing netcdf file has amplitudes in meters and currents in m/s. The ADCIRC documentation says amplitudes are in units of distance consistent with gravity. I do not know what this means. I am doing O1, K1, N2, M2, S2, M4, and M6 and I have the tide periods as 25.82, 23.93, 12.66, 12.42, 12.00, 6.21, and 4.14 hours, respectively. Does this sound like a units problem, or could something else be causing these outrageous tides?

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Tidal Forcing File

#9 Unread post by ymamoutos »

Greetings,

I am also having - let's say - a similar problem.
When I am applying tides on my model I get almost
2 times higher amplitude than the actual (I am
comparing with a tide gauge data, see attached figure).
During my tests I change several things and rerun
but the results in all of the cases are more or less
the same. First I tried different values for the
quadratic drag, even high values with very small
timesteps for stability but nothing changed. I tried
the same with log drag and linear drag and again I had
no luck. I also used relative high values for viscosity
(nl_visc2 in ocean.in) and different sponge layers -
from modest factor (3-4) to high (10+) - for my boundaries
but again the problem insists. One last solution was to
smooth a bit more my bathymetry (rx1 from ~ 5 to 4.5),create
new boundary files and rerun. No luck again. I must also
say that the standard model setup - without tidal forcing -
is stable and validated and I don't have reasons to doubt
about it's solution/results.

I am using TPXO8 data and John Luick matlab script to create the
tidal forcing file and I am sure that my phase is the proper one.
I am using 8 constituents, 4 diurnal(O1,K1,Q1,P1) and 4 semi-diurnal
(M2,S2,K2,N2) and running only for a year. My grid resolution is
2km x 2km and covers a part of the Mediterranean sea (Aegean sea).

The cpp flags I use for the tidal run are

ADD_FSOBC
ADD_M2OBC
SSH_TIDES
UV_TIDES
RAMP_TDES

Any help or suggestion will be highly appreciated.
Regards

Giannis
Attachments
Jan_2008_HNHS_vs_ROMS_C8_cmp_new.png

johnluick

Re: Tidal Forcing File

#10 Unread post by johnluick »

Giannis,

It might be timely to mention that I have not updated TPXO2ROMS.m since before 19 April 2017, when Hernan updated the way ROMS keeps time (I haven't updated my ROMS yet either). It isn't obvious to me, from ticket 724, whether TPXO2ROMS.m actually requires updating. First, the ticket says that for time_ref = -2 (which TPXO2ROMS.m assumes is being used), ROMS uses a new and different calendar (one that runs from Jan 1, 4713 BC); then right below that it implies that it still uses the original (NASA) calendar (one that runs from May 23, 1968). If the latter is the case, then TPXO2ROMS.m should still be fine. Perhaps Hernan can clarify.

Of course, if you are using the earlier ROMS, the above is irrelevant.

Looking at your graph, my first suspicion would be that the global TPXO8 solution is too large in the Mediterranean (I assume that the domain is in the Med.). There may be a local high resolution solution on the OSU website for the Mediterranean that would be more accurate.

John

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Tidal Forcing File

#11 Unread post by ymamoutos »

Greetings John

first of all many thanks for your reply.
I am using the latest version of ROMS code
and time_ref = -2 still uses the same calendar
with the older versions. Yes my domain
is inside the Mediterranean sea. I forgot to
mention to my previous post that I had already
used the regional solutions of OSU for the
Mediterranean sea. For the 8 constituents that
I am using the resolution is the same with the
global model (1/30 degrees) and the results
were similar with the attached figure.

Any other suggestion?

Kind Regards
Giannis

johnluick

Re: Tidal Forcing File

#12 Unread post by johnluick »

My second suspicion would be that there is something wrong with the tide gauge. Do you have a reliable set of harmonics? If the amplitudes of the two major harmonics (probably M2 and S2) sum to about .15 m, then the data is in error.

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Tidal Forcing File

#13 Unread post by ymamoutos »

John

The sum of M2 and S2 harmonics is a bit bigger than 0.15m... :shock:
I suppose that I can't use this dataset to validate my results.
Once more any suggestions???

Kind Regards
Giannis

P.S. Sorry editing the post multiple times. I had to double check the harmonics
because I was looking on the wrong dataset
Last edited by ymamoutos on Mon May 15, 2017 12:20 am, edited 1 time in total.

johnluick

Re: Tidal Forcing File

#14 Unread post by johnluick »

My suggestion would be to assume your tides are ok, and move on to whatever process you are really interested in. At some point, use t_tide or something to analyse the ROMS hourly data for a point near where your harmonics are from, but don't get too hung up on an exact match to amplitude or phase. By the way most published phases (e.g. Admiralty) are in the local time zone, whereas you are probably running ROMS in UT. For S2 (for example) if the published phases are in a time zone 3 hours ahead of UT, then you have to subtract 90 degrees to match the ROMS/t_tide phase. (Since 3 hours x 30 degrees/hour = 90 degrees.)
Good luck!
John

miguel.solano
Posts: 12
Joined: Mon Jan 30, 2012 8:02 pm
Location: University of Texas at Dallas

Re: Tidal Forcing File

#15 Unread post by miguel.solano »

Giannis,
Another thing you might want to look at are your barotropic boundary conditions. If you are using ADD_FSOBC & ADD_U2OBC as well as SSH_TIDES/UV_TIDES, and if the regional model you are downscaling from is not de-tied (i.e. it has tides) you might be giving ROMS the tidal forcing twice, which might also explain why your standard model setup without the tidal forcing works well. If this is the case you can apply a low-pass filter to your barotropic OBC's (SSH/UBAR/VBAR) and combine it with your tide forcing file to get the right solution.
Hope this helps,

-Miguel

JDTilley
Posts: 63
Joined: Tue May 31, 2011 3:31 pm
Location: University of Southern Mississippi

Re: Tidal Forcing File

#16 Unread post by JDTilley »

So looking at my zeta vs tide gauge data, it seems that the amplitudes of my tides are reasonable, although I must have miscalculated my TIDE_START. Let me show you an example of what I have, and maybe someone can tell me if it looks ridiculous to them. Tides certainly have a big effect on our system. Although the tides are small (1–2 ft usually), the MS Sound is shallow. Still, a little wind can have tremendous affects on currents, so this is just not believable to me. Each frame of this animation represents 3 hours over a 12-day period. The horizontal extent is somewhere on the order of 60–80 miles. Does the model just need more time before wind-driven circulation starts to dampen the tide-driven circulation? I was hoping to test without doing a full model run.
ms_sound_3d_model_surface_12_day_tides_test.gif
ms_sound_3d_model_surface_12_day_tides_test.gif (3.04 MiB) Viewed 16745 times
Without tides, the model shows what appears to be reasonable geostrophic current patterns, but I haven't gotten my model to the point where I'm ready to start validating.

ymamoutos
Posts: 71
Joined: Fri Nov 19, 2010 2:33 pm
Location: University of Aegean

Re: Tidal Forcing File

#17 Unread post by ymamoutos »

Greetings

Miguel thanks for your reply. I am using two different regional models (Global Mercator with 1/12 degrees resolution and MFS 1/16 degrees resolution) to create the input data for mine and to check for any significant differences on my results. According to myocean Copernicus service documentation none of the models include tides. I will check my results with another tide gauge data that I have for the same time period and then I will decide what I am going to do...

Again many thanks for your suggestion and willingness to help. I appreciated.

Kind Regards
Giannis

Post Reply