Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.24 KB

bathymetry_plot.md

File metadata and controls

40 lines (26 loc) · 1.24 KB

bathymetry_plot

Syntax

bathymetry_plot(bathy,ptype)

Description

bathymetry_plot(bathy,ptype) makes a 2D (latitude vs. longitude) or 3D (latitude vs. longitude vs. depth) plot from bathy, where bathy is a struct of Smith & Sandwell Global Topography created using bathymetry_extract. type = '2Dscatter' or '2Dcontour' or '3Dsurf' specifies the plot type.

Example 1

% Setup nctoolbox: 

setup_nctoolbox

% Plot a 3-D velocity domain from Operational Mercator:

model_type = 'mercator'; % 'hycom' 'mercator'
source = '/Users/lnferris/Documents/GitHub/ocean_data_tools/data/mercator/global-analysis-forecast-phy-001-024_1593408360353.nc'; 
date = '18-Mar-2020 00:00:00';   
variable = 'thetao'; 
region = [60.0, 70.0 ,-80, -60];      % [-90 90 -180 180]
variable = 'velocity'; 
model_domain_plot(model_type,source,date,variable,region)

% Add bathymetry:

[bathy] = bathymetry_extract(bathymetry_dir,region);
bathymetry_plot(bathy,'3Dsurf')
caxis([0 1])

Back