[ncl-talk] Area average using a shapefile

Lyndz olagueralyndonmark429 at gmail.com
Sat Apr 4 05:51:06 MDT 2020


Dear NCL-experts,

*[Description of the Problem]*

I would like to get the area average of temperature (netcdf file) based on
a shapefile mask.

The attached file contains a shapefile of climate types.
I want to get the area average based on Climate type 2.
I want to do this per time step and save the output file to a text file.


*[What I have so far]*

I have a script that plots the shapefile. However, I dont know how I can
get the area average of climate type 2 only.


*[Error]*
I get the following error using the attached script:

(0) gsn_csm_contour_map_other: Fatal: the input data array must be 1D or 2D

fatal:Illegal right-hand side type for assignment

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 65 in file
mask_rainfall.ncl



I'll appreciate any help on how I can do this correctly in NCL.

Sincerely,
Lyndz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200404/569c7a60/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mask_rainfall.ncl
Type: application/octet-stream
Size: 3456 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200404/569c7a60/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: climatetype.zip
Type: application/zip
Size: 1240222 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200404/569c7a60/attachment-0001.zip>


More information about the ncl-talk mailing list