I have multiple satellite orbit paths that cover different latitudes/longitudes, but are all bounded by the same overall lat/lon grid (below). I am trying to split the data from each orbit path into the corresponding 0.5x0.5o lat/lon cell of the large grid.
For example, I'm looking at individual satellite orbits that cross the Beaufort Sea, total lat/lon boundary below:
lat = [82:-0.5:68];
lon = [-118:-0.5:-160];
I have 88 orbit files that cover different tracks over the Beaufort Sea. The latitude, longitude, and data from each orbit track is stored in separate cells. Example from one orbit path:
lat{16,1} = [68.751 68.749 68.746 68.743 68.740 68.738 68.735 68.732 68.729 68.726];
lon{16,1} = [-118.002 -118.006 -118.009 -118.013 -118.016 -118.020 -118.023
-118.027 -118.030 -118.034];
data{16,1} = [0 0 0 0 0 1 0 0 0 0; 0 0 0 0 1 1 1 1 1 0; 0 0 0 1 1 1 0 0 0 0];
% data is stored in height x location
% each 1 is a cloud, each 0 is clear air
Each data array is a different length because each orbit path crossed a different number of locations, but has the same number of heights.
What I would like is to split the columns of each data array according to their corresponding lat/lon and put each data column into the correct 0.5x0.5o grid cell over the Beaufort Sea. Then I'd divide number of 'clouds' by total number of counts at each location and average to find cloud fraction within each grid cell, but I can figure that out after everything is properly gridded.
So if a grid cell were bounded by 68.75-68.73oN and 118.01-118.03oW, for example, then data columns 4-8 would end up in that grid cell because their lat/lon fall within the grid boundary.
Any help or hints would be greatly appreciated!
Thanks,
Aaron
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…