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 10005 for branches/UKMO/dev_r5518_GO6_package_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90 – NEMO

Ignore:
Timestamp:
2018-07-26T13:07:55+02:00 (6 years ago)
Author:
timgraham
Message:

Included all of the functional changes from STARTHOUR branch in branches/2014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_STARTHOUR/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90

    r6486 r10005  
    4747      INTEGER, INTENT( in ) ::   kt     ! ocean time-step 
    4848      INTEGER               ::   jk     ! dummy loop index 
     49      INTEGER               ::   nsec_day_orig     ! Temporary variable 
    4950      !!---------------------------------------------------------------------- 
    50  
    51       IF( nsec_day == NINT(0.5_wp * rdttra(1)) ) THEN      ! start a new day 
     51       
     52      IF( nsec_day == NINT(0.5_wp * rdttra(1)) .OR. kt == nit000 ) THEN      ! start a new day 
    5253         ! 
    5354         IF( kt == nit000 ) THEN 
     
    6061         pot_astro(:,:) = 0._wp 
    6162         ! 
     63         ! If the run does not start from midnight then need to initialise tides 
     64         ! at the start of the current day (only occurs when kt==nit000) 
     65         ! Temporarily set nsec_day to beginning of day. 
     66         nsec_day_orig = nsec_day 
     67         IF ( nsec_day /= NINT(0.5_wp * rdttra(1)) ) THEN  
     68            kt_tide = kt - (nsec_day - 0.5_wp * rdttra(1))/rdttra(1) 
     69            nsec_day = NINT(0.5_wp * rdttra(1)) 
     70         ELSE 
     71            kt_tide = kt  
     72         ENDIF 
    6273         CALL tide_harmo( omega_tide, v0tide, utide, ftide, ntide, nb_harmo ) 
    6374         ! 
    64          kt_tide = kt 
    6575         ! 
    6676         IF(lwp) THEN 
     
    7585         IF( ln_tide_pot )   CALL tide_init_potential 
    7686         ! 
     87         ! Reset nsec_day 
     88         nsec_day = nsec_day_orig  
    7789      ENDIF 
    7890      ! 
Note: See TracChangeset for help on using the changeset viewer.