[ncl-talk] Error using xMonthAvg

Ipshita Majhi ipmajhi at alaska.edu
Wed Sep 10 23:18:00 MDT 2014


; This program is to calculate the area average for snow for all the data
period
Dear NCL,

I am working on CDO on the side and there are some errors with installing
netcdf operator for me.  I am working on that. I also thought of using NCL
xMonthAvg the documentation does say high frequency data .

I am getting this error:
Variable:xMonth
Type:integer
Number of dimension:1
Dimensions and sizes: [573]
Coordinates;
fatal :Assignment type mismatch, right hand can't be coerced to type of
left hand side
fatal :Error occured at line
4265"$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl".

The global attributes for the variable of snow covered extent
byte snow_cover_extent(time, rows, cols) ;
        snow_cover_extent:long_name = "NOAA/NCDC Climate Data Record of
snow cover extent" ;
        snow_cover_extent:standard_name = "surface_snow_binary_mask" ;
        snow_cover_extent:grid_mapping = "coord_system" ;
        snow_cover_extent:coordinates = "longitude latitude time
snow_cover_threshold" ;
        snow_cover_extent:valid_range = 0b, 1b ;
        snow_cover_extent:flag_values = 0b, 1b ;
        snow_cover_extent:flag_meanings = "no_snow snow_covered" ;
        snow_cover_extent:_FillValue = -9b ;

*****************************************

I

******************************************
; This program is to calculate the area average for snow for all the data
period
;*******************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;*******************************************

;The intention is to average the sce for each year and for each month

a=addfile("~/Documents/Snow_cover_IMS/nhsce_v01r01_19661004_20140602.nc
","r")

sce=a->snow_cover_extent(:,:,:)
xMonthAvg = calculate_monthly_values(sce, "avg", 0, False)

;***************************************************

I will be grateful if you could guide me on this

Best Regards
Ipshita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140911/a5d59d51/attachment.html 


More information about the ncl-talk mailing list