From b698bd180430b402a48a85f337d4647feea102ac Mon Sep 17 00:00:00 2001 From: Cheryl Craig Date: Fri, 18 Apr 2025 16:51:37 -0600 Subject: [PATCH] Remove unnecessary check npes>1 --- src/data/ref_pres.F90 | 12 +++++------- src/dynamics/utils/vert_coord.F90 | 6 ++---- src/physics/utils/physics_grid.F90 | 14 ++++++-------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/data/ref_pres.F90 b/src/data/ref_pres.F90 index 4cc34cbbb..4736ea0ab 100644 --- a/src/data/ref_pres.F90 +++ b/src/data/ref_pres.F90 @@ -94,13 +94,11 @@ subroutine ref_pres_readnl(nlfile) end if end if - if (npes > 1) then - ! Broadcast namelist variables - call mpi_bcast(trop_cloud_top_press, 1, mpi_real8, masterprocid, mpicom, ierr) - call mpi_bcast(clim_modal_aero_top_press, 1, mpi_real8, masterprocid, mpicom, ierr) - call mpi_bcast(do_molec_press, 1, mpi_real8, masterprocid, mpicom, ierr) - call mpi_bcast(molec_diff_bot_press, 1, mpi_real8, masterprocid, mpicom, ierr) - endif + ! Broadcast namelist variables + call mpi_bcast(trop_cloud_top_press, 1, mpi_real8, masterprocid, mpicom, ierr) + call mpi_bcast(clim_modal_aero_top_press, 1, mpi_real8, masterprocid, mpicom, ierr) + call mpi_bcast(do_molec_press, 1, mpi_real8, masterprocid, mpicom, ierr) + call mpi_bcast(molec_diff_bot_press, 1, mpi_real8, masterprocid, mpicom, ierr) end subroutine ref_pres_readnl diff --git a/src/dynamics/utils/vert_coord.F90 b/src/dynamics/utils/vert_coord.F90 index 83cc7ef47..d7334edf6 100644 --- a/src/dynamics/utils/vert_coord.F90 +++ b/src/dynamics/utils/vert_coord.F90 @@ -67,10 +67,8 @@ subroutine vert_coord_readnl(nlfile) end if end if - if (npes > 1) then - ! Broadcast namelist variables - call mpi_bcast(pver, 1, mpi_integer, masterprocid, mpicom, ierr) - endif + ! Broadcast namelist variables + call mpi_bcast(pver, 1, mpi_integer, masterprocid, mpicom, ierr) end subroutine vert_coord_readnl diff --git a/src/physics/utils/physics_grid.F90 b/src/physics/utils/physics_grid.F90 index 8dd3dca33..aad15594a 100644 --- a/src/physics/utils/physics_grid.F90 +++ b/src/physics/utils/physics_grid.F90 @@ -285,14 +285,12 @@ subroutine phys_grid_init(hdim1_d_in, hdim2_d_in, dycore_name_in, & file=__FILE__, line=__LINE__) ! We need a global minimum longitude and latitude - if (npes > 1) then - temp = lonmin - call MPI_allreduce(temp, lonmin, 1, MPI_INTEGER, MPI_MIN, & - mpicom, ierr) - temp = latmin - call MPI_allreduce(temp, latmin, 1, MPI_INTEGER, MPI_MIN, & - mpicom, ierr) - end if + temp = lonmin + call MPI_allreduce(temp, lonmin, 1, MPI_INTEGER, MPI_MIN, & + mpicom, ierr) + temp = latmin + call MPI_allreduce(temp, latmin, 1, MPI_INTEGER, MPI_MIN, & + mpicom, ierr) ! Create lon coord map which only writes from one of each unique lon where(latvals == latmin) coord_map(:) = grid_map(3, :)