Skip to content

Commit

Permalink
trying to set up for write
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Oct 16, 2023
1 parent 9b895f2 commit 854d0b6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion model/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# Ed Hartnett, 10/14/23

add_executable(test_io test_io.F90)
target_link_libraries(test_io PRIVATE ww3_lib)
add_test(NAME test_io COMMAND test_io)


26 changes: 26 additions & 0 deletions model/tests/test_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,35 @@
!
! Ed Hartnett 10/14/23
program test_io
use w3iopomd
USE W3ODATMD, ONLY: NDST, NDSE, IPASS => IPASS2, NOPTS, IPTINT, &
IL, IW, II, PTLOC, PTIFAC, DPO, WAO, WDO, &
ASO, CAO, CDO, SPCO, PTNME, O2INIT, FNMPRE, &
GRDID, ICEO, ICEHO, ICEFO
USE W3GDATMD, ONLY: NGRIDS, NAUXGR
implicit none
integer, target :: i, j, k, l

integer :: ndsop, iotst, imod
print *, 'Testing WW3 IO...'

ndsop = 10
iotst = 11
ipass => i
! Open file for error output.
ndse => j
ndse = 20
open(unit = ndse, file = "test_io_error")
ndst => k
ndst = 21
ngrids = 9
imod = 1
ndstst = 22
open(unit = ndstst, file = "test_io_test")
call w3iopo('WRITE', ndsop, iotst, imod)
if (iotst .ne. 0) stop 10
close(20)

print *, 'SUCCESS!'
end program test_io

0 comments on commit 854d0b6

Please sign in to comment.