[cig-commits] [commit] master: moving define_io_appendix to data_io (ffcd02b)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Oct 17 05:30:08 PDT 2014


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

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/607f803cf074063627513d235f9ed0837fc1dd44...b6457db24acdde4a4e1c08935ae1b22adf87f5bf

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

commit ffcd02b8674e6cc64e41098fe677a7d9ff9dea76
Author: martinvandriel <vandriel at erdw.ethz.ch>
Date:   Thu Oct 16 20:16:25 2014 +0200

    moving define_io_appendix to data_io


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

ffcd02b8674e6cc64e41098fe677a7d9ff9dea76
 SOLVER/commun.F90  |  9 +++++----
 SOLVER/data_io.f90 | 16 ++++++++++++++++
 SOLVER/main.f90    | 22 +++-------------------
 3 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/SOLVER/commun.F90 b/SOLVER/commun.F90
index 9c32b32..2edf8d2 100644
--- a/SOLVER/commun.F90
+++ b/SOLVER/commun.F90
@@ -318,8 +318,8 @@ end subroutine assembmass_sum_solid
 subroutine assembmass_sum_fluid(f1,res)
 
   use data_mesh,   only: igloc_fluid
-  use data_mesh,        only: gvec_fluid
-  use data_mesh,        only: gvec_solid, npol, nel_fluid
+  use data_mesh,   only: gvec_fluid
+  use data_mesh,   only: gvec_solid, npol, nel_fluid
   
   real(kind=realkind), intent(in)   :: f1(0:,0:,:)
   real(kind=dp)   , intent(out)     :: res
@@ -350,8 +350,9 @@ end subroutine assembmass_sum_fluid
 !-----------------------------------------------------------------------------------------
 subroutine pinit
 
-  integer ioerr, nproc_mesh
-  character(len=20) dbname
+  use data_io, only: define_io_appendix
+  integer           :: ioerr, nproc_mesh
+  character(len=20) :: dbname
  
   ! Get mesh number of processors
 
diff --git a/SOLVER/data_io.f90 b/SOLVER/data_io.f90
index d21ec5d..f13fc27 100644
--- a/SOLVER/data_io.f90
+++ b/SOLVER/data_io.f90
@@ -76,5 +76,21 @@ module data_io
   character(len=80), dimension(:), allocatable :: fname_rec_seis
   character(len=80), dimension(:), allocatable :: fname_rec_velo
 
+contains
+
+!-----------------------------------------------------------------------------------------
+subroutine define_io_appendix(app, iproc)
+  ! Defines the 4 digit character string appended to any 
+  ! data or io file related to process myid. 
+
+  implicit none
+  integer, intent(in)           :: iproc
+  character(len=4), intent(out) :: app
+  
+  write(app,"(I4.4)") iproc
+
+end subroutine define_io_appendix
+!-----------------------------------------------------------------------------------------
+
 end module data_io
 !=========================================================================================
diff --git a/SOLVER/main.f90 b/SOLVER/main.f90
index 9ed7fbe..701c8de 100644
--- a/SOLVER/main.f90
+++ b/SOLVER/main.f90
@@ -34,7 +34,7 @@ program axisem
   use time_evol_wave, only : prepare_waves, time_loop
   use commun,         only : pinit, pend, barrier
   use meshes_io,      only : finish_xdmf_xml
-  use data_io,        only : verbose
+  use data_io,        only : verbose, define_io_appendix
   use clocks_mod,     only : start_clock, end_clock
   
   implicit none
@@ -44,10 +44,9 @@ program axisem
   call read_inparam_basic_verbosity ! parameters
   if (lpr .and. verbose >= 1) write(6,'(/,a,/)') ' MAIN: Welcome to AxiSEM!'
 
-  call define_io_appendix(appmynum,mynum)
-  call define_io_appendix(appnproc,nproc)
+  call define_io_appendix(appmynum, mynum)
+  call define_io_appendix(appnproc, nproc)
   
-  !call get_mesh_params !Get very basic mesh params, including pol. order, needed later
   call open_local_output_file ! parameters, open file for processor-specific screen output 
   call start_clock !clocks
 
@@ -112,18 +111,3 @@ program axisem
 
 end program axisem
 !=========================================================================================
-
-
-!-----------------------------------------------------------------------------------------
-subroutine define_io_appendix(app, iproc)
-  ! Defines the 4 digit character string appended to any 
-  ! data or io file related to process myid. 
-
-  implicit none
-  integer, intent(in)           :: iproc
-  character(len=4), intent(out) :: app
-  
-  write(app,"(I4.4)") iproc
-
-end subroutine define_io_appendix
-!-----------------------------------------------------------------------------------------



More information about the CIG-COMMITS mailing list