[ncl-talk] Area average using a shapefile

Karin Meier-Fleischer meier-fleischer at dkrz.de
Tue Apr 14 06:11:05 MDT 2020


Hi Lyndz,

excuse me for the late reply. Without the data file 
ymonmean_temp_1979-2018.nc it is not possible to help.

Sorry,
Karin

Am 04.04.20 um 13:51 schrieb Lyndz:
> 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



More information about the ncl-talk mailing list