[cig-commits] [commit] devel, master: Added the routine DATA/s362ani/src/read_model_s362ani.f. Currently this routine is called by all CPUs, and we should change it to be called only by the master and broadcast to the other nodes, as we do with read_mantle_model.f90. (db9713e)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:02:12 PST 2014


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

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

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

commit db9713e7d3a1b38f2f4b3af42421ef8ad2ae3620
Author: Jeroen Tromp <jtromp at princeton.edu>
Date:   Mon Jul 23 17:06:55 2007 +0000

    Added the routine DATA/s362ani/src/read_model_s362ani.f. Currently this routine is called by all
    CPUs, and we should change it to be called only by the master and broadcast to the other nodes,
    as we do with read_mantle_model.f90.


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

db9713e7d3a1b38f2f4b3af42421ef8ad2ae3620
 Par_file                         | 12 ++++----
 s362ani/src/read_model_s362ani.f | 60 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 6 deletions(-)

diff --git a/Par_file b/Par_file
index 7227b34..8b0bc86 100644
--- a/Par_file
+++ b/Par_file
@@ -15,12 +15,12 @@ GAMMA_ROTATION_AZIMUTH        = 20.d0
 
 # number of elements at the surface along the two sides of the first chunk
 # (must be 16 * multiple of NPROC below)
-NEX_XI                          = 160  
-NEX_ETA                         = 160 
+NEX_XI                          = 256  
+NEX_ETA                         = 256 
 
 # number of MPI processors along the two sides of the first chunk
-NPROC_XI                        = 5
-NPROC_ETA                       = 5
+NPROC_XI                        = 8
+NPROC_ETA                       = 8
 
 # 1D models with real structure:
 # 1D_isotropic_prem, 1D_transversely_isotropic_prem, 1D_iasp91, 1D_1066a, 1D_ak135, 1D_ref
@@ -45,7 +45,7 @@ ATTENUATION                     = .true.
 ABSORBING_CONDITIONS            = .false.
 
 # record length in minutes
-RECORD_LENGTH_IN_MINUTES        = 1.0d0
+RECORD_LENGTH_IN_MINUTES        = 60.0d0
 
 # save AVS or OpenDX movies
 MOVIE_SURFACE                   = .false.
@@ -54,7 +54,7 @@ NTSTEP_BETWEEN_FRAMES           = 100
 HDUR_MOVIE                      = 0.d0
 
 # save mesh files to check the mesh
-SAVE_MESH_FILES                 = .true.
+SAVE_MESH_FILES                 = .false.
 
 # restart files (number of runs can be 1, 2 or 3, choose 1 for no restart files)
 NUMBER_OF_RUNS                  = 1
diff --git a/s362ani/src/read_model_s362ani.f b/s362ani/src/read_model_s362ani.f
new file mode 100644
index 0000000..32b3aca
--- /dev/null
+++ b/s362ani/src/read_model_s362ani.f
@@ -0,0 +1,60 @@
+         subroutine read_model_s362ani(THREE_D_MODEL,
+     #            THREE_D_MODEL_S362ANI,THREE_D_MODEL_S362WMANI,
+     #            THREE_D_MODEL_S362ANI_PREM,THREE_D_MODEL_S29EA)
+
+        implicit none
+
+        integer THREE_D_MODEL,THREE_D_MODEL_S362ANI
+        integer THREE_D_MODEL_S362WMANI
+        integer THREE_D_MODEL_S362ANI_PREM,THREE_D_MODEL_S29EA
+
+        integer lu
+        character*128 modeldef
+        logical exists
+        integer numvar
+        integer lnblnk,ierror
+
+        include 'mod.h'
+
+c -------------------------------------
+
+        lu=1                    ! --- log unit: input 3-D model 
+        if(THREE_D_MODEL .eq. THREE_D_MODEL_S362ANI) then
+          modeldef='DATA/s362ani/S362ANI'
+        elseif(THREE_D_MODEL .eq. THREE_D_MODEL_S362WMANI) then
+          modeldef='DATA/s362ani/S362WMANI'
+        elseif(THREE_D_MODEL .eq. THREE_D_MODEL_S362ANI_PREM) then
+          modeldef='DATA/s362ani/S362ANI_PREM'
+        elseif(THREE_D_MODEL .eq. THREE_D_MODEL_S29EA) then
+          modeldef='DATA/s362ani/S2.9EA'
+        else
+          stop 'unknown 3D model in read_model_s362ani'
+        endif
+        inquire(file=modeldef,exist=exists)
+        if(exists) then
+          call gt3dmodl(lu,modeldef,
+     #      maxhpa,maxker,maxcoe,
+     #      numhpa,numker,numcoe,lmxhpa,
+     #      ihpakern,itypehpa,coe,
+     #      itpspl,xlaspl,xlospl,radspl,
+     #      numvar,ivarkern,varstr,
+     #      refmdl,kerstr,hsplfl,dskker,ierror)
+        else
+          write(6,"('the model ',a,' does not exits')")
+     #           modeldef(1:lnblnk(modeldef))
+        endif
+
+c         --- check arrays
+
+        if(numker.gt.maxker) stop 'numker.gt.maxker'
+        do ihpa=1,numhpa
+          if(itypehpa(ihpa).eq.1) then
+            if(lmxhpa(ihpa).gt.maxl) stop 'lmxhpa(ihpa).gt.maxl'
+          else if(itypehpa(ihpa).eq.2) then
+            if(numcoe(ihpa).gt.maxcoe) stop 'numcoe(ihpa).gt.maxcoe'
+          else
+            stop 'problem with itypehpa'
+          endif
+        enddo
+
+        end



More information about the CIG-COMMITS mailing list