gmt ex08 : gmtreformat - 國立臺灣大學format identifier by default, grids will be written as...

46
GMT ex08 : gmtreformat 胡植慶 Jyr-Ching HU, Dept. of Geosciences, NTU

Upload: others

Post on 26-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

GMT ex08 : gmtreformat

胡植慶 Jyr-Ching HU, Dept. of Geosciences, NTU

Page 2: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

grdreformat: Converting between different grdfile formats.

• grdreformatingrdfile[=id[/scale/offset[/NaNvalue]]] outgrdfile[=id[/scale/offset[/NaNvalue]]] [ −N ] [ −Rwest/east/south/north[r] ] [ −V ]

Page 3: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

FORMAT IDENTIFIERBy default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure. This format is conform the COARDS conventions. GMT versions prior to 4.1 produced netCDF files that did not conform to these conventions. Although these files are still supported, their use is depreciated. To write other than floating point COARDS-compliant netCDF files, append the =id suffix to the filename outgrdfile.

When reading files, grdreformat and other GMT programs will automatically recognize any type of netCDF grdfile. These can be in either COARDS-compliant or pre-4.1 format, and contain floating-point or integer data. To read other types of grdfiles, append the =id suffix to the filename ingrdfile.

Page 4: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

ID for pre-4.10 GMT netCDF-based grid format [Default]1 GMT native, C-binary float (4-byte) format w/header 2 GMT native, C-binary short (2-byte) format w/header 3 8-bit standard format SUN rasterfile4 GMT native, C-binary unsigned char (1-byte) format

w/header5 GMT native, C-binary bit-mask format w/header 6 GMT native, C-binary float, Surfer format7 GMT netCDF-based byte format 8 GMT netCDF-based char format 9 GMT netCDF-based short format 10 GMT netCDF-based int format 11 GMT netCDF-based double format

Page 5: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

ID for grdreformat (I)

Id GMT 4 netCDF standard formatsnb GMT netCDF format (byte) (COARDS-compliant)ns GMT netCDF format (short) (COARDS-compliant)ni GMT netCDF format (integer) (COARDS-compliant)nf GMT netCDF format (float) (COARDS-compliant)nd GMT netCDF format (double) (COARDS-compliant)

Page 6: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

ID for grdreformat (II)

Id GMT 3 netCDF legacy formatscb GMT netCDF format (byte) (depreciated)cs GMT netCDF format (short) (depreciated)ci GMT netCDF format (integer) (depreciated)cf GMT netCDF format (float) (depreciated)cd GMT netCDF format (double) (depreciated)

Page 7: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

ID for grdreformat (III)

Id GMT native binary formatsbm GMT native, C-binary format (bit-mask)bb GMT native, C-binary format (byte)bs GMT native, C-binary format (short)bi GMT native, C-binary format (integer)bf GMT native, C-binary format (float)bd GMT native, C-binary format (double)

Page 8: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

ID for grdreformat (IV)

Id Miscellaneous formatsrb SUN rasterfile format (8-bit standard)rf GEODAS grid format GRD98 (NGDC)sf Golden Software Surfer format 6 (float)sd Golden Software Surfer format 7 (double, read-only)

Page 9: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

gmt2008_ex08a1

grdreformat tsaoling.grd=6 tsaoling_gmt.grd -Vgrdgradient tsaoling_gmt.grd -A315 -Nt1 -Gtsaoling_gmt.int.grdgrd2cpt tsaoling_gmt.grd -Crainbow -V -Z > tsaoling.cpt

Page 10: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

gmt2008_ex08a2

grdreformat tsaoling.grd=sf tsaoling_gmt_ns.grd=ns -Vgrdgradient tsaoling_gmt_ns.grd -A315 -Nt1 -Gtsaoling_gmt_ns.int.grd

tsaoling_gmt_ns.grd

Page 11: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Exercise 08a

• Convert tsaoling.grd by different grid format with ID of pre-4.1 version by id = 7, 8, 9, 10 and 11. Compare the results.

Page 12: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Install Surfer: open topo_surfer.grd

Page 13: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Grid Information

Page 14: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Extract Grid

Page 15: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Download the 3DEM software

http://www.visualizationsoftware.com/3dem/

Page 16: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Input the *.hgt files

Page 17: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Coordinates of *.hgt

N25E120.hgt

Page 18: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Output as *.dem files

Page 19: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Install and open 3DEM

Page 20: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Open all *.hgt files in Taiwan area

Page 21: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

*hgt to *.dem

Page 22: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

*.dem to *.grd

.DEM ‐> [ Surfer ] 

‐> .grd ‐> [ surfer 7 grids ] 

‐> .grd ( grdreformat )

Page 23: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

gmt2008_ex08b

rem xyz2grd N25E119.hgt -Ga01.grd -I3c -R119/120/25/26 -N-32768 –ZTLhw

rem grdpaste a01.grd a02.grd -Gb1.grd

psbasemap -Jm1.5 -R119/123/21/26 -B2f1 -X1.5 -Y3 -P -K -V > %filename%

grdgradient e.grd -A10 -Gg001.grd.int -Ne0.8 -M

grdimage e.grd -Jm -R119/123/21/26 -Cg001.cpt -Ig001.grd.int -P -O -K -V >> %filename%

Page 24: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Oral Presentation and Report1. Report:a. Winword file with detailed explications of commands as

well as parameters in your batch or shellscript file;b. Detailed explications of standard input file or table;c. Batch or shellscript file;d. Final results (Figures).e. All necessary data for batch or shellscripts2 : Powerpoint file:

10 minutes of oral presentation3: Upload all the data sources and your reports into our FTP

site under the folder of /~/Final_reports/subfolderPlease make a subfolder with your English name

Page 25: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

References:

1. Ben Horner-Johnson's GMT & Geophysics Links:

http://www.ruf.rice.edu/~ben/gmt.html

2. Geowareswww.geoware-online.com

Page 26: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Final Report: Ben Horner-Johnson's GMT & Geophysics Links

http://www.ruf.rice.edu/~ben/gmt.html

Page 27: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Final Report: Bathymetry

http://www.ruf.rice.edu/~ben/gmt.html

Page 28: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Border• Digital Chart of the World:http://ortelius.maproom.psu.edu/dcw/http://www.maproom.psu.edu/dcw/http://www.mobilegeographics.com/downloads/st_cntry_bn

drs.tar.gz GMT multi-segment file formathttp://cires.colorado.edu/~braup/data/st_cntry_bndrs.tar

GMT multi-segment file format• China• http://sedac.ciesin.columbia.edu/china/admin/bnd90/bnd

90.html• US-Canada borderhttp://www.fcc.gov/oet/info/maps/uscabdry/uscabdry.htmlhttp://www.fcc.gov/oet/info/maps/uscabdry/ibccan.zip

Page 29: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Cities• http://www.ecf.toronto.edu:80/~mao/• http://www.astro.ch/atlas/atlquest-eng.shtmlCIA World Fact Book• http://www.odci.gov/cia/publications/factbook/index.ht

mlLocations/Populations/etc• http://ftp.census.gov/geo/www/gazetteer/places.htmlHeaven's Above:• http://www.heavens-above.com/countries.aspUnited Nations Statistics Division (capitals, 100000+

residents)• http://www.un.org/Depts/unsd/United States NIMA:• http://164.214.2.59:80/gns/html/cntry_files.html• http://gnpswww.nima.mil/geonames/GNS/index.jsp

Page 30: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Climate

Live Access to Climate Data:• http://usjgofs.whoi.edu/las/jglas.htmlSPECMAP:• http://www.ngdc.noaa.gov/mgg/geology/

specmap.htmlWorld Ocean Atlas:• http://www.nodc.noaa.gov/OC5/data_w

oa.html

Page 31: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Color PalettesThe GMT color schemes:• http://earth.uni-

muenster.de/~thoma/GMT/cpt.ps• http://www.seismology.harvard.edu/~becker/i

gmt/data/schemes.pdfColorBrewer: software that generates RGB

values• http://www.personal.psu.edu/faculty/c/a/cab3

8/ColorBrewerBeta.htmlColor Palette City: A collection of color palettes

for GMT• http://craikshef.ac.uk/cpt-city/

Page 32: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Datum conversions

• http://www.ordsvy.gov.uk/services/gps-co/50000026.pdf

• http://www.anzlic.org.au/icsm/gdatm/• ftp://164.214.2.65/pub/gig/tr8350.2/wgs

84fin.pdf• http://164.214.2.59/GandG/wgs84dt

Page 33: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Earthquake Catalog

CNSS: Council of the National Seismic System• http://quake.geo.berkeley.edu/cnss/IRIS: Incorporated Research Institutions for Seismology• http://www.iris.washington.edu/FORMS/event.search.

form.htmNGDC: Significant Earthquake Database• http://www.ngdc.noaa.gov/seg/hazard/sig_srch.shtmlUSGS: National Earthquake Information Center• http://wwwneic.cr.usgs.gov/• http://neic.usgs.gov/neis/epic/epic.htmlUSGS: Weekly reports• http://quake.wr.usgs.gov/QUAKES/WEEKREPS/wee

kly.html

Page 34: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Fault Database

• ftp://alum.wr.usgs.gov/pub/map/asciiLink may be down

• http://geohazards.cr.usgs.gov/eq/faults/WUSfaults Western US except CA and NV

• ftp://ghtftp.cr.usgs.gov/pub/hazmaps/faults/ United States

Page 35: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Focal mechanisms

• http://www.seismology.harvard.edu/CMTsearch.html Harvard CMT catalogue

• http://geohazards.cr.usgs.gov/ USGS (based on NEIS)

• ftp://gldfs.cr.usgs.gov/pub/momten/

Page 36: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Geoid

WGS84 ECM96 field, 15 arc minute grid to degree/order 360

• http://164.214.2.59/GandG/wgs-84/egm96.html

Sandwell & Smith, 1999: World GeoidImage version 9.2, 2 minute resolution, 72S to 72N

• ftp://topex.ucsd.edu/pub/global_grav_2min/

Page 37: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

GravitySandwell & Smith, 1997: World Gravity Image version 7.2, 2

minute resolution, 72S to 72N• http://topex.ucsd.edu/marine_grav/mar_grav.htmlSandwell & Smith, 2002: World Gravity Image version 10.2,

2 minute resolution, 72S to 72N• ftp://topex.ucsd.edu/pub/global_grav_2min/Sandwell & Smith, 2003: World Gravity Image version 11.2,

2 minute resolution, 72S to 72N• ftp://topex.ucsd.edu/pub/global_grav_2min/Sandwell & Smith, 2002: World Gravity Image version 10.1,

1 minute resolution, 72 S to 72N• ftp://topex.ucsd.edu/pub/global_grav_1min/Bureau Gravimetrique International• http://bgi.cnes.fr:8110/bgi_service_a.htmlUSGS• http://crustal.cr.usgs.gov/crustal/geophysics/index.html#o

ne

Page 38: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Plate boundariesPeter Bird's PB2002 model (published in G3: 4(3),

1027, doi:10.1029/2001GC000252)• http://element.ess.ucla.eduGeological Survey of Japan [updated site in 2001, not

sure of file location]• http://www.aist.go.jp/GSJ/dMG/free/plates/Intro.htmlNUVEL 1: nuvel_1_plates (all), separate plates in

multi-segment format, delimiter is ":"• http://jules.unavco.org/Gmt/University of Texas• http://www.ig.utexas.edu/research/projects/plates/plat

es.htmlU.S. Geological Survery• ftp://alum.wr.usgs.gov/pub/map/ascii/plates.asc.Z

Page 39: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Projection

Oddens bookmarks for *any* kind of cartographic related topics

• http://kartoserver.frw.ruu.nl/html/staff/oddens/oddens.htm

PROJ4*.ps.* describes many projections• http://www.remotesensing.org/projA Guide to Coordinate Systems in Great Britain• http://www.o-s.co.uk/services/gps-co/geo6.htmGerman coordinate system (Landesvermessungsamt

Nordrhein-Westfalen)• http://www.lverma.nrw.de/vermessung/raumbezug/pu

rraumbezug.htm

Page 40: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Rivers

HYDRO1K: Drainage network extracted from GTOPO30

• http://edcdaac.usgs.gov/gtopo30/hydro/

Page 41: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Salinity and Temperature

World Ocean Atlas: temperature, salinity, nutrients, oxygen

• http://www.nodc.noaa.gov/OC5/indprod.html [1994, 1998, 2001]

Page 42: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Sediment Thickness

• http://www.ngdc.noaa.gov/mgg/sedthick/sedthick.html

GSC Open file 3039 "A digital compilation of depth to basement and sediment

thickness for the North Atlantic and adjacent coastal land areas"

• http://geoscope.ipgp.jussieu.fr/pub/logiciels/3SMAC (README, 3SMAC.2v6.tar.Z)

Page 43: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

Stress

• http://www-wsm.physik.uni-karlsruhe.de/ World Stress Map

• http://www.world-stress-map.org

Page 44: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

1. An updated digital model of plate boundaries:PB2002

Bird, P. (2003) An updated digital model of plate boundaries, Geochemistry Geophysics Geosystems, 4(3), 1027, doi:10.1029/2001GC000252

http://element.ess.ucla.edu/publications/2003_PB2002/2003_PB2002.htm

Page 45: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

2. Total Sediment Thickness of the World's Oceans & Marginal Seas

• http://www.ngdc.noaa.gov/mgg/sedthick/sedthick.html

1. Download GMT NetCDF file.

2. Download ASCII file with NaNs

3. Download ASCII without NaNs

Page 46: GMT ex08 : gmtreformat - 國立臺灣大學FORMAT IDENTIFIER By default, grids will be written as floating point data stored in binary files using the netCDF format and meta-data structure

3. The World Stress Map Project (WSM)

http://www-wsm.physik.uni-karlsruhe.de/pub/introduction/introduction_frame.htmlhttp://www.world-stress-map.org/