Skip to content

Commit

Permalink
Merge pull request #424 from NCAR/master
Browse files Browse the repository at this point in the history
Fix
  • Loading branch information
arbennett authored Sep 9, 2020
2 parents 079d249 + 1c3b230 commit 5280041
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions build/source/engine/read_attrb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ subroutine read_dimension(attrFile,fileGRU,fileHRU,nGRU,nHRU,err,message,startGR

! locals
integer(i4b) :: sGRU ! starting GRU
integer(i4b) :: iHRU ! HRU counting index
integer(i4b) :: jHRU ! HRU index within GRU
integer(i4b) :: iHRU ! HRU couinting index
integer(i4b) :: iGRU ! GRU loop index
integer(8),allocatable :: gru_id(:),hru_id(:)! read gru/hru IDs in from attributes file
integer(8),allocatable :: hru2gru_id(:) ! read hru->gru mapping in from attributes file
Expand Down Expand Up @@ -181,12 +180,9 @@ subroutine read_dimension(attrFile,fileGRU,fileHRU,nGRU,nHRU,err,message,startGR
index_map(1)%localHRU_ix = hru_ix(1) ! index of hru within the gru

else ! anything other than a single HRU run

do iGRU = 1,nGRU
do jHRU = 1,gru_struc(iGRU)%hruCount
index_map(gru_struc(iGRU)%hruInfo(jHRU)%hru_nc)%gru_ix = iGRU ! index of gru in run domain to which the hru belongs
index_map(gru_struc(iGRU)%hruInfo(jHRU)%hru_nc)%localHRU_ix = jHRU ! index of hru within the gru
end do ! jHRU = 1,gru_struc(iGRU)%hruCount
index_map(gru_struc(iGRU)%hruInfo(:)%hru_ix)%gru_ix = iGRU ! index of gru in run domain to which the hru belongs
index_map(gru_struc(iGRU)%hruInfo(:)%hru_ix)%localHRU_ix = hru_ix(1:gru_struc(iGRU)%hruCount)! index of hru within the gru
enddo ! iGRU = 1,nGRU

end if ! not checkHRU
Expand Down

0 comments on commit 5280041

Please sign in to comment.