[cig-commits] [commit] master: in case of dipole, transform to s/phi before dumping displacements (a3f12b7)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Sep 16 06:39:20 PDT 2014
Repository : https://github.com/geodynamics/axisem
On branch : master
Link : https://github.com/geodynamics/axisem/compare/3ec28839d7a847c57a8196510ecbcdd02241a1de...a3f12b76845763abf59a1637498a4d30cda282f5
>---------------------------------------------------------------
commit a3f12b76845763abf59a1637498a4d30cda282f5
Author: martinvandriel <martin at vandriel.de>
Date: Tue Sep 16 15:38:34 2014 +0200
in case of dipole, transform to s/phi before dumping displacements
incrementing file version number of the netcdf file, as this requires changes to the
kerner
>---------------------------------------------------------------
a3f12b76845763abf59a1637498a4d30cda282f5
SOLVER/parameters.F90 | 2 +-
SOLVER/wavefields_io.f90 | 18 ++++++++++++++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/SOLVER/parameters.F90 b/SOLVER/parameters.F90
index eb7c856..662e488 100644
--- a/SOLVER/parameters.F90
+++ b/SOLVER/parameters.F90
@@ -1419,7 +1419,7 @@ subroutine write_parameters
if ((mynum.eq.0).and.(use_netcdf)) then !Only proc0 has the netcdf file open at that point
! write generic simulation info file
write(6,*) ' Writing simulation info to netcdf file attributes'
- call nc_write_att_int( 1, 'file version')
+ call nc_write_att_int( 2, 'file version')
call nc_write_att_char( trim(bkgrdmodel), 'background model')
call nc_write_att_dble( router / 1000, 'planet radius')
call nc_write_att_char( trim(svn_version), 'SVN revision')
diff --git a/SOLVER/wavefields_io.f90 b/SOLVER/wavefields_io.f90
index c15a68c..5c34287 100644
--- a/SOLVER/wavefields_io.f90
+++ b/SOLVER/wavefields_io.f90
@@ -919,7 +919,14 @@ subroutine dump_velo_global(v, dchi, istrain)
! sssssssssssss dump velocity vector inside solid ssssssssssssssssssssssssssss
- f = v
+ if (src_type(1) == 'dipole') then
+ ! tranform from +/- coordinates to s/phi
+ f(:,:,:,1) = v(:,:,:,1) + v(:,:,:,2)
+ f(:,:,:,2) = v(:,:,:,1) - v(:,:,:,2)
+ else
+ f = v
+ endif
+
if (src_dump_type == 'mask') then
call eradicate_src_elem_vec_values(f)
end if
@@ -998,7 +1005,14 @@ subroutine dump_disp_global(u, chi, istrain)
! sssssssssssss dump disp vector inside solid ssssssssssssssssssssssssssss
- f = u
+ if (src_type(1) == 'dipole') then
+ ! tranform from +/- coordinates to s/phi
+ f(:,:,:,1) = u(:,:,:,1) + u(:,:,:,2)
+ f(:,:,:,2) = u(:,:,:,1) - u(:,:,:,2)
+ else
+ f = u
+ endif
+
if (src_dump_type == 'mask') then
call eradicate_src_elem_vec_values(f)
end if
More information about the CIG-COMMITS
mailing list