[cig-commits] r16282 - seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy

danielpeter at geodynamics.org danielpeter at geodynamics.org
Sat Feb 20 11:26:43 PST 2010


Author: danielpeter
Date: 2010-02-20 11:26:42 -0800 (Sat, 20 Feb 2010)
New Revision: 16282

Added:
   seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/readme_etopo1.txt
   seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xprocess_ETOPO1.m
   seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xread_ETOPO1.m
Log:
In order to use ETOPO1 as new topography, we describe a small
step-by-step procedure how to create the needed file 'ETOPO1.xyz' (rather than upload
the file to this package because of its file size ~4.7GB). however, the scripts are
based on MATLAB, a numerical computing environment, with the Mapping Toolbox, 
which has to be purchased (http://www.mathworks.com/) in order to use the script files. 
these files have been added to 
DATA/topo_bathy:
- readme_etopo1.txt
- xprocess_ETOPO1.m
- xread_ETOPO1.m



Added: seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/readme_etopo1.txt
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/readme_etopo1.txt	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/readme_etopo1.txt	2010-02-20 19:26:42 UTC (rev 16282)
@@ -0,0 +1,37 @@
+----------------------------------------------------------------------
+ETOPO1  
+----------------------------------------------------------------------
+
+
+1. download the whole world gridfile, ETOPO1 Ice Surface, in (georeferenced) tiff format 
+   from this website:
+    
+   http://www.ngdc.noaa.gov/mgg/global/global.html
+
+   and rename file to 'ETOPO1_Ice_c.tif'
+   
+
+2. process with matlab script 'xprocess_ETOPO1.m' to create file 'ETOPO1.xyz':
+
+  > matlab -nojvm -r "xprocess_ETOPO1"
+
+  note: this will probably take a while (~up to a few hours) and produce a rather big file (~4.7GB).
+
+
+3. uncomment the lines in file 'constants.h' which refer to ETOPO1 as topography 
+
+
+in order to check the newly created file 'ETOPO1.xyz', a plotting 
+script 'xread_ETOPO1.m' is provided to produce an image plot of the file. 
+  
+  it can be called by:
+  > matlab -nojvm -r "xread_ETOPO1"
+
+
+
+ETOPO1 reference:
+
+Amante, C. and B. W. Eakins,
+ETOPO1 1 Arc-Minute Global Relief Model: 
+Procedures, Data Sources and Analysis. 
+NOAA Technical Memorandum NESDIS NGDC-24, 19 pp, March 2009.
\ No newline at end of file

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xprocess_ETOPO1.m
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xprocess_ETOPO1.m	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xprocess_ETOPO1.m	2010-02-20 19:26:42 UTC (rev 16282)
@@ -0,0 +1,28 @@
+%% script by Hejun Zhu
+%%
+%% converts ETOPO1_Ice_c.tif file to ETOPO1.xyz
+
+clear all
+close all
+
+
+%% loads tiff file
+fnm='ETOPO1_Ice_c.tif';
+tmp = double(geotiffread(fnm));
+
+
+[leny,lenx]=size(tmp);
+
+%% prints out etopo1 array file
+fid = fopen('ETOPO1.xyz','w');
+for j = 1:leny
+	for i = 1:lenx
+		if i < lenx/2
+			fprintf(fid,'%18.15f\n',tmp(j,lenx/2+i+1));
+		else 
+			fprintf(fid,'%18.15f\n',tmp(j,i-lenx/2+1));
+		end 
+	end 
+end 
+fclose(fid);
+

Added: seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xread_ETOPO1.m
===================================================================
--- seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xread_ETOPO1.m	                        (rev 0)
+++ seismo/3D/SPECFEM3D_GLOBE/trunk/DATA/topo_bathy/xread_ETOPO1.m	2010-02-20 19:26:42 UTC (rev 16282)
@@ -0,0 +1,18 @@
+%% script by Hejun Zhu
+%%
+%% plots image of ETOPO1.xyz
+
+clear all
+close all
+
+%% loads etopo1 array file
+tmp = load('ETOPO1.xyz');
+
+nx=21600;
+ny=10800;
+
+%% plots image
+etopo=reshape(tmp,nx,ny);
+pcolor(etopo(1:50:nx,1:50:ny))
+shading interp
+axis image



More information about the CIG-COMMITS mailing list