diff --git a/f90/3D_MT/modelParam/modelParamIO.f90 b/f90/3D_MT/modelParam/modelParamIO.f90 index 1220989f..5b3b688a 100644 --- a/f90/3D_MT/modelParam/modelParamIO.f90 +++ b/f90/3D_MT/modelParam/modelParamIO.f90 @@ -83,6 +83,27 @@ end subroutine read_modelParam_HDF5 #endif end interface + ! Read/write ModelParam Vec for Sensitivity Matrix + interface + module subroutine readVec_modelParam_binary(grid,nSigma,m,header,cfile) + implicit none + type(grid_t), target, intent(inout) :: grid + integer, intent(in) :: nSigma + type(modelParam_t), intent(inout) :: m(nSigma) + character(*), intent(in) :: cfile + character(80), intent(out) :: header + end subroutine readVec_modelParam_binary + end interface + + interface + module subroutine writeVec_modelParam_binary(nSigma,m,header,cfile) + implicit none + integer, intent(in) :: nSigma + character(*), intent(in) :: cfile, header + type(modelParam_t), intent(in) :: m(nSigma) + end subroutine writeVec_modelParam_binary + end interface + contains subroutine unsupported_modelParamIO_error(ftype_choice, input_or_output) @@ -209,15 +230,19 @@ module subroutine readVec_modelParam(grid,nSigma,sigma,header,cfile) character(*), intent(out) :: header character(*), intent(in) :: cfile + call readVec_modelParam_binary(grid, nSigma, sigma, header, Cfile) + end subroutine readVec_modelParam module subroutine writeVec_modelParam(nSigma,sigma,header,cfile) - implicit none + implicit none + + integer, intent(in) :: nSigma + character(*), intent(in) :: header, cfile + type(modelParam_t), intent(in) :: sigma(nSigma) - integer, intent(in) :: nSigma - character(*), intent(in) :: header, cfile - type(modelParam_t), intent(in) :: sigma(nSigma) + call writeVec_modelParam_binary(nSigma, sigma, header, cfile) end subroutine writeVec_modelParam diff --git a/f90/MPI/Main_MPI.f90 b/f90/MPI/Main_MPI.f90 index 08e01e66..7f48d1c2 100644 --- a/f90/MPI/Main_MPI.f90 +++ b/f90/MPI/Main_MPI.f90 @@ -2489,9 +2489,9 @@ Subroutine Worker_job(sigma,d) ! compute linearized data functional(s) : L !call Lrows(e0,sigma,dt,stn_index,L) ! 2022.10.06, Liu Zhongyin, Add Azimuth - call Lrows(e0,sigma,dt,stn_index,orient,L) + call Lrows(e0,sigma,dt,stn_index,d%d(per_index)%data(dt_index)%orient(stn_index),L) ! compute linearized data functional(s) : Q - call Qrows(e0,sigma,dt,stn_index,Qzero,Qreal,Qimag) + call Qrows(e0,sigma,dt,d%d(per_index)%data(dt_index)%rx(stn_index),Qzero,Qreal,Qimag) ! clean up the grid elements stored in GridCalc on the ! leader node call deall_rvector(l_E)