This README.txt file was generated on 23 NOV 2020 by Sam Kelly ------------------- GENERAL INFORMATION ------------------- These Matlab scripts and data files replicate the figures in Kelly et al. (2020). See the paper captions for detailed figure descriptions. All input data files can be generated using the Matlab scripts in the "post_processing" folder along with the CSW output. One exception is "slope_16.mat", which simply contains Matlab patch data to blank out land. Alternative land patches can be generated from numerous data sources. Some color maps are generated using othercolor.m by Joshua Atkins, which is available at the MATLAB Central File Exchange (Retrieved December 8, 2020). https://www.mathworks.com/matlabcentral/fileexchange/30564-othercolor. Otherwise, a built-in color map can be substituted. ------------------------------------ SCRIPT DESCRIPTION OF figure_1.m ------------------------------------ This script plots figure 1. Function dependencies: (1) LON2KM.m (2) LAT2KM.m (3) FIXXLIM.m (4) invhot.m (color map) (5) othercolor.m (color map) Input files: (1) r_obs.mat (2) slope_16.mat Output files: (1) figure_1.png ------------------------------------ SCRIPT DESCRIPTION OF figure_2.m ------------------------------------ Plots figure 2. Function dependencies: None Input files: (1) summary_r.mat Output files: (1) figure_2.pdf ------------------------------------ SCRIPT DESCRIPTION OF figure_3.m ------------------------------------ Plots figure 3. Function dependencies: (1) LON2KM.m (2) LAT2KM.m (3) FIXXLIM.m (4) othercolor.m (color map) Input files: (1) coarse.mat (2) slope_16.mat Output files: (1) figure_3.png ------------------------------------ SCRIPT DESCRIPTION OF figure_4.m ------------------------------------ Plots figure 4. Function dependencies: (1) LON2KM.m (2) LAT2KM.m (3) FIXXLIM.m (4) invhot.m (color map) Input files: (1) best_v2.mat (this is the out.mat file produced by best_v2.h is used as csw.h in the CSW source code) (2) slope_16 Output files: (1) figure_4.png ------------------------------------ SCRIPT DESCRIPTION OF table_1.m ------------------------------------ Displays text that can be copied into latex to produce a formatted table. Function dependencies: None Input files: (1) summary_table.mat Output files: None ------------------------------------ FUNCTION DESCRIPTION OF LAT2KM.m ------------------------------------ Input: None Output: The number of kilometers per degree of latitude. ------------------------------------ FUNCTION DESCRIPTION OF LON2KM.m ------------------------------------ Input: Latitude [deg] Output: The number of kilometers per degree of longitude. ------------------------------------ FUNCTION DESCRIPTION OF FIXXLIM.m ------------------------------------ Input: gca (Matlab handle, see Matlab documentation) right x-limit scale (i.e., the desired x/y aspect ratio of the figure) Output: The x-limits that have the desired aspect ratio (given the y-limits and the right x limit). ------------------------------------ DATA FILE DESCRIPTION OF best_v2.mat ------------------------------------ Structure: out fields: lon (9002 x 1) [deg] coordinates at 1/25 degree resolution lat (3652 x 1) [deg] coordinates at 1/25 degree resolution C0 (9002 x 3652) [W/m^2] mode-1 internal tide generation at 1/25 degree resolution Cn (9002 x 3652) [W/m^2] mode-1 internal tide scattering at 1/25 degree resolution K (9002 x 3652) [W/m^2] mode-1 internal tide dissipation by diffusion at 1/25 degree resolution D (9002 x 3652) [W/m^2] mode-1 internal tide dissipation by wave drag at 1/25 degree resolution ----------------------------------- DATA FILE DESCRIPTION OF coarse.mat ----------------------------------- Structure: coarse fields: lat (1 x 132) [deg] coordinates at 1 degree resolution lon (1 x 360) [deg] coordinates at 1 degree resolution A_HRET (360 × 132) [m] Observed mode-1 M2 tidal amplitude from HRET mask (360 × 132] [ ] the 1 degree HRET mask for bad data (a value between 0 and 1) A_CSW (360×132×17) [m] Mode-1 M2 tidal amplitude for each CSW simulation r2_CSW (1 x 17) [ ] coefficient of determination for each CSW simulation vs A_HRET fid (1 x 360 cell) [ ] file name for each CSW simulation ---------------------------------- DATA FILE DESCRIPTION OF r_obs.mat ---------------------------------- Structure: data fields: lon (9002 x 1) [deg] coordinates at 1/25 degree resolution lat (3652 x 1) [deg] coordinates at 1/25 degree resolution kappa (9002 x 3652) [m^2/s] diffusivity at 1/25 degree resolution r_wave (9002 x 3652] [1/s] wave drag at 1/25 degree resolution c (9002 x 3652) [m/s] mode-1 eigenspeed at 1/25 degree resolution delta_c2 (9002 x 3652) [m^2/s^2] mode-1 eigenspeed variance at 1/25 degree resolution lon1 (1 x 360) [deg] coordinates at 1 degree resolution lat1 (1 x 132) [deg] coordinates at 1 degree resolution r_obs (360 x 132) [1/s] wave-drag inferred from observed SSH at 1 degree resolution ------------------------------------- DATA FILE DESCRIPTION OF slope_16.mat ------------------------------------- Structure: coast fields: lon (1 x 3318 cell) [deg] coordinates for continent and island shapes lat (1 x 3318 cell) [deg] coordinates for continent and island shapes -------------------------------------- DATA FILE DESCRIPTION OF summary_r.mat -------------------------------------- Structure: summary fields: cycle [1 x 50] tidal cycle that was averaged r [1/s] constant wave drag fid (1 x 6 cell) [ ] file name for each CSW simulation pct_bad (1 x 6) [%] percentage of bad data (i.e., model grid points with unrealistic amplitudes) E (6 x 50) [J] Integrated mode 1 energy for each simulation during each tidal cycle C (6 x 50) [W] Integrated mode 1 generation for each simulation during each tidal cycle C0 (6 x 50) [W] Integrated total generation for each simulation during each tidal cycle Cn (6 x 50) [W] Integrated mode 1 scattering for each simulation during each tidal cycle divF (6 x 50) [W] Integrated mode 1 energy flux divergence for each simulation during each tidal cycle D (6 x 50) [W] Integrated mode 1 dissipation for each simulation during each tidal cycle error (6 x 50) [W] Integrated error in the mode-1 energy balance for each simulation during each tidal cycle ------------------------------------------ DATA FILE DESCRIPTION OF summary_table.mat ------------------------------------------ Structure: summary fields: fid (1 x 12 cell) [ ] file name for each CSW simulation C (6 x 50) [W] Integrated mode 1 generation for each simulation during the final tidal cycle S (1 x 12) [W] Integrated mode 1 scattering for each simulation during the final tidal cycle divF (1 x 12) [W] Integrated mode 1 energy flux divergence for each simulation during the final tidal cycle D (1 x 12) [W] Integrated mode 1 dissipation for each simulation during the final tidal cycle r2 (1 x 12) [ ] coefficient of determination for each CSW simulation vs A_HRET