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.
updtide.F90 in branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90 @ 8809

Last change on this file since 8809 was 7646, checked in by timgraham, 7 years ago

Merge of dev_merge_2016 into trunk. UPDATE TO ARCHFILES NEEDED for XIOS2.
LIM_SRC_s/limrhg.F90 to follow in next commit due to change of kind (I'm unable to do it in this commit).
Merged using the following steps:

1) svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk .
2) Resolve minor conflicts in sette.sh and namelist_cfg for ORCA2LIM3 (due to a change in trunk after branch was created)
3) svn commit
4) svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
5) svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2016/dev_merge_2016 .
6) At this stage I checked out a clean copy of the branch to compare against what is about to be committed to the trunk.
6) svn commit #Commit code to the trunk

In this commit I have also reverted a change to Fcheck_archfile.sh which was causing problems on the Paris machine.

  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1MODULE updtide
2   !!======================================================================
3   !!                       ***  MODULE  updtide  ***
4   !! Initialization of tidal forcing
5   !!======================================================================
6   !! History :  9.0  !  07  (O. Le Galloudec)  Original code
7   !!----------------------------------------------------------------------
8   !!   upd_tide       : update tidal potential
9   !!----------------------------------------------------------------------
10   USE oce             ! ocean dynamics and tracers variables
11   USE dom_oce         ! ocean space and time domain
12   USE in_out_manager  ! I/O units
13   USE phycst          ! physical constant
14   USE sbctide         ! tide potential variable
15   USE tideini, ONLY: ln_tide_ramp, rdttideramp
16
17   IMPLICIT NONE
18   PUBLIC
19
20   PUBLIC   upd_tide   ! called in dynspg_... modules
21 
22   !!----------------------------------------------------------------------
23   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
24   !! $Id$
25   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
26   !!----------------------------------------------------------------------
27CONTAINS
28
29   SUBROUTINE upd_tide( kt, kit, time_offset )
30      !!----------------------------------------------------------------------
31      !!                 ***  ROUTINE upd_tide  ***
32      !!
33      !! ** Purpose :   provide at each time step the astronomical potential
34      !!
35      !! ** Method  :   computed from pulsation and amplitude of all tide components
36      !!
37      !! ** Action  :   pot_astro   actronomical potential
38      !!----------------------------------------------------------------------     
39      INTEGER, INTENT(in)           ::   kt      ! ocean time-step index
40      INTEGER, INTENT(in), OPTIONAL ::   kit     ! external mode sub-time-step index (lk_dynspg_ts=T)
41      INTEGER, INTENT(in), OPTIONAL ::   time_offset ! time offset in number
42                                                     ! of internal steps             (lk_dynspg_ts=F)
43                                                     ! of external steps             (lk_dynspg_ts=T)
44      !
45      INTEGER  ::   joffset      ! local integer
46      INTEGER  ::   ji, jj, jk   ! dummy loop indices
47      REAL(wp) ::   zt, zramp    ! local scalar
48      REAL(wp), DIMENSION(nb_harmo) ::   zwt 
49      !!----------------------------------------------------------------------     
50      !
51      !                               ! tide pulsation at model time step (or sub-time-step)
52      zt = ( kt - kt_tide ) * rdt
53      !
54      joffset = 0
55      IF( PRESENT( time_offset ) )   joffset = time_offset
56      !
57      IF( PRESENT( kit ) )   THEN
58         zt = zt + ( kit +  joffset - 1 ) * rdt / REAL( nn_baro, wp )
59      ELSE
60         zt = zt + joffset * rdt
61      ENDIF
62      !
63      zwt(:) = omega_tide(:) * zt
64
65      pot_astro(:,:) = 0._wp          ! update tidal potential (sum of all harmonics)
66      DO jk = 1, nb_harmo   
67         pot_astro(:,:) = pot_astro(:,:) + amp_pot(:,:,jk) * COS( zwt(jk) + phi_pot(:,:,jk) )     
68      END DO
69      !
70      IF( ln_tide_ramp ) THEN         ! linear increase if asked
71         zt = ( kt - nit000 ) * rdt
72         IF( PRESENT( kit ) )   zt = zt + ( kit + joffset -1) * rdt / REAL( nn_baro, wp )
73         zramp = MIN(  MAX( zt / (rdttideramp*rday) , 0._wp ) , 1._wp  )
74         pot_astro(:,:) = zramp * pot_astro(:,:)
75      ENDIF
76      !
77   END SUBROUTINE upd_tide
78
79  !!======================================================================
80
81END MODULE updtide
Note: See TracBrowser for help on using the repository browser.