-
Notifications
You must be signed in to change notification settings - Fork 6
/
Signature_StructureFunction_Plots.m
81 lines (62 loc) · 1.71 KB
/
Signature_StructureFunction_Plots.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
% Example Plot of Spectral Density Functions
clc
clear
close all
% Select Bin
bin = 10;
% Sampling frequency
fs=8;
% Ensembles
Ens1=10;
EnsN=34;
NEns=EnsN-Ens1+1;
% Maximum velocity for colormap
Umax=2;
Umin=0.5;
dU=0.5;
% Structure Function D(z,r) path and file
fpath = ['/Users/Maru/Documents/PhD_UW/5BeamCodes/Signature_Dissipation'];
fname = ['Dzr_Beam5.mat']; %This file contains the structure function for el depths
load([ fpath '/' fname ])
% Mean Flow
fpath2=['/Users/Maru/Documents/PhD_UW/5BeamCodes/BinDataSignature'];
fname2=['Signature_Usigned_Bin' int2str(bin) '.mat'];
load([fpath2 '/' fname2])
% Range
fpath3=['/Users/Maru/Documents/PhD_UW/5BeamCodes/BinDataSignature'];
prefix3 = ['SignatureData_QC_Bin'];
fname3 = [prefix3 int2str(bin) '.mat'];
load([ fpath3 '/' fname3 ])
z=SigData.range;
%% --------------------------------------------------------------------------
% D(z,r) Plot
Usigned(1:NEns)=nanmean(Ens_Usigned(:,Ens1:EnsN),1)';
Usigned(abs(Usigned(:))<0.5)=NaN;
maxr = z(bin);
for i=1:NEns
D(i,:)=Dzr(i).D5(bin,:);
r(i,:)=Dzr(i).r5(bin,:);
end
figure(1)
clf
colormap jet
cmap=colormap;
for i=1:NEns
goodpts = ~isnan( D(i,:) ) & r(i,:)< maxr & r(i,:) >= 0;
if ~isnan(Usigned(i))
cindex=min([ceil(abs(Usigned(i))/Umax*64); 64]);
semilogy(r(i,goodpts),D(i,goodpts),'o-','MarkerSize',5,'color',cmap(cindex,:),'MarkerFaceColor',cmap(cindex,:),'LineWidth',2)
hold on
end
end
text(4,4.2e-2,'~r ^{2/3}','FontSize',20)
semilogy([1:0.1:10],10^-2*[1:0.1:10].^(2/3),'--k')
hold off
xlabel('r (m)')
ylabel('D(z,r)')
cb = colorbar;
caxis([Umin Umax])
set(cb,'YTickLabel',[Umin:dU:Umax]);
ylabel(cb,'<U> (ms^{-1})','FontSize',16)
set(gca,'FontSize',16)
axis([0 10 10^-5 10^-1])