[cig-commits] r8511 - seismo/2D/SPECFEM2D/trunk/UTILS

walter at geodynamics.org walter at geodynamics.org
Fri Dec 7 15:52:20 PST 2007


Author: walter
Date: 2007-12-07 15:52:20 -0800 (Fri, 07 Dec 2007)
New Revision: 8511

Added:
   seismo/2D/SPECFEM2D/trunk/UTILS/create_gaussian_profile.f90
Log:
added program to create a Gaussian profile for topography or bathymetry


Added: seismo/2D/SPECFEM2D/trunk/UTILS/create_gaussian_profile.f90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/UTILS/create_gaussian_profile.f90	2007-04-17 09:33:09 UTC (rev 8510)
+++ seismo/2D/SPECFEM2D/trunk/UTILS/create_gaussian_profile.f90	2007-12-07 23:52:20 UTC (rev 8511)
@@ -0,0 +1,24 @@
+
+! create a gaussian profile for bathymetry
+
+  program create_gaussian_profile
+
+  implicit none
+
+  integer, parameter :: N = 200
+
+  double precision, parameter :: horiz_size = 10000.d0, x0 = horiz_size / 2.d0, sigma = horiz_size / 20.d0, height = 400.d0
+
+  double precision :: deltax,x
+
+  integer :: i
+
+  deltax = horiz_size / dble(N-1)
+
+  do i = 1,N
+    x = (i-1) * deltax
+    print *,x, -3000.d0 + height * exp(-(x-x0)**2/(2*sigma**2))
+  enddo
+
+ end program create_gaussian_profile
+



More information about the cig-commits mailing list