% routine to extract drifter tracks from OPeNDAP server % X days prior to today where X is hardcoded as: X=100; % assumes you have "loaddap" loaded somewhere on your machine % and then you need to tell MATLAB where to find it. % My path, for example, is: %addpath /usr/local/bin url=['http://gisweb.wh.whoi.edu:8080/dods/whoi/drift_data?drift_data.ID,drift_data.TIME_GMT,drift_data.LON_DD,drift_data.LAT_DD,drift_data.YRDAY0_GMT&drift_data.TIME_GMT>',datestr(datenum(date)-X)]; loaddap(url); if exist('drift_data')==0; disp('No drifter data found in this time period.');return;end; % get the ID of drifters in this time ids=unique(drift_data.ID,'rows'); [nr,nc]=size(ids); disp([num2str(nr),' drifter tracks found with a total of ',num2str(nc),' fixes.']);