Skip to content

Commit

Permalink
Issue 714 Bugfix: need to check if optional arguments are present bef…
Browse files Browse the repository at this point in the history
…ore assigning them to a variable
  • Loading branch information
scrasmussen committed Oct 9, 2023
1 parent 5d9e489 commit de61ef9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/MPP/mpp_land.F
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,18 @@ subroutine LOG_MAP2d()
end subroutine log_map2d


!old subroutine MPP_LAND_INIT(flag, ew_numprocs, sn_numprocs)
subroutine MPP_LAND_INIT(in_global_nx,in_global_ny)
! ### initialize the land model logically based on the two D method.
! ### Call this function directly if it is nested with WRF.
implicit none
integer, optional :: in_global_nx, in_global_ny
integer :: ierr, provided
integer :: ew_numprocs, sn_numprocs ! input the processors in x and y direction.
logical mpi_inited

global_nx = in_global_nx
global_ny = in_global_ny

! left_right_np = ew_numprocs
! up_down_np = sn_numprocs
if (present(in_global_nx) .and. present(in_global_ny)) then
global_nx = in_global_nx
global_ny = in_global_ny
end if

call mpi_initialized( mpi_inited, ierr )
if ( .not. mpi_inited ) then
Expand Down

0 comments on commit de61ef9

Please sign in to comment.