/[MITgcm]/MITgcm_contrib/gael/comm/course-idma2015/computing/idma_float_plot.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/comm/course-idma2015/computing/idma_float_plot.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Jan 15 01:46:42 2015 UTC (10 years, 6 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +16 -9 lines
- improve plots a bit.
- replace fourth panel with T-S diagram.

1 function [p]=idma_float_plot(nameFloat);
2 %
3 %four Argo floats in subtropical Pacific:
4 % nameFloat='2900828';
5 % nameFloat='2900829';
6 % nameFloat='2900830';
7 % nameFloat='2900831';
8
9 addpath gcmfaces;
10 addpath MITprof;
11 MITprof_global
12
13 %load Argo data set:
14 dirIn='release1/MITprof/';
15 nameFile='argo_feb2013_2008_to_2010_model.nc';
16 prof=MITprof_load([dirIn nameFile]);
17
18 %isolate one instrument time series:
19 p=MITprof_subset(prof,'descr',nameFloat);
20
21 %find increasing time order, for plotting:
22 [tmp1,tt]=sort(p.prof_date);
23
24 %plot location of profiles:
25 figureL;
26 subplot(2,2,1); set(gca,'FontSize',12);
27 plot(p.prof_lon(tt),p.prof_lat(tt),'.-'); grid on;
28 t0=num2str(min(p.prof_YYYYMMDD));
29 t1=num2str(max(p.prof_YYYYMMDD));
30 title(['float ' nameFloat ' from ' t0 ' to ' t1]);
31 % axis([-180 -120 10 40]);
32
33 %plot T time series at select depths:
34 subplot(2,2,2); set(gca,'FontSize',12);
35 kk=2; d=num2str(round(p.prof_depth(kk)));
36 o=p.prof_T(tt,kk); m=p.prof_Testim(tt,kk);
37 plot(o,'b.-'); hold on; plot(m,'r.-'); grid on;
38 title(['T at ' d 'm, argo (blue) and ecco v4 (red)']);
39
40 subplot(2,2,4); set(gca,'FontSize',12);
41 kk=10; d=num2str(round(p.prof_depth(kk)));
42 o=p.prof_T(tt,kk); m=p.prof_Testim(tt,kk);
43 plot(o,'b.-'); hold on; plot(m,'r.-'); grid on;
44 title(['T at ' d 'm, argo (blue) and ecco v4 (red)']);
45
46 %plot S-T diagram:
47 subplot(2,2,3); set(gca,'FontSize',12);
48 plot(p.prof_S(:),p.prof_T(:),'b.'); hold on;
49 plot(p.prof_Sestim(:),p.prof_Testim(:),'r.'); hold on;
50 xlabel('salinity'); ylabel('temperature');
51 grid on; title('argo (blue) and ecco v4 (red)');
52

  ViewVC Help
Powered by ViewVC 1.1.22