Distribution of Lightning in different circles for different distances

조회 수: 4 (최근 30일)
Joydeb Saha
Joydeb Saha 2024년 9월 9일
답변: Shishir Reddy 2024년 9월 9일
Consider the cyclone eye cordinate is 15.0, 88.4. The lightning data is E:\LIGHT\a.nc
[ncid = netcdf.open(ncFilePath, 'NOWRITE');
lat = netcdf.getVar(ncid, netcdf.inqVarID(ncid, 'lat'));
lon = netcdf.getVar(ncid, netcdf.inqVarID(ncid, 'lon'));
time = netcdf.getVar(ncid, netcdf.inqVarID(ncid, 'time'));
LTNG = netcdf.getVar(ncid, netcdf.inqVarID(ncid, 'lghtn_count'));
netcdf.close(ncid);]
So I wanted an Azimuthal distribution of lightning flashes in a circle within a distance of 300 km from the cyclone eye.

답변 (1개)

Shishir Reddy
Shishir Reddy 2024년 9월 9일
Hi Joydeb
As per my understanding, for a given data of lightning flashes, you would like to analyse the azimuthal distribution of flashes that are within a 300 km radius from the cyclone eye. I am assuming that you have latitudes, longitudes of all the lightning flashes and they are stored in ‘lat’ and ‘lon’ vectors respectively. Since I have the limited understanding of the data, here are some general steps that can be followed.
  1. Distance should be calculated from cyclone eye and each lightning location.
  2. Flashes that are within 300km range should be filtered out.
  3. Computing the angle for these lightnings
Refer to the sample MATLAB script below for implementation of these steps:
eyeLat = 15.0;
eyeLon = 88.4;
for i = 1:length(lat)
dLat = deg2rad(lat(i) - eyeLat);
dLon = deg2rad(lon(i) - eyeLon);
a = sin(dLat/2)^2 + cos(deg2rad(eyeLat)) * cos(deg2rad(lat(i))) * sin(dLon/2)^2;
c = 2 * atan2(sqrt(a), sqrt(1-a));
distances(i) = 6371 * c; % Earth radius in kilometers
azimuths(i) = atan2(sin(dLon) * cos(deg2rad(lat(i))), ...
cos(deg2rad(eyeLat)) * sin(deg2rad(lat(i))) -sin(deg2rad(eyeLat)) * cos(deg2rad(lat(i))) * cos(dLon));
end
withinRadius = distances <= radius;
filteredAzimuths = azimuths(withinRadius);
Finally, the results can be analysed by plotting using the ‘polarhistogram’ function.
polarhistogram(filteredAzimuths, 36); % 36 bins for each 10-degree intervals
For more information regarding ‘polarhistogram’ function, kindly refer the following documentation
I hope this helps.

카테고리

Help CenterFile Exchange에서 Geometric Geodesy에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by