[ncl-talk] SSP interpolation

Dennis Shea shea at ucar.edu
Wed Apr 21 14:34:38 MDT 2021


Hi Jonathan,

It was called to my attention that there are some *undocumented* 'area_'
functions in shea_util.ncl.
I am not sure if any of these would be what you want.

%> less "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

Search for:
*area_global_rectilinear_grid*
*area_polar_region*
*area_earth_region*

I guess I was too lazy to document them!
The* shea_util.ncl *library is automatically loaded.






On Wed, Apr 21, 2021 at 9:49 AM Buzan, Jonathan <jbuzan at purdue.edu> wrote:

> Thanks Dennis, I’ll work this out.
>
> Cheers,
> -Jonathan
>
>
>
> On Apr 21, 2021, at 5:21 PM, Dennis Shea <shea at ucar.edu> wrote:
>
> I don't think there is a function but for rectilinear grids (ie: lat[*],
> lon[*] )
>
> *cell_area*= (pi/180)*R^2* ((sind(lat(i)*rad) - sind(lat(j)*rad))*dlon);  *dlon
> in radians*
>
> R:  radius of earth: rearth = 6371.220      ; default; kilometers; ECMWF
> uses this value
>
> see: *get_d2r*
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/get_d2r.shtml>,
> *get_pi*
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/get_pi.shtml>
>
> EG:
>
>
>
>
> *rad = 0.0174532925199433 (double)rad = 0.01745329  (float)*
>
> For 2D lat/lon*, *it would be a bit more tedious
>
>
>
>
>
> On Wed, Apr 21, 2021 at 8:27 AM Buzan, Jonathan via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi NCL-Talk,
>>
>> 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).
>>
>> 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.
>>
>> Is there one?
>>
>> Cheers,
>> -Jonathan
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210421/4e5bf0cd/attachment.html>


More information about the ncl-talk mailing list