% SBEACH toolbox - fsbeach_checktsdata % Written by Joshua Simmons 11/2017 % returns all the SBEACH default values % Syntax: % OPT = fsbeach_checktsdata() % Input: % waves = wave data structure - output by fsbeach_genwaves % tides = tide data structure - output by fsbeach_gentides function fsbeach_checktsdata(waves,tide) % check the tide and wave data matches if tide.time(1) ~= waves.time(1) error('Start times for wave and tide data dont match') end if tide.time(end) ~= waves.time(end) error('End times for wave and tide data dont match. Make sure start/end times are hourly (for wave data).') end %check and allocate time parameters; tt = round((tide.time - tide.time(1))*24*60); %check time steps dtt = diff(tt); if any(dtt~=dtt(1)) error('Inconsistent time steps in tide data'); end %now check the wave data lines up (os only required the rest if copied) wt = round((waves.time - waves.time(1))*24*60); dwt = diff(wt); if any(dwt~=dwt(1)) error('Inconsistent time steps in wave data'); end end