Skilled (#3) - [tides] Tides and more (#45) - Message List
Hi All,
I have a couple of questions about tides:
May I activate the tidal potential with a curvilinear rotated grid? Ok for the ssh but not fully confident with currents.
Assuming the key_tide option works fine regardless the kind of horizontal mesh I provide, what about the tide at the BDY sections?
What are the data should I provide at the BDY sections? Amplitude and phase of the major constituents? in the AAM input files I see "sin" and "cos" but nothing is written in the user guide (few words may help a lot).
Usually the models want normal and tangential components of the velocities.
So the question is: should I provide amplitude and phase (or other info) of the normal/tangetial or meridional/zonal velocities?
Thanks in advance
Paolo
-
Message #79
Hi Paolo,
You can use the tidal potential whatever your grid is. What is the issue here ? Note that this may be relevant only for relatively large domains, otherwise your tidal solution may be well constrain by the tidal forcing at open boundaries. At boundaries you should provide complex amplitudes (the real "z1","u1","v1" and imaginary part "z2","u2","v2" of each harmonic constituent which is online transformed into amplitude and phase). For elevation and both components of barotropic velocities. You can obtain these from TPXO inverse solution for instance. They do provide global and regional solutions. NEMO assumes that velocities are oriented along the local grid so that you have to rotate the tidal velocities before feeding the model.
Jérôme
jchanut2018-05-18 17:35 CEST (7 years ago)-
Message #80
Hi Jérôme, thanks for your reply. I think I got it.
BTW I am emulating simple barotropic model forcing T and S to be constant everywhere with no SBC and only forced laterally using the tidal forcing.
For the moment I am not using a rotated grid. Tidal forcing have been extracted from FES2012.
I run the model for 20 days starting on 28 Mar 2018 and compare the SSH with the TPXO predictions for several points in my domain.
The domain is quite small so I am not expecting more than few days to spin-up.
There is clearly a phase shift in the semi-diurnal tide and in the occurrence of spring and neap tides in my NEMO solution.
Last year when I did similar exercise with ROMS I figured out a parameter to center the tidal boundary forcing correctly. I wonder if something similar exist in NEMO. Reading the code I do not see it.
I assume there must be an hard coded assumpiion about tidal forcing I am missing.
Any help is more than welcome.
Paolo
poddo2018-06-01 17:59 CEST (7 years ago)-
Message #81
Hi Paolo,
The common mistake could be to have complex conjugates as tidal open boundary data while the code doesn't expect that. (Complex conjugate form means that your tidal data (A,B) is such that the complex signal is S = A -iB). There is a flag in the namelist (ln_bdytide_conj) that you have to set to true in such a case.
Not sure what you mean concerning the ROMS parameter. There is indeed a phase correction in NEMO based on the current date. You can remove it by editing tide_mod.F90, then comment the call to tide_vuf( ) and set the arrays. In practice you should put:
pvt(:) = 0._wp put(:) = 0._wp pcor(:) = 1._wp ! CALL tide_vuf ( pvt, put, pcor, ktide ,kc )
There's no chance that your tidal solution will be in phase with reality doing that. This is relevant depending if you did to predict tides with TPXO. Let say that if your tidal input has a zero phase lag, then you will have a zero amplitude at the model startup in that case.
You should probably perform a tidal analysis over the whole domain and compare to TPXO. There's a cpp key "key_diaharm" for that. Beware you use only a few constituents, particularly if your run is short.
Jérôme
jchanut2018-06-05 17:31 CEST (7 years ago)-
Message #84
Hi Jerome,
thanks! I did it. Hoping this help this is the description of what I did. NB: Similar procedure with FES2012 produces wrong results (at least for me)
- download the TMD matlab toolbox (https://www.esr.org/research/polar-tide-models/tmd-software/). This is a matlab version of TPXO (F90).
- download the appropriate global or regional solutions (http://volkov.oce.orst.edu/tides/region.html)
- in matlab:
zrad=pi/180.; % Extract TPXO amp and phase at NEMO boundaries % -------------------------------------------------- [amp_z,Gph_z,Depth,conList]=tmd_extract_HC(Model,lat_t_bdy,lon_t_bdy,'z',[1 2 3 4 5 6 7 8]); [amp_u,Gph_u,Depth,conList]=tmd_extract_HC(Model,lat_u_bdy,lon_u_bdy,'u',[1 2 3 4 5 6 7 8]); [amp_v,Gph_v,Depth,conList]=tmd_extract_HC(Model,lat_v_bdy,lon_v_bdy,'v',[1 2 3 4 5 6 7 8]); % Convert to NEMO inputs % -------------------------------------------------------------------- % T hg_tpxo = atan2(sin(zrad*Gph_z),cos(zrad*Gph_z)) / zrad; z1_tpxo = amp_z .* cos( zrad * hg_tpxo ); z2_tpxo = amp_z .* sin( zrad * hg_tpxo ); clear hg_tpxo amp_z Gph_z % U amp_u=amp_u*0.01; hg_tpxo = atan2(sin(zrad*Gph_u),cos(zrad*Gph_u)) / zrad; u1_tpxo = amp_u .* cos( zrad * hg_tpxo ); u2_tpxo = amp_u .* sin( zrad * hg_tpxo ); clear hg_tpxo amp_u Gph_u % V amp_v=amp_v*0.01; hg_tpxo = atan2(sin(zrad*Gph_v),cos(zrad*Gph_v)) / zrad; v1_tpxo = amp_v .* cos( zrad * hg_tpxo ); v2_tpxo = amp_v .* sin( zrad * hg_tpxo ); clear hg_tpxo amp_v Gph_v for nc=1:size(z1_tpxo,1) tide_c=deblank(upper(conList(nc,:))); file_t=['bdytide_iceland_' tide_c '_grid_T.nc']; file_u=['bdytide_iceland_' tide_c '_grid_U.nc']; file_v=['bdytide_iceland_' tide_c '_grid_V.nc']; % T file nccreate(file_t,'z1', 'Dimensions',{'xb' size(lon_t_bdy,1) 'yb' 1 ... },'Datatype','single'); nccreate(file_t,'z2', 'Dimensions',{'xb' size(lon_t_bdy,1) 'yb' 1 ... },'Datatype','single'); ncwrite(file_t,'z1' , squeeze(z1_tpxo(nc,:))'); ncwrite(file_t,'z2' , squeeze(z2_tpxo(nc,:))'); end
similar procedure for U and V.
In the NEMO namelist include names of constituents and ln_bdytide_conj = .false.
Paolo
PS I suppose :) is a smile .. I not coding with smiles in matlab it should be : )
poddo2018-06-07 17:04 CEST (7 years ago)-
Message #85
PS I suppose :) is a smile .. I not coding with smiles in matlab it should be : )
Hello PaoloWhen you have a code snippet to share, it is better to embedded it inside a wiki processor which begins with {{{#!matlab and ends with }}} to have syntax highlighting wrt the code language.
Or you will be bother by the interpretation of some character sequences ;-)Regards, Nicolas
nicolasmartin2018-06-08 12:53 CEST (7 years ago)
-
-
-