% example code to get the last X days of eMOLT data via OPeNDAP % % 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 X=100; % number of days prior to today to search for eMOLT data % get the temperature data url=['http://gisweb.wh.whoi.edu:8080/dods/whoi/emolt_sensor?emolt_sensor.SITE,emolt_sensor.YRDAY0_LOCAL,emolt_sensor.TEMP,emolt_sensor.DEPTH_I&emolt_sensor.TIME_LOCAL>',datestr(datenum(date)-X)]; loaddap(url); % get the site codes associated with this temperature sites=unique(emolt_sensor.SITE,'rows'); [nr,nc]=size(sites); % now get the lat/lons associated with these sites for k=1:nr; url2=['http://gisweb.wh.whoi.edu:8080/dods/whoi/emolt_site?emolt_site.SITE,emolt_site.LAT_DDMM,emolt_site.LON_DDMM&emolt_site.SITE="',sites(k,:),'"']; loaddap(url2); [lat(k),lon(k)]=dm2dd(emolt_site.LAT_DDMM,emolt_site.LON_DDMM);% converts to decimal degrees end;