Skip to content
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
5 changes: 2 additions & 3 deletions src/initialization/MOM_shared_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1327,10 +1327,9 @@ subroutine compute_global_grid_integrals(G, US)
G%areaT_global = reproducing_sum(tmpForSumming)

if (G%areaT_global == 0.0) &
call MOM_error(FATAL, "compute_global_grid_integrals: "//&
"zero ocean area (check topography?)")
call MOM_error(FATAL, "compute_global_grid_integrals: zero ocean area (check topography?)")

G%IareaT_global = 1.0 / (G%areaT_global)
G%IareaT_global = 1.0 / G%areaT_global
end subroutine compute_global_grid_integrals
! -----------------------------------------------------------------------------

Expand Down
20 changes: 0 additions & 20 deletions src/initialization/MOM_state_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2339,26 +2339,6 @@ subroutine set_velocity_depth_max(G)
enddo ; enddo
end subroutine set_velocity_depth_max

!> Subroutine to pre-compute global integrals of grid quantities for
!! later use in reporting diagnostics
subroutine compute_global_grid_integrals(G, US)
type(ocean_grid_type), intent(inout) :: G !< The ocean's grid structure
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
! Local variables
real, dimension(G%isc:G%iec, G%jsc:G%jec) :: tmpForSumming ! Masked and unscaled areas for sums [m2]
real :: area_scale ! A conversion factor to prepare for reproducing sums [m2 L-2 ~> 1]
integer :: i,j

area_scale = US%L_to_m**2
tmpForSumming(:,:) = 0.
G%areaT_global = 0.0 ; G%IareaT_global = 0.0
do j=G%jsc,G%jec ; do i=G%isc,G%iec
tmpForSumming(i,j) = area_scale*G%areaT(i,j) * G%mask2dT(i,j)
enddo ; enddo
G%areaT_global = reproducing_sum(tmpForSumming)
G%IareaT_global = 1. / (G%areaT_global)
end subroutine compute_global_grid_integrals

!> This subroutine sets the 4 bottom depths at velocity points to be the
!! minimum of the adjacent depths.
subroutine set_velocity_depth_min(G)
Expand Down