urgent problem on time ref and tide_start !!!!!!!

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
viviocean
Posts: 10
Joined: Mon Jul 21, 2008 1:45 pm
Location: OUC

urgent problem on time ref and tide_start !!!!!!!

#1 Unread post by viviocean »

Hi, erveryone, I am using Romstools to get the amplitude and phase from TPOX06 and using Roms3.4 to forecast operationally the Bohai current. Now I encounter such problem: I am confused how to used time_ref and tide_start for long time.
Case1
In Romstools:
Yorig = 1900; % reference time for vector time
Ymin = 2000; % first forcing year
Ymax = 2000; % last forcing year
In Rom3.4
DSTART = 0.0d0 ! days
TIDE_START = 0.0d0 ! days
TIME_REF = 20000101.00 ! yyyymmdd.dd
The result is that the simulated elevation is phase lag with the observation for so long time.
Case2
Yorig = 1900; % reference time for vector time
Ymin = 2000; % first forcing year
Ymax = 2000; % last forcing year
In Rom3.4
DSTART = 0.0d0 ! days
TIDE_START = mjd(2000,1,1)- mjd(1900,1,1) ! days
TIME_REF = 1900.00 ! yyyymmdd.dd
The result is that the simulated elevation is phase lag with the observation for 6hour.(maybe6hour).
Is there anyone who tell me how to used time_ref and tide_start?
When I study in https://www.myroms.org/wiki/index.php/tide_start
I am curious that is tide_start is connect with initial time- oceantime in netcdf?

Is the amplitude and phase from TPOX06 need to transform into the east eight district, for bohai is into the east eight district?
I would really appreciate for your help.

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

Re: urgent problem on time ref and tide_start !!!!!!!

#2 Unread post by kate »

If you read the fine print on the TPXO, you will see that the reference time for the tides is the year 0. Your reference time for the currents is the year 2000 or the year 1900. You need to set TIDE_START at some large negative number to get the offset between the two time origins. Here's what I use:

Code: Select all

!     DSTART =  21185.0d0                  ! days 
      DSTART =  25202.0d0                  ! days 
!     DSTART =  31049.0d0                  ! days 
  TIDE_START =  -693962.0d0                ! days 
    TIME_REF =  19000101.0d0               ! yyyymmdd.dd
The time origin here is 1900, with different start times, depending on my actual starting year. The TIDE_START is the difference between the years 0 and 1900 (I hope).

viviocean
Posts: 10
Joined: Mon Jul 21, 2008 1:45 pm
Location: OUC

Re: urgent problem on time ref and tide_start !!!!!!!

#3 Unread post by viviocean »

thank you very much! and how to set the Yorgin and ymax in roms_tools if I like to forecast the tide elevation in jan 1,2000.

viviocean
Posts: 10
Joined: Mon Jul 21, 2008 1:45 pm
Location: OUC

Re: urgent problem on time ref and tide_start !!!!!!!

#4 Unread post by viviocean »

what is the reference time of DSTAR, DSTART = 25202.0d0
I do follwing your indication:
! DSTART = 21185.0d0 ! days
DSTART = 25202.0d0 ! days
! DSTART = 31049.0d0 ! days
TIDE_START = -693962.0d0 ! days
TIME_REF = 19000101.0d0 ! yyyymmdd.dd
Yorig = 1900; % reference time for vector time
Ymin = 2000; % first forcing year
Ymax = 2000; % last forcing year
to forecast the elevation from jan 01 2010. However, the simulated result is lag from so long time.
Therefore, i am curious about the time of dstart.
"If you read the fine print on the TPXO, you will see that the reference time for the tides is the year 0.
" could you give me the assocated paper or website.
I used the topox harmonic data from the following website:http://volkov.oce.orst.edu/tides/region.html with resolution 1/30.
I really appreciate for your help

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

Re: urgent problem on time ref and tide_start !!!!!!!

#5 Unread post by kate »

I don't use the tools you mention, so can't answer as to what they are doing. The day 25202 is at the start of 1969, 69 years of days since 1900.

One thing those tools might be doing is adding in the 18-year tidal corrections, valid only near the origin time chosen. I don't use that method because I'm running a 35+ year simulation, picking up all the phases of the 18-year cycle. Something to beware of!

johnluick

Re: urgent problem on time ref and tide_start !!!!!!!

#6 Unread post by johnluick »

Was there ever a question on the forum that was not urgent?

If you want to forecast tides, I suggest you use something like:
DSTART=14652 !Modified Julian Days since 1968-05-23 00:00:00 GMT
TIDE_START=14652 !Se equal to DSTART
TIME_REF=-2

This example will start the model running at 0000 Hours on 4 July 2008. (All the times - like zeta_time, etc. - in your initialization file, if you use one, must also be set to the same time.) See the notes in the ".in" file to explain these values. If you want real tides, you need to run in real time (real calendar time).

Now, however you create them, all the phases of the constituents (of your tidal elevations and current ellipses) in your tides forcing file must be correct for your choice of DSTART, because ROMS will simply take those phases and wind them forward in accordance with their tidal "speed" (degrees/hour).

The aforementioned phases are not the same as the phases you will find in the Admiralty Tide Tables, for example. Those phases are referenced to some date in the past, like 0000 Hours 1 Jan 1900 or something. It is easy to convert from one to the other (at least for S2, see below).

About the nodal thing. I've mentioned this before - first check that the program that creates your tides forcing file correctly produces the correct phase for S2, which is not affected by the nodal progression, THEN worry about the nodal correction. If the program gets S2 right, it's probably right for M2 etc. except possibly for the nodal correction (to M2 etc.). Does that make sense?

One last thing. The last time I checked, the people that wrote ROMS_TOOLS have not updated the TPXO file since TPXO6. I wrote my own Matlab script for setting up the tidal constants directly from the files available from OTPS (e.g. TPXO7.2.nc). I can make it available but I suspect that other people have done so and better than me so I was sort of hoping someone else would do this. The way that is suggested on WikiROMS and elsewhere that involves using a FORTRAN program is (in my opinion) an awful hash. My way only requires a simple Matlab script, a given DSTART, and a ROMS grid file. Meanwhile, maybe TPXO6 will do.

By the way, are all you tide modellers at OUC are talking to each other?

User avatar
wilkin
Posts: 922
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: urgent problem on time ref and tide_start !!!!!!!

#7 Unread post by wilkin »

Searching for "tides" in wiki roms will offer some useful advice:
https://www.myroms.org/wiki/index.php/Tidal_Forcing
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

viviocean
Posts: 10
Joined: Mon Jul 21, 2008 1:45 pm
Location: OUC

Re: urgent problem on time ref and tide_start !!!!!!!

#8 Unread post by viviocean »

Thank you for kate,johnluick and wilkin’s help.
To johnluick: does it mean that in Roms_tools I would set
Yorig = 1900; % reference time for vector time
Ymin = 2008; % first forcing year
Ymax = 2008; % last forcing year
Min==7
Dmin=4
In Roms3.4
DSTART=14652 !Modified Julian Days since 1968-05-23 00:00:00 GMT
TIDE_START=14652 !Se equal to DSTART
TIME_REF=-2
to simulate in the tide elevation at 0000 Hours on 4 July 2008.
Would you like to give me your own Matlab script for setting up the tidal constants directly from the files available from OTPS (e.g. TPXO7.2.nc), because I could not get other. My E-mail is ocean8102@yahoo.com.cn.

hbzong
Posts: 36
Joined: Thu Oct 04, 2007 4:14 am
Location: Fathom Science/NCSU

Re: urgent problem on time ref and tide_start !!!!!!!

#9 Unread post by hbzong »

Did you consider the time lag between Beijing Time and GMT when you compared your model result with observation?

cambon
Posts: 1
Joined: Tue Oct 13, 2009 4:25 pm
Location: LEGOS

Re: urgent problem on time ref and tide_start !!!!!!!

#10 Unread post by cambon »

Hi,

I think I can bring some informations about Romstools, that my colleagues an I wrote. They are associated to the ROMS_AGRIF branch : http;//roms.mpl.ird.fr and there are some differences with the RUTGERS code that why there is problems and confusions. ROMSTOOLS are compatible with ROMS_AGRIF branch.
You can refer there also to the forum of ROMS_AGRIF / ROMSTOOLS branch on InriaGFORGE (https://gforge.inria.fr/projects/romsagrif/).

Here is the RUTGERS forum but I give you some explanations concerning this.

In ROMS_AGRIF and ROMSTOOLS we define a reference time for the simulation (1 January Yorig) and an initialisation time for the simulation (Ymin, Dmin, Hmin, Smin), in romstools_param.m.
Then if you compute tides from TPXO6 and TPXO7, using the make_tides.m from the ROMSTOOLS :

1) you compute first the phase lag between 1/1/1992 TPXO6 reference time and ROMS simulation, but for that scrum_time (ocean_time in rutgers branch) need to be defined regarding 1/1/1992 ---> [pf,pu,t0,phase_mkB]=egbert_correc(date_mjd,Hmin,Min_min,Smin) in make_tides.m and this is not very convenient ...

2) So we add a the second phase lag between referenced simulation time (1/01/Yorig) and TPXO referenced time (1/1/1992). ---> in make_tides.m
% Add a phase correction to be consistent with the 'Yorig' time
%
t0=t0-24*mjd(Yorig,1,1);
....
correc_phase=-phase_mkB(itide)-pu(itide)+360.*t0./periods(itide);

3) So you have the phase lag of TPXO data at the beginning of the run with scrum_time defined regarding the reference simulation time (1/01/Yorig) you choose.

If you want to simulate tides the 8 July 2008, with climatological data, for example you can define initialisation for forcing like this :
Yorig=2008;
%
Ymin = 2008; % first forcing year
Ymax = 2008; % last forcing year
Mmin = 8; % first forcing month
Mmax = 8; % last forcing month
%
Dmin = 1; % Day of initialization
Hmin = 0; % Hour of initialization
Min_min = 0; % Minute of initialization
Smin = 0; % Second of initialization

and make a run a 10 days. The time in forcing and initialisation time will be referenced to 1/1/2008, the simulation will start with scrum_time (ocean_time in rutgers version) referenced to 1 Jan 2008, it will start at (datenum(2008,8,1)- datenum(2008,1,1))*86400=213 days = 18403200 seconds. The tidal forcing will also be referenced also to 1 Janv 2008 and the others forcings also.

I hope it will help you to avoid confusion.

Indeed, the RUTGERS branch is different as mentioned in the previous post by John Wilkin (https://www.myroms.org/wiki/index.php/Tidal_Forcing) with the time_ref and tide_start variables in ocean.in.

Gildas

johnluick

Re: urgent problem on time ref and tide_start !!!!!!!

#11 Unread post by johnluick »

Thank you Gildas for that explanation!

Given that I previously recommended using TIME_REF=-2, I should mention that if you do so (i.e. if you use TIME_REF=-2 in the Rutgers code) then time and phase lag will not be referenced as described near the end of Gildas' explanation. Rather, they will be referenced strictly to the start of the model run (4 July 2008 in the example below)..

vivocean, I tried entering the dates and times you suggested into make_tides.m (the ROMS_tools script) and made maps of M2 and S2 amplitude and phase. They came out nearly identical to the maps I created using my own software* so probably the answer to your question is "yes, you can". The tpxo7 I downloaded from the ROMS AGRIF site is a little older (like tpxo7.1 I think) which would explain the small differences I saw.

*in both cases I specified 4 July 2008, i.e. in make_tides.m:
Ymin=2008; Mmin=7; Dmin=4; Hmin=0; Min_min=0; Smin=0;
However, for ROMS_tools (make_tides.m) I had to set Yorig=1900 to put the phases in agreement with the Rutgers convention.

John

zhaoqian
Posts: 45
Joined: Tue Nov 11, 2008 5:45 pm
Location: National Marine Environmental Mornitoring Center

Re: urgent problem on time ref and tide_start !!!!!!!

#12 Unread post by zhaoqian »

Hi viviocean and all:
What is the program of your doing tidal harmonic analysis, t-tide or others? Do they take the parameters discussing above into account. I think maybe different program will lead to different results.

Post Reply