Skip to content

Commit f951c93

Browse files
Yujin ZengYujin Zeng
authored andcommitted
fixed a bug in runoff remapping
1 parent 203ee0e commit f951c93

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSroute_GridComp/GEOS_RouteGridComp.F90

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -745,16 +745,9 @@ subroutine create_mapping_handler(tile_pfaf_file, tilegrid, pfaf_tilegrid, rc)
745745
weights = pack(global_frac(:), mask)
746746
deallocate(global_src, global_dst, global_frac)
747747

748-
! mapping form local to global index
749748
nLocal_weights = count(mask)
750-
allocate(srcIndices(nLocal_weights))
751-
do i =1, nLocal_weights
752-
positions = pack([(j, j=1, nt_global)], global_id == local_src(i))
753-
srcIndices(i) = positions(1)
754-
enddo
755-
756-
allocate(factorIndexList(2, nlocal_weights))
757-
factorIndexList(1,:) = srcIndices
749+
allocate(factorIndexList(2, nLocal_weights))
750+
factorIndexList(1,:) = local_src
758751
factorIndexList(2,:) = local_dst
759752
call ESMF_FieldSMMStore(route%field_src, route%field, &
760753
routeHandle=route%routeHandle, &

0 commit comments

Comments
 (0)