Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions f90/3D_MT/modelParam/modelParamIO.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions f90/MPI/Main_MPI.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading