- Timestamp:
- 2019-04-09T17:46:52+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r10742_ENHANCE-12_SimonM-Tides/src/OCE/TDE/tide_mod.F90
r10855 r10856 335 335 INTEGER, INTENT( in ) :: kt ! ocean time-step 336 336 INTEGER :: jk ! dummy loop index 337 INTEGER :: nsec_day_orig ! Temporary variable338 337 !!---------------------------------------------------------------------- 339 338 … … 342 341 ! If the run does not start from midnight then need to initialise tides 343 342 ! at the start of the current day (only occurs when kt==nit000) 344 ! Temporarily set nsec_day to beginning of day.345 nsec_day_orig = nsec_day346 343 IF ( nsec_day /= NINT(0.5_wp * rdt) ) THEN 347 344 kt_tide = kt - (nsec_day - 0.5_wp * rdt)/rdt 348 nsec_day = NINT(0.5_wp * rdt)349 345 ELSE 350 346 kt_tide = kt 351 347 ENDIF 352 CALL tide_harmo(tide_components, tide_harmonics ) ! Update oscillation parameters of tidal components348 CALL tide_harmo(tide_components, tide_harmonics, ndt05) ! Update oscillation parameters of tidal components for start of current day 353 349 ! 354 350 ! … … 365 361 IF( ln_tide_pot ) CALL tide_init_potential 366 362 ! 367 ! Reset nsec_day368 nsec_day = nsec_day_orig369 363 ENDIF 370 364 ! … … 372 366 373 367 374 SUBROUTINE tide_harmo( ptide_comp, ptide_harmo )368 SUBROUTINE tide_harmo( ptide_comp, ptide_harmo, psec_day ) 375 369 ! 376 370 TYPE(tide), DIMENSION(:), POINTER :: ptide_comp ! Array of selected tidal component parameters 377 371 TYPE(tide_harmonic), DIMENSION(:), POINTER :: ptide_harmo ! Oscillation parameters of selected tidal components 378 ! 379 CALL astronomic_angle 372 INTEGER, OPTIONAL :: psec_day ! Number of seconds since the start of the current day 373 ! 374 IF (PRESENT(psec_day)) THEN 375 CALL astronomic_angle(psec_day) 376 ELSE 377 CALL astronomic_angle(nsec_day) 378 END IF 380 379 CALL tide_pulse( ptide_comp, ptide_harmo ) 381 380 CALL tide_vuf( ptide_comp, ptide_harmo ) … … 384 383 385 384 386 SUBROUTINE astronomic_angle 385 SUBROUTINE astronomic_angle(psec_day) 387 386 !!---------------------------------------------------------------------- 388 387 !! tj is time elapsed since 1st January 1900, 0 hour, counted in julian 389 388 !! century (e.g. time in days divide by 36525) 390 389 !!---------------------------------------------------------------------- 390 INTEGER :: psec_day ! Number of seconds from midnight 391 391 REAL(wp) :: cosI, p, q, t2, t4, sin2I, s2, tgI2, P1, sh_tgn2, at1, at2 392 392 REAL(wp) :: zqy , zsy, zday, zdj, zhfrac … … 399 399 zday = zdj + zqy - 1. 400 400 ! 401 zhfrac = nsec_day / 3600.401 zhfrac = psec_day / 3600. 402 402 ! 403 403 !----------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.