Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ add_library(FV3::fv3 ALIAS fv3)

set_property(SOURCE model/nh_utils.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "${FAST}")
set_property(SOURCE model/fv_mapz.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "${FAST}")
set_property(SOURCE tools/fv_diagnostics.F90 APPEND_STRING PROPERTY COMPILE_FLAGS "-O0")

set_target_properties(fv3 PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/fv3)
target_include_directories(fv3 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include/fv3>
Expand Down
28 changes: 4 additions & 24 deletions tools/fv_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4270,20 +4270,9 @@ subroutine range_check_3d(qname, q, is, ie, js, je, n_g, km, pos, q_low, q_hi, b
integer year, month, day, hour, minute, second

if ( present(bad_range) ) bad_range = .false.
qmin = q(is,js,1)
qmax = qmin

do k=1,km
do j=js,je
do i=is,ie
if( q(i,j,k) < qmin ) then
qmin = q(i,j,k)
elseif( q(i,j,k) > qmax ) then
qmax = q(i,j,k)
endif
enddo
enddo
enddo
qmin=minval(q(is:ie,js:je,1:km))
qmax=maxval(q(is:ie,js:je,1:km))

call mp_reduce_min(qmin)
call mp_reduce_max(qmax)
Expand Down Expand Up @@ -4337,18 +4326,9 @@ subroutine range_check_2d(qname, q, is, ie, js, je, n_g, pos, q_low, q_hi, bad_r
integer year, month, day, hour, minute, second

if ( present(bad_range) ) bad_range = .false.
qmin = q(is,js)
qmax = qmin

do j=js,je
do i=is,ie
if( q(i,j) < qmin ) then
qmin = q(i,j)
elseif( q(i,j) > qmax ) then
qmax = q(i,j)
endif
enddo
enddo
qmin=minval(q(is:ie,js:je))
qmax=maxval(q(is:ie,js:je))

call mp_reduce_min(qmin)
call mp_reduce_max(qmax)
Expand Down