From e22cdeb26a9cb177e159c70945bb8427d5f64a67 Mon Sep 17 00:00:00 2001 From: Caroline Cardinale Date: Thu, 15 Jun 2017 12:00:24 -0400 Subject: [PATCH 01/10] added Doxygen comments to MOM_checksum_packages.F90 added Doxygen comments to all of the arguments to the subroutines in MOM_checksum_packages.F90. All the answers are bitwise identical. --- src/core/MOM_checksum_packages.F90 | 117 ++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 36 deletions(-) diff --git a/src/core/MOM_checksum_packages.F90 b/src/core/MOM_checksum_packages.F90 index d01e7f9639..a7798514c5 100644 --- a/src/core/MOM_checksum_packages.F90 +++ b/src/core/MOM_checksum_packages.F90 @@ -52,14 +52,20 @@ module MOM_checksum_packages ! ============================================================================= subroutine MOM_state_chksum_5arg(mesg, u, v, h, uh, vh, G, GV, haloshift, symmetric) - character(len=*), intent(in) :: mesg - type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(in) :: u !< The zonal velocity, in m s-1 - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(in) :: v !< The meridional velocity, in m s-1 - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H (usually m or kg m-2) - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(in) :: uh - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(in) :: vh + character(len=*), & + intent(in) :: mesg ! Date: Thu, 15 Jun 2017 16:29:39 -0400 Subject: [PATCH 02/10] added Doxygen comments to MOM_checksum_packages.F90 added Doxygen comments to all of the subroutines in MOM_checksum_packages.F90. All the answers are bitwise identical. --- src/core/MOM_checksum_packages.F90 | 84 +++++++++++++++--------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/src/core/MOM_checksum_packages.F90 b/src/core/MOM_checksum_packages.F90 index a7798514c5..f7c90836dd 100644 --- a/src/core/MOM_checksum_packages.F90 +++ b/src/core/MOM_checksum_packages.F90 @@ -53,21 +53,22 @@ module MOM_checksum_packages subroutine MOM_state_chksum_5arg(mesg, u, v, h, uh, vh, G, GV, haloshift, symmetric) character(len=*), & - intent(in) :: mesg ! Date: Thu, 15 Jun 2017 16:42:53 -0400 Subject: [PATCH 03/10] Added Doxygen comments to MOM_dynamics_legacy_split.F90 Added Doxygen comments to all of the subroutines in the MOM_dynamics_legacy_split.F90. All the answers are bitwise identical. --- src/core/MOM_dynamics_legacy_split.F90 | 199 +++++++++++++++++-------- 1 file changed, 138 insertions(+), 61 deletions(-) diff --git a/src/core/MOM_dynamics_legacy_split.F90 b/src/core/MOM_dynamics_legacy_split.F90 index 9332e5cc5a..3aea12b3b8 100644 --- a/src/core/MOM_dynamics_legacy_split.F90 +++ b/src/core/MOM_dynamics_legacy_split.F90 @@ -272,27 +272,60 @@ subroutine step_MOM_dyn_legacy_split(u, v, h, tv, visc, & Time_local, dt, fluxes, p_surf_begin, p_surf_end, & dt_since_flux, dt_therm, uh, vh, uhtr, vhtr, eta_av, & G, GV, CS, calc_dtbt, VarMix, MEKE) - type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), target, intent(inout) :: u !< The zonal velocity, in m s-1 - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), target, intent(inout) :: v !< The meridional velocity, in m s-1 - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< Layer thicknesses, in H (usually m or kg m-2) - type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables - type(vertvisc_type), intent(inout) :: visc - type(time_type), intent(in) :: Time_local - real, intent(in) :: dt !< The baroclinic dynamics time step, in s - type(forcing), intent(in) :: fluxes - real, dimension(:,:), pointer :: p_surf_begin, p_surf_end - real, intent(in) :: dt_since_flux, dt_therm - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), target, intent(inout) :: uh - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), target, intent(inout) :: vh - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: uhtr - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: vhtr - real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta_av - type(MOM_dyn_legacy_split_CS), pointer :: CS - logical, intent(in) :: calc_dtbt - type(VarMix_CS), pointer :: VarMix - type(MEKE_type), pointer :: MEKE + type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + target, intent(inout) :: u !< The zonal velocity, in m s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + target, intent(inout) :: v !< The meridional velocity, in m s-1. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: h !< Layer thicknesses, in H (usually m or kg m-2). + type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various. + !! thermodynamic variables. + type(vertvisc_type), intent(inout) :: visc !< A structure containing vertical viscosities, + !! bottom drag viscosities, and related fields. + type(time_type), intent(in) :: Time_local !< The model time at the end + !! of the time step. + real, intent(in) :: dt !< The baroclinic dynamics time step, in s + type(forcing), intent(in) :: fluxes !< A structure containing pointers to any + !! possible forcing fields. Unused fields + !! have NULL ptrs. + real, dimension(:,:), pointer :: p_surf_begin !< A pointer (perhaps NULL) to the + !! surface pressure at the beginning + !! of this dynamic step, in Pa. + real, dimension(:,:), pointer :: p_surf_end !< A pointer (perhaps NULL) to the + !! surface pressure at the end of + !! this dynamic step, in Pa. + real, intent(in) :: dt_since_flux !< The elapsed time since fluxes + !! were applied, in s. + real, intent(in) :: dt_therm !< The thermodynamic time step, in s. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + target, intent(inout) :: uh !< The zonal volume or mass transport, + !! in m3 s-1 or kg s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + target, intent(inout) :: vh !< The meridional volume or mass transport, + !! in m3 s-1 or kg s-1. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: uhtr !< The accumulated zonal volume or mass + !! transport since the last tracer advection, + !! in m3 or kg. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: vhtr !< The accumulated meridional volume or mass + !! transport since the last tracer advection, + !! in m3 or kg. + real, dimension(SZI_(G),SZJ_(G)), & + intent(out) :: eta_av !< The free surface height or column mass + !! time-averaged over a time step, + !! in m or kg m-2. + type(MOM_dyn_legacy_split_CS), & + pointer :: CS !< The control structure set up by + !! initialize_dyn_legacy_split. + logical, intent(in) :: calc_dtbt !< If true, recalculate the + !! barotropic time step. + type(VarMix_CS), pointer :: VarMix ! Date: Thu, 15 Jun 2017 16:44:36 -0400 Subject: [PATCH 04/10] Added Doxygen comments to MOM_dynamics_unsplit.F90 Added Doxygen comments to all of the subroutines in the MOM_dynamics_unsplit.F90. All the answers are bitwise identical. --- src/core/MOM_dynamics_unsplit.F90 | 140 ++++++++++++++++++++---------- 1 file changed, 96 insertions(+), 44 deletions(-) diff --git a/src/core/MOM_dynamics_unsplit.F90 b/src/core/MOM_dynamics_unsplit.F90 index b9c9d30bd1..422655a89a 100644 --- a/src/core/MOM_dynamics_unsplit.F90 +++ b/src/core/MOM_dynamics_unsplit.F90 @@ -183,25 +183,48 @@ module MOM_dynamics_unsplit subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, fluxes, & p_surf_begin, p_surf_end, uh, vh, uhtr, vhtr, eta_av, G, GV, CS, & VarMix, MEKE) - type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: u !< The zonal velocity, in m s-1 - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: v !< The meridional velocity, in m s-1 - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< Layer thicknesses, in H (usually m or kg m-2) - type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables - type(vertvisc_type), intent(inout) :: visc - type(time_type), intent(in) :: Time_local - real, intent(in) :: dt !< The dynamics time step, in s. - type(forcing), intent(in) :: fluxes - real, dimension(:,:), pointer :: p_surf_begin, p_surf_end - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: uh - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: vh - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: uhtr - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: vhtr - real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta_av - type(MOM_dyn_unsplit_CS), pointer :: CS - type(VarMix_CS), pointer :: VarMix - type(MEKE_type), pointer :: MEKE + type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: u !< The zonal velocity, in m s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: v !< The meridional velocity, in m s-1. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: h !< Layer thicknesses, in H. + !! (usually m or kg m-2). + type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various + !! thermodynamic variables. + type(vertvisc_type), intent(inout) :: visc !< A structure containing vertical + !! viscosities, bottom drag viscosities, and related fields. + type(time_type), intent(in) :: Time_local !< The model time at the end + !! of the time step. + real, intent(in) :: dt !< The dynamics time step, in s. + type(forcing), intent(in) :: fluxes !< A structure containing pointers to + !! any possible forcing fields. Unused fields have NULL ptrs. + real, dimension(:,:), pointer :: p_surf_begin !< A pointer (perhaps NULL) to the + !! surface pressure at the beginning of this dynamic step, in Pa. + real, dimension(:,:), pointer :: p_surf_end !< A pointer (perhaps NULL) to the + !! surface pressure at the end of this dynamic step, in Pa. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: uh !< The zonal volume or mass transport, + !! in m3 s-1 or kg s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: vh !< The meridional volume or mass + !! transport, in m3 s-1 or kg s-1. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: uhtr !< he accumulated zonal volume or mass + !! transport since the last tracer advection, in m3 or kg. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: vhtr !< The accumulated meridional volume or + !! mass transport since the last tracer advection, in m3 or kg. + real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta_av !< The time-mean free surface height or + !! column mass, in m or kg m-2. + type(MOM_dyn_unsplit_CS), pointer :: CS !< The control structure set up by + !! initialize_dyn_unsplit. + type(VarMix_CS), pointer :: VarMix !< A pointer to a structure with fields + !! that specify the spatially variable viscosities. + type(MEKE_type), pointer :: MEKE !< A pointer to a structure containing + !! fields related to the Mesoscale Eddy Kinetic Energy. ! Arguments: u - The input and output zonal velocity, in m s-1. ! (inout) v - The input and output meridional velocity, in m s-1. ! (inout) h - The input and output layer thicknesses, in m or kg m-2, @@ -540,11 +563,14 @@ end subroutine step_MOM_dyn_unsplit ! ============================================================================= subroutine register_restarts_dyn_unsplit(HI, GV, param_file, CS, restart_CS) - type(hor_index_type), intent(in) :: HI - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time parameters - type(MOM_dyn_unsplit_CS), pointer :: CS - type(MOM_restart_CS), pointer :: restart_CS + type(hor_index_type), intent(in) :: HI !< A horizontal index type structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure. + type(param_file_type), intent(in) :: param_file !< A structure to parse for + !! run-time parameters. + type(MOM_dyn_unsplit_CS), pointer :: CS !< The control structure set up by + !! initialize_dyn_unsplit. + type(MOM_restart_CS), pointer :: restart_CS !< A pointer to the restart control structure. + ! This subroutine sets up any auxiliary restart variables that are specific ! to the unsplit time stepping scheme. All variables registered here should ! have the ability to be recreated if they are not present in a restart file. @@ -589,26 +615,52 @@ subroutine initialize_dyn_unsplit(u, v, h, Time, G, GV, param_file, diag, CS, & restart_CS, Accel_diag, Cont_diag, MIS, & OBC, update_OBC_CSp, ALE_CSp, setVisc_CSp, & visc, dirs, ntrunc) - type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: u !< The zonal velocity, in m s-1 - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: v !< The meridional velocity, in m s-1 - real, dimension(SZI_(G),SZJ_(G),SZK_(G)) , intent(inout) :: h !< Layer thicknesses, in H (usually m or kg m-2) - type(time_type), target, intent(in) :: Time - type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time parameters - type(diag_ctrl), target, intent(inout) :: diag - type(MOM_dyn_unsplit_CS), pointer :: CS - type(MOM_restart_CS), pointer :: restart_CS - type(accel_diag_ptrs), target, intent(inout) :: Accel_diag - type(cont_diag_ptrs), target, intent(inout) :: Cont_diag - type(ocean_internal_state), intent(inout) :: MIS - type(ocean_OBC_type), pointer :: OBC - type(update_OBC_CS), pointer :: update_OBC_CSp - type(ALE_CS), pointer :: ALE_CSp - type(set_visc_CS), pointer :: setVisc_CSp - type(vertvisc_type), intent(inout) :: visc - type(directories), intent(in) :: dirs - integer, target, intent(inout) :: ntrunc + type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid + !! structure. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: u !< The zonal velocity, in m s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: v !< The meridional velocity, in m s-1. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)) , & + intent(inout) :: h !< Layer thicknesses, in H + !! (usually m or kg m-2). + type(time_type), target, intent(in) :: Time !< The current model time. + type(param_file_type), intent(in) :: param_file !< A structure to parse + !! for run-time parameters. + type(diag_ctrl), target, intent(inout) :: diag !< A structure that is used to + !! regulate diagnostic output. + type(MOM_dyn_unsplit_CS), pointer :: CS !< The control structure set up + !! by initialize_dyn_unsplit. + type(MOM_restart_CS), pointer :: restart_CS !< A pointer to the restart control + !!structure. + type(accel_diag_ptrs), target, intent(inout) :: Accel_diag !< A set of pointers to the various + !! accelerations in the momentum equations, which can be used + !! for later derived diagnostics, like energy budgets. + type(cont_diag_ptrs), target, intent(inout) :: Cont_diag !< A structure with pointers to + !! various terms in the continuity + !! equations. + type(ocean_internal_state), intent(inout) :: MIS !< The "MOM6 Internal State" + !! structure, used to pass around pointers + !! to various arrays for diagnostic purposes. + type(ocean_OBC_type), pointer :: OBC !< If open boundary conditions are + !! used, this points to the ocean_OBC_type + !! that was set up in MOM_initialization. + type(update_OBC_CS), pointer :: update_OBC_CSp !< If open boundary condition + !! updates are used, this points to + !! the appropriate control structure. + type(ALE_CS), pointer :: ALE_CSp !< This points to the ALE control + !! structure. + type(set_visc_CS), pointer :: setVisc_CSp !< This points to the set_visc + !! control structure. + type(vertvisc_type), intent(inout) :: visc !< A structure containing vertical + !! viscosities, bottom drag + !! viscosities, and related fields. + type(directories), intent(in) :: dirs !< A structure containing several + !! relevant directory paths. + integer, target, intent(inout) :: ntrunc !< A target for the variable that + !! records the number of times the velocity + !! is truncated (this should be 0). ! Arguments: u - The zonal velocity, in m s-1. ! (inout) v - The meridional velocity, in m s-1. From 22827d0932d54462c851a02be91972b816f27ee8 Mon Sep 17 00:00:00 2001 From: Caroline Cardinale Date: Fri, 16 Jun 2017 10:27:21 -0400 Subject: [PATCH 05/10] Added doxygen comments to MOM_dynamics_unsplit_RK2.F90 Added doxygen comments to all of the subroutines in MOM_dynamics_unsplit_RK2.F90 --- src/core/MOM_dynamics_unsplit_RK2.F90 | 152 ++++++++++++++++++-------- 1 file changed, 108 insertions(+), 44 deletions(-) diff --git a/src/core/MOM_dynamics_unsplit_RK2.F90 b/src/core/MOM_dynamics_unsplit_RK2.F90 index 2fbd5356d4..0275c539d3 100644 --- a/src/core/MOM_dynamics_unsplit_RK2.F90 +++ b/src/core/MOM_dynamics_unsplit_RK2.F90 @@ -189,25 +189,61 @@ module MOM_dynamics_unsplit_RK2 subroutine step_MOM_dyn_unsplit_RK2(u_in, v_in, h_in, tv, visc, Time_local, dt, fluxes, & p_surf_begin, p_surf_end, uh, vh, uhtr, vhtr, eta_av, G, GV, CS, & VarMix, MEKE) - type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: u_in - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: v_in - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h_in - type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables - type(vertvisc_type), intent(inout) :: visc - type(time_type), intent(in) :: Time_local - real, intent(in) :: dt !< The baroclinic dynamics time step, in s. - type(forcing), intent(in) :: fluxes - real, dimension(:,:), pointer :: p_surf_begin, p_surf_end - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: uh - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: vh - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: uhtr - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: vhtr - real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta_av - type(MOM_dyn_unsplit_RK2_CS), pointer :: CS - type(VarMix_CS), pointer :: VarMix - type(MEKE_type), pointer :: MEKE + type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid + !! structure. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: u_in !< The input and output zonal + !! velocity, in m s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: v_in !< The input and output meridional + !! velocity, in m s-1. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: h_in !< The input and output layer + !! thicknesses, in m or kg m-2, depending on + !! whether the Boussinesq approximation is made. + type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various + !! thermodynamic variables. + type(vertvisc_type), intent(inout) :: visc !< A structure containing vertical + !! viscosities, bottom drag + !! viscosities, and related fields. + type(time_type), intent(in) :: Time_local !< The model time at the end of + !! the time step. + real, intent(in) :: dt !< The baroclinic dynamics time step, + !! in s. + type(forcing), intent(in) :: fluxes !< A structure containing pointers to + !! any possible forcing fields. Unused + !! fields have NULL ptrs. + real, dimension(:,:), pointer :: p_surf_begin !< A pointer (perhaps NULL) to + !! the surface pressure at the beginning + !! of this dynamic step, in Pa. + real, dimension(:,:), pointer :: p_surf_end !< A pointer (perhaps NULL) to + !! the surface pressure at the end of + !! this dynamic step, in Pa. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: uh !< The zonal volume or mass transport, + !! in m3 s-1 or kg s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: vh !< The meridional volume or mass + !! transport, in m3 s-1 or kg s-1. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & + intent(inout) :: uhtr !< The accumulated zonal volume or + !! mass transport since the last + !! tracer advection, in m3 or kg. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & + intent(inout) :: vhtr !< The accumulated meridional volume + !! or mass transport since the last + !! tracer advection, in m3 or kg. + real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta_av !< The time-mean free surface height + !! or column mass, in m or kg m-2. + type(MOM_dyn_unsplit_RK2_CS), pointer :: CS !< The control structure set up by + !! initialize_dyn_unsplit_RK2. + type(VarMix_CS), pointer :: VarMix !< A pointer to a structure with + !! fields that specify the spatially + !! variable viscosities. + type(MEKE_type), pointer :: MEKE !< A pointer to a structure containing + !! fields related to the Mesoscale + !! Eddy Kinetic Energy. ! Arguments: u_in - The input and output zonal velocity, in m s-1. ! (inout) v_in - The input and output meridional velocity, in m s-1. ! (inout) h_in - The input and output layer thicknesses, in m or kg m-2, @@ -478,11 +514,14 @@ end subroutine step_MOM_dyn_unsplit_RK2 ! ============================================================================= subroutine register_restarts_dyn_unsplit_RK2(HI, GV, param_file, CS, restart_CS) - type(hor_index_type), intent(in) :: HI - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time parameters - type(MOM_dyn_unsplit_RK2_CS), pointer :: CS - type(MOM_restart_CS), pointer :: restart_CS + type(hor_index_type), intent(in) :: HI !< A horizontal index type structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure. + type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time + !! parameters. + type(MOM_dyn_unsplit_RK2_CS), pointer :: CS !< The control structure set up by + !! initialize_dyn_unsplit_RK2. + type(MOM_restart_CS), pointer :: restart_CS !< A pointer to the restart control + !! structure. ! This subroutine sets up any auxiliary restart variables that are specific ! to the unsplit time stepping scheme. All variables registered here should ! have the ability to be recreated if they are not present in a restart file. @@ -526,26 +565,51 @@ subroutine initialize_dyn_unsplit_RK2(u, v, h, Time, G, GV, param_file, diag, CS restart_CS, Accel_diag, Cont_diag, MIS, & OBC, update_OBC_CSp, ALE_CSp, setVisc_CSp, & visc, dirs, ntrunc) - type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: u !< The zonal velocity, in m s-1 - real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: v !< The meridional velocity, in m s-1 - real, dimension(SZI_(G),SZJ_(G),SZK_(G)) , intent(inout) :: h !< Layer thicknesses, in H (usually m or kg m-2) - type(time_type), target, intent(in) :: Time - type(param_file_type), intent(in) :: param_file !< A structure to parse for run-time parameters - type(diag_ctrl), target, intent(inout) :: diag - type(MOM_dyn_unsplit_RK2_CS), pointer :: CS - type(MOM_restart_CS), pointer :: restart_CS - type(accel_diag_ptrs), target, intent(inout) :: Accel_diag - type(cont_diag_ptrs), target, intent(inout) :: Cont_diag - type(ocean_internal_state), intent(inout) :: MIS - type(ocean_OBC_type), pointer :: OBC - type(update_OBC_CS), pointer :: update_OBC_CSp - type(ALE_CS), pointer :: ALE_CSp - type(set_visc_CS), pointer :: setVisc_CSp - type(vertvisc_type), intent(inout) :: visc - type(directories), intent(in) :: dirs - integer, target, intent(inout) :: ntrunc + type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid + !! structure. + real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(inout) :: u !< The zonal velocity, in m s-1. + real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(inout) :: v !< The meridional velocity, + !! in m s-1. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)) , intent(inout) :: h !< Layer thicknesses, in H + !! (usually m or kg m-2). + type(time_type), target, intent(in) :: Time !< The current model time. + type(param_file_type), intent(in) :: param_file !< A structure to parse + !! for run-time parameters. + type(diag_ctrl), target, intent(inout) :: diag !< A structure that is used to + !! regulate diagnostic output. + type(MOM_dyn_unsplit_RK2_CS), pointer :: CS !< The control structure set up + !! by initialize_dyn_unsplit_RK2. + type(MOM_restart_CS), pointer :: restart_CS !< A pointer to the restart + !! control structure. + type(accel_diag_ptrs), target, intent(inout) :: Accel_diag !< A set of pointers to the + !! various accelerations in the momentum equations, which can + !! be used for later derived diagnostics, like energy budgets. + type(cont_diag_ptrs), target, intent(inout) :: Cont_diag ! Date: Fri, 16 Jun 2017 15:53:47 -0400 Subject: [PATCH 06/10] Added doxygen comments to MOM_interface_heights.F90 Added doxygen comments to all of the subroutines in MOM_interface_heights.F90. All the answers are bitwise identical. --- src/core/MOM_interface_heights.F90 | 53 +++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 16 deletions(-) diff --git a/src/core/MOM_interface_heights.F90 b/src/core/MOM_interface_heights.F90 index d8efbe8561..aa50373755 100644 --- a/src/core/MOM_interface_heights.F90 +++ b/src/core/MOM_interface_heights.F90 @@ -67,14 +67,25 @@ module MOM_interface_heights contains subroutine find_eta_3d(h, tv, G_Earth, G, GV, eta, eta_bt, halo_size) - type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H (usually m or kg m-2) - type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables - real, intent(in) :: G_Earth - real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1), intent(out) :: eta - real, dimension(SZI_(G),SZJ_(G)), optional, intent(in) :: eta_bt - integer, optional, intent(in) :: halo_size + type(ocean_grid_type), intent(in) :: G !< The ocean's grid + !! structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical + !! grid structure. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H + !! (usually m or kg m-2). + type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to + !! various thermodynamic + !! variables. + real, intent(in) :: G_Earth !< Earth gravitational + !! acceleration (m/s2). + real, dimension(SZI_(G),SZJ_(G),SZK_(G)+1), intent(out) :: eta !< layer interface heights + !! (meter). + real, dimension(SZI_(G),SZJ_(G)), optional, intent(in) :: eta_bt !< optional barotropic + !! variable that gives the "correct" free surface height (Boussinesq) or total water + !! column mass per unit aread (non-Boussinesq). This is used to dilate the layer. + !! thicknesses when calculating interfaceheights, in H (m or kg m-2). + integer, optional, intent(in) :: halo_size !< width of halo points on + !! which to calculate eta. ! This subroutine determines the heights of all interfaces between layers, ! using the appropriate form for consistency with the calculation of the @@ -186,14 +197,24 @@ end subroutine find_eta_3d subroutine find_eta_2d(h, tv, G_Earth, G, GV, eta, eta_bt, halo_size) - type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H (usually m or kg m-2) - type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to various thermodynamic variables - real, intent(in) :: G_Earth - real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta - real, dimension(SZI_(G),SZJ_(G)), optional, intent(in) :: eta_bt - integer, optional, intent(in) :: halo_size + type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid + !! structure. + real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thicknesses, in H + !! (usually m or kg m-2). + type(thermo_var_ptrs), intent(in) :: tv !< A structure pointing to + !! various thermodynamic + !! variables. + real, intent(in) :: G_Earth !< Earth gravitational + !! acceleration (m/s2). + real, dimension(SZI_(G),SZJ_(G)), intent(out) :: eta !< free surface height + !! relative to mean sea + !! level (z=0) (m). + real, dimension(SZI_(G),SZJ_(G)), optional, intent(in) :: eta_bt !< optional barotropic + !! variable that gives the "correct" free surface height (Boussinesq) or total + !! water column mass per unit aread (non-Boussinesq), in H (m or kg m-2). + integer, optional, intent(in) :: halo_size !< width of halo points on + !! which to calculate eta. ! This subroutine determines the free surface height, using the appropriate ! form for consistency with the calculation of the pressure gradient forces. From 869be3c3e63ce6527efd3304b4291560d008652b Mon Sep 17 00:00:00 2001 From: Caroline Cardinale Date: Fri, 16 Jun 2017 15:54:58 -0400 Subject: [PATCH 07/10] Added doxygen comments to MOM_verticalGrid.F90 Adedded doxygen comments to all of the subroutines in MOM_verticalGrid.F90. All the answers are bitwise identical. --- src/core/MOM_verticalGrid.F90 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/core/MOM_verticalGrid.F90 b/src/core/MOM_verticalGrid.F90 index d2be2394d1..4b0adbcf14 100644 --- a/src/core/MOM_verticalGrid.F90 +++ b/src/core/MOM_verticalGrid.F90 @@ -201,11 +201,21 @@ end function get_flux_units !> Returns the model's tracer flux units. function get_tr_flux_units(GV, tr_units, tr_vol_conc_units, tr_mass_conc_units) - character(len=48) :: get_tr_flux_units - type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure - character(len=*), optional, intent(in) :: tr_units - character(len=*), optional, intent(in) :: tr_vol_conc_units - character(len=*), optional, intent(in) :: tr_mass_conc_units + character(len=48) :: get_tr_flux_units !< The model's flux units + !! for a tracer. + type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical + !! grid structure. + character(len=*), optional, intent(in) :: tr_units ! Date: Mon, 19 Jun 2017 11:05:18 -0400 Subject: [PATCH 08/10] Added Doxygen comments to MOM_checksum_packages.F90 Added Doxygen comments to all of the subroutines in MOM_checksum_packages.F90. All the answers are bitwise identical. --- src/core/MOM_checksum_packages.F90 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/MOM_checksum_packages.F90 b/src/core/MOM_checksum_packages.F90 index f7c90836dd..9c59a4768a 100644 --- a/src/core/MOM_checksum_packages.F90 +++ b/src/core/MOM_checksum_packages.F90 @@ -166,7 +166,7 @@ subroutine MOM_accel_chksum(mesg, CAu, CAv, PFu, PFv, diffu, diffv, G, GV, pbce, !! and momentum advection terms, in m s-2. real, dimension(SZI_(G),SZJB_(G),SZK_(G)), & intent(in) :: CAv !< Meridional acceleration due to Coriolis - !! and momentum advection terms, in m s-2. + !! and momentum advection terms, in m s-2. real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), & intent(in) :: PFu !< Zonal acceleration due to pressure gradients !! (equal to -dM/dx) in m s-2. @@ -254,7 +254,6 @@ subroutine MOM_state_stats(mesg, u, v, h, Temp, Salt, G, allowChange, permitDimi logical, optional, & intent(in) :: permitDiminishing !< do not flag error !!if the extrema are diminishing. - ! This subroutine monitors statistics for the model's state variables. ! Arguments: mesg - A message that appears on the chksum lines. ! (in) u - Zonal velocity, in m s-1. From 8abf4af7ec4efa6d09751964ce8e387628510220 Mon Sep 17 00:00:00 2001 From: Caroline Cardinale Date: Mon, 19 Jun 2017 11:08:00 -0400 Subject: [PATCH 09/10] Added Doxygen comments to MOM_dynamics_legacy_split.F90 Added Doxygen comments to all of the subroutines in the MOM_dynamics_legacy_split.F90. All the answers are bitwise identical. --- src/core/MOM_dynamics_legacy_split.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/MOM_dynamics_legacy_split.F90 b/src/core/MOM_dynamics_legacy_split.F90 index 3aea12b3b8..b5a8409804 100644 --- a/src/core/MOM_dynamics_legacy_split.F90 +++ b/src/core/MOM_dynamics_legacy_split.F90 @@ -1241,7 +1241,7 @@ subroutine initialize_dyn_legacy_split(u, v, h, uh, vh, eta, Time, G, GV, param_ real, intent(in) :: dt !< The baroclinic dynamics time step, !! in s. type(accel_diag_ptrs), target, intent(inout) :: Accel_diag ! Date: Mon, 19 Jun 2017 11:08:45 -0400 Subject: [PATCH 10/10] Added doxygen comments to MOM_verticalGrid.F90 Adedded doxygen comments to all of the subroutines in MOM_verticalGrid.F90. All the answers are bitwise identical. --- src/core/MOM_verticalGrid.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/MOM_verticalGrid.F90 b/src/core/MOM_verticalGrid.F90 index 4b0adbcf14..34965659f6 100644 --- a/src/core/MOM_verticalGrid.F90 +++ b/src/core/MOM_verticalGrid.F90 @@ -205,7 +205,7 @@ function get_tr_flux_units(GV, tr_units, tr_vol_conc_units, tr_mass_conc_units) !! for a tracer. type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical !! grid structure. - character(len=*), optional, intent(in) :: tr_units !