@@ -244,10 +244,12 @@ subroutine ocn_export(ind, ocn_public, grid, o2x)
244244 do j= grid% jsc, grid% jec ; do i= grid% isc,grid% iec
245245 n = n+1
246246 ! This is a simple second-order difference
247- ! o2x(ind%o2x_So_dhdx, n) = 0.5 * (ssh(i+1,j) + ssh(i-1,j)) * grid%IdxT(i,j) * grid%mask2dT(i,j)
247+ ! o2x(ind%o2x_So_dhdx, n) = 0.5 * (ssh(i+1,j) + ssh(i-1,j)) * grid%IdxT(i,j) * grid%mask2dT(i,j)
248248 ! This is a PLM slope which might be less prone to the A-grid null mode
249- slp_L = ssh(i,j) - ssh(i-1 ,j)
250- slp_R = ssh(i+1 ,j) - ssh(i,j)
249+ slp_L = (ssh(i,j) - ssh(i-1 ,j)) * grid% mask2dCu(I-1 ,j)
250+ ! if (grid%mask2dCu(I-1,j)==0.) slp_L = 0.
251+ slp_R = (ssh(i+1 ,j) - ssh(i,j)) * grid% mask2dCu(I,j)
252+ ! if (grid%mask2dCu(I,j)==0.) slp_R = 0.
251253 slp_C = 0.5 * (slp_L + slp_R)
252254 if ( (slp_L * slp_R) > 0.0 ) then
253255 ! This limits the slope so that the edge values are bounded by the
@@ -270,6 +272,8 @@ subroutine ocn_export(ind, ocn_public, grid, o2x)
270272 ! This is a PLM slope which might be less prone to the A-grid null mode
271273 slp_L = ssh(i,j) - ssh(i,j-1 )
272274 slp_R = ssh(i,j+1 ) - ssh(i,j)
275+ slp_L= 0 .
276+ slp_R= 0 .
273277 slp_C = 0.5 * (slp_L + slp_R)
274278 if ( (slp_L * slp_R) > 0.0 ) then
275279 ! This limits the slope so that the edge values are bounded by the
0 commit comments