New URL for NEMO forge!

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
[tides] Tides and more – Message List – Discussion – NEMO

Skilled (#3) - [tides] Tides and more (#45) - Message List

[tides] Tides and more

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

  • 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.


    • 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.


      • 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.


        • 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)

          • in matlab:
          % 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
            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
            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)
              file_t=['bdytide_iceland_' tide_c ''];
              file_u=['bdytide_iceland_' tide_c ''];
              file_v=['bdytide_iceland_' tide_c ''];
          % T file
              nccreate(file_t,'z1',  'Dimensions',{'xb' size(lon_t_bdy,1) 'yb' 1 ...
              nccreate(file_t,'z2',  'Dimensions',{'xb' size(lon_t_bdy,1) 'yb' 1 ...
             ncwrite(file_t,'z1'  , squeeze(z1_tpxo(nc,:))');
             ncwrite(file_t,'z2'  , squeeze(z2_tpxo(nc,:))');

          similar procedure for U and V.

          In the NEMO namelist include names of constituents and ln_bdytide_conj = .false.


          PS I suppose :) is a smile .. I not coding with smiles in matlab it should be : )

          • Message #85

            PS I suppose :) is a smile .. I not coding with smiles in matlab it should be : )

            Hello Paolo

            When 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


No attachments created.