Hello,<br clear="all"><br> I have data for a regular one degree grid spanning the entire Earth. I was hoping to calculate the grid space area for each grid and then multiply this value by my data value for each individual grid point. The grid point surface area function is:<br>
SA = (Radius of Earth)^2(longitude(2)-longitude(1))(sin(latitude(2))-sin(latitude(1)) where longitude is in radians and latitude is in degrees. Is there a way to do this calculation without having the script create very large arrays. The data is only on the surface. The script I was hoping I'd be able to use would be something like this:<br>
<br>'open dummy.ctl'<br>'set lat -90 90'<br>'set lon 0 360'<br>'set t 1'<br>'set fwrite dummytwo'<br>'set gxout fwrite'<br><br>count = 1<br>while (count <= 100)<br>dummyvar2 = 6371*6371(((lon+1)*(3.141592653589/180))-(lon*(3.141592653589/180)))*(sin(lat+1)-sin(lat))*dummyvar<br>
count = count + 1<br>'d dummyvar2'<br>'set t 'count<br>endwhile<br>disable fwrite<br><br>I am just uncertain how lat and lon would be treated in the above equation. Any insight on how to do this would be greatly appreciated.<br>
<br>Thanks,<br>Jim<br><br> <br>