Skip to content

Commit

Permalink
replace iso_fortran_env::stdout with MOM_io::stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Oct 27, 2020
1 parent 1269874 commit 3f09291
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/framework/MOM_diag_vkernels.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module MOM_diag_vkernels

! This file is part of MOM6. See LICENSE.md for the license.

use iso_fortran_env, only : stdout=>output_unit, stderr=>error_unit
use MOM_io, only : stdout, stderr

implicit none ; private

Expand Down
2 changes: 1 addition & 1 deletion src/framework/MOM_random.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module MOM_random
use MersenneTwister_mod, only : getRandomReal ! Generates a random number
use MersenneTwister_mod, only : getRandomPositiveInt ! Generates a random positive integer

use iso_fortran_env, only : stdout=>output_unit, stderr=>error_unit
use MOM_io, only : stdout, stderr

implicit none ; private

Expand Down
21 changes: 9 additions & 12 deletions src/tracer/MOM_lateral_boundary_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module MOM_lateral_boundary_diffusion
use MOM_CVMix_KPP, only : KPP_get_BLD, KPP_CS
use MOM_energetic_PBL, only : energetic_PBL_get_MLD, energetic_PBL_CS
use MOM_diabatic_driver, only : diabatic_CS, extract_diabatic_member
use iso_fortran_env, only : stdout=>output_unit, stderr=>error_unit
use MOM_io, only : stdout, stderr

implicit none ; private

Expand Down Expand Up @@ -1111,16 +1111,15 @@ logical function test_layer_fluxes(verbose, nk, test_name, F_calc, F_ans)
real, dimension(nk), intent(in) :: F_ans !< Fluxes of the unitless tracer calculated by hand [s^-1]
! Local variables
integer :: k
integer, parameter :: stdunit = stdout

test_layer_fluxes = .false.
do k=1,nk
if ( F_calc(k) /= F_ans(k) ) then
test_layer_fluxes = .true.
write(stdunit,*) "MOM_lateral_boundary_diffusion, UNIT TEST FAILED: ", test_name
write(stdunit,10) k, F_calc(k), F_ans(k)
write(stdout,*) "MOM_lateral_boundary_diffusion, UNIT TEST FAILED: ", test_name
write(stdout,10) k, F_calc(k), F_ans(k)
elseif (verbose) then
write(stdunit,10) k, F_calc(k), F_ans(k)
write(stdout,10) k, F_calc(k), F_ans(k)
endif
enddo

Expand All @@ -1141,19 +1140,17 @@ logical function test_boundary_k_range(k_top, zeta_top, k_bot, zeta_bot, k_top_a
character(len=80) :: test_name !< Name of the unit test
logical :: verbose !< If true always print output

integer, parameter :: stdunit = stdout

test_boundary_k_range = k_top .ne. k_top_ans
test_boundary_k_range = test_boundary_k_range .or. (zeta_top .ne. zeta_top_ans)
test_boundary_k_range = test_boundary_k_range .or. (k_bot .ne. k_bot_ans)
test_boundary_k_range = test_boundary_k_range .or. (zeta_bot .ne. zeta_bot_ans)

if (test_boundary_k_range) write(stdunit,*) "UNIT TEST FAILED: ", test_name
if (test_boundary_k_range) write(stdout,*) "UNIT TEST FAILED: ", test_name
if (test_boundary_k_range .or. verbose) then
write(stdunit,20) "k_top", k_top, "k_top_ans", k_top_ans
write(stdunit,20) "k_bot", k_bot, "k_bot_ans", k_bot_ans
write(stdunit,30) "zeta_top", zeta_top, "zeta_top_ans", zeta_top_ans
write(stdunit,30) "zeta_bot", zeta_bot, "zeta_bot_ans", zeta_bot_ans
write(stdout,20) "k_top", k_top, "k_top_ans", k_top_ans
write(stdout,20) "k_bot", k_bot, "k_bot_ans", k_bot_ans
write(stdout,30) "zeta_top", zeta_top, "zeta_top_ans", zeta_top_ans
write(stdout,30) "zeta_bot", zeta_bot, "zeta_bot_ans", zeta_bot_ans
endif

20 format(A,"=",i3,X,A,"=",i3)
Expand Down
3 changes: 1 addition & 2 deletions src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ module MOM_neutral_diffusion
use MOM_energetic_PBL, only : energetic_PBL_get_MLD, energetic_PBL_CS
use MOM_diabatic_driver, only : diabatic_CS, extract_diabatic_member
use MOM_lateral_boundary_diffusion, only : boundary_k_range, SURFACE, BOTTOM

use iso_fortran_env, only : stdout=>output_unit, stderr=>error_unit
use MOM_io, only : stdout, stderr

implicit none ; private

Expand Down

0 comments on commit 3f09291

Please sign in to comment.