Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidal angular frequency has units [rad s-1] #764

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

awallcraft
Copy link

Tidal frequencies are always angular frequencies to simplify applying sine and cosine. These have MKS units [rad s-1] but they are all currently listed as [s-1].

Updated dOxygen comments for variables, e.g. [T-1 ~> s-1] becomes [rad T-1 ~> rad s-1]. Updated get_param units. e.g. units="s-1" becomes units="rad s-1".

No answers are changed, but the logged parameter units are different.

There are frequencies in MOM_internal_tides.F90 but these have not been updated because they may be specified incorrectly. They are used as if they are [T-1] but they are calculated as 2PI/period [rad T-1].

real, allocatable, dimension(:) :: frequency !< The frequency of each band [T-1 ~> s-1].

real :: period ! A tidal period read from namelist [T ~> s]

! The periods of the tidal constituents for internal tides raytracing
call read_param(param_file, "TIDAL_PERIODS", periods)

do fr=1,num_freq
period = US%s_to_Textract_real(periods, " ,", fr, 0.)
CS%frequency(fr) = 8.0
atan(1.0)/period
enddo

All MOM6-examples cases have INTERNAL_TIDES=False and so can't resolve this issue.

Copy link
Member

@Hallberg-NOAA Hallberg-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes to the documented units seem sensible. We have been considering changing some of the sines and cosines to use arguments in degrees so that they have more exact periodicity, and if we were to do so, having the clear and explicit documentation of which frequencies are in radians per second that this PR introduces will be very helpful.

Tidal frequencies are always angular frequencies to simplify applying
sine and cosine.  These have MKS units [rad s-1] but they are all
currently listed as [s-1].

Updated dOxygen comments for variables, e.g. [T-1 ~> s-1] becomes
[rad T-1 ~> rad s-1].  Updated get_param units. e.g. units="s-1"
becomes units="rad s-1".

No answers are changed, but the logged parameter units are different.

There are frequencies in MOM_internal_tides.F90 but these have not
been updated because they may be specified incorrectly.  They are
used as if they are [T-1] but they are calculated as 2PI/period [rad T-1].

  real, allocatable, dimension(:) :: frequency  !< The frequency of each band [T-1 ~> s-1].

  real    :: period             ! A tidal period read from namelist [T ~> s]

  ! The periods of the tidal constituents for internal tides raytracing
  call read_param(param_file, "TIDAL_PERIODS", periods)

  do fr=1,num_freq
    period = US%s_to_T*extract_real(periods, " ,", fr, 0.)
    CS%frequency(fr) = 8.0*atan(1.0)/period
  enddo

All MOM6-examples cases have INTERNAL_TIDES=False and so can't
resolve this issue.
@Hallberg-NOAA
Copy link
Member

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/25707, with the expected changes in the documented units in MOM_parameter_doc files.

@Hallberg-NOAA Hallberg-NOAA merged commit 78a7936 into NOAA-GFDL:dev/gfdl Dec 9, 2024
10 checks passed
kshedstrom pushed a commit to ESMG/MOM6 that referenced this pull request Dec 10, 2024
* Tidal angular frequency has units [rad s-1]

Tidal frequencies are always angular frequencies to simplify applying
sine and cosine.  These have MKS units [rad s-1] but they are all
currently listed as [s-1].

Updated dOxygen comments for variables, e.g. [T-1 ~> s-1] becomes
[rad T-1 ~> rad s-1].  Updated get_param units. e.g. units="s-1"
becomes units="rad s-1".

No answers are changed, but the logged parameter units are different.

There are frequencies in MOM_internal_tides.F90 but these have not
been updated because they may be specified incorrectly.  They are
used as if they are [T-1] but they are calculated as 2PI/period [rad T-1].

  real, allocatable, dimension(:) :: frequency  !< The frequency of each band [T-1 ~> s-1].

  real    :: period             ! A tidal period read from namelist [T ~> s]

  ! The periods of the tidal constituents for internal tides raytracing
  call read_param(param_file, "TIDAL_PERIODS", periods)

  do fr=1,num_freq
    period = US%s_to_T*extract_real(periods, " ,", fr, 0.)
    CS%frequency(fr) = 8.0*atan(1.0)/period
  enddo

All MOM6-examples cases have INTERNAL_TIDES=False and so can't
resolve this issue.

* fixed too-long line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants