Finding Data between two points on a 3D grid / with 4D data

1 view (last 30 days)
Hello, I'm currently using four dimensional data (latitude, longitude, altitude, and Nitrogen Dioxide Concentration) in my research. I've managed to calculate the amoun of NO2 along a straight line with matlab (only changes in the height dimension), but I'd like to be able to calculate the amount of NO2 along a line between two points at different latitudes and longitudes.
Kind of like this image shows: 3DGrid.png
Here is my current code for calculating a veritcal column amount (the amount of no2 along a straight line in the altitude direction).
%% Vertical Column Calculation
av = 6.022140857747*(10^23); % Avogadro's Number 1/mol
R = 82.06; % Gas Constant cm3*atm/(k*mol)
Pres_atm = Pres*(1/101325); % Changes the pressure matrix to units of atm
no2_moleccm3 = no2*(1/(10^6))*av.*Pres_atm*(1/R).*(1/Temp); % Conversion of no2 to molecules/cm3
% For loop that changes the total height to a difference of heights for
% each altitude layer of 2->27
for index = 2:27
h(:,:,index,:) = flheight(:,:,index,:) - flheight(:,:,index-1,:);
end
h(:,:,1,:) = flheight(:,:,1,:); % Adding the first altitude layer
% For loop that changes the total mid-layer height to a height difference
% at each altitude 2->27
for index = 2:27
mh(:,:,index,:) = mlheight(:,:,index,:) - mlheight(:,:,index-1,:);
end
mh(:,:,1,:) = mlheight(:,:,1,:); % Adding the first mid altitude layer
no2_moleccm2 = no2_moleccm3.*h(:,:,:,:); % Converts no2 to units of molecules per unit area.
vcol = sum(no2_moleccm2(1,1,:,12)) % Calculates a vertical column for any combination of time, lat, and lon.
Is there a package/command in MATLAB that could help me to find the amoun of NO2 along a straight line from one point in my data to another?

Answers (0)

Categories

Find more on Chemistry in Help Center and File Exchange

Products


Release

R2013a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!