1 %====================================================================== |
1 %====================================================================== |
2 % G E T E R R . M |
2 % G E T E R R . M |
3 % doc: Wed Jun 30 23:24:51 2004 |
3 % doc: Wed Jun 30 23:24:51 2004 |
4 % dlm: Thu Dec 7 09:50:52 2017 |
4 % dlm: Mon Jan 27 19:42:27 2020 |
5 % (c) 2004 ladcp@ |
5 % (c) 2004 ladcp@ |
6 % uE-Info: 23 47 NIL 0 0 72 0 2 8 NIL ofnI |
6 % uE-Info: 25 73 NIL 0 0 72 0 2 8 NIL ofnI |
7 %====================================================================== |
7 %====================================================================== |
8 |
8 |
9 % MODIFICATIONS BY ANT: |
9 % MODIFICATIONS BY ANT: |
10 % Jun 30, 2004: - BUG: bin numbering was wrong for asymmetric up/down |
10 % Jun 30, 2004: - BUG: bin numbering was wrong for asymmetric up/down |
11 % bin setup |
11 % bin setup |
19 % Jul 6, 2001: - fixed plot title |
19 % Jul 6, 2001: - fixed plot title |
20 % Jan 25, 2015: - separated uc/dc in bin-averaged residual plots |
20 % Jan 25, 2015: - separated uc/dc in bin-averaged residual plots |
21 % Jan 28, 2015: - BUG: figure legend typo |
21 % Jan 28, 2015: - BUG: figure legend typo |
22 % Dec 7, 2017: - BUG: btmi was set to nan for P6 station 94; fixed with |
22 % Dec 7, 2017: - BUG: btmi was set to nan for P6 station 94; fixed with |
23 % symptomatic work-around |
23 % symptomatic work-around |
|
24 % Jan 27, 2020: - BUG: btmi was set to nan for JR195 stations 20 and 30; |
|
25 % fixed by skipping sub-plots if btmi is not finite |
|
26 |
24 |
27 |
25 function l=geterr(ps,dr,d,iplot) |
28 function l=geterr(ps,dr,d,iplot) |
26 % function l=geterr(dr,d,iplot) |
29 % function l=geterr(dr,d,iplot) |
27 % returns predicitons of U_ocean and |
30 % returns predicitons of U_ocean and |
28 % U_ctd on the raw data grid |
31 % U_ctd on the raw data grid |
247 colorbar |
250 colorbar |
248 xlabel('Super Ensemble #'); |
251 xlabel('Super Ensemble #'); |
249 title(sprintf('U-err std: %.03f',meannan(stdnan(l.ru_err')))) |
252 title(sprintf('U-err std: %.03f',meannan(stdnan(l.ru_err')))) |
250 |
253 |
251 subplot(232) |
254 subplot(232) |
252 if ps.fig3_avgerr == 2 |
255 if isfinite(btmi) |
253 plot(medianan(l.ru_err(:,1:btmi)')',-ib,'r',medianan(l.ru_err(:,btmi:end)')',-ib,'b'); |
256 if ps.fig3_avgerr == 2 |
254 title('median(U-err) [r/b: down-/up-cast]') |
257 plot(medianan(l.ru_err(:,1:btmi)')',-ib,'r',medianan(l.ru_err(:,btmi:end)')',-ib,'b'); |
255 else |
258 title('median(U-err) [r/b: down-/up-cast]') |
256 plot(meanan(l.ru_err(:,1:btmi)')',-ib,'r',meanan(l.ru_err(:,btmi:end)')',-ib,'b'); |
259 else |
257 title('mean(U-err) [r/b: down-/up-cast]') |
260 plot(meanan(l.ru_err(:,1:btmi)')',-ib,'r',meanan(l.ru_err(:,btmi:end)')',-ib,'b'); |
|
261 title('mean(U-err) [r/b: down-/up-cast]') |
|
262 end |
258 end |
263 end |
259 set(gca,'XLim',[-0.05 0.05]); |
264 set(gca,'XLim',[-0.05 0.05]); |
260 set(gca,'Ylim',[-ib(end) -ib(1)]); |
265 set(gca,'Ylim',[-ib(end) -ib(1)]); |
261 set(gca,'Xtick',[-0.04:0.02:0.04]); |
266 set(gca,'Xtick',[-0.04:0.02:0.04]); |
262 grid |
267 grid |
313 xlabel('Super Ensemble #'); |
318 xlabel('Super Ensemble #'); |
314 ylabel('Bin #'); |
319 ylabel('Bin #'); |
315 title(sprintf('V-err std: %.03f',meannan(stdnan(l.rv_err')))) |
320 title(sprintf('V-err std: %.03f',meannan(stdnan(l.rv_err')))) |
316 |
321 |
317 subplot(235) |
322 subplot(235) |
318 if ps.fig3_avgerr == 2 |
323 if isfinite(btmi) |
319 plot(medianan(l.rv_err(:,1:btmi)')',-ib,'r',medianan(l.rv_err(:,btmi:end)')',-ib,'b'); |
324 if ps.fig3_avgerr == 2 |
320 title('median(V-err) [r/b: down-/up-cast]') |
325 plot(medianan(l.rv_err(:,1:btmi)')',-ib,'r',medianan(l.rv_err(:,btmi:end)')',-ib,'b'); |
321 else |
326 title('median(V-err) [r/b: down-/up-cast]') |
322 plot(meanan(l.rv_err(:,1:btmi)')',-ib,'r',meanan(l.rv_err(:,btmi:end)')',-ib,'b'); |
327 else |
323 title('mean(V-err) [r/b: down-/up-cast]') |
328 plot(meanan(l.rv_err(:,1:btmi)')',-ib,'r',meanan(l.rv_err(:,btmi:end)')',-ib,'b'); |
|
329 title('mean(V-err) [r/b: down-/up-cast]') |
|
330 end |
324 end |
331 end |
325 set(gca,'XLim',[-0.05 0.05]); |
332 set(gca,'XLim',[-0.05 0.05]); |
326 set(gca,'Ylim',[-ib(end) -ib(1)]); |
333 set(gca,'Ylim',[-ib(end) -ib(1)]); |
327 set(gca,'Xtick',[-0.04:0.02:0.04]); |
334 set(gca,'Xtick',[-0.04:0.02:0.04]); |
328 grid |
335 grid |