Skip to content

Commit

Permalink
Add strawman unit test for orog routine get_index.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Nov 22, 2024
1 parent fe71fa1 commit 73f9e7d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/orog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ target_link_libraries(ftst_minmax orog_lib)
add_executable(ftst_get_ll_angle ftst_get_ll_angle.F90)
add_test(NAME orog-ftst_get_ll_angle COMMAND ftst_get_ll_angle)
target_link_libraries(ftst_get_ll_angle orog_lib)

add_executable(ftst_get_index ftst_get_index.F90)
add_test(NAME orog-ftst_get_index COMMAND ftst_get_index)
target_link_libraries(ftst_get_index orog_lib)
32 changes: 32 additions & 0 deletions tests/orog/ftst_get_index.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
program test_get_index

use orog_utils, only : get_index

implicit none

integer, parameter :: imn=360*120
integer, parameter :: jmn=180*120
integer, parameter :: npts=4

integer :: jst, jen, ilist(imn), numx

real :: lono(npts), lato(npts)
real, parameter :: delxn=360.0/imn

print*,'hello world'

lato(1) = 0.0; lono(1) = 0.0
lato(2) = 1.0; lono(2) = 0.5
lato(3) = 0.0; lono(3) = 1.0
lato(4) = -1.0; lono(4) = 0.5

ilist = -999

call get_index(imn,jmn,npts,lonO,latO,delxn,jst,jen,ilist,numx)

print*,jst,jen,numx

print*,ilist(1:numx)


end program test_get_index

0 comments on commit 73f9e7d

Please sign in to comment.