Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
multi-interval regotracking works!!!!
  • Loading branch information
Austin Blevins committed May 30, 2023
1 parent 5e1d1b5 commit 7c350de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
19 changes: 5 additions & 14 deletions src/io/io_read_regotrack.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ subroutine io_read_regotrack(user,surf,domain)
type(regodatatype) :: newsurfi
integer(I4B) :: ioerr,i,j,k,q,itmp,N
integer(kind=8) :: recsize
logical :: initstat
logical :: initstat

! Executable code

Expand Down Expand Up @@ -118,16 +118,15 @@ subroutine io_read_regotrack(user,surf,domain)
stop
end if

! Start pushing regolith thickness and melt fraction of each layer in FILO manner

! Start pushing regolith thickness and melt fraction of each layer
allocate(newsurfi%meltdist(1+domain%rcnum))
allocate(newsurfi%distvol(1+domain%rcnum))

do j=1,user%gridsize
do i=1,user%gridsize

!call util_init_list(surf(i,j)%regolayer,initstat)
call util_init_array(user,surf(i,j)%regolayer,domain,initstat)
!call util_init_array(user,surf(i,j)%regolayer,domain,initstat)
N = stacks_num(i,j)
allocate(meltvolume(N),thickness(N),comp(N),age(MAXAGEBINS,N),distvol(1+domain%rcnum,N),ejm(N),ejmf(N),&
meltfrac(N),meltdist(1+domain%rcnum,N))
Expand All @@ -152,11 +151,9 @@ subroutine io_read_regotrack(user,surf,domain)
end do

end do




do k=max(stacks_num(i,j),1),1,-1
!do k=max(stacks_num(i,j),1),1,-1
do k=1,max(stacks_num(i,j),1),1
newsurfi%thickness = thickness(k)
newsurfi%comp = comp(k)
newsurfi%meltfrac = meltfrac(k)
Expand All @@ -171,12 +168,6 @@ subroutine io_read_regotrack(user,surf,domain)
newsurfi%meltdist(q) = meltdist(q,k)
newsurfi%distvol(q) = distvol(q,k)
end do
! if (j .eq. 1) then
! if (i .eq. 1) then
! !write(*,*) meltdist(:,k)
! write(*,*) newsurfi%meltdist
! end if
! end if
call util_push_array(surf(i,j)%regolayer,newsurfi)
end do

Expand Down
1 change: 0 additions & 1 deletion src/io/io_write_regotrack.f90
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ subroutine io_write_regotrack(user,surf,domain)
meltdist(:,k) = current(k)%meltdist(:)
ejm(k) = current(k)%ejm
ejmf(k) = current(k)%ejmf

end do
deallocate(current)
write(FMELT) meltvolume(:)
Expand Down

0 comments on commit 7c350de

Please sign in to comment.