-
Notifications
You must be signed in to change notification settings - Fork 245
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
Code standardization and dOxyGenization of framework code #764
Merged
adcroft
merged 32 commits into
mom-ocean:dev/gfdl
from
Hallberg-NOAA:code_standardization
May 9, 2018
Merged
Code standardization and dOxyGenization of framework code #764
adcroft
merged 32 commits into
mom-ocean:dev/gfdl
from
Hallberg-NOAA:code_standardization
May 9, 2018
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replaced 'end do' with 'enddo' and 'else if' with 'elseif', to follow typical practice in MOM6. Also adding spacing around the semicolons separating stacked enddo statements in several places. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in MOM_coms.F90. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in MOM_spatial_means.F90. All answers are bitwise identical.
Fixed some of the new dOxygen comments in MOM_debugging.F90 to document only one variable per comment and avoid excessively long lines. All answers are bitwise identical.
Split several recently introduced excessively long lines in MOM_open_boundary.F90. All answers are bitwise identical.
Split several recently introduced excessively long lines in MOM_file_parser.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_diag_mediator.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_diag_remap.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_domains.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_intrinsic_functions.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_io.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_restart.F90. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in MOM_string_functions.F90. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in MOM_write_cputime.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_diagnostics.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_obsolete_diagnostics.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_wave_structure.F90. All answers are bitwise identical.
Added dOxyGen comments for all remaining routines and arguments in MOM_grid_initialization.F90. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in MOM_sum_output.F90. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in the solo_driver version of MOM_surface_forcing.F90. Also replaced calls to alloc_if_needed with calls to the functionally equivalent safe_alloc_ptr. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in user_surface_forcing.F90. Also replaced calls to alloc_if_needed with calls to the functionally equivalent safe_alloc_ptr. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in MESO_surface_forcing.F90. Also replaced calls to alloc_if_needed with calls to the functionally equivalent safe_alloc_ptr. All answers are bitwise identical.
Added dOxyGen comments for all routines and arguments in Neverland_surface_forcing.F90. Also replaced calls to alloc_if_needed with calls to the functionally equivalent safe_alloc_ptr. All answers are bitwise identical.
Split lines exceeding 120 characters in the code in ice_solo_driver and mct_driver to promote readability and compliance with MOM6 code standards. All answers are bitwise identical.
Combined the maxvel and minvel arguments to write_[uv]_accel into vel_rpt. Also turned the a and hv arguments from 2-d sliced to full 3-d arrays to avoid doing an extra copy during the calls to write_[uv]_accel. The calls inside of vertvisc_limit_vel have been changed accordingly. Also added dOxyGen comments for all remaining arguments in MOM_PointAccel.F90. All answers are bitwise identical, but two public interfaces change.
A recent update intended to add a min of n and 3 to avoid segmentation faults, but a max was added instead, triggering segmentation faults. All answers are still bitwise identical in the test cases, but this now passes a more sensitive compiler's checks.
Added dOxyGen comments for all subroutine arguments in MOM_tracer_flow_control.F90. All answers are bitwise identical.
Added dOxyGen comments for many arguments in the tracer utility codes, including MOM_neutral_diffusion.F90, MOM_neutral_diffusion_aux.F90, MOM_tracer_advect.F90, MOM_tracer_hor_diff.F90, and MOM_tracer_diabatic.F90. All answers are bitwise identical.
Added dOxyGen comments for many arguments in the tracer packages in src/tracer. All answers are bitwise identical.
angus-g
reviewed
May 8, 2018
src/framework/MOM_diag_mediator.F90
Outdated
if (present(n_in)) n = n_in | ||
|
||
i2s = '' | ||
do i=1,max(n,3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do i=1,min(n,3)
?
5 additional commits have corrected a bug (thanks @angus-g), merged in a recent commit to dev/gfdl, and added updates dOxyGenizing much of the MOM6 tracer code. |
Hallberg-NOAA
pushed a commit
to Hallberg-NOAA/MOM6
that referenced
this pull request
Dec 11, 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extensive dOxyGenization and cleanup of MOM6 code, including the following commits: