1 |
% |
2 |
% Ed Hill |
3 |
% $Id$ |
4 |
% |
5 |
|
6 |
% Data from: |
7 |
% http://mqabi.gsfc.nasa.gov/cgi-bin/MQABI/subset/map_04_week_D1.sst.cgi |
8 |
|
9 |
matlab -nojvm |
10 |
|
11 |
!./pre_process |
12 |
|
13 |
clear all |
14 |
files = [ ... |
15 |
'2002065'; '2002073'; '2002089'; '2002097'; '2002105'; ... |
16 |
'2002113'; ... |
17 |
'2002145'; '2002153'; '2002161'; '2002169'; '2002177'; ... |
18 |
'2002185'; '2002193'; '2002201'; '2002209'; '2002217'; ... |
19 |
]; |
20 |
lats = linspace(47.0, 29.0, 410); |
21 |
lons = linspace(-78.0, -54.0, 546); |
22 |
i = 1; |
23 |
nt = size(files,1); |
24 |
days = [1:nt]; |
25 |
all = zeros(nt,length(lats),length(lons)); |
26 |
for i = 1:size(files,1) |
27 |
|
28 |
var = load([ 'sst-' files(i,:) ]); |
29 |
vt = var; |
30 |
for j = 1:prod(size(vt)) |
31 |
if vt(j) == -99 |
32 |
vt(j) = NaN; |
33 |
end |
34 |
end |
35 |
all(i,:,:) = vt; |
36 |
days(i) = str2double(files(i,5:7)); |
37 |
|
38 |
% surf(lons,lats,vt), view(2), shading interp |
39 |
% pause(1) |
40 |
|
41 |
end |
42 |
|
43 |
id = 'SST'; |
44 |
units = 'deg C (weekly average)'; |
45 |
|
46 |
nc = netcdf('modis_aqua_gulfstr.nc', 'clobber'); |
47 |
nc.reference = 'Various MODIS-Aqua data sets of the Gulf Stream'; |
48 |
nc.author = 'Ed Hill <eh3@mit.edu>'; |
49 |
nc.date = 'Jun 16, 2004'; |
50 |
|
51 |
nc('T') = nt; |
52 |
nc('Y') = length(lats); |
53 |
nc('X') = length(lons); |
54 |
nc{'T'} = 'T'; |
55 |
nc{'Y'} = 'Y'; |
56 |
nc{'X'} = 'X'; |
57 |
nc{ id } = { 'T', 'Y', 'X' }; |
58 |
nc{'X'}.uniquename = 'X'; |
59 |
nc{'X'}.long_name = 'longitude'; |
60 |
nc{'X'}.gridtype = ncint(1); |
61 |
nc{'X'}.units = 'degree_east'; |
62 |
nc{'Y'}.uniquename = 'Y'; |
63 |
nc{'Y'}.long_name = 'latitude'; |
64 |
nc{'Y'}.gridtype = ncint(0); |
65 |
nc{'Y'}.units = 'degree_north'; |
66 |
nc{'T'}.uniquename = 'T'; |
67 |
nc{'T'}.long_name = 'Time'; |
68 |
nc{'T'}.gridtype = ncint(0); |
69 |
nc{'T'}.units = 'days since Jan 1, 2002'; |
70 |
nc{ id }.units = units; |
71 |
nc{ id }.long_name = id; |
72 |
nc{ id }.missing_value = ncdouble(NaN); |
73 |
nc{ id }.FillValue_ = ncdouble(0.); |
74 |
nc{'Y'}(:) = lats; |
75 |
nc{'X'}(:) = lons; |
76 |
nc{'T'}(:) = days; |
77 |
nc{ id }(:) = permute(all,[ 1 2 3 ]); |
78 |
nc = close(nc); |
79 |
|
80 |
! scp ./modis_aqua_gulfstr.nc channel.mit.edu:/home/edhill/INGRID_PEOPLE/EH3/modis-aqua |