Skip to content

Commit 53c63ee

Browse files
committed
Modifies computation of beg/end indices for ghost subgrid units
1 parent bc67638 commit 53c63ee

File tree

1 file changed

+47
-46
lines changed

1 file changed

+47
-46
lines changed

components/elm/src/main/decompInitMod.F90

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2380,52 +2380,7 @@ subroutine decompInit_ghosts(glcmask)
23802380

23812381
if (.not.lateral_connectivity) then
23822382

2383-
! No ghost cells
2384-
procinfo%ncells_ghost = 0
2385-
procinfo%ntunits_ghost = 0
2386-
procinfo%nlunits_ghost = 0
2387-
procinfo%ncols_ghost = 0
2388-
procinfo%npfts_ghost = 0
2389-
procinfo%nCohorts_ghost = 0
2390-
2391-
procinfo%begg_ghost = 0
2392-
procinfo%begt_ghost = 0
2393-
procinfo%begl_ghost = 0
2394-
procinfo%begc_ghost = 0
2395-
procinfo%begp_ghost = 0
2396-
procinfo%begCohort_ghost = 0
2397-
procinfo%endg_ghost = 0
2398-
procinfo%endt_ghost = 0
2399-
procinfo%endl_ghost = 0
2400-
procinfo%endc_ghost = 0
2401-
procinfo%endp_ghost = 0
2402-
procinfo%endCohort_ghost = 0
2403-
2404-
! All = local (as no ghost cells)
2405-
procinfo%ncells_all = procinfo%ncells
2406-
procinfo%ntunits_all = procinfo%ntunits
2407-
procinfo%nlunits_all = procinfo%nlunits
2408-
procinfo%ncols_all = procinfo%ncols
2409-
procinfo%npfts_all = procinfo%npfts
2410-
procinfo%nCohorts_all = procinfo%nCohorts
2411-
2412-
procinfo%begg_all = procinfo%begg
2413-
procinfo%begt_all = procinfo%begt
2414-
procinfo%begl_all = procinfo%begl
2415-
procinfo%begc_all = procinfo%begc
2416-
procinfo%begp_all = procinfo%begp
2417-
procinfo%begCohort_all = procinfo%begCohort
2418-
procinfo%endg_all = procinfo%endg
2419-
procinfo%endt_all = procinfo%endt
2420-
procinfo%endl_all = procinfo%endl
2421-
procinfo%endc_all = procinfo%endc
2422-
procinfo%endp_all = procinfo%endp
2423-
procinfo%endCohort_all = procinfo%endCohort
2424-
2425-
else
2426-
24272383
#if defined(HAVE_MOAB)
2428-
24292384
call get_proc_bounds(begg, endg)
24302385

24312386
tagname = 'nsubgrid'//C_NULL_CHAR
@@ -2528,7 +2483,53 @@ subroutine decompInit_ghosts(glcmask)
25282483
procinfo%endp_all = procinfo%endp + procinfo%npfts_ghost
25292484
procinfo%endCohort_all = procinfo%endCohort + procinfo%nCohorts_ghost
25302485

2531-
#elif defined(USE_PETSC_LIB)
2486+
#else
2487+
! No ghost cells
2488+
procinfo%ncells_ghost = 0
2489+
procinfo%ntunits_ghost = 0
2490+
procinfo%nlunits_ghost = 0
2491+
procinfo%ncols_ghost = 0
2492+
procinfo%npfts_ghost = 0
2493+
procinfo%nCohorts_ghost = 0
2494+
2495+
procinfo%begg_ghost = 0
2496+
procinfo%begt_ghost = 0
2497+
procinfo%begl_ghost = 0
2498+
procinfo%begc_ghost = 0
2499+
procinfo%begp_ghost = 0
2500+
procinfo%begCohort_ghost = 0
2501+
procinfo%endg_ghost = 0
2502+
procinfo%endt_ghost = 0
2503+
procinfo%endl_ghost = 0
2504+
procinfo%endc_ghost = 0
2505+
procinfo%endp_ghost = 0
2506+
procinfo%endCohort_ghost = 0
2507+
2508+
! All = local (as no ghost cells)
2509+
procinfo%ncells_all = procinfo%ncells
2510+
procinfo%ntunits_all = procinfo%ntunits
2511+
procinfo%nlunits_all = procinfo%nlunits
2512+
procinfo%ncols_all = procinfo%ncols
2513+
procinfo%npfts_all = procinfo%npfts
2514+
procinfo%nCohorts_all = procinfo%nCohorts
2515+
2516+
procinfo%begg_all = procinfo%begg
2517+
procinfo%begt_all = procinfo%begt
2518+
procinfo%begl_all = procinfo%begl
2519+
procinfo%begc_all = procinfo%begc
2520+
procinfo%begp_all = procinfo%begp
2521+
procinfo%begCohort_all = procinfo%begCohort
2522+
procinfo%endg_all = procinfo%endg
2523+
procinfo%endt_all = procinfo%endt
2524+
procinfo%endl_all = procinfo%endl
2525+
procinfo%endc_all = procinfo%endc
2526+
procinfo%endp_all = procinfo%endp
2527+
procinfo%endCohort_all = procinfo%endCohort
2528+
#endif
2529+
2530+
else
2531+
2532+
#if defined(USE_PETSC_LIB)
25322533

25332534
call get_proc_bounds(begg, endg)
25342535

0 commit comments

Comments
 (0)