From ce614c6eed2b94890a9e23705ff7a7a52a2607f4 Mon Sep 17 00:00:00 2001 From: Robert Hallberg Date: Mon, 7 May 2018 15:23:09 -0400 Subject: [PATCH] dOxyGenized MOM_spatial_means.F90 Added dOxyGen comments for all routines and arguments in MOM_spatial_means.F90. All answers are bitwise identical. --- src/framework/MOM_spatial_means.F90 | 31 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/framework/MOM_spatial_means.F90 b/src/framework/MOM_spatial_means.F90 index 38c4b61180..9e2d312887 100644 --- a/src/framework/MOM_spatial_means.F90 +++ b/src/framework/MOM_spatial_means.F90 @@ -23,9 +23,10 @@ module MOM_spatial_means contains +!> Return the global area mean of a variable. This uses reproducing sums. function global_area_mean(var,G) type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure - real, dimension(SZI_(G), SZJ_(G)), intent(in) :: var + real, dimension(SZI_(G), SZJ_(G)), intent(in) :: var !< The variable to average real, dimension(SZI_(G), SZJ_(G)) :: tmpForSumming real :: global_area_mean @@ -40,9 +41,10 @@ function global_area_mean(var,G) end function global_area_mean +!> Return the global area integral of a variable. This uses reproducing sums. function global_area_integral(var,G) type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure - real, dimension(SZI_(G), SZJ_(G)), intent(in) :: var + real, dimension(SZI_(G), SZJ_(G)), intent(in) :: var !< The variable to integrate real, dimension(SZI_(G), SZJ_(G)) :: tmpForSumming real :: global_area_integral @@ -57,10 +59,11 @@ function global_area_integral(var,G) end function global_area_integral +!> Return the layerwise global thickness-weighted mean of a variable. This uses reproducing sums. function global_layer_mean(var, h, G, GV) 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_(GV)), intent(in) :: var + real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: var !< The variable to average real, dimension(SZI_(G),SZJ_(G),SZK_(GV)), intent(in) :: h !< Layer thicknesses, in H (usually m or kg m-2) real, dimension(SZK_(GV)) :: global_layer_mean @@ -86,7 +89,7 @@ function global_layer_mean(var, h, G, GV) end function global_layer_mean -!> Find the global thickness-weighted mean of a variable. +!> Find the global thickness-weighted mean of a variable. This uses reproducing sums. function global_volume_mean(var, h, G, GV) type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure @@ -114,7 +117,7 @@ function global_volume_mean(var, h, G, GV) end function global_volume_mean -!> Find the global mass-weighted integral of a variable +!> Find the global mass-weighted integral of a variable. This uses reproducing sums. function global_mass_integral(h, G, GV, var, on_PE_only) type(ocean_grid_type), intent(in) :: G !< The ocean's grid structure type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure @@ -158,11 +161,14 @@ function global_mass_integral(h, G, GV, var, on_PE_only) end function global_mass_integral +!> Determine the global mean of a field along rows of constant i, returning it +!! in a 1-d array using the local indexing. This uses reproducing sums. subroutine global_i_mean(array, i_mean, G, mask) type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - real, dimension(SZI_(G),SZJ_(G)), intent(in) :: array - real, dimension(SZJ_(G)), intent(out) :: i_mean - real, dimension(SZI_(G),SZJ_(G)), optional, intent(in) :: mask + real, dimension(SZI_(G),SZJ_(G)), intent(in) :: array !< The variable being averaged + real, dimension(SZJ_(G)), intent(out) :: i_mean !< Global mean of array along its i-axis + real, dimension(SZI_(G),SZJ_(G)), & + optional, intent(in) :: mask !< An array used for weighting the i-mean ! This subroutine determines the global mean of a field along rows of ! constant i, returning it in a 1-d array using the local indexing. @@ -236,11 +242,14 @@ subroutine global_i_mean(array, i_mean, G, mask) end subroutine global_i_mean +!> Determine the global mean of a field along rows of constant j, returning it +!! in a 1-d array using the local indexing. This uses reproducing sums. subroutine global_j_mean(array, j_mean, G, mask) type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure - real, dimension(SZI_(G),SZJ_(G)), intent(in) :: array - real, dimension(SZI_(G)), intent(out) :: j_mean - real, dimension(SZI_(G),SZJ_(G)), optional, intent(in) :: mask + real, dimension(SZI_(G),SZJ_(G)), intent(in) :: array !< The variable being averaged + real, dimension(SZI_(G)), intent(out) :: j_mean !< Global mean of array along its j-axis + real, dimension(SZI_(G),SZJ_(G)), & + optional, intent(in) :: mask !< An array used for weighting the j-mean ! This subroutine determines the global mean of a field along rows of ! constant j, returning it in a 1-d array using the local indexing.