This commit is contained in:
Hongjian 2020-04-19 07:52:07 -04:00
parent 9aead30bf2
commit b657c68d28
4 changed files with 19 additions and 13 deletions

View File

@ -1098,6 +1098,7 @@ subroutine CalSurfG(nx,ny,nz,nparpi,vels,iw,rw,col,dsurf, &
if(kmaxRc.gt.0) then if(kmaxRc.gt.0) then
iwave=2 iwave=2
igr=0 igr=0
print*,'Rayleigh wave phase velocity depth kernel'
call depthkernel(nx,ny,nz,vels,pvRc,sen_vsRc,sen_vpRc, & call depthkernel(nx,ny,nz,vels,pvRc,sen_vsRc,sen_vpRc, &
sen_rhoRc,iwave,igr,kmaxRc,tRc,depz,minthk) sen_rhoRc,iwave,igr,kmaxRc,tRc,depz,minthk)
endif endif
@ -1109,6 +1110,7 @@ subroutine CalSurfG(nx,ny,nz,nparpi,vels,iw,rw,col,dsurf, &
call caldespersion(nx,ny,nz,vels,pvRc, & call caldespersion(nx,ny,nz,vels,pvRc, &
iwave,igr,kmax,tRg,depz,minthk) iwave,igr,kmax,tRg,depz,minthk)
igr=1 igr=1
print*,'Rayleigh wave group velocity depth kernel'
call depthkernel(nx,ny,nz,vels,pvRg,sen_vsRg,sen_vpRg, & call depthkernel(nx,ny,nz,vels,pvRg,sen_vsRg,sen_vpRg, &
sen_rhoRg,iwave,igr,kmaxRg,tRg,depz,minthk) sen_rhoRg,iwave,igr,kmaxRg,tRg,depz,minthk)
endif endif
@ -1377,9 +1379,9 @@ subroutine CalSurfG(nx,ny,nz,nparpi,vels,iw,rw,col,dsurf, &
! !
if (igrt(srcnum,knumi) == 0 .or. (ig == 2 .and. igrt(srcnum,knumi) == 1)) then if (igrt(srcnum,knumi) == 0 .or. (ig == 2 .and. igrt(srcnum,knumi) == 1)) then
! a little stupid, remember to change latter ! a little stupid, remember to change latter
if (igrt(srcnum,knumi) == 1) then !if (igrt(srcnum,knumi) == 1) then
call gridder(velf0) !call gridder(velf0)
endif !endif
count11=count11+1 count11=count11+1
CALL rpaths(x,z,fdm,rcxf(istep,srcnum,knumi),rczf(istep,srcnum,knumi)) CALL rpaths(x,z,fdm,rcxf(istep,srcnum,knumi),rczf(istep,srcnum,knumi))
row(1:nparpi)=0.0 row(1:nparpi)=0.0

View File

@ -1,6 +1,6 @@
CMD = DSurfTomo CMD = DSurfTomo
FC = gfortran FC = gfortran
FFLAGS = -O3 -ffixed-line-length-none -ffloat-store\ FFLAGS = -O -ffixed-line-length-none -ffloat-store\
-fbounds-check -m64 -mcmodel=medium -fbounds-check -m64 -mcmodel=medium
F90SRCS = lsmrDataModule.f90 lsmrblasInterface.f90\ F90SRCS = lsmrDataModule.f90 lsmrblasInterface.f90\
lsmrblas.f90 lsmrModule.f90 delsph.f90\ lsmrblas.f90 lsmrModule.f90 delsph.f90\

View File

@ -289,6 +289,7 @@ program SurfTomo
close(87) close(87)
allocate(depz(nz), stat=checkstat) allocate(depz(nz), stat=checkstat)
maxnar = spfra*dall*nx*ny*nz!sparsity fraction maxnar = spfra*dall*nx*ny*nz!sparsity fraction
if (maxnar<0) print*, 'number overflow, decrease your sparsefrac'
maxvp = (nx-2)*(ny-2)*(nz-1) maxvp = (nx-2)*(ny-2)*(nz-1)
allocate(dv(maxvp),dvsub(maxvp),dvstd(maxvp),dvall(maxvp*nrealizations), stat=checkstat) allocate(dv(maxvp),dvsub(maxvp),dvstd(maxvp),dvall(maxvp*nrealizations), stat=checkstat)
! allocate(dvall(maxvp*nrealizations),stats=checkstat) ! allocate(dvall(maxvp*nrealizations),stats=checkstat)
@ -416,6 +417,7 @@ program SurfTomo
lenrw = nar lenrw = nar
iw(1)=nar iw(1)=nar
iw(nar+2:2*nar+1) = col(1:nar) iw(nar+2:2*nar+1) = col(1:nar)
print*,'no. of nonzero:',nar,minval(cbst),maxval(cbst)
!$omp parallel & !$omp parallel &
!$omp default(private) & !$omp default(private) &
!$omp shared(leniw,lenrw,iw,rw,cbst,goxd,gozd,dvxd,dvzd,depz,maxvp) & !$omp shared(leniw,lenrw,iw,rw,cbst,goxd,gozd,dvxd,dvzd,depz,maxvp) &
@ -497,8 +499,10 @@ program SurfTomo
leniw = 2*nar+1 leniw = 2*nar+1
lenrw = nar lenrw = nar
dv = 0 dv = 0
atol = 1e-4 !atol = 1e-4
btol = 1e-4 !btol = 1e-4
atol = 1e-3/((dvxd+dvzd)*111.19/2.0*0.1) !1e-2
btol = 1e-3/(dvxd*nx*111.19/3.0)!1e-3
conlim = 100 conlim = 100
itnlim = 400 itnlim = 400
istop = 0 istop = 0

View File

@ -140,8 +140,8 @@ subroutine voronoiproj(leniw,lenrw,iw,rw,dres,goxd,dvxd,gozd,dvzd,depz,&
conlim = 50 conlim = 50
itnlim = 100 itnlim = 100
atol = 1e-2 atol = 1e-3/((dvxd+dvzd)*111.19/2.0*0.1) !1e-2
btol = 1e-3 btol = 1e-3/(dvxd*nx*111.19/3.0)!1e-3
istop = 0 istop = 0
anorm = 0.0 anorm = 0.0
acond = 0.0 acond = 0.0
@ -152,14 +152,14 @@ subroutine voronoiproj(leniw,lenrw,iw,rw,dres,goxd,dvxd,gozd,dvzd,depz,&
! using lsmr to solve for the projection coefficients ! using lsmr to solve for the projection coefficients
!print*, 'LSMR beginning ...' !print*, 'LSMR beginning ...'
nout = -1 !nout = -1
!nout = 36 nout = 36
!open(nout,file='lsmrout_sub.txt') open(nout,file='lsmrout_sub.txt')
call LSMR(nd, ncells, leniwgp, lenrwgp,iwgp,rwgp,dres,damp,& call LSMR(nd, ncells, leniwgp, lenrwgp,iwgp,rwgp,dres,damp,&
atol, btol, conlim, itnlim, localSize,nout,& atol, btol, conlim, itnlim, localSize,nout,&
xunknown, istop, itn, anorm, acond,rnorm, arnorm, xnorm) xunknown, istop, itn, anorm, acond,rnorm, arnorm, xnorm)
!close(nout) close(nout)
do ii = 1,ncells do ii = 1,ncells
xunknown(ii) = xunknown(ii)/norm(ii) xunknown(ii) = xunknown(ii)/norm(ii)
enddo enddo