New URL for NEMO forge!   http://forge.nemo-ocean.eu

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.
Changeset 11664 for NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/TDE/tide_mod.F90 – NEMO

Ignore:
Timestamp:
2019-10-08T19:32:15+02:00 (4 years ago)
Author:
smueller
Message:

Inclusion of selected long-periodic tidal constituents in the computation of the tidal potential (ticket #2194)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/TDE/tide_mod.F90

    r11663 r11664  
    111111            WRITE(numout,*) '   Namelist nam_tide' 
    112112            WRITE(numout,*) '      Use tidal components                       ln_tide         = ', ln_tide 
    113             WRITE(numout,*) '         Variant (0: legacy option)              nn_tide_var     = ', nn_tide_var 
     113            WRITE(numout,*) '         Variant (1: default; 0: legacy option)  nn_tide_var     = ', nn_tide_var 
    114114            WRITE(numout,*) '         Apply astronomical potential            ln_tide_pot     = ', ln_tide_pot 
    115115            WRITE(numout,*) '         Tidal tilt factor                       rn_tide_gamma   = ', rn_tide_gamma 
     
    280280               ztmp = tide_harmonics(jk)%v0 + tide_harmonics(jk)%u + tide_components(jk)%nutide * zlon 
    281281               ! le potentiel est composé des effets des astres: 
    282                IF    ( tide_components(jk)%nutide == 1 )  THEN  ;  zcs = zcons * SIN( 2._wp*zlat ) 
    283                ELSEIF( tide_components(jk)%nutide == 2 )  THEN  ;  zcs = zcons * COS( zlat )**2 
    284                ELSE                                         ;  zcs = 0._wp 
    285                ENDIF 
     282               SELECT CASE( tide_components(jk)%nutide ) 
     283               CASE( 0 )                                                  !   long-periodic tidal constituents (included unless 
     284                  zcs = zcons * ( 0.5_wp - 1.5_wp * SIN( zlat )**2 )      !   compatibility with original formulation is requested) 
     285                  IF ( nn_tide_var < 1 ) zcs = 0.0_wp 
     286               CASE( 1 )                                                  !   diurnal tidal constituents 
     287                  zcs = zcons * SIN( 2.0_wp*zlat ) 
     288               CASE( 2 )                                                  !   semi-diurnal tidal constituents 
     289                  zcs = zcons * COS( zlat )**2 
     290               CASE DEFAULT                                               !   constituents of higher frequency are not included 
     291                  zcs = 0.0_wp 
     292               END SELECT 
    286293               ztmp1 = ztmp1 + zcs * COS( ztmp ) 
    287294               ztmp2 = ztmp2 - zcs * SIN( ztmp ) 
Note: See TracChangeset for help on using the changeset viewer.