% ISLICE Extracts a vertical slice of a scalar variable % along row I from a 4D ECOM NetCDF file. % % USAGE: [u,y,z,jd]=islice(cdf,var,time,i_index) % cdf = NetCDF file name (string) (e.g. 'ecomsi.cdf') % var = variable name (string) (e.g. 'salt' for salinity) % time = time step (integer) (e.g. 1 for 1st time step) % i_index = I index along which to take vertical slice % % u = 2D array of the variable "var" % y = along slice coordinates (km) % z = depth coordinates (m) % jd = Julian time of slice (type "help julian" for details) % % % Example: to extract temperature along I=20 % from the 3rd time step in the file 'ecom3d.cdf', do: % % [temp,x,y]=islice('ecom3d.cdf','temp',3,20); % % Tip: Visualize these arrays using EXTCONTOUR, % [e.g. EXTCONTOUR(y,z,temp,'label','fill');] % Rich Signell rsignell@usgs.gov