This README.txt file was generated on 09 MAR 2022 by Sam Kelly ------------------- GENERAL INFORMATION ------------------- These Matlab scripts and data files replicate the figures in Kelly and Ogbuka (2022). 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 MITgcm output. ------------------------------------ SCRIPT DESCRIPTION OF figure_1.m ------------------------------------ This script plots figure 1. Function dependencies: none Input files: (1) data_L250.mat Output files: (1) figure_1.png ------------------------------------ SCRIPT DESCRIPTION OF figure_2.m ------------------------------------ Plots figure 2. Function dependencies: None Input files: (1) data_OR.mat Output files: (1) figure_2.pdf ------------------------------------ SCRIPT DESCRIPTION OF figure_3_9.m ------------------------------------ Plots figures 3 and 9. Function dependencies: (1) CTW_MODES.m (2) REDBLUE5.m (colorbar) Input files: (1) data_OR.mat Output files: (1) figure_3.png (1) figure_9.png ------------------------------------ SCRIPT DESCRIPTION OF figure_4.m ------------------------------------ Plots figure 4. Function dependencies: (1) REDBLUE5.m (colorbar) Input files: (1) data_post_L250.mat Output files: (1) figure_4.png ------------------------------------ SCRIPT DESCRIPTION OF figure_5.m ------------------------------------ Plots figure 5. Function dependencies: (1) REDBLUE5.m (colorbar) Input files: (1) data_post_L250.mat Output files: (1) figure_5.png ------------------------------------ SCRIPT DESCRIPTION OF figure_6.m ------------------------------------ Plots figure 6. Function dependencies: none Input files: (1) data_post_L250.mat Output files: (1) figure_6.png ------------------------------------ SCRIPT DESCRIPTION OF figure_7.m ------------------------------------ Plots figure 7. Function dependencies: none Input files: (1) mit_L.mat Output files: (1) figure_7.png ------------------------------------ SCRIPT DESCRIPTION OF figure_8.m ------------------------------------ Plots figure 8. Function dependencies: none Input files: (1) mit_W.mat Output files: (1) figure_8.png ------------------------------------ SCRIPT DESCRIPTION OF figure_10.m ------------------------------------ Plots figure 10. Function dependencies: (1) TPXO.m (2) LAT2KM.m (3) LON2KM.m (4) FIXXLIM.m Input files: (1) data_post_OR.mat Output files: (1) figure_10.png ------------------------------------ SCRIPT DESCRIPTION OF figure_11.m ------------------------------------ Plots figure 11. Function dependencies: none Input files: (1) data_post_OR.mat Output files: (1) figure_11.png ------------------------------------ FUNCTION DESCRIPTION OF CSW_MODES.m ------------------------------------ see function header ------------------------------------ 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). ------------------------------------ FUNCTION DESCRIPTION OF REDBLUE5.m ------------------------------------ A custom Matlab color map that can is called like a standard color map (see Matlab documentation). ------------------------------------ FUNCTION DESCRIPTION OF TPXO.m ------------------------------------ Reads the NetCDF TPXOO8 atlas and returns the amplitudes of the tidal transports and elevations at each lon and lat. The amplitudes can be used to predict the tides for a given constituent using the formula: U(x,y,t)=Real[U(x,y)*exp(ii*omega*t)] where t is seconds from the start of the input day Input: lon [m x 1] or [m x n] Vector of longitudes [0 360] lat [n x 1] or [m x n] Vector of latitudes [-90 90] conID [k x 1] Constituents to include (e.g., see list below, [1 3] returns M2 and K1) day [1 x 1] The serial day (use 'datenum') for which the phase is set to zero vel_flag (0 or 1) If 0 (default) return transports, if 1 return velocity Output: U, V [m x n x k] Complex amplitude of transport [m^2/s] eta [m x n x k] Complex amplitude of tidal elevation [m] omega [k x 1] The tidal frequency in rad/s File dependencies (available at https://www.tpxo.net/): uv.k1_tpxo8_atlas_30c.nc hf.k1_tpxo8_atlas_30c.nc grid_tpxo8atlas_30.nc ------------------------------------ DATA FILE DESCRIPTION OF data_L250.mat ------------------------------------ Structure: data fields: X (1 x 400) [m] longshore grid cell coordinates Y (1 x 150) [m] cross-shore grid cell coordinates Z (60 x 1) [m] vertical grid cell coordinates T (1 x 9000) [] unnecessary N2 (60 x 1) [1/s^2] buoyancy frequency squared H (400 x 150) [m] depth W (1 x 1) [m] amplitude of bump L (1 x 1) [m] width of bump U0 (1 x 1) [m/s] amplitude of forcing velocity x0 (1 x 1) [m] location of the start of the bump omega (1 x 1) [1/s] forcing frequency f (1 x 1) [1/s] inertial frequency wall (1 x 1) [] flag indicating whether the bump uses a vertical wall (1) or translated slope (2) strat (1 x 1) [] flag indicating whether there was density stratification (1) or not (0) ----------------------------------- DATA FILE DESCRIPTION OF data_OR.mat ----------------------------------- Structure: data fields: X (1 x 278) [m] longshore grid cell coordinates Y (1 x 148) [m] cross-shore grid cell coordinates Z (60 x 1) [m] vertical grid cell coordinates T (1 x 9000) [] unnecessary N2 (60 x 1) [1/s^2] buoyancy frequency squared H (148 x 278) [m] depth omega (1 x 1) [1/s] forcing frequency f (1 x 1) [1/s] inertial frequency lon (1 x 278) [deg] longitude grid cell coordinates lat (1 x 148) [deg] latitude grid cell coordinates ---------------------------------- DATA FILE DESCRIPTION OF data_post_L250.mat ---------------------------------- Structure: grid fields: x (400 x 1) [m] longshore grid cell coordinates y (150 x 1) [m] cross-shore grid cell coordinates z (60 x 1) [m] vertical grid cell coordinates t (24 x 1) [s] time N2 (60 x 1) [1/s^2] buoyancy frequency squared H (400 x 150) [m] depth W (1 x 1) [m] amplitude of bump L (1 x 1) [m] width of bump U0 (1 x 1) [m/s] amplitude of forcing velocity x0 (1 x 1) [m] location of the start of the bump omega (1 x 1) [1/s] forcing frequency f (1 x 1) [1/s] inertial frequency Structure: modes fields: u (400 x 150 x 60 x 10) [m/s] K1 longshore velocity for modes 0-9 p (400 x 150 x 60 x 10) [pa] K1 pressure for modes 0-9 eta (400 x 150 x 10) [m] K1 SSH for modes 0-9 lambda (400 x 10) [m] wavelength for modes 0-9 F (400 x 1) [W] longshore energy flux Ac (400 x 10) [] modal amplitude for modes 0-9 Fc (400 x 10) [W/m] longshore energy flux for modes 0-9 divF (400 x 10) [W/m] longshore energy flux divergence for modes 0-9 Cn (400 x 10) [W/m] longshore scattering for modes 0-9 Structure: raw fields: u (401 x 150 x 60) [m/s] K1 longshore velocity p (400 x 150 x 60) [pa] K1 pressure eta (400 x 150) [m] K1 SSH ------------------------------------- DATA FILE DESCRIPTION OF data_post_OR.mat ------------------------------------- Structure: grid fields: x (148 x 1) [m] cross-shore grid cell coordinates y (278 x 1) [m] longshore grid cell coordinates z (60 x 1) [m] vertical grid cell coordinates t (24 x 1) [s] time N2 (60 x 1) [1/s^2] buoyancy frequency squared H (400 x 150) [m] depth omega (1 x 1) [1/s] forcing frequency f (1 x 1) [1/s] inertial frequency lon (1 x 278) [deg] longitude grid cell coordinates lat (1 x 148) [deg] latitude grid cell coordinates Structure: modes fields: V (148 x 278 x 10) [m^2/s] K1 longshore velocity transport for modes 0-9 eta (148 x 278 x 10) [m] K1 SSH for modes 0-9 lambda (278 x 10) [m] wavelength for modes 0-9 F (278 x 1) [W] longshore energy flux Ac (278 x 10) [] modal amplitude for modes 0-9 Fc (278 x 10) [W/m] longshore energy flux for modes 0-9 divF (278 x 10) [W/m] longshore energy flux divergence for modes 0-9 Cn (278 x 10) [W/m] longshore scattering for modes 0-9 Structure: raw fields: u (149 x 278 x 60) [m/s] K1 cross-shore velocity u (148 x 279 x 60) [m/s] K1 longshore velocity p (148 x 278 x 60) [pa] K1 pressure eta (148 x 278) [m] K1 SSH -------------------------------------- DATA FILE DESCRIPTION OF mit_L.mat -------------------------------------- Structure: mit fields: directory (string) [ ] directory name with MITgcm simulations s (18 x 1) [km] length of coastline along bump for each simulation L (18 x 1) [km] width of bump for each simulation C (18 x 10) [W/(km/m^3)] longshore integrated CTW generation for modes 0-10 in each simulation lambda (18 x 10) [km] wavelength of CTW modes ------------------------------------------ DATA FILE DESCRIPTION OF mit_W.mat ------------------------------------------ Structure: mit fields: directory (string) [ ] directory name with MITgcm simulations W (10 x 1) [km] amplitude of bump for each simulation C (10 x 10) [W/(km/m^3)] longshore integrated CTW generation for modes 0-10 in each simulation lambda (10 x 10) [km] wavelength of CTW modes