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

(*)Refactor and document soliton_initialization #612

Merged
merged 3 commits into from
May 30, 2024

Conversation

Hallberg-NOAA
Copy link
Member

Refactored the code in soliton_initialization.F90 to more accurately reflect the nondimensionalization that was applied in developing this test case. This change includes reading in the maximum depth and beta, and using them to calculate the equatorial deformation radius and the external gravity wave speed. The references to the papers describing the test case in the module were added to the doxygen comments describing the routines in this module. This commit also includes adding comments documenting the nature and units of all the internal variables in this module. There are two new arguments each (param_file and just_read) to soliton_initialize_thickness() and soliton_initialize_velocity() to accommodate these changes, bringing them into line with the interfaces for other similar user initialization routines, and MOM_initialize_state() was changed accordingly. This change could change answers in general, but in the specific examples that use this code, both beta and the external wave speed are deliberately set to 1 in MKS units, so this commit does not change answers for that specific case.

  Refactored the code in soliton_initialization.F90 to more accurately reflect
the nondimensionalization that was applied in developing this test case.  This
change includes reading in the maximum depth and beta, and using them to
calculate the equatorial deformation radius and the external gravity wave
speed.  The references to the papers describing the test case in the module were
added to the doxygen comments describing the routines in this module.   This
commit also includes adding comments documenting the nature and units of all the
internal variables in this module.  There are two new arguments each (param_file
and just_read) to soliton_initialize_thickness and soliton_initialize_velocity
to accommodate these changes, bringing them into line with the interfaces for
other similar user initialization routines, and MOM_initialize_state was changed
accordingly.  This change could change answers in general, but in the specific
examples that use this code, both beta and the external wave speed are
deliberately set to 1 in MKS units, so this commit does not change answers for
that specific case.
@Hallberg-NOAA Hallberg-NOAA added documentation Improvements or additions to documentation refactor Code cleanup with no changes in functionality or results answer-changing A change in results (actual or potential) labels Apr 27, 2024
Copy link

@kshedstrom kshedstrom left a comment

Choose a reason for hiding this comment

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

Thank you for cleaning up the units in this code. I agree that this now gives the same answers as before. Dale Haidvogel was quite fond of this problem and would have wanted it to be seen.

Copy link
Member

@marshallward marshallward left a comment

Choose a reason for hiding this comment

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

@marshallward
Copy link
Member

@marshallward marshallward merged commit d90ff6b into NOAA-GFDL:dev/gfdl May 30, 2024
10 checks passed
@Hallberg-NOAA Hallberg-NOAA deleted the refactor_soliton branch June 5, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answer-changing A change in results (actual or potential) documentation Improvements or additions to documentation refactor Code cleanup with no changes in functionality or results
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants