Skip to content

Commit

Permalink
Removed obsolete tally components.
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Dec 6, 2016
1 parent 8f1089d commit 81473d0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 60 deletions.
33 changes: 0 additions & 33 deletions src/io/io_read_surf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ subroutine io_read_surf(user,surf)
end do
close(LUN)

recsize = sizeof(itmp) * user%gridsize * user%gridsize
open(LUN,file=RIMFILE,status='old',form='unformatted',recl=recsize,access='direct',iostat=ioerr)
if (ioerr/=0) then
write(*,*) 'Error! Cannot read file ',trim(adjustl(RIMFILE))
stop
end if
do i=1,user%numlayers
read(LUN,rec=i) surf%isrim(i)
end do
close(LUN)

recsize = sizeof(stmp) * user%gridsize * user%gridsize
open(LUN,file=POSFILE,status='old',form='unformatted',recl=recsize,access='direct',iostat=ioerr)
if (ioerr/=0) then
Expand All @@ -89,28 +78,6 @@ subroutine io_read_surf(user,surf)
end do
close(LUN)

recsize = sizeof(stmp) * user%gridsize * user%gridsize
open(LUN,file=ELEVFILE,status='old',form='unformatted',recl=recsize,access='direct',iostat=ioerr)
if (ioerr/=0) then
write(*,*) 'Error! Cannot read file ',trim(adjustl(ELEVFILE))
stop
end if
do i=1,user%numlayers
read(LUN,rec=i) surf%original_depth(i)
end do
close(LUN)

recsize = sizeof(stmp) * user%gridsize * user%gridsize
open(LUN,file=BASEFILE,status='old',form='unformatted',recl=recsize,access='direct',iostat=ioerr)
if (ioerr/=0) then
write(*,*) 'Error! Cannot read file ',trim(adjustl(BASEFILE))
stop
end if
do i=1,user%numlayers
read(LUN,rec=i) surf%baseline(i)
end do
close(LUN)

if (user%doregotrack) call io_read_regotrack(user,surf)

!if (user%docrustal_thinning) then
Expand Down
21 changes: 0 additions & 21 deletions src/io/io_write_surf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ subroutine io_write_surf(user,surf)
end do
close(LUN)

recsize = sizeof(itmp) * user%gridsize * user%gridsize
open(LUN,file=RIMFILE,status='replace',form='unformatted',recl=recsize,access='direct')
do i=1,user%numlayers
write(LUN,rec=i) surf%isrim(i)
end do
close(LUN)

recsize = sizeof(stmp) * user%gridsize * user%gridsize
open(LUN,file=POSFILE,status='replace',form='unformatted',recl=recsize,access='direct')
do i=1,user%numlayers
Expand All @@ -68,20 +61,6 @@ subroutine io_write_surf(user,surf)
end do
close(LUN)

recsize = sizeof(stmp) * user%gridsize * user%gridsize
open(LUN,file=ELEVFILE,status='replace',form='unformatted',recl=recsize,access='direct')
do i=1,user%numlayers
write(LUN,rec=i) surf%original_depth(i)
end do
close(LUN)

recsize = sizeof(stmp) * user%gridsize * user%gridsize
open(LUN,file=BASEFILE,status='replace',form='unformatted',recl=recsize,access='direct')
do i=1,user%numlayers
write(LUN,rec=i) surf%baseline(i)
end do
close(LUN)

if (user%doregotrack) then
!call io_write_regodist(user,surf)
call io_write_regotrack(user,surf)
Expand Down
8 changes: 4 additions & 4 deletions src/io/io_write_tally.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
!**********************************************************************************************************************************


subroutine io_write_tally(tdist,tlist,odist,olist,oposlist,original_depth,current_depth,deviation_sigma,p_score)
subroutine io_write_tally(tdist,tlist,odist,olist,oposlist,depthdiam)
use module_globals
use module_io, EXCEPT_THIS_ONE => io_write_tally
implicit none
Expand All @@ -27,7 +27,7 @@ subroutine io_write_tally(tdist,tlist,odist,olist,oposlist,original_depth,curren
real(DP),dimension(:,:),intent(in) :: tdist,tlist,odist
real(DP),dimension(:),intent(in) :: olist
real(SP),dimension(:,:),intent(in) :: oposlist
real(SP),dimension(:),intent(in) :: original_depth,current_depth,deviation_sigma,p_score
real(SP),dimension(:),intent(in) :: depthdiam

! Internals
integer(I4B) :: i,distl,distc,ioerr,onum
Expand Down Expand Up @@ -74,10 +74,10 @@ subroutine io_write_tally(tdist,tlist,odist,olist,oposlist,original_depth,curren
close(LUN)

open(LUN, FILE=OLISTFILE, status='REPLACE')
write(LUN,'("#Dcrat(m) xpos(m) ypos(m) origdepth(m) currdepth(m) devsigma pscore")' )
write(LUN,'("#Dcrat(m) xpos(m) ypos(m) depth/diam")' )
do i=1,onum

write(LUN,2000) olist(i),oposlist(:,i),original_depth(i),current_depth(i),deviation_sigma(i),p_score(i)
write(LUN,2000) olist(i),oposlist(:,i),depthdiam(i)
end do
close(LUN)

Expand Down
4 changes: 2 additions & 2 deletions src/io/module_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@ end subroutine io_write_dist
end interface

interface
subroutine io_write_tally(tdist,tlist,odist,olist,oposlist,original_depth,current_depth,deviation_sigma,p)
subroutine io_write_tally(tdist,tlist,odist,olist,oposlist,depthdiam)
use module_globals
implicit none
real(DP),dimension(:,:),intent(in) :: tdist,tlist,odist
real(DP),dimension(:),intent(in) :: olist
real(SP),dimension(:,:),intent(in) :: oposlist
real(SP),dimension(:),intent(in) :: original_depth,current_depth,deviation_sigma,p
real(SP),dimension(:),intent(in) :: depthdiam
end subroutine io_write_tally
end interface

Expand Down

0 comments on commit 81473d0

Please sign in to comment.