nodal_fu Subroutine

public pure subroutine nodal_fu(dnum, add_nodal, f_nodal, u_nodal)

Nodal amplitude factor f_c(N) (nondim) and phase u_c(N) (radians), fixed at the nodal reference date’s N. add_nodal = .false. returns f=1, u=0 for every constituent.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: dnum
logical, intent(in) :: add_nodal
real(kind=wp), intent(out) :: f_nodal(TIDES_CATALOG_SIZE)
real(kind=wp), intent(out) :: u_nodal(TIDES_CATALOG_SIZE)

Calls

proc~~nodal_fu~~CallsGraph proc~nodal_fu nodal_fu proc~mean_longitudes mean_longitudes proc~nodal_fu->proc~mean_longitudes proc~wrap360 wrap360 proc~mean_longitudes->proc~wrap360

Called by

proc~~nodal_fu~~CalledByGraph proc~nodal_fu nodal_fu proc~configure_ocean_bc configure_ocean_bc proc~configure_ocean_bc->proc~nodal_fu proc~tides_configure_astronomy tides_configure_astronomy proc~tides_configure_astronomy->proc~nodal_fu proc~configure_ocean_tides configure_ocean_tides proc~configure_ocean_tides->proc~tides_configure_astronomy proc~engine_setup engine_setup proc~engine_setup->proc~configure_ocean_bc proc~engine_setup->proc~configure_ocean_tides proc~complete_ocean_create complete_ocean_create proc~complete_ocean_create->proc~engine_setup proc~driver_run_ocean driver_run_ocean proc~driver_run_ocean->proc~engine_setup proc~driver_validate driver_validate proc~driver_validate->proc~engine_setup proc~driver_run driver_run proc~driver_run->proc~driver_run_ocean proc~rdb_ocean_create_finalize rdb_ocean_create_finalize proc~rdb_ocean_create_finalize->proc~complete_ocean_create proc~rdb_ocean_create_from_string rdb_ocean_create_from_string proc~rdb_ocean_create_from_string->proc~complete_ocean_create

Variables

Type Visibility Attributes Name Initial
integer, private :: c
real(kind=wp), private :: cos_n
real(kind=wp), private :: h_deg
real(kind=wp), private :: n_deg
real(kind=wp), private :: p_deg
real(kind=wp), private :: s_deg
real(kind=wp), private :: sin_n

Source Code

   pure subroutine nodal_fu(dnum, add_nodal, f_nodal, u_nodal)
      !! Nodal amplitude factor `f_c(N)` (nondim) and phase `u_c(N)`
      !! (radians), fixed at the nodal reference date's `N`.
      !! `add_nodal = .false.` returns f=1, u=0 for every constituent.
      real(wp), intent(in) :: dnum
      logical, intent(in) :: add_nodal
      real(wp), intent(out) :: f_nodal(TIDES_CATALOG_SIZE)
      real(wp), intent(out) :: u_nodal(TIDES_CATALOG_SIZE)
      real(wp) :: s_deg, h_deg, p_deg, n_deg
      real(wp) :: cos_n, sin_n
      integer :: c
      if (.not. add_nodal) then
         do c = 1, TIDES_CATALOG_SIZE
            f_nodal(c) = 1.0_wp
            u_nodal(c) = 0.0_wp
         end do
         return
      end if
      call mean_longitudes(dnum, s_deg, h_deg, p_deg, n_deg)
      cos_n = cos(n_deg*TIDE_DEG2RAD)
      sin_n = sin(n_deg*TIDE_DEG2RAD)
      ! M2, N2
      f_nodal(1) = 1.0_wp - 0.037_wp*cos_n
      u_nodal(1) = (-2.1_wp)*TIDE_DEG2RAD*sin_n
      f_nodal(3) = 1.0_wp - 0.037_wp*cos_n
      u_nodal(3) = (-2.1_wp)*TIDE_DEG2RAD*sin_n
      ! K2
      f_nodal(4) = 1.024_wp + 0.286_wp*cos_n
      u_nodal(4) = (-17.7_wp)*TIDE_DEG2RAD*sin_n
      ! K1
      f_nodal(5) = 1.006_wp + 0.115_wp*cos_n
      u_nodal(5) = (-8.9_wp)*TIDE_DEG2RAD*sin_n
      ! O1, Q1  (NOTE +sign on u)
      f_nodal(6) = 1.009_wp + 0.187_wp*cos_n
      u_nodal(6) = (10.8_wp)*TIDE_DEG2RAD*sin_n
      f_nodal(8) = 1.009_wp + 0.187_wp*cos_n
      u_nodal(8) = (10.8_wp)*TIDE_DEG2RAD*sin_n
      ! S2, P1
      f_nodal(2) = 1.0_wp
      u_nodal(2) = 0.0_wp
      f_nodal(7) = 1.0_wp
      u_nodal(7) = 0.0_wp
      ! MF
      f_nodal(9) = 1.043_wp + 0.414_wp*cos_n
      u_nodal(9) = (-23.7_wp)*TIDE_DEG2RAD*sin_n
      ! MM
      f_nodal(10) = 1.0_wp - 0.130_wp*cos_n
      u_nodal(10) = 0.0_wp
   end subroutine nodal_fu