How to calculate the area of each grid cell?

41 ビュー (過去 30 日間)
Mikhail Latonin
Mikhail Latonin 2019 年 3 月 2 日
コメント済み: asutosh acharya 2019 年 8 月 8 日
I have gridded data of air temperature with the spatial resolution 1.25 x 1.25 degrees (lon-lat). The data covers the Northern Hemisphere, and the first latitude is 90 degrees.
I need to calculate the area of each grid cell, and my approach is to do that from the latitude bands.
An alternative could be to read in the area of each grid cell directly from the netCDF file. Is that possible in MATLAB?
Here is my code I have tried; I am not sure if that is correct.
i=1:72;
j=2:73;
R=6371; % Earth's radius in km^2
deltalon=1.25;
area=(pi/180)*R^2*((sind(latitude(i)) - sind(latitude(j)))*deltalon); % Area of each grid cell in km^2

採用された回答

Chad Greene
Chad Greene 2019 年 3 月 6 日
The easiest way is to use the cdtarea function in the Climate Data Toolbox for Matlab. For gridded coordinates Lat,Lon, syntax is just
A = cdtarea(Lat,Lon);
for area in square meters, or
A = cdtarea(Lat,Lon,'km2');
for area in square kilometers.
  3 件のコメント
Chad Greene
Chad Greene 2019 年 5 月 28 日
Fantastic; thanks for the feedback, Lei!
asutosh acharya
asutosh acharya 2019 年 8 月 8 日
Can someone help me to calculate area within the countour ? For exaplme the area within 2.5 degree global temparature contour .
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNetCDF についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by