[ncl-talk] Area average using multiple shapefiles
Xueyan Zhang
xueyanzhang520 at gmail.com
Sat May 9 10:20:49 MDT 2020
Awesome, thanks!
On Sat, May 9, 2020 at 10:07 AM Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:
> You can do this in a single run in an NCL program. Get a list of all the
> shapefile names. This can be done externally, or within NCL like this:
>
> file_names = systemfunc ("ls -1 path/*.shp")
>
> Then read all the precip data into a large array, one time only. Then
> loop over all the names of the shape files. For each shape file, use one
> of the known NCL methods to compute areal average over the defined region
> on the precip array. When the loop is finished, you will have one areal
> average for each region.
>
>
> On Sat, May 9, 2020 at 9:40 AM Xueyan Zhang via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hello ncl-talk,
>>
>> I want to calculate areal average of precipitation (netcdf format) for
>> hundreds of small regions that are defined by shapefiles with different
>> names. Any ideas to do a batch work?
>>
>> Thank you!
>>
>> Xueyan
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200509/5fb61a92/attachment.html>
More information about the ncl-talk
mailing list