Changeset 12056
 Timestamp:
 20191204T18:55:02+01:00 (6 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

NEMO/branches/2019/dev_r10742_ENHANCE12_SimonMTides/src/OCE/TDE/tide_mod.F90
r12047 r12056 5 5 !!====================================================================== 6 6 !! History : 1.0 ! 2007 (O. Le Galloudec) Original code 7 !! ! 2019 (S. Mueller) 7 8 !! 9 !! 10 !! ** Reference : 11 !! S58) Schureman, P. (1958): Manual of Harmonic Analysis and 12 !! Prediction of Tides (Revised (1940) Edition (Reprinted 1958 13 !! with corrections). Reprinted June 2001). U.S. Department of 14 !! Commerce, Coast and Geodetic Survey Special Publication 15 !! No. 98. Washington DC, United States Government Printing 16 !! Office. 317 pp. DOI: 10.25607/OBP155. 17 !! 18 8 19 USE oce, ONLY : sshn ! seasurface height 9 20 USE par_oce ! ocean parameters … … 17 28 18 29 PUBLIC tide_init 19 PUBLIC tide_update ! called by stp20 PUBLIC tide_init_harmonics ! called internally and by module diaharm21 PUBLIC upd_tide ! called in dynspg_... modules30 PUBLIC tide_update ! called by stp 31 PUBLIC tide_init_harmonics ! called internally and by module diaharm 32 PUBLIC upd_tide ! called in dynspg_... modules 22 33 23 34 INTEGER, PUBLIC, PARAMETER :: jpmax_harmo = 64 !: maximum number of harmonic components … … 31 42 END TYPE tide 32 43 33 TYPE(tide), DIMENSION(:), POINTER :: tide_components !: Array of selected tidal component parameters44 TYPE(tide), DIMENSION(:), POINTER :: tide_components !: Array of selected tidal component parameters 34 45 35 46 TYPE, PUBLIC :: tide_harmonic !: Oscillation parameters of harmonic tidal components … … 42 53 END type tide_harmonic 43 54 44 TYPE(tide_harmonic), PUBLIC, DIMENSION(:), POINTER :: tide_harmonics !: Oscillation parameters of selected tidal components45 46 LOGICAL , PUBLIC :: ln_tide !:47 LOGICAL , PUBLIC :: ln_tide_pot !:48 INTEGER :: nn_tide_var ! Variant of tidal parameter set and tidepotential computation49 LOGICAL :: ln_tide_dia ! Enable tidal diagnostic output50 LOGICAL :: ln_read_load !:51 LOGICAL , PUBLIC :: ln_scal_load !:52 LOGICAL , PUBLIC :: ln_tide_ramp !:53 INTEGER , PUBLIC :: nb_harmo !: Number of active tidal components55 TYPE(tide_harmonic), PUBLIC, DIMENSION(:), POINTER :: tide_harmonics !: Oscillation parameters of selected tidal components 56 57 LOGICAL , PUBLIC :: ln_tide !: 58 LOGICAL , PUBLIC :: ln_tide_pot !: 59 INTEGER :: nn_tide_var ! Variant of tidal parameter set and tidepotential computation 60 LOGICAL :: ln_tide_dia ! Enable tidal diagnostic output 61 LOGICAL :: ln_read_load !: 62 LOGICAL , PUBLIC :: ln_scal_load !: 63 LOGICAL , PUBLIC :: ln_tide_ramp !: 64 INTEGER , PUBLIC :: nb_harmo !: Number of active tidal components 54 65 REAL(wp), PUBLIC :: rn_tide_ramp_dt !: 55 REAL(wp), PUBLIC :: rn_scal_load !:66 REAL(wp), PUBLIC :: rn_scal_load !: 56 67 CHARACTER(lc), PUBLIC :: cn_tide_load !: 57 REAL(wp) :: rn_tide_gamma ! Tidal tilt factor58 59 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: pot_astro !: tidal potential60 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: pot_astro_comp ! tidalpotential component68 REAL(wp) :: rn_tide_gamma ! Tidal tilt factor 69 70 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: pot_astro !: tidal potential 71 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: pot_astro_comp ! tidalpotential component 61 72 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: amp_pot, phi_pot 62 73 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: amp_load, phi_load 63 74 64 REAL(wp) :: rn_tide_ramp_t ! Elapsed time in seconds75 REAL(wp) :: rn_tide_ramp_t ! Elapsed time in seconds 65 76 66 77 REAL(wp) :: sh_T, sh_s, sh_h, sh_p, sh_p1 ! astronomic angles … … 71 82 ! deg/h, respectively. The values of these module variables have been copied 72 83 ! from subroutine astronomic_angle of the version of this module used in 73 ! version 4.0 of NEMO84 ! release version 4.0 of NEMO. 74 85 REAL(wp) :: rlon00_N = 259.1560564_wp ! Longitude of ascending lunar node 75 86 REAL(wp) :: romega_N = .0022064139_wp … … 84 95 REAL(wp) :: rlon00_p = 334.3837214_wp ! Longitude of lunar perigee 85 96 REAL(wp) :: romega_p = .004641834_wp 97 ! Values of cos(i)*cos(epsilon), rcice, and sin(incl)*sin(epsilon), rsise, 98 ! where i is the inclination of the orbit of the Moon w.r.t. the ecliptic and 99 ! epsilon the obliquity of the ecliptic on 1 January 1900, 00h. The values of 100 ! these module variables have been copied from subroutine astronomic_angle 101 ! (computation of the cosine of inclination of orbit of Moon to the celestial 102 ! equator) of the version of this module used in release version 4.0 of NEMO. 103 REAL(wp) :: rcice = 0.913694997_wp 104 REAL(wp) :: rsise = 0.035692561_wp 105 ! Coefficients used to compute sh_xi and sh_nu in subroutine astronomic_angle 106 ! according to two equations given in the explanation of Table 6 of S58 107 REAL(wp) :: rxinu1, rxinu2 86 108 87 109 !! … … 155 177 IF( ln_tide_ramp.AND.(rn_tide_ramp_dt<0.) ) & 156 178 & CALL ctl_stop('rn_tide_ramp_dt must be positive') 179 ! 180 ! Compute coefficients which are used in subroutine astronomic_angle to 181 ! compute sh_xi and sh_nu according to two equations given in the 182 ! explanation of Table 6 of S58 183 rxinu1 = COS( 0.5_wp * ( ABS( ACOS( rcice + rsise ) ) ) ) / COS( 0.5_wp * ( ACOS( rcice  rsise ) ) ) 184 rxinu2 = SIN( 0.5_wp * ( ABS( ACOS( rcice + rsise ) ) ) ) / SIN( 0.5_wp * ( ACOS( rcice  rsise ) ) ) 185 rxinu1 = 1.01883_wp 186 rxinu2 = 0.64412_wp 157 187 ! 158 188 ! Initialise array used to store tidal oscillation parameters (frequency, … … 302 332 !! *** ROUTINE tide_init_potential *** 303 333 !! 304 !! ** * Reference:334 !! ** Reference : 305 335 !! CT71) Cartwright, D. E. and Tayler, R. J. (1971): New computations of 306 336 !! the Tidegenerating Potential. Geophys. J. R. astr. Soc. 23, … … 445 475 !! 446 476 INTEGER :: psec_day ! Number of seconds from midnight 447 REAL(wp) :: cosI, p, q, t2, t4, sin2I, s2, tgI2, P1, sh_tgn2, at1,at2477 REAL(wp) :: zp, zq, zt2, zs2, ztgI2, zP1, ztgn2, zat1, zat2 448 478 REAL(wp) :: zqy , zsy, zday, zdj, zhfrac, zt 449 479 !! … … 477 507 sh_p = ( rlon00_p + romega_p * zt ) * rad 478 508 sh_p = MOD( sh_p, 2*rpi ) 479 480 cosI = 0.913694997_wp  0.035692561_wp * COS( sh_N ) 481 482 sh_I = ACOS( cosI ) 483 484 sin2I = sin(sh_I) 485 sh_tgn2 = tan(sh_N/2.0) 486 487 at1 = ATAN( 1.01883_wp * sh_tgn2 ) 488 at2 = ATAN( 0.64412_wp * sh_tgn2 ) 489 490 sh_xi = sh_N  at1  at2 491 509 ! 510 ! Inclination of the orbit of the moon w.r.t. the celestial equator, see 511 ! explanation of Table 6 of S58 512 sh_I = ACOS( rcice  rsise * COS( sh_N ) ) 513 ! 514 ! Computation of sh_xi and sh_nu, see explanation of Table 6 of S58 515 ztgn2 = TAN( sh_N / 2.0_wp ) 516 zat1 = ATAN( rxinu1 * ztgn2 ) 517 zat2 = ATAN( rxinu2 * ztgn2 ) 518 sh_xi = sh_N  zat1  zat2 492 519 IF( sh_N > rpi ) sh_xi = sh_xi  2.0_wp * rpi 493 494 sh_nu = at1  at2 495 496 ! For computation of tidal constituents L2 K1 K2 497 tgI2 = tan( sh_I / 2.0_wp ) 498 P1 = sh_p  sh_xi 499 ! 500 t2 = tgI2 * tgI2 501 t4 = t2 * t2 502 sh_x1ra = SQRT( 1.0  12.0 * t2 * COS( 2.0 * P1 ) + 36.0_wp * t4 ) 503 ! 504 p = SIN( 2.0_wp * P1 ) 505 q = 1.0_wp / ( 6.0_wp * t2 )  COS( 2.0_wp * P1 ) 506 sh_R = ATAN( p / q ) 507 ! 508 p = SIN( 2.0_wp * sh_I ) * SIN( sh_nu ) 509 q = SIN( 2.0_wp * sh_I ) * COS( sh_nu ) + 0.3347_wp 510 sh_nuprim = ATAN( p / q ) 511 ! 512 s2 = SIN( sh_I ) * SIN( sh_I ) 513 p = s2 * SIN( 2.0_wp * sh_nu ) 514 q = s2 * COS( 2.0_wp * sh_nu ) + 0.0727_wp 515 sh_nusec = 0.5_wp * ATAN( p / q ) 520 sh_nu = zat1  zat2 521 ! 522 ! Computation of sh_x1ra, sh_R, sh_nuprim, and sh_nusec used for tidal 523 ! constituents L2, K1, and K2 524 ! 525 ! Computation of sh_x1ra and sh_R (Equations 204, 213, and 214 of S58) 526 ztgI2 = tan( sh_I / 2.0_wp ) 527 zP1 = sh_p  sh_xi 528 zt2 = ztgI2 * ztgI2 529 sh_x1ra = SQRT( 1.0  12.0 * zt2 * COS( 2.0_wp * zP1 ) + 36.0_wp * zt2 * zt2 ) 530 zp = SIN( 2.0_wp * zP1 ) 531 zq = 1.0_wp / ( 6.0_wp * zt2 )  COS( 2.0_wp * zP1 ) 532 sh_R = ATAN( zp / zq ) 533 ! 534 ! Computation of sh_nuprim (Equation 224 of S58) 535 zp = SIN( 2.0_wp * sh_I ) * SIN( sh_nu ) 536 zq = SIN( 2.0_wp * sh_I ) * COS( sh_nu ) + 0.3347_wp 537 sh_nuprim = ATAN( zp / zq ) 538 ! 539 ! Computation of sh_nusec (Equation 232 of S58) 540 zs2 = SIN( sh_I ) * SIN( sh_I ) 541 zp = zs2 * SIN( 2.0_wp * sh_nu ) 542 zq = zs2 * COS( 2.0_wp * sh_nu ) + 0.0727_wp 543 sh_nusec = 0.5_wp * ATAN( zp / zq ) 516 544 ! 517 545 END SUBROUTINE astronomic_angle … … 589 617 !! 590 618 !! ** Purpose : Compute amplitude correction factors due to nodal motion 591 !!592 !! ** Reference :593 !! S58) Schureman, P. (1958): Manual of Harmonic Analysis and594 !! Prediction of Tides (Revised (1940) Edition (Reprinted 1958595 !! with corrections). Reprinted June 2001). U.S. Department of596 !! Commerce, Coast and Geodetic Survey Special Publication597 !! No. 98. Washington DC, United States Government Printing598 !! Office. 317 pp. DOI: 10.25607/OBP155.599 619 !! 600 620 INTEGER, INTENT(in) :: kformula
Note: See TracChangeset
for help on using the changeset viewer.