Plot the output of Tephra2 in Matlab
10 Dec 2017tephra2utils
tephra2
map
codes
utilities
This function plots the output of Tephra2 runs on a map. Output files generated by Tephra2 are in a column format (i.e. easting, northing, elevation and mass accumulation), with the number of rows equal to the total number of points in the grid. For some obscure reason, most of Matlab’s plotting functions only accept inputs in a matrix format, i.e. separate
Additionally, Tephra works with UTM coordinates. This function accepts optional arguments to convert the output of Tephra2 to lat/lon coordinates. For this, two additional functions published on the Matlab File Exchange are required:
- utm2ll by François Beauducel
- plot_google_map by Zohar Bar-Yehuda
The function
The function
Required argument
Argument | Description |
---|---|
pathToFile | Path to Tephra2 output file |
Optional name-value pairs of arguments
The optional pairs of name-value arguments are summarised below:
Argument | Description |
---|---|
'zone' | UTM zone of the Tephra2 output, used to convert projected to geographic coordinates and plot a Google Map background if both utm2ll and plot_google_map are available. Should be a double, positive in the N hemisphere, negative in the S hemisphere |
'plot' | Defines if accumulation is plotted as log10 ( |
'contours' | Vector containing the values (kg/m2) of accumulation to contour. By default set to |
'minVal' | Minimum value to be represented on the continuous color surface (kg/m2) |
'vent' | Plot the vent, entered as |
'points' | Additional points to plot, entered as a 2-columns |
Output arguments
Argument | Description |
---|---|
E | Easting matrix (m) |
N | Northing matrix (m) |
M | Mass accumulation matrix (kg/m2) |
Carea | Area of each isomass contour (km2) |
Pmass | Mass contained within each contour (kg) |
contour | Contours (kg/m2) |
lat | Optional - latitude matrix, if 'zone' is specified |
lon | Optional - longitude matrix, if 'zone' is specified |
Examples
When the argument