<div dir="ltr"><div>I don't think there is a function but for rectilinear grids (ie: lat[*],  lon[*] )<br></div><div><br></div><div><b id="gmail-yui_3_10_0_1_1619017610545_110">cell_area</b>= (pi/180)*R^2* ((sind(lat(i)*rad) - sind(lat(j)*rad))*dlon);  <b>dlon in radians</b></div><div><br></div><div>R:  radius of earth: rearth = 6371.220      ; default; kilometers; ECMWF uses this value</div><div><br></div><div>see: <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/get_d2r.shtml"><b>get_d2r</b></a>, <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/get_pi.shtml"><b>get_pi</b></a></div><div><br></div><div>EG:<br></div><div><pre><b>rad = 0.0174532925199433 (double)<br>rad = <b>0.01745329  (float)<br><br></b></b></pre><pre>For 2D lat/lon<b><b>, </b></b>it would be a bit more tedious<b><b><br><br><br></b></b></pre><pre><b><b><br></b></b></pre><pre><b><b><br></b></b></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 21, 2021 at 8:27 AM Buzan, Jonathan via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi NCL-Talk,<br>
<br>
I am working with SSP files. They are incomplete 1km x 1km lat-lon grids (aka the omit high latitudes), with missing/fill values over oceans. The population data is absolutes, not density per area. All of this makes it hard to interpolate to a low resolution grid approximate to CMIP data (aka 100 km x 100 km). <br>
<br>
I was thinking that I would divide each grid cell by the area to get a density value, then interpolate that to 1°x1° grid. But, I am having trouble finding a NCL function that will calculate the area of a grid cell.<br>
<br>
Is there one?<br>
<br>
Cheers,<br>
-Jonathan<br>
<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>