Skip to content

Commit

Permalink
Merge pull request #556 from adcroft/avoid-grid-building-on-land
Browse files Browse the repository at this point in the history
Avoids building grids on land points
  • Loading branch information
Hallberg-NOAA authored Jul 17, 2017
2 parents 82fed8f + de04db1 commit a036c3d
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 a036c3d

Please sign in to comment.