Skip to content

Commit

Permalink
Update first unit test point to be a 4x4 grid as to test
Browse files Browse the repository at this point in the history
both odd and even dimensioned grids.

Fixes ufs-community#1000.
  • Loading branch information
George Gayno committed Dec 31, 2024
1 parent a7545ea commit 11dda0c
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions tests/orog/ftst_rm_isolated_pts.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ program rm_isolated_pts

print*,"Starting test of remove_isolated_pts."

im = 3
jm = 3
im = 4
jm = 4

allocate (slm(im,jm))
allocate (oro(im,jm))
Expand Down Expand Up @@ -97,12 +97,25 @@ program rm_isolated_pts
enddo
enddo

deallocate (slm, oro, var, var4, oa, ol)
deallocate (slm_expected, oro_expected, var_expected, var4_expected, oa_expected, ol_expected)

! Test Point 2

! Now remove an isolated water point.

print*,'-Test point 2.'

im = 3
jm = 3

allocate (slm(im,jm))
allocate (oro(im,jm))
allocate (var(im,jm))
allocate (var4(im,jm))
allocate (oa(im,jm,4))
allocate (ol(im,jm,4))

slm = 1.0
slm(2,2) = 0.0 ! water point

Expand Down Expand Up @@ -144,6 +157,13 @@ program rm_isolated_pts
! surrounding land points. All other points should remain
! unchanged.

allocate (slm_expected(im,jm))
allocate (oro_expected(im,jm))
allocate (var_expected(im,jm))
allocate (var4_expected(im,jm))
allocate (oa_expected(im,jm,4))
allocate (ol_expected(im,jm,4))

slm_expected = slm
oro_expected = oro
var_expected = var
Expand Down

0 comments on commit 11dda0c

Please sign in to comment.