[cig-commits] r12650 - in seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta: . setup src utils

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Fri Aug 15 18:07:06 PDT 2008


Author: dkomati1
Date: 2008-08-15 18:07:06 -0700 (Fri, 15 Aug 2008)
New Revision: 12650

Added:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_auto_ner.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_1248.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2368.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2880.f90
Modified:
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/auto_ner.f90
   seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90
Log:
better mesh design at very high resolution: suppressed the call to auto_NER, which
did not give a very well balanced mesh, and manually designed several meshes
instead and optimized them using OpenDX.
Better scaling of the time step as well.


Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h	2008-08-15 21:59:07 UTC (rev 12649)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/setup/constants.h	2008-08-16 01:07:06 UTC (rev 12650)
@@ -335,11 +335,11 @@
   integer, parameter          :: NRAD_ATTENUATION  = 70000
   double precision, parameter :: TABLE_ATTENUATION = R_EARTH_KM * 10.0d0
 
-! for determination of the attenuation period range
-! if this is set to .true. then the hardcoded values will be used
-! otherwise they are computed automatically from the Number of elements
-! This *may* be a useful parameter for Benchmarking against older versions
-  logical, parameter           :: ATTENUATION_RANGE_PREDEFINED = .false.
+!!!!!!!!!!!!!! for determination of the attenuation period range
+!!!!!!!!!!!!!! if this is set to .true. then the hardcoded values will be used
+!!!!!!!!!!!!!! otherwise they are computed automatically from the number of elements
+!!!!!!!!!!!!!! This *may* be a useful parameter for benchmarking against older versions
+!!!!!!!!!!!!!  logical, parameter           :: ATTENUATION_RANGE_PREDEFINED = .false.
 
 ! flag for the four edges of each slice and for the bottom edge
   integer, parameter :: XI_MIN  = 1

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/auto_ner.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/auto_ner.f90	2008-08-15 21:59:07 UTC (rev 12649)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/auto_ner.f90	2008-08-16 01:07:06 UTC (rev 12650)
@@ -47,7 +47,7 @@
 !  and the core determination was developed.
 !
 
-  subroutine auto_time_stepping(WIDTH,  NEX_MAX, DT)
+  subroutine auto_time_stepping(WIDTH, NEX_MAX, DT)
     implicit none
 
     include 'constants.h'
@@ -150,7 +150,7 @@
     integer,          dimension(NUM_REGIONS-1) :: NER
     integer NEX_ETA
 
-    ! This is PREM in Kilometers, well ... kinda, not really ....
+    ! This is PREM in Kilometers, well ... kind of, not really ....
     radius(1)  = 6371.00d0 ! Surface
     radius(2)  = 6346.60d0 !    Moho - 1st Mesh Doubling Interface
     radius(3)  = 6291.60d0 !      80
@@ -238,10 +238,10 @@
           ner_test = ner_test + 1      ! Increment ner_test and
           ratio = (dr / ner_test) / w  ! look for a better
           xi = dabs(ratio - 1.0d0)     ! solution
-       end do
+       enddo
        rt(i) = dr / NER(i) / wt        ! Find the Ratio of Top
        rb(i) = dr / NER(i) / wb        ! and Bottom for completeness
-    end do
+    enddo
 
   end subroutine auto_optimal_ner
 
@@ -289,7 +289,7 @@
           max_edgemax = MAX(max_edgemax, edgemax)
           min_edgemin = MIN(min_edgemin, edgemin)
           max_aspect_ratio = MAX(max_aspect_ratio, aspect_ratio)
-       end do
+       enddo
        xi = (max_edgemax / min_edgemin)
        deallocate(points)
        if(xi < ximin) then
@@ -333,7 +333,7 @@
           dist_cc_icb = dist_cc_icb * 2
        endif
        somme = somme + dist_cc_icb
-    end do
+    enddo
     dist_moy = somme / (nex_xi + 1)
     ner = nint(dist_moy / ((PI * RICB_KM) / (2*nex_xi)))
   end subroutine compute_nex
@@ -365,7 +365,7 @@
                sqrt( (pts(ix2,1) - pts(ix3,1))**2 + (pts(ix2,2) - pts(ix3,2))**2 )
         edgemax = MAX(edgemax, edge)
         edgemin = MIN(edgemin, edge)
-    end do
+    enddo
   end subroutine get_size_min_max
 
   subroutine compute_IC_mesh(rcube, points, npts, nspec_cube, nspec_chunks, nex_xi, nex_eta)
@@ -397,11 +397,11 @@
                 points(k,1) = x
                 points(k,2) = y
                 k = k + 1
-             end do
+             enddo
              nspec_chunks = nspec_chunks + 1
-          end do
-       end do
-    end do
+          enddo
+       enddo
+    enddo
 
     nspec_cube = 0
     do ix = 0,(nex_xi-1)*2,2
@@ -411,10 +411,10 @@
              points(k,1) = x
              points(k,2) = y
              k = k + 1
-          end do
+          enddo
           nspec_cube = nspec_cube + 1
-       end do
-    end do
+       enddo
+    enddo
 
   end subroutine compute_IC_mesh
 
@@ -446,6 +446,7 @@
   end subroutine compute_coordinate_central_cube
 
   subroutine compute_coordinate(ix,iy,nbx, nby, rcube, ic, alpha, x, y)
+
     implicit none
 
     double precision, parameter :: PI      = 3.1415d0
@@ -491,5 +492,7 @@
        temp = x
        x    = -y
        y    = temp
-    end if
+    endif
+
   end subroutine compute_coordinate
+

Modified: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90	2008-08-15 21:59:07 UTC (rev 12649)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/src/read_compute_parameters.F90	2008-08-16 01:07:06 UTC (rev 12650)
@@ -498,18 +498,16 @@
 !----  case prem_onecrust by default
 !----
       if (SUPPRESS_CRUSTAL_MESH) then
-        multiplication_factor=2
+        multiplication_factor = 2
       else
-        multiplication_factor=1
+        multiplication_factor = 1
       endif
 
      ! element width =   0.5625000      degrees =    62.54715      km
       if(NEX_MAX*multiplication_factor <= 160) then
+
         DT                       = 0.252d0
 
-        MIN_ATTENUATION_PERIOD   = 30
-        MAX_ATTENUATION_PERIOD   = 1500
-
         NER_CRUST                = 1
         NER_80_MOHO              = 1
         NER_220_80               = 2
@@ -525,11 +523,9 @@
 
     ! element width =   0.3515625      degrees =    39.09196      km
       else if(NEX_MAX*multiplication_factor <= 256) then
+
         DT                       = 0.225d0
 
-        MIN_ATTENUATION_PERIOD   = 20
-        MAX_ATTENUATION_PERIOD   = 1000
-
         NER_CRUST                = 1
         NER_80_MOHO              = 1
         NER_220_80               = 2
@@ -545,11 +541,9 @@
 
     ! element width =   0.2812500      degrees =    31.27357      km
       else if(NEX_MAX*multiplication_factor <= 320) then
+
         DT                       = 0.16d0
 
-        MIN_ATTENUATION_PERIOD   = 15
-        MAX_ATTENUATION_PERIOD   = 750
-
         NER_CRUST                = 1
         NER_80_MOHO              = 1
         NER_220_80               = 3
@@ -565,11 +559,9 @@
 
     ! element width =   0.1875000      degrees =    20.84905      km
       else if(NEX_MAX*multiplication_factor <= 480) then
+
         DT                       = 0.11d0
 
-        MIN_ATTENUATION_PERIOD   = 10
-        MAX_ATTENUATION_PERIOD   = 500
-
         NER_CRUST                = 1
         NER_80_MOHO              = 2
         NER_220_80               = 4
@@ -585,11 +577,9 @@
 
     ! element width =   0.1757812      degrees =    19.54598      km
       else if(NEX_MAX*multiplication_factor <= 512) then
+
         DT                       = 0.1125d0
 
-        MIN_ATTENUATION_PERIOD   = 9
-        MAX_ATTENUATION_PERIOD   = 500
-
         NER_CRUST                = 1
         NER_80_MOHO              = 2
         NER_220_80               = 4
@@ -605,11 +595,9 @@
 
     ! element width =   0.1406250      degrees =    15.63679      km
       else if(NEX_MAX*multiplication_factor <= 640) then
+
         DT                       = 0.09d0
 
-        MIN_ATTENUATION_PERIOD   = 8
-        MAX_ATTENUATION_PERIOD   = 400
-
         NER_CRUST                = 2
         NER_80_MOHO              = 3
         NER_220_80               = 5
@@ -625,16 +613,14 @@
 
     ! element width =   0.1041667      degrees =    11.58280      km
       else if(NEX_MAX*multiplication_factor <= 864) then
+
         DT                       = 0.0667d0
 
-        MIN_ATTENUATION_PERIOD   = 6
-        MAX_ATTENUATION_PERIOD   = 300
-
         NER_CRUST                = 2
         NER_80_MOHO              = 4
         NER_220_80               = 6
-        NER_400_220              = 10
-        NER_600_400              = 10
+        NER_400_220              = 8
+        NER_600_400              = 9
         NER_670_600              = 3
         NER_771_670              = 4
         NER_TOPDDOUBLEPRIME_771  = 79
@@ -645,67 +631,98 @@
 
     ! element width =   7.8125000E-02  degrees =    8.687103      km
       else if(NEX_MAX*multiplication_factor <= 1152) then
+
         DT                       = 0.05d0
 
-        MIN_ATTENUATION_PERIOD   = 4
-        MAX_ATTENUATION_PERIOD   = 200
-
         NER_CRUST                = 3
-        NER_80_MOHO              = 6
-        NER_220_80               = 8
-        NER_400_220              = 13
-        NER_600_400              = 13
+        NER_80_MOHO              = 3 !!!!!!! 4 !!!!!!! 6
+        NER_220_80               = 7 !!!!!!!!! 8
+        NER_400_220              = 9 !!!!!!!!! 11 !!!!!!! 13
+        NER_600_400              = 11 !!!!!!! 13
         NER_670_600              = 4
         NER_771_670              = 6
-        NER_TOPDDOUBLEPRIME_771  = 106
+        NER_TOPDDOUBLEPRIME_771  = 86 !!!! 106
         NER_CMB_TOPDDOUBLEPRIME  = 7
-        NER_OUTER_CORE           = 116
+        NER_OUTER_CORE           = 112 !!!!!!!!!! 116
         NER_TOP_CENTRAL_CUBE_ICB = 12
         R_CENTRAL_CUBE = 985000.d0
 
     ! element width =   7.2115384E-02  degrees =    8.018865      km
       else if(NEX_MAX*multiplication_factor <= 1248) then
+
         DT                       = 0.0462d0
 
-        MIN_ATTENUATION_PERIOD   = 4
-        MAX_ATTENUATION_PERIOD   = 200
-
         NER_CRUST                = 3
-        NER_80_MOHO              = 6
-        NER_220_80               = 9
-        NER_400_220              = 14
-        NER_600_400              = 14
-        NER_670_600              = 5
+        NER_80_MOHO              = 4 !!!!!!!!!!! 6
+        NER_220_80               = 8 !!!!!!!!!!! 9
+        NER_400_220              = 11 !!!!! 10 !!!!!!!!!! 14
+        NER_600_400              = 12 !!!!!!!! 11 !!! 13 !!!!!!!!!!! 14
+        NER_670_600              = 4 !!!!!!!!!!!!! 5
         NER_771_670              = 6
-        NER_TOPDDOUBLEPRIME_771  = 114
+        NER_TOPDDOUBLEPRIME_771  = 94 !!!!!!!! 114
         NER_CMB_TOPDDOUBLEPRIME  = 8
-        NER_OUTER_CORE           = 124
+        NER_OUTER_CORE           = 116 !!!!!!!!! 124
         NER_TOP_CENTRAL_CUBE_ICB = 13
         R_CENTRAL_CUBE = 985000.d0
 
-      else
+      else  if(NEX_MAX*multiplication_factor <= 2368) then
 
-! scale with respect to 1248 if above that limit
-        DT                       = 0.0462d0 * 1248.d0 / (2.d0*NEX_MAX)
+! simple scaling for the time step
+        DT                       = 0.0462d0 * 1248.d0 / dble(NEX_MAX*multiplication_factor)
+        R_CENTRAL_CUBE = 985000.d0
 
-        MIN_ATTENUATION_PERIOD   = 4
-        MAX_ATTENUATION_PERIOD   = 200
+ NER_CRUST =            5 !!!!!!!!!! 6
+ NER_80_MOHO =            7 !!!!!!!!!!! 8
+ NER_220_80 =           15
+ NER_400_220 =           21
+ NER_600_400 =           23
+ NER_670_600 =            8
+ NER_771_670 =           11
+ NER_TOPDDOUBLEPRIME_771 =          178
+ NER_CMB_TOPDDOUBLEPRIME =           15
+ NER_OUTER_CORE =          220
+ NER_TOP_CENTRAL_CUBE_ICB =           27 !!!!!!!!! 25
 
-        NER_CRUST                = nint(3 * 2.d0*NEX_MAX / 1248.d0)
-        NER_80_MOHO              = nint(6 * 2.d0*NEX_MAX / 1248.d0)
-        NER_220_80               = nint(9 * 2.d0*NEX_MAX / 1248.d0)
-        NER_400_220              = nint(14 * 2.d0*NEX_MAX / 1248.d0)
-        NER_600_400              = nint(14 * 2.d0*NEX_MAX / 1248.d0)
-        NER_670_600              = nint(5 * 2.d0*NEX_MAX / 1248.d0)
-        NER_771_670              = nint(6 * 2.d0*NEX_MAX / 1248.d0)
-        NER_TOPDDOUBLEPRIME_771  = nint(114 * 2.d0*NEX_MAX / 1248.d0)
-        NER_CMB_TOPDDOUBLEPRIME  = nint(8 * 2.d0*NEX_MAX / 1248.d0)
-        NER_OUTER_CORE           = nint(124 * 2.d0*NEX_MAX / 1248.d0)
-        NER_TOP_CENTRAL_CUBE_ICB = nint(13 * 2.d0*NEX_MAX / 1248.d0)
+      else  if(NEX_MAX*multiplication_factor <= 2880) then
+
+! simple scaling for the time step
+        DT                       = 0.0462d0 * 1248.d0 / dble(NEX_MAX*multiplication_factor)
         R_CENTRAL_CUBE = 985000.d0
 
-!! removed this limit           else
-!! removed this limit             stop 'problem with this value of NEX_MAX'
+ NER_CRUST =            5 !!!!!!!!!!!!!!!!!! 6
+ NER_80_MOHO =            8 !!!!!!!!!!!!! 9
+ NER_220_80 =           18
+ NER_400_220 =           24 !!!!!!!!!! 26
+ NER_600_400 =           26 !!!!!!!!!! 28
+ NER_670_600 =           9 !!!!!!!!!!! 10
+ NER_771_670 =           13
+ NER_TOPDDOUBLEPRIME_771 =          216
+ NER_CMB_TOPDDOUBLEPRIME =           18
+ NER_OUTER_CORE =          268
+ NER_TOP_CENTRAL_CUBE_ICB =           33
+
+      else  if(NEX_MAX*multiplication_factor <= 3264) then
+
+! simple scaling for the time step
+        DT                       = 0.0462d0 * 1248.d0 / dble(NEX_MAX*multiplication_factor)
+        R_CENTRAL_CUBE = 985000.d0
+
+ NER_CRUST =            6
+ NER_80_MOHO =            8 !!!!!!!!!!!!!!! 9
+ NER_220_80 =           20
+ NER_400_220 =           27
+ NER_600_400 =           29
+ NER_670_600 =           10
+ NER_771_670 =           15
+ NER_TOPDDOUBLEPRIME_771 =          245
+ NER_CMB_TOPDDOUBLEPRIME =           19 !!!!!!!!!!! 20
+ NER_OUTER_CORE =          304
+ NER_TOP_CENTRAL_CUBE_ICB =           37
+
+      else
+
+        stop 'values of NEX_MAX > 3264 not implemented yet in read_compute_parameters'
+
       endif
 
 !----
@@ -714,6 +731,7 @@
 
 ! case of regular PREM with two crustal layers: change the time step for small meshes
 ! because of a different size of elements in the radial direction in the crust
+    if (.not. PATCH_FOR_GORDON_BELL) then
     if (HONOR_1D_SPHERICAL_MOHO) then
       if (.not. ONE_CRUST) then
         ! case 1D + two crustal layers
@@ -735,30 +753,22 @@
           DT = 0.155d0
       endif
     endif
+    endif ! of .not. PATCH_FOR_GORDON_BELL
 
-    if (REFERENCE_1D_MODEL == REFERENCE_MODEL_1066A) then
-      DT = DT*0.20d0
-    endif
+! model 1066A has one very thin layer therefore we need to drastically reduce the time step
+    if (REFERENCE_1D_MODEL == REFERENCE_MODEL_1066A) DT = DT*0.20d0
 
+!----
+! if the chunk is smaller than full 90 degrees, call Brian Savage's set of auto_ner routines
+!----
+    if(.not. PATCH_FOR_GORDON_BELL .and. (ANGULAR_WIDTH_XI_IN_DEGREES  < 90.0d0 .or. ANGULAR_WIDTH_ETA_IN_DEGREES < 90.0d0)) then
 
-    if( .not. ATTENUATION_RANGE_PREDEFINED ) then
-       call auto_attenuation_periods(ANGULAR_WIDTH_XI_IN_DEGREES, NEX_MAX, &
-            MIN_ATTENUATION_PERIOD, MAX_ATTENUATION_PERIOD)
-    endif
-
-    if(ANGULAR_WIDTH_XI_IN_DEGREES  < 90.0d0 .or. &
-       ANGULAR_WIDTH_ETA_IN_DEGREES < 90.0d0 .or. &
-       NEX_MAX > 1248) then
-
      call auto_ner(ANGULAR_WIDTH_XI_IN_DEGREES, NEX_MAX, &
           NER_CRUST, NER_80_MOHO, NER_220_80, NER_400_220, NER_600_400, &
           NER_670_600, NER_771_670, NER_TOPDDOUBLEPRIME_771, &
           NER_CMB_TOPDDOUBLEPRIME, NER_OUTER_CORE, NER_TOP_CENTRAL_CUBE_ICB, &
           R_CENTRAL_CUBE, CASE_3D)
 
-     call auto_attenuation_periods(ANGULAR_WIDTH_XI_IN_DEGREES, NEX_MAX, &
-          MIN_ATTENUATION_PERIOD, MAX_ATTENUATION_PERIOD)
-
      call auto_time_stepping(ANGULAR_WIDTH_XI_IN_DEGREES, NEX_MAX, DT)
 
     if (HONOR_1D_SPHERICAL_MOHO) then
@@ -770,12 +780,16 @@
       ! case 3D
       if (NER_CRUST<2) NER_CRUST=2
     endif
-  endif
 
+  endif ! of call to Brian Savage's set of auto_ner routines
+
 ! take a 5% safety margin on the maximum stable time step
 ! which was obtained by trial and error
 !!!!!!!!!!!!!!!!!!  DT = DT * (1.d0 - 0.05d0)
 
+! determine suitable attenuation periods for the mesh
+  call auto_attenuation_periods(ANGULAR_WIDTH_XI_IN_DEGREES,NEX_MAX,MIN_ATTENUATION_PERIOD,MAX_ATTENUATION_PERIOD)
+
   call read_value_logical(OCEANS, 'model.OCEANS')
   if(err_occurred() /= 0) stop 'an error occurred while reading the parameter file'
   call read_value_logical(ELLIPTICITY, 'model.ELLIPTICITY')
@@ -792,6 +806,13 @@
   call read_value_logical(ABSORBING_CONDITIONS, 'solver.ABSORBING_CONDITIONS')
   if(err_occurred() /= 0) stop 'an error occurred while reading the parameter file'
 
+  if(PATCH_FOR_GORDON_BELL) then
+    OCEANS = .false.
+    GRAVITY = .false.
+    ROTATION = .false.
+    ABSORBING_CONDITIONS = .false.
+  endif
+
   if(ABSORBING_CONDITIONS .and. NCHUNKS == 6) stop 'cannot have absorbing conditions in the full Earth'
 
   if(ABSORBING_CONDITIONS .and. NCHUNKS == 3) stop 'absorbing conditions not supported for three chunks yet'

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_auto_ner.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_auto_ner.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_auto_ner.f90	2008-08-16 01:07:06 UTC (rev 12650)
@@ -0,0 +1,91 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  4 . 1
+!          --------------------------------------------------
+!
+!          Main authors: Dimitri Komatitsch and Jeroen Tromp
+!    Seismological Laboratory, California Institute of Technology, USA
+!             and University of Pau / CNRS / INRIA, France
+! (c) California Institute of Technology and University of Pau / CNRS / INRIA
+!                            August 2008
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+  program display_results_auto_ner
+
+  implicit none
+
+  include "constants.h"
+
+  integer, parameter :: NCASES = 11
+
+  double precision, parameter :: ANGULAR_WIDTH_XI_IN_DEGREES = 90.d0
+
+  logical, parameter :: CASE_3D = .false.
+
+  integer :: NER_CRUST, NER_80_MOHO, NER_220_80, NER_400_220, NER_600_400, &
+          NER_670_600, NER_771_670, NER_TOPDDOUBLEPRIME_771, &
+          NER_CMB_TOPDDOUBLEPRIME, NER_OUTER_CORE, NER_TOP_CENTRAL_CUBE_ICB
+
+  double precision :: R_CENTRAL_CUBE,DT
+
+  integer, dimension(NCASES) :: NEX_MAX = (/ 480, 512, 640, 672, 864, 1056, 1152, 1248, 2368, 2880, 3264 /)
+
+  integer :: icase
+
+  do icase = 1,NCASES
+
+     call auto_ner(ANGULAR_WIDTH_XI_IN_DEGREES, NEX_MAX(icase), &
+          NER_CRUST, NER_80_MOHO, NER_220_80, NER_400_220, NER_600_400, &
+          NER_670_600, NER_771_670, NER_TOPDDOUBLEPRIME_771, &
+          NER_CMB_TOPDDOUBLEPRIME, NER_OUTER_CORE, NER_TOP_CENTRAL_CUBE_ICB, &
+          R_CENTRAL_CUBE, CASE_3D)
+
+     call auto_time_stepping(ANGULAR_WIDTH_XI_IN_DEGREES, NEX_MAX(icase), DT)
+!! DK DK I realize that auto_NER DT values are too small by a factor 1.5, therefore fix it
+     DT = DT * 1.5d0
+
+goto 777
+    print *
+    print *,'Case NEX_XI = ',NEX_MAX(icase)
+    print *,'NER_CRUST = ',NER_CRUST
+    print *,'NER_80_MOHO = ',NER_80_MOHO
+    print *,'NER_220_80 = ',NER_220_80
+    print *,'NER_400_220 = ',NER_400_220
+    print *,'NER_600_400 = ',NER_600_400
+    print *,'NER_670_600 = ',NER_670_600
+    print *,'NER_771_670 = ',NER_771_670
+    print *,'NER_TOPDDOUBLEPRIME_771 = ',NER_TOPDDOUBLEPRIME_771
+    print *,'NER_CMB_TOPDDOUBLEPRIME = ',NER_CMB_TOPDDOUBLEPRIME
+    print *,'NER_OUTER_CORE = ',NER_OUTER_CORE
+    print *,'NER_TOP_CENTRAL_CUBE_ICB = ',NER_TOP_CENTRAL_CUBE_ICB
+    print *,'R_CENTRAL_CUBE = ',R_CENTRAL_CUBE
+    print *,'DT = ',DT
+    print *
+777 continue
+
+!! print the evolution of the time step for Gnuplot
+    print *,NEX_MAX(icase),DT
+
+  enddo
+
+  end program display_results_auto_ner
+
+!-----------
+
+  include "auto_ner.f90"
+

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_1248.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_1248.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_1248.f90	2008-08-16 01:07:06 UTC (rev 12650)
@@ -0,0 +1,71 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  4 . 1
+!          --------------------------------------------------
+!
+!          Main authors: Dimitri Komatitsch and Jeroen Tromp
+!    Seismological Laboratory, California Institute of Technology, USA
+!             and University of Pau / CNRS / INRIA, France
+! (c) California Institute of Technology and University of Pau / CNRS / INRIA
+!                            August 2008
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+  program display_results_simple_scaling
+
+  implicit none
+
+  integer :: NEX_MAX, NER_CRUST, NER_80_MOHO, NER_220_80, NER_400_220, NER_600_400, &
+          NER_670_600, NER_771_670, NER_TOPDDOUBLEPRIME_771, &
+          NER_CMB_TOPDDOUBLEPRIME, NER_OUTER_CORE, NER_TOP_CENTRAL_CUBE_ICB
+
+! good values for NEX_XI = 1248 determined by trial and error using OpenDX on one slice
+        NER_CRUST                = 3
+        NER_80_MOHO              = 4 !!!!!!!!!!! 6
+        NER_220_80               = 8 !!!!!!!!!!! 9
+        NER_400_220              = 11 !!!!! 10 !!!!!!!!!! 14
+        NER_600_400              = 12 !!!!!!!! 11 !!! 13 !!!!!!!!!!! 14
+        NER_670_600              = 4 !!!!!!!!!!!!! 5
+        NER_771_670              = 6
+        NER_TOPDDOUBLEPRIME_771  = 94 !!!!!!!! 114
+        NER_CMB_TOPDDOUBLEPRIME  = 8
+        NER_OUTER_CORE           = 116 !!!!!!!!! 124
+        NER_TOP_CENTRAL_CUBE_ICB = 13
+
+  print *,'enter NEX_MAX to use:'
+  read(*,*) NEX_MAX
+
+  if(mod(NEX_MAX,32) /= 0) stop 'not a multiple of 32, exiting'
+
+    print *
+    print *,'! scaling from 1248 for NEX_MAX = ',NEX_MAX
+    print *
+    print *,'NER_CRUST = ',nint(NER_CRUST * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_80_MOHO = ',nint(NER_80_MOHO * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_220_80 = ',nint(NER_220_80 * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_400_220 = ',nint(NER_400_220 * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_600_400 = ',nint(NER_600_400 * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_670_600 = ',nint(NER_670_600 * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_771_670 = ',nint(NER_771_670 * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_TOPDDOUBLEPRIME_771 = ',nint(NER_TOPDDOUBLEPRIME_771 * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_CMB_TOPDDOUBLEPRIME = ',nint(NER_CMB_TOPDDOUBLEPRIME * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_OUTER_CORE = ',nint(NER_OUTER_CORE * dble(NEX_MAX) / 1248.d0)
+    print *,'NER_TOP_CENTRAL_CUBE_ICB = ',nint(NER_TOP_CENTRAL_CUBE_ICB * dble(NEX_MAX) / 1248.d0)
+    print *
+
+  end program display_results_simple_scaling
+

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2368.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2368.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2368.f90	2008-08-16 01:07:06 UTC (rev 12650)
@@ -0,0 +1,71 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  4 . 1
+!          --------------------------------------------------
+!
+!          Main authors: Dimitri Komatitsch and Jeroen Tromp
+!    Seismological Laboratory, California Institute of Technology, USA
+!             and University of Pau / CNRS / INRIA, France
+! (c) California Institute of Technology and University of Pau / CNRS / INRIA
+!                            August 2008
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+  program display_results_simple_scaling
+
+  implicit none
+
+  integer :: NEX_MAX, NER_CRUST, NER_80_MOHO, NER_220_80, NER_400_220, NER_600_400, &
+          NER_670_600, NER_771_670, NER_TOPDDOUBLEPRIME_771, &
+          NER_CMB_TOPDDOUBLEPRIME, NER_OUTER_CORE, NER_TOP_CENTRAL_CUBE_ICB
+
+! good values for NEX_XI = 2368 determined by trial and error using OpenDX on one slice
+ NER_CRUST =            5 !!!!!!!!!! 6
+ NER_80_MOHO =            7 !!!!!!!!!!! 8
+ NER_220_80 =           15
+ NER_400_220 =           21
+ NER_600_400 =           23
+ NER_670_600 =            8
+ NER_771_670 =           11
+ NER_TOPDDOUBLEPRIME_771 =          178
+ NER_CMB_TOPDDOUBLEPRIME =           15
+ NER_OUTER_CORE =          220
+ NER_TOP_CENTRAL_CUBE_ICB =           27 !!!!!!!!! 25
+
+  print *,'enter NEX_MAX to use:'
+  read(*,*) NEX_MAX
+
+  if(mod(NEX_MAX,32) /= 0) stop 'not a multiple of 32, exiting'
+
+    print *
+    print *,'! scaling from 2368 for NEX_MAX = ',NEX_MAX
+    print *
+    print *,'NER_CRUST = ',nint(NER_CRUST * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_80_MOHO = ',nint(NER_80_MOHO * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_220_80 = ',nint(NER_220_80 * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_400_220 = ',nint(NER_400_220 * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_600_400 = ',nint(NER_600_400 * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_670_600 = ',nint(NER_670_600 * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_771_670 = ',nint(NER_771_670 * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_TOPDDOUBLEPRIME_771 = ',nint(NER_TOPDDOUBLEPRIME_771 * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_CMB_TOPDDOUBLEPRIME = ',nint(NER_CMB_TOPDDOUBLEPRIME * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_OUTER_CORE = ',nint(NER_OUTER_CORE * dble(NEX_MAX) / 2368.d0)
+    print *,'NER_TOP_CENTRAL_CUBE_ICB = ',nint(NER_TOP_CENTRAL_CUBE_ICB * dble(NEX_MAX) / 2368.d0)
+    print *
+
+  end program display_results_simple_scaling
+

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2880.f90
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2880.f90	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/version41_beta/utils/display_results_simple_scaling_mesh_from_2880.f90	2008-08-16 01:07:06 UTC (rev 12650)
@@ -0,0 +1,71 @@
+!=====================================================================
+!
+!          S p e c f e m 3 D  G l o b e  V e r s i o n  4 . 1
+!          --------------------------------------------------
+!
+!          Main authors: Dimitri Komatitsch and Jeroen Tromp
+!    Seismological Laboratory, California Institute of Technology, USA
+!             and University of Pau / CNRS / INRIA, France
+! (c) California Institute of Technology and University of Pau / CNRS / INRIA
+!                            August 2008
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License along
+! with this program; if not, write to the Free Software Foundation, Inc.,
+! 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+!
+!=====================================================================
+
+  program display_results_simple_scaling
+
+  implicit none
+
+  integer :: NEX_MAX, NER_CRUST, NER_80_MOHO, NER_220_80, NER_400_220, NER_600_400, &
+          NER_670_600, NER_771_670, NER_TOPDDOUBLEPRIME_771, &
+          NER_CMB_TOPDDOUBLEPRIME, NER_OUTER_CORE, NER_TOP_CENTRAL_CUBE_ICB
+
+! good values for NEX_XI = 2880 determined by trial and error using OpenDX on one slice
+ NER_CRUST =            5 !!!!!!!!!!!!!!!!!! 6
+ NER_80_MOHO =            8 !!!!!!!!!!!!! 9
+ NER_220_80 =           18
+ NER_400_220 =           24 !!!!!!!!!! 26
+ NER_600_400 =           26 !!!!!!!!!! 28
+ NER_670_600 =           9 !!!!!!!!!!! 10
+ NER_771_670 =           13
+ NER_TOPDDOUBLEPRIME_771 =          216
+ NER_CMB_TOPDDOUBLEPRIME =           18
+ NER_OUTER_CORE =          268
+ NER_TOP_CENTRAL_CUBE_ICB =           33
+
+  print *,'enter NEX_MAX to use:'
+  read(*,*) NEX_MAX
+
+  if(mod(NEX_MAX,32) /= 0) stop 'not a multiple of 32, exiting'
+
+    print *
+    print *,'! scaling from 2880 for NEX_MAX = ',NEX_MAX
+    print *
+    print *,'NER_CRUST = ',nint(NER_CRUST * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_80_MOHO = ',nint(NER_80_MOHO * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_220_80 = ',nint(NER_220_80 * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_400_220 = ',nint(NER_400_220 * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_600_400 = ',nint(NER_600_400 * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_670_600 = ',nint(NER_670_600 * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_771_670 = ',nint(NER_771_670 * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_TOPDDOUBLEPRIME_771 = ',nint(NER_TOPDDOUBLEPRIME_771 * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_CMB_TOPDDOUBLEPRIME = ',nint(NER_CMB_TOPDDOUBLEPRIME * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_OUTER_CORE = ',nint(NER_OUTER_CORE * dble(NEX_MAX) / 2880.d0)
+    print *,'NER_TOP_CENTRAL_CUBE_ICB = ',nint(NER_TOP_CENTRAL_CUBE_ICB * dble(NEX_MAX) / 2880.d0)
+    print *
+
+  end program display_results_simple_scaling
+



More information about the cig-commits mailing list