Skip to content

Commit

Permalink
Add CESMCOUPLED back in
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-seaice committed May 3, 2024
1 parent daf234a commit de9378f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cicecore/cicedyn/infrastructure/ice_domain.F90
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,21 @@ subroutine init_domain_blocks
call broadcast_scalar(ny_global, master_task)

! Set nprocs if not set in namelist
#ifdef CESMCOUPLED
nprocs = get_num_procs()
#else
if (nprocs == -1) then
nprocs = get_num_procs()
else if (nprocs /= get_num_procs()) then
write(nu_diag,*) subname,' ERROR: nprocs, get_num_procs = ',nprocs,get_num_procs()
call abort_ice(subname//' ERROR: Input nprocs not same as system request', file=__FILE__, line=__LINE__)
endif
#endif

! Determine max_blocks if not set
if (max_blocks < 1) then
max_blocks=( ((nx_global-1)/block_size_x + 1) * &
((ny_global-1)/block_size_y + 1) - 1) / nprocs + 1
max_blocks=(((nx_global-1)/block_size_x + 1) * &
((ny_global-1)/block_size_y + 1) - 1) / nprocs + 1
max_blocks=max(1,max_blocks)
if (my_task == master_task) then
write(nu_diag,'(/,a52,i6,/)') &
Expand Down

0 comments on commit de9378f

Please sign in to comment.