[cig-commits] [commit] devel, master: 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 (ac60ec9)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:03:46 PST 2014


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

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

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

commit ac60ec90c39ba35eeb402e25aa28fc74e2d900d6
Author: Daniel Peter <peterda at ethz.ch>
Date:   Sat Feb 20 19:26:42 2010 +0000

    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


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

ac60ec90c39ba35eeb402e25aa28fc74e2d900d6
 topo_bathy/readme_etopo1.txt | 37 +++++++++++++++++++++++++++++++++++++
 topo_bathy/xprocess_ETOPO1.m | 28 ++++++++++++++++++++++++++++
 topo_bathy/xread_ETOPO1.m    | 18 ++++++++++++++++++
 3 files changed, 83 insertions(+)

diff --git a/topo_bathy/readme_etopo1.txt b/topo_bathy/readme_etopo1.txt
new file mode 100644
index 0000000..fdeb560
--- /dev/null
+++ b/topo_bathy/readme_etopo1.txt
@@ -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
diff --git a/topo_bathy/xprocess_ETOPO1.m b/topo_bathy/xprocess_ETOPO1.m
new file mode 100644
index 0000000..a337d7e
--- /dev/null
+++ b/topo_bathy/xprocess_ETOPO1.m
@@ -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);
+
diff --git a/topo_bathy/xread_ETOPO1.m b/topo_bathy/xread_ETOPO1.m
new file mode 100644
index 0000000..3a45ec5
--- /dev/null
+++ b/topo_bathy/xread_ETOPO1.m
@@ -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