[cig-commits] [commit] master: Dump timestep zero as well (290927f)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Aug 25 05:48:32 PDT 2014


Repository : https://github.com/geodynamics/axisem

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/d5f53bf9c3506c77131176349d5694c0618b5edc...4fdc3be0b9163702cd293f978f30a53c8313fa17

>---------------------------------------------------------------

commit 290927f72dbac611b121aa7af0549759eef06496
Author: Simon Stähler <staehler at geophysik.uni-muenchen.de>
Date:   Mon Aug 25 14:47:12 2014 +0200

    Dump timestep zero as well
    
     - True for all three dump types (seismograms, xdmf/vtk and kernel dumps)


>---------------------------------------------------------------

290927f72dbac611b121aa7af0549759eef06496
 SOLVER/nc_routines.F90    |  2 +-
 SOLVER/parameters.F90     |  6 +++---
 SOLVER/time_evol_wave.F90 | 12 +++++++++---
 3 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/SOLVER/nc_routines.F90 b/SOLVER/nc_routines.F90
index 16343eb..f47d398 100644
--- a/SOLVER/nc_routines.F90
+++ b/SOLVER/nc_routines.F90
@@ -1328,7 +1328,7 @@ subroutine nc_define_outputfile(nrec, rec_names, rec_th, rec_th_req, rec_ph, rec
         end do
 
         ! Write out seismogram dump times
-        time_seis = dble([ (i, i = 1, nseismo) ]) * deltat
+        time_seis = dble([ (i, i = 0, nseismo-1) ]) * deltat
         call check( nf90_put_var( ncid_recout, nc_time_varid, values = time_seis ) ) 
         if (verbose > 1) write(6,*) '...done'
 
diff --git a/SOLVER/parameters.F90 b/SOLVER/parameters.F90
index aa448fd..df451f2 100644
--- a/SOLVER/parameters.F90
+++ b/SOLVER/parameters.F90
@@ -887,7 +887,7 @@ subroutine compute_numerical_parameters
   endif
   deltat_coarse = seis_dt
 
-  nseismo = floor(real(niter) / real(seis_it))
+  nseismo = ceiling(real(niter) / real(seis_it)) 
 
   ! Frequency of checkpointing. Hardcoded to every 5% of runtime
   check_it = niter / 20
@@ -904,7 +904,7 @@ subroutine compute_numerical_parameters
   if (dump_vtk .or. dump_xdmf .or. dump_memory_vars) then
      snap_it = floor(snap_dt / deltat)
      open(unit=2900+mynum, file=datapath(1:lfdata)//'/snap_info.dat'//appmynum)
-     nsnap = floor(real(niter) / real(snap_it))
+     nsnap = ceiling(real(niter) / real(snap_it)) 
      
      write(2900+mynum,*) nsnap 
      do ielem=1, nsnap
@@ -1047,7 +1047,7 @@ subroutine compute_numerical_parameters
   ! strain tensor output, convert from num of dumps per period into 
   ! incremental time steps
   if (dump_wavefields) then
-     nstrain = floor(real(niter)/real(strain_it))
+     nstrain = ceiling(real(niter)/real(strain_it)) + 1
 
      open(unit=2900+mynum,file=datapath(1:lfdata)//'/strain_info.dat'//appmynum)
      write(2900+mynum,*) nstrain 
diff --git a/SOLVER/time_evol_wave.F90 b/SOLVER/time_evol_wave.F90
index 863c0b4..b2214de 100644
--- a/SOLVER/time_evol_wave.F90
+++ b/SOLVER/time_evol_wave.F90
@@ -326,6 +326,10 @@ subroutine sf_time_loop_newmark
   if (verbose > 1) write(69,*) &
         '************ S T A R T I N G   T I M E   L O O P *************'
 
+  iclockdump = tick()
+  call dump_stuff(0, iseismo, istrain, isnap, disp, velo, chi, dchi, ddchi0, t)
+  iclockdump = tick(id=iddump, since=iclockdump)
+
   do iter = 1, niter
 
      t = t + deltat
@@ -532,6 +536,10 @@ subroutine symplectic_time_loop
   if (verbose > 1) write(69,*) &
         '*********** S T A R T I N G   T I M E   L O O P ************'
 
+  iclockdump = tick()
+  call dump_stuff(0, iseismo, istrain, isnap, disp,velo,chi,dchi,ddchi,t)
+  iclockdump = tick(id=iddump, since=iclockdump)
+
   do iter=1, niter
 
      t = t + deltat
@@ -646,8 +654,6 @@ subroutine symplectic_time_loop
            velo(:,:,:,3) = velo(:,:,:,3) - acc(:,:,:,3) * coefv(i) * inv_mass_rho
         endif
 
-        !call dump_stuff(iter * nstages + i,disp,velo,chi,dchi,ddchi,subdt(i))
-
      enddo ! ... nstages substages
 
 
@@ -1113,7 +1119,7 @@ subroutine dump_stuff(iter, iseismo, istrain, isnap,     &
 
   if (dump_wavefields) then
 
-    if (mod(iter,strain_it)==0 .or. iter==0) then
+    if (mod(iter,strain_it)==0) then
 
       ! dump displacement and velocity in each surface element
       ! for netcdf people set .true. in inparam to use it instead of the standard



More information about the CIG-COMMITS mailing list