Skip to content

Commit

Permalink
unit tests version 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mlee03 authored and mlee03 committed Jul 7, 2023
1 parent e3653f6 commit 4d0ce31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test_fms/diag_integral/test_diag_integral.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ subroutine test_call_diag_integral_field
implicit none
integer :: is, ie, js, je

is=1 ; ie=nxy
is=1 ; ie=nxy/2
js=1 ; je=nxy !je is not used

Time=set_time(0,3,0)
Expand All @@ -117,7 +117,7 @@ subroutine test_call_sum_diag_integral_field
implicit none
integer :: is, ie, js, je

is=1 ; ie=nxy
is=1 ; ie=nxy/2
js=1 ; je=nxy

Time=set_time(0,4,0)
Expand Down Expand Up @@ -148,6 +148,7 @@ subroutine test_sum_diag_integral_field_2d
answer2=answer2/area_sum

call check_answers(answer2, field_avg2, 'sum_diag_integral_field failed for 2d')
call check_answers(answer2/2.0,field_avgh, 'sum_diag_integral_field_hemi failed')

end subroutine test_sum_diag_integral_field_2d
!-------------------------------------
Expand Down Expand Up @@ -225,7 +226,7 @@ subroutine read_diag_integral_file
read(iunit,*) itime, field_avg2, field_avg3, field_avgh
read(iunit,*) cline1, cline2, cline3, cline4, cline5
!> only the answers for the last time step will be checked
read(iunit,*) cline1, field_avg2, field_wght_avg3, cline5
read(iunit,*) cline1, field_avg2, field_wght_avg3, field_avgh
close(iunit)

end subroutine read_diag_integral_file
Expand Down

0 comments on commit 4d0ce31

Please sign in to comment.