-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprocess_float_data_surface.asv
72 lines (62 loc) · 1.82 KB
/
process_float_data_surface.asv
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
%
% Process the BB2FL2 float data to use for the PACE satellite matchups
%
% These float files were processed by Yui Takeshita by collecting the float
% data normally, and also the aux files. The aux files which contained the
% CHL435 data were interpolated to the rest of the data for each float
% using pressure
%
%
%
close all; clear all
fpath = ('/Users/jlong/Documents/Data/PACE Hackweek/BBFL2_floats/');
% Load float data save in 'process_float_data.m'
load([fpath, '/bbfl2_surface_float_data.mat'])
%% Loop through unique profiles
R = fs.CHL435./fs.CHLA;
% plot data XY
figure(1)
scatter(fs.CHL435,fs.CHLA,10,fs.LAT,'filled')
colorbar
title('x = 435, y = 470, color = latitude')
% Map
figure(2)
m_proj('mollweide','long',[-180 179],'lat',[-90 90]);hold on
%m_gshhs_l('patch',rgb('gray'),'edgecolor','k');hold on
m_scatter(fs.LON,fs.LAT,50,R,'Filled')
caxis([0 2])
colormap(cmocean('tarn'))
cb = colorbar;
title(cb,'Chl435:Chl470')
title('')
m_grid('box','off','tickdir','in','linestyle','none','yticklabels',[],'xticklabels',[]);
% Map
figure(2)
m_proj('mollweide','long',[-180 179],'lat',[-90 90]);hold on
%m_gshhs_l('patch',rgb('gray'),'edgecolor','k');hold on
m_scatter(fs.LON,fs.LAT,50,R,'Filled')
caxis([0 2])
colormap(cmocean('tarn'))
cb = colorbar;
title(cb,'Chl435:Chl470')
title('')
m_grid('box','off','tickdir','in','linestyle','none','yticklabels',[],'xticklabels',[]);
% Loop at the ratio through depth for a float
load([fpath, '/bbfl2_float_data.mat'])
cd(fpath)
fn = dir('*.mat');
fn = {fn.name};
i = 3;
% Load float data
load([fpath char(fn(i))])
tmp = char(fn(i));
fR = f.CHL435./f.CHLA;
idx = find(f.CRUISE == str2num(tmp(1:end-13)));
%idx = find(f.CRUISE == 1902601)
figure(2); clf
scatter(f.SDN(idx),-f.PRES(idx),30,fR(idx),'Filled')
ylim([-250 0])
caxis([0 2])
colormap(cmocean('tarn'))
cb = colorbar;
title(cb,'Chl435:Chl470')