Skip to content

Commit

Permalink
Avoids building grids on land points
Browse files Browse the repository at this point in the history
- We had two coordinate modes that were building grids everywhere including
  on land points. This worked but is unnecessary.
- Avoids computations.
- No answer changes.
  • Loading branch information
adcroft committed Jul 14, 2017
1 parent 9b914f2 commit de04db1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/ALE/MOM_regridding.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@ subroutine build_sigma_grid( CS, G, GV, h, dzInterface )
do i = G%isc-1,G%iec+1
do j = G%jsc-1,G%jec+1

if (G%mask2dT(i,j)==0.) then
dzInterface(i,j,:) = 0.
cycle
endif

! The rest of the model defines grids integrating up from the bottom
nominalDepth = G%bathyT(i,j)*GV%m_to_H

Expand Down Expand Up @@ -1293,6 +1298,12 @@ subroutine build_rho_grid( G, GV, h, tv, dzInterface, remapCS, CS )
do j = G%jsc-1,G%jec+1
do i = G%isc-1,G%iec+1

if (G%mask2dT(i,j)==0.) then
dzInterface(i,j,:) = 0.
cycle
endif


! Local depth (G%bathyT is positive)
nominalDepth = G%bathyT(i,j)*GV%m_to_H

Expand Down

0 comments on commit de04db1

Please sign in to comment.