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

module DoxyGenization in the MOM6/src/core directory #817

Merged
merged 5 commits into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
!> The central module of the MOM6 ocean model
module MOM

! This file is part of MOM6. See LICENSE.md for the license.
Expand All @@ -9,7 +10,6 @@ module MOM
use MOM_cpu_clock, only : cpu_clock_id, cpu_clock_begin, cpu_clock_end
use MOM_cpu_clock, only : CLOCK_COMPONENT, CLOCK_SUBCOMPONENT
use MOM_cpu_clock, only : CLOCK_MODULE_DRIVER, CLOCK_MODULE, CLOCK_ROUTINE
use MOM_coord_initialization, only : MOM_initialize_coord
use MOM_diag_mediator, only : diag_mediator_init, enable_averaging
use MOM_diag_mediator, only : diag_mediator_infrastructure_init
use MOM_diag_mediator, only : diag_set_state_ptrs, diag_update_remap_grids
Expand All @@ -30,7 +30,6 @@ module MOM
use MOM_error_handler, only : MOM_set_verbosity, callTree_showQuery
use MOM_error_handler, only : callTree_enter, callTree_leave, callTree_waypoint
use MOM_file_parser, only : read_param, get_param, log_version, param_file_type
use MOM_fixed_initialization, only : MOM_initialize_fixed
use MOM_forcing_type, only : forcing, mech_forcing
use MOM_forcing_type, only : MOM_forcing_chksum, MOM_mech_forcing_chksum
use MOM_get_input, only : Get_MOM_Input, directories
Expand All @@ -40,7 +39,6 @@ module MOM
use MOM_restart, only : register_restart_field, query_initialized, save_restart
use MOM_restart, only : restart_init, is_new_run, MOM_restart_CS
use MOM_spatial_means, only : global_mass_integral
use MOM_state_initialization, only : MOM_initialize_state
use MOM_time_manager, only : time_type, set_time, time_type_to_real, operator(+)
use MOM_time_manager, only : operator(-), operator(>), operator(*), operator(/)
use MOM_time_manager, only : operator(>=), increment_date
Expand All @@ -52,6 +50,7 @@ module MOM
use MOM_ALE, only : ALE_getCoordinate, ALE_getCoordinateUnits, ALE_writeCoordinateFile
use MOM_ALE, only : ALE_updateVerticalGridType, ALE_remap_init_conds, ALE_register_diags
use MOM_boundary_update, only : call_OBC_register, OBC_register_end, update_OBC_CS
use MOM_coord_initialization, only : MOM_initialize_coord
use MOM_diabatic_driver, only : diabatic, diabatic_driver_init, diabatic_CS
use MOM_diabatic_driver, only : adiabatic, adiabatic_driver_init, diabatic_driver_end
use MOM_diabatic_driver, only : legacy_diabatic
Expand All @@ -72,8 +71,9 @@ module MOM
use MOM_dynamics_unsplit_RK2, only : initialize_dyn_unsplit_RK2, end_dyn_unsplit_RK2
use MOM_dynamics_unsplit_RK2, only : MOM_dyn_unsplit_RK2_CS
use MOM_dyn_horgrid, only : dyn_horgrid_type, create_dyn_horgrid, destroy_dyn_horgrid
use MOM_EOS, only : EOS_init, calculate_density
use MOM_debugging, only : check_redundant
use MOM_EOS, only : EOS_init, calculate_density
use MOM_fixed_initialization, only : MOM_initialize_fixed
use MOM_grid, only : ocean_grid_type, set_first_direction
use MOM_grid, only : MOM_grid_init, MOM_grid_end
use MOM_hor_index, only : hor_index_type, hor_index_init
Expand All @@ -91,6 +91,7 @@ module MOM
use MOM_set_visc, only : set_viscous_BBL, set_viscous_ML, set_visc_init
use MOM_set_visc, only : set_visc_register_restarts, set_visc_CS
use MOM_sponge, only : init_sponge_diags, sponge_CS
use MOM_state_initialization, only : MOM_initialize_state
use MOM_sum_output, only : write_energy, accumulate_net_input
use MOM_sum_output, only : MOM_sum_output_init, sum_output_CS
use MOM_ALE_sponge, only : init_ALE_sponge_diags, ALE_sponge_CS
Expand Down Expand Up @@ -860,6 +861,7 @@ subroutine step_MOM(forces, fluxes, sfc_state, Time_start, time_interval, CS, &

end subroutine step_MOM

!> Time step the ocean dynamics, including the momentum and continuity equations
subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_thermo, &
bbl_time_int, CS, Time_local, Waves)
type(mech_forcing), intent(in) :: forces !< A structure with the driving mechanical forces
Expand Down Expand Up @@ -1478,7 +1480,8 @@ subroutine step_offline(forces, fluxes, sfc_state, Time_start, time_interval, CS

end subroutine step_offline

!> This subroutine initializes MOM.
!> Initialize MOM, including memory allocation, setting up parameters and diagnostics,
!! initializing the ocean state variables, and initializing subsidiary modules
subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
Time_in, offline_tracer_mode, input_restart_file, diag_ptr, &
count_calls, tracer_flow_CSp)
Expand Down Expand Up @@ -2444,7 +2447,7 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &

end subroutine initialize_MOM

!> This subroutine finishes initializing MOM and writes out the initial conditions.
!> Finishe initializing MOM and writes out the initial conditions.
subroutine finish_MOM_initialization(Time, dirs, CS, restart_CSp)
type(time_type), intent(in) :: Time !< model time, used in this routine
type(directories), intent(in) :: dirs !< structure with directory paths
Expand Down Expand Up @@ -2518,7 +2521,7 @@ subroutine register_diags(Time, G, GV, IDs, diag)
Time, 'Instantaneous Sea Surface Height', 'm')
end subroutine register_diags

!> This subroutine sets up clock IDs for timing various subroutines.
!> Set up CPU clock IDs for timing various subroutines.
subroutine MOM_timing_init(CS)
type(MOM_control_struct), intent(in) :: CS !< control structure set up by initialize_MOM.

Expand Down Expand Up @@ -2609,7 +2612,7 @@ subroutine set_restart_fields(GV, param_file, CS, restart_CSp)

end subroutine set_restart_fields

!> This subroutine applies a correction to the sea surface height to compensate
!> Apply a correction to the sea surface height to compensate
!! for the atmospheric pressure (the inverse barometer).
subroutine adjust_ssh_for_p_atm(tv, G, GV, ssh, p_atm, use_EOS)
type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables
Expand Down Expand Up @@ -2646,8 +2649,8 @@ subroutine adjust_ssh_for_p_atm(tv, G, GV, ssh, p_atm, use_EOS)

end subroutine adjust_ssh_for_p_atm

!> This subroutine sets the surface (return) properties of the ocean
!! model by setting the appropriate fields in sfc_state. Unused fields
!> Set the surface (return) properties of the ocean model by
!! setting the appropriate fields in sfc_state. Unused fields
!! are set to NULL or are unallocated.
subroutine extract_surface_state(CS, sfc_state)
type(MOM_control_struct), pointer :: CS !< Master MOM control structure
Expand Down Expand Up @@ -2991,7 +2994,7 @@ subroutine get_ocean_stocks(CS, mass, heat, salt, on_PE_only)

end subroutine get_ocean_stocks

!> End of model
!> End of ocean model, including memory deallocation
subroutine MOM_end(CS)
type(MOM_control_struct), pointer :: CS !< MOM control structure

Expand Down
8 changes: 3 additions & 5 deletions src/core/MOM_checksum_packages.F90
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
!> Provides routines that do checksums of groups of MOM variables
module MOM_checksum_packages

! This file is part of MOM6. See LICENSE.md for the license.

! This module provdes a several routines that do check-sums of groups
! This module provides several routines that do check-sums of groups
! of variables in the various dynamic solver routines.

use MOM_debugging, only : hchksum, uvchksum
Expand Down Expand Up @@ -110,10 +111,7 @@ subroutine MOM_thermo_chksum(mesg, tv, G, haloshift)
!! thermodynamic variables.
type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure.
integer, optional, intent(in) :: haloshift !< The width of halos to check (default 0).
! Arguments: mesg - A message that appears on the chksum lines.
! (in) tv - A structure containing pointers to any thermodynamic
! fields that are in use.
! (in) G - The ocean's grid structure.

integer :: is, ie, js, je, nz, hs
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = G%ke
hs=1; if (present(haloshift)) hs=haloshift
Expand Down
Loading