forked from ufs-community/UFS_UTILS
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Baseline a unit test for routine "read_global_mask" and a
low-resolution version of the umd land use file. Fixes ufs-community#1000.
- Loading branch information
George Gayno
committed
Jan 3, 2025
1 parent
d63ecfd
commit be93997
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
program read_gbl_mask | ||
|
||
! Test routine "read_global_mask" using a reduced-size | ||
! version (6 x 3 vs 43200 x 21600) of the umd land mask file. | ||
|
||
use io_utils, only : read_global_mask | ||
|
||
implicit none | ||
|
||
integer, parameter :: im=6 | ||
integer, parameter :: jm=3 | ||
|
||
integer :: i, j | ||
|
||
integer(kind=1) :: mask(im,jm) | ||
integer(kind=1) :: mask_expected(im,jm) | ||
|
||
! Note the routine flips the i and j directions. | ||
data mask_expected /1,1,1,0,0,1, & | ||
1,1,1,0,0,0, & | ||
1,1,1,0,0,0/ | ||
|
||
print*,"- Begin test of read_global_mask" | ||
|
||
call read_global_mask(im, jm, mask) | ||
|
||
do j = 1, jm | ||
do i = 1, im | ||
if (mask(i,j) /= mask_expected(i,j)) stop 3 | ||
enddo | ||
enddo | ||
|
||
print*,"OK" | ||
print*,"SUCCSSS" | ||
|
||
end program read_gbl_mask |