tide

Everything related to the preinstalled test cases in COHERENS. Additionally, you can find here the necessary files to setup a test case.If you have developed a new test case and you want to share it with other users, feel free to post a new thread.

Moderator:Katrijn

Post Reply
pooran
Posts:8
Joined:Fri Nov 06, 2015 5:26 pm
Full name:pooran khedri
tide

Post by pooran » Sun Apr 24, 2016 1:24 pm

i am using coherens in domain with one open boundary(in east)in tidal region for first time.before, i used coherens in closed body without tide. I don't know how can add tidal force to coherens.
would you please guide me that what harmonic forcing file should contain and in which dimensions?and how can provide it?


Many thanks for any reply
Cheers
pooran

Katrijn
Posts:86
Joined:Fri Nov 29, 2013 3:04 pm
Full name:Katrijn Baetens

Re: tide

Post by Katrijn » Mon Dec 12, 2016 10:58 am

Hi Pooran,

Dear Pooran,

Thank you very much for your message, I will try to explain, but let me know if something is still not clear.

Identifying boundary conditions can be done in several ways. One is including time series of water elevations and current velocities, another one is to include phases and amplitudes of the tidal constituents at the boundary conditions, with this the model automatically calculates the tidal elevations. I will explain about using tidal elevations.

The bohai test case is a very good example on how to implement tides. I use V2.10.3 to explain it. If you want to change to that version, you can get it from this link: https://share.naturalsciences.be/f/b8d4ec5a34/?raw=1
First thing you need to do is gather data about the amplitudes and phases in your domain, I often suggest to students to get them from the OTPS tidal model. http://volkov.oce.orst.edu/tides/otps.html. Please make sure you have a good idea about the arakawa C-grid that is used in COHERENS. The bathymetry coordinates are given at the center of the the cell (the C nodes), however, the tidal amplitudes and elevations are required at the U or V node positions of the cell. This means the coordinates of the tidal constituents should shift half a grid space to the left for boundaries at the west side of the domain, half a grid space to the right for boundaries at the east side of the domain, half a grid cell up for boundaries at the north side and half a grid space down for boundaries at the south.

In the subroutine
SUBROUTINE usrdef_mod_params

Switch on the open boundary conditions by:
iopt_obc_2D = 1
iopt_obc_3D = MERGE(0,1,iopt_sal.EQ.0)

Then you decide on the number of tidal constituents you want to include:

!---number of tidal constituents
nconobc = 11

After that you set which tidal constituents you want to include (this is different for each case, usually we drop the ones with very small amplitudes, but it is up to you te decide how many and which):

!---tidal indices
index_obc(1) = icon_M2
index_obc(2) = icon_S2
index_obc(3) = icon_K1
index_obc(4) = icon_K2
index_obc(5) = icon_N2
index_obc(6) = icon_2N2
index_obc(7) = icon_O1
index_obc(8) = icon_Q1
index_obc(9) = icon_P1
index_obc(10) = icon_Mf
index_obc(11) = icon_Mm

After define the modfiles:


! Open boudary condition:

!---open boundary conditions (2-D)
modfiles(io_2uvobc,1:2,1)%status = 'N'

In SUBROUTINE usrdef_2dobc_spec(iddesc)

!open sea boundaries option
ityp2dobv(1:nosbv) = 12
ityp2dobu(1:nosbu) = 12

If you will look up the meaning of ityp2doby you'll see 12 means: characteristic method with specified elevation. Which basically means you need to supply amplitudes and tides

iloczobu = 1
iloczobv = 1

The meaning of iloczobu is rather tricky and you should make sure you really understand the meaning of U, V and C nodes (look it up in the manual if you doubt), because the model is quite sensitive to the tidal elevation input. If the elevation has to be specified at the open boundary, iloczobu (or iloczobv) selects the position of the specified elevation with respect to the open boundary.
0: not required
1: at the open boundary U-node
2: at the “nearest” C-node outside the domain
I explained how to search for tidal elevations for the situation where iloczobu = 1 (see the explanation at the beginning).

In the same subroutine you read the input file with the tides as follows:

!
!2. Amplitudes and phases
!------------------------
!
!---read data
CALL open_file(iunit,'DATA/rrd_tides.dat','IN','A') ! open boundary

READ (iunit,*)
DO i=1,nosbv
READ (iunit,*) dummy1, dummy2, zdatobv_amp(i,1), zdatobv_amp(i,2), zdatobv_amp(i,3), zdatobv_amp(i,4),&
& zdatobv_amp(i,5), zdatobv_amp(i,6), zdatobv_amp(i,7), zdatobv_amp(i,8), &
& zdatobv_amp(i,9), zdatobv_amp(i,10), zdatobv_amp(i,11)!, dummy3, dummy4!, zdatobu_amp(i,12), &
! & zdatobu_amp(i,13)
END DO
READ (iunit,*)
DO i=1,nosbv
READ (iunit,*) dummy1, dummy2, zdatobv_pha(i,1), zdatobv_pha(i,2), zdatobv_pha(i,3), zdatobv_pha(i,4),&
& zdatobv_pha(i,5), zdatobv_pha(i,6), zdatobv_pha(i,7), zdatobv_pha(i,8), &
& zdatobv_pha(i,9), zdatobv_pha(i,10), zdatobv_pha(i,11)!, dummy3, dummy4!, zdatobu_pha(i,12), &
! & zdatobu_pha(i,13)
END DO

CALL close_file(iunit,'A')

!---convert to appropriate units
zdatobv_pha = degtorad*zdatobv_pha

Your input file can have any form you want, you just have to programme how to fill zdatobv_pha(:,:),zdatobu_pha(:,:),zdatobv_amp(:,:),zdatobu_amp(:,:). If you do not feel comfortable with programming, try to adapt your file with amplitudes and phases like the one I put in attach. After you can copy and paste this code. Do not that I explain this code for version 2.10.3 and some of the names may have changed.

This should cover how to implement tidal elevations. In case of doubt or if this explanation is not really clear, please contact me again!

Katrijn

pooran
Posts:8
Joined:Fri Nov 06, 2015 5:26 pm
Full name:pooran khedri

Re: tide

Post by pooran » Wed Sep 20, 2017 2:53 am

Dear Katriin,
Thank you so much for your useful informaton.
you said me before "If you do not feel comfortable with programming, try to adapt your file with amplitudes and phases like the one I put in attach. After you can copy and paste this code", unfortunately, I have lost these files.I need these attached file again for checking my code.
I would be grateful if you could reattach them.
Thank you in addvance.
Best
Pooran

Katrijn
Posts:86
Joined:Fri Nov 29, 2013 3:04 pm
Full name:Katrijn Baetens

Re: tide

Post by Katrijn » Sun Sep 24, 2017 6:48 pm

Dear Pooran,

I am afraid I didn't keep those data either. If I know myself a little bit I probably based myself on the bohai test case, so have a look how the tides are implemented in that test case.

Hope this helps,

Katrijn

pooran
Posts:8
Joined:Fri Nov 06, 2015 5:26 pm
Full name:pooran khedri

Re: tide

Post by pooran » Wed Sep 27, 2017 4:15 am

Dear katrijin,
Thank you for your reply.
I have solved My problem
Best
Pooran,

Post Reply