User Tools

Site Tools


software:specfem3d:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:specfem3d:start [2014/01/03 00:19]
emheien
software:specfem3d:start [2015/02/11 17:45] (current)
emheien
Line 2: Line 2:
  
 [[http://​geodynamics.org/​cig/​software/​specfem3d|SPECFEM3D Software Page]] [[http://​geodynamics.org/​cig/​software/​specfem3d|SPECFEM3D Software Page]]
 +
 +===== Development =====
 +
 +If you want to contribute to the source code, please refer to [[https://​github.com/​geodynamics/​specfem3d/​wiki|https://​github.com/​geodynamics/​specfem3d/​wiki]] for details.
  
 ===== Tutorials ===== ===== Tutorials =====
 +
 +Step-by-step tutorials how to run SPECFEM3D simulations
  
 ==== Tutorial 1: Homogeneous halfspace ==== ==== Tutorial 1: Homogeneous halfspace ====
Line 435: Line 441:
 ==== Tutorial 3: Mount St. Helens ==== ==== Tutorial 3: Mount St. Helens ====
  
-The following instructions assume that you have installed ​"​SPECFEM3D"​:../../specfem3d and familiarized yourself with how you will run the package based on your computer configuration,​ as detailed in the "​SPECFEM3D User manual":​http://​www.geodynamics.org/​wsvn/​cig/​seismo/​3D/​SPECFEM3D/​trunk/​doc/​USER_MANUAL/​manual_SPECFEM3D.pdf?​op=file&​rev=0&​sc=0 (Chapter 2 provides installation help). Additionally,​ we will make use of an external, hexahedral mesher ​"​CUBIT":​http://​cubit.sandia.gov. Please make sure you have these packages installed on your system.+The following instructions assume that you have installed ​[[http://​geodynamics.org/​cig/​software/specfem3d/​|SPECFEM3D]] ​and familiarized yourself with how you will run the package based on your computer configuration,​ as detailed in the "​SPECFEM3D User manual":​http://​www.geodynamics.org/​wsvn/​cig/​seismo/​3D/​SPECFEM3D/​trunk/​doc/​USER_MANUAL/​manual_SPECFEM3D.pdf?​op=file&​rev=0&​sc=0 (Chapter 2 provides installation help). Additionally,​ we will make use of an external, hexahedral mesher ​[[http://​cubit.sandia.gov/|CUBIT]]. Please make sure you have these packages installed on your system.
  
 The example is distributed with the package under the examples/ directory. However, you might need to edit these example scripts slightly to launch them on your system. The example is distributed with the package under the examples/ directory. However, you might need to edit these example scripts slightly to launch them on your system.
Line 441: Line 447:
 === Mount St. Helens === === Mount St. Helens ===
  
-This is a step-by-step tutorial how to create a mesh for a region around Mount St. Helens, export it into a "​SPECFEM3D"​:../../specfem3d file format and run the mesh partitioning and database generation.+This is a step-by-step tutorial how to create a mesh for a region around Mount St. Helens, export it into a [[http://​geodynamics.org/​cig/​software/specfem3d/​|SPECFEM3D]] ​file format and run the mesh partitioning and database generation.
  
 Change to the example directory Change to the example directory
-  ​<​pre>​ +  []$ cd SPECFEM3D/​examples/​Mount_StHelens
-  ​[]$ cd SPECFEM3D/​examples/​Mount_StHelens</​pre>​ +
  
 Please also see the README file in this example directory. An example topography file "​ptopo.mean.utm"​ is provided as well, in the following we explain in detail how to construct such a file.  Please also see the README file in this example directory. An example topography file "​ptopo.mean.utm"​ is provided as well, in the following we explain in detail how to construct such a file. 
  
-Downloading topography data+=== Downloading topography data ===
  
-  ​You can get "​SRTM":​http://​srtm.csi.cgiar.org 90m Digital Elevation Data for a region of interest at: "http://​srtm.csi.cgiar.org":http://​srtm.csi.cgiar.org+You can get [[http://​srtm.csi.cgiar.org|SRTM]] ​90m Digital Elevation Data for a region of interest at: [[http://​srtm.csi.cgiar.org|http://​srtm.csi.cgiar.org]]
  
 For this example, we choose Mount St.Helens as region of interest. For this example, we choose Mount St.Helens as region of interest.
 Mount St. Helens is located at: 46.197 N 122.186 W Mount St. Helens is located at: 46.197 N 122.186 W
-This region is contained in a downloadable file ''​srtm_12_03.zip'',​ which you will have to download from "http://​srtm.csi.cgiar.org/​SELECTION/​inputCoord.asp":http://​srtm.csi.cgiar.org/​SELECTION/​inputCoord.asp+This region is contained in a downloadable file ''​srtm_12_03.zip'',​ which you will have to download from  
 +[[http://​srtm.csi.cgiar.org/​SELECTION/​inputCoord.asp|http://​srtm.csi.cgiar.org/​SELECTION/​inputCoord.asp]]
 using the region of interest: ​   using the region of interest: ​  
   Latitude min: 45 N  max: 50 N   Latitude min: 45 N  max: 50 N
Line 462: Line 467:
  
 unzipping the file unzipping the file
-  ​<​pre>​ +  [Mount_StHelens]$ unzip srtm_12_03.zip
-  ​[Mount_StHelens]$ unzip srtm_12_03.zip</​pre>​+
  
 leads to: leads to:
Line 470: Line 474:
   ..   ..
  
 +=== Converting Geotif topography data ===
  
-Converting ​Geotif ​topography data+To convert the Geotif-file into an ''​longitude/​latitude/​elevation''​ format, you can use the package [[http://​fwtools.maptools.org/​|FWTools]] at: [[http://​fwtools.maptools.org/​|http://​fwtools.maptools.org/​]]
  
-  To convert the Geotif-file into an ''​longitude/​latitude/​elevation''​ format, you can use the +Install the package and use their ''​gdal2xyz''​ executable to extract the tif file into xyz format: 
-package "​FWTools":​http://​fwtools.maptools.org/​ at: "​http://​fwtools.maptools.org/":​http://​fwtools.maptools.org/​ +  [Mount_StHelens]$ FWTools-2.0.6/​bin_safe/​gdal2xyz.py srtm_12_03.tif > srtm_12_03.xyz
- +
-Install the package and use their ''​gdal2xyz''​ executable to extract +
-the tif file into xyz format: +
-  <pre> +
-  [Mount_StHelens]$ FWTools-2.0.6/​bin_safe/​gdal2xyz.py srtm_12_03.tif > srtm_12_03.xyz ​</​pre>​+
  
 the newly created file ''​srtm_12_03.xyz''​ has now the format: ​ the newly created file ''​srtm_12_03.xyz''​ has now the format: ​
-  ​<​pre>​ +  #longitude #latitude #elevation (m)
-  ​#longitude #latitude #elevation (m)</​pre>​+
  
 the file size is ~ 963 MB. the file size is ~ 963 MB.
  
 +=== Extracting the region of interest ===
  
-Extracting ​the region of interest+To further extract and manipulate ​the topography data, you can use the package [[http://​gmt.soest.hawaii.edu/​|GMT]] at: [[http://​gmt.soest.hawaii.edu/​|http://​gmt.soest.hawaii.edu/​]]
  
-  To further extract and manipulate the topography data, you can use the +For our purpose, the region of interest will be: 
-package "​GMT":​http://​gmt.soest.hawaii.edu/​ at: "​http://​gmt.soest.hawaii.edu/":​http://​gmt.soest.hawaii.edu/​ +  ​-R-122.3/​-122.1/​46.1/​46.3//​
- +
-  ​For our purpose, the region of interest will be:  +
-  ​<​pre>​ +
-  ​-R-122.3/​-122.1/​46.1/​46.3//​</​pre>​+
  
 that is a region of ~23 km x 23 km extent. that is a region of ~23 km x 23 km extent.
  
-<p align="​center"><​a href="​figures/​mount-sthelens.jpg/​image_view"><​img src="​figures/​mount-sthelens.jpg"​ width=300 ></​a></​p>​+{{:​software:​specfem3d:​tutorial:​mount-sthelens.jpg?​direct&​300|}}
  
 Using the ''​blockmean''​ executable from the GMT package, we extract and interpolate the topography data for the detailed region, using an interpolated grid spacing of 0.006 degrees (~ 700 m): Using the ''​blockmean''​ executable from the GMT package, we extract and interpolate the topography data for the detailed region, using an interpolated grid spacing of 0.006 degrees (~ 700 m):
-  ​<​pre>​ +  [Mount_StHelens]$ blockmean srtm_12_03.xyz -R-122.3/​-122.1/​46.1/​46.3 -I0.006/​0.006 > ptopo.mean.xyz
-  ​[Mount_StHelens]$ blockmean srtm_12_03.xyz -R-122.3/​-122.1/​46.1/​46.3 -I0.006/​0.006 > ptopo.mean.xyz ​</​pre>​+
  
-This will create a new file ''​ptopo.mean.xyz''​ with a ''​longitude/​latitude/​elevation''​ format +This will create a new file ''​ptopo.mean.xyz''​ with a ''​longitude/​latitude/​elevation''​ format of the region of interest
-of the region of interest+
  
 +=== Converting to Cartesian coordinates ===
  
-Converting to Cartesian coordinates  +Since the CUBIT mesh will need Cartesian coordinates,​ we convert the topography file from ''​longitude/​latitude/​elevation''​ to ''​X/​Y/​Z''​ coordinates using a UTM projection.
- +
-  ​Since the CUBIT mesh will need Cartesian coordinates,​ we convert the topography file from ''​longitude/​latitude/​elevation''​ to ''​X/​Y/​Z''​ coordinates using a UTM projection.+
 Mount St.Helens lies in the UTM zone: 10 (T). Mount St.Helens lies in the UTM zone: 10 (T).
  
 Use the script "​convert_lonlat2utm.pl"​ provided in this example folder: Use the script "​convert_lonlat2utm.pl"​ provided in this example folder:
-  ​<​pre>​ +  [Mount_StHelens]$ ./​convert_lonlat2utm.pl ptopo.mean.xyz 10 > ptopo.mean.utm
-  ​[Mount_StHelens]$ ./​convert_lonlat2utm.pl ptopo.mean.xyz 10 > ptopo.mean.utm ​</​pre>​+
   ​   ​
 to create a new file ''​ptopo.mean.utm''​ which will have a file format: ​ to create a new file ''​ptopo.mean.utm''​ which will have a file format: ​
-  ​<​pre>​ +  #UTM_X (m) #UTM_Y (m) #Z (m) 
-  ​#UTM_X (m) #UTM_Y (m) #Z (m)</​pre>​ + 
-   +{{:​software:​specfem3d:​tutorial:​mount-sthelens-views.jpg?​direct&​400|}}
-<p align="​center"><​a href="​figures/​mount-sthelens-views.jpg/​image_view"><​img src="​figures/​mount-sthelens-views.jpg" width=400 ></​a></​p>​+
  
 ---- ----
Line 528: Line 519:
 === Meshing === === Meshing ===
  
-In the following, we will run a python script within ​"​CUBIT":​http://​cubit.sandia.gov to create the needed mesh files for the partitioner.+In the following, we will run a python script within ​[[http://​cubit.sandia.gov/​|CUBIT]] ​to create the needed mesh files for the partitioner.
  
 1. if not done so yet, change your working directory to the example folder: 1. if not done so yet, change your working directory to the example folder:
   []$ cd SPECFEM3D/​examples/​Mount_StHelens   []$ cd SPECFEM3D/​examples/​Mount_StHelens
  
-2. start the graphical user interface (GUI) of "​CUBIT":​http://​cubit.sandia.gov:  ​+2. start the graphical user interface (GUI) of [[http://​cubit.sandia.gov/|CUBIT]]:  ​
   [Mount_StHelens]$ claro   [Mount_StHelens]$ claro
  
Line 563: Line 554:
   nummaterial_velocity_file   nummaterial_velocity_file
  
-you can also check if the export was successful by examining the output in the Command line window of CUBIT. ​+you can also check if the export was successful by examining the output in the Command line window of CUBIT.
  
 ---- ----
  
-Setting up example folder for simulations ​+=== Setting up example folder for simulations ​===
  
-  ​We will set up the example folder for simulation runs: All the steps and following decomposition,​ database generation and solver run are put in a ''​process.sh''​ bash script file in the example folder. ​+We will set up the example folder for simulation runs: All the steps and following decomposition,​ database generation and solver run are put in a ''​process.sh''​ bash script file in the example folder. ​
  
 1. In case you can run parallel programs on your desktop (needs an MPI installation),​ you can simply run the script: 1. In case you can run parallel programs on your desktop (needs an MPI installation),​ you can simply run the script:
software/specfem3d/start.1388708381.txt.gz · Last modified: 2014/01/03 00:19 by emheien