new file: readslice.R
[wrf-fire-matlab.git] / detect_ignition / new_likelihood / L2_script.m
blob32d161eae02d985082cdefc8fd16ba34e044c6b0
1 function [] = L2_script()
3 prefix = '/bigdisk/james.haley/wrfcycling/wrf-fire/wrfv2_fire/test/TIFs/';
5 pl2 = sort_rsac_files(prefix);
6 if pl2.file{1}(end) == 't'
7     fprintf('TIF files selected \n')
8     return
9 end
11 num_files = length(pl2.file);
12 fprintf('Level 2 data selected \n')
13 fprintf('%d files in the data \n',num_files)
15 if mod(num_files,2) ~= 0
16     fprintf('Warning, odd number of files \n')
17 end
19 sets = num_files/2;
22 for i=1:num_files-1
23     if mod(i,2) == 1
24         set_num = (i+1)/2;
25         file1 = pl2.file{i};
26         file2 = pl2.file{i+1};
27         fprintf('Set %d %s %s \n', set_num, file1(1:25), file2(1:25))
28         v(set_num) = readl2data(prefix,file1,file2);
29     end
30 end
32 pause
34 % example
35 % long = h5read('VNP03MODLL.A2013222.0848.001.2017280021857.h5','/HDFEOS/SWATHS/VNP_750M_GEOLOCATION/Geolocation Fields/Longitude');
36 % lat  = h5read('VNP03MODLL.A2013222.0848.001.2017280021857.h5','/HDFEOS/SWATHS/VNP_750M_GEOLOCATION/Geolocation Fields/Latitude');
37 % mask = h5read('VNP14.A2013222.0848.001.2017280021837.nc','/fire mask')
40 end % function