Contents
Specify input variables
uri_a='http://gyre.umeoce.maine.edu/data/gomoos/buoy/archive/A01/realtime/A01.sbe37.realtime.20m.nc';
uri_b='http://gyre.umeoce.maine.edu/data/gomoos/buoy/archive/B01/realtime/B01.sbe37.realtime.50m.nc';
uri_mod='http://coast-enviro.er.usgs.gov/thredds/dodsC/gom_interop/umaine/latest';
Call njTBX functions
[Tc_a,ga] = nj_grid_varget(uri_a,'temperature');
[Tc_b,gb] = nj_grid_varget(uri_b,'temperature');
Tf_last=[Tc_a(end) Tc_b(end)]*(9/5)+32;
lon=[ga.lon gb.lon];
lat=[ga.lat gb.lat];
jd=[ga.time(end) gb.time(end)];
ind=find(abs(now+4/24-jd)<1);
if isempty(ind),
disp('Sorry, no model data within 24 hours of last observation');
return
end
jdmax=max(jd(ind));
jdmod=nj_time(uri_mod,'temp');
itime=near(jdmod,jdmax);
[Tc,g] = nj_grid_varget(uri_mod,'temp',[itime,1,1,1],[1,inf,inf,inf]);
Tf = (9/5)*Tc+32;
Plot data
pcolorjw(g.lon,g.lat,squeeze(double(Tf(end,:,:)))); shading flat;
dasp(43);
set(gcf,'color','white');
title(['Bottom Temperature (deg F): ' datestr(g.time) ' UTC'])
cax=caxis;
cdot(lon(ind),lat(ind),Tf_last(ind),jet,20,1,cax);
colorbar
load gom_coast.mat coast
fillseg(coast);