[ncl-talk] Error using xMonthAvg
Ipshita Majhi
ipmajhi at alaska.edu
Thu Sep 11 13:20:30 MDT 2014
Thank you so much I will use the information. I did manage to do it in CDO
too :) which was also awesome!
Thank you again
Ipshita
On Thu, Sep 11, 2014 at 1:01 PM, Dennis Shea <shea at ucar.edu> wrote:
> Use
>
> sce = byte2flt( a->snow_cover_extent )
> printVarSummary(sce)
>
> The input 'snow_cover_extent' is binary (0 or 1):
> "surface_snow_binary_mask"
> When averaging you will get fractional values like 0.31 or 0.82 or ...
> *You* must decide how to interpret these values for "the area average for
> snow"
>
>
>
> On Wed, Sep 10, 2014 at 11:18 PM, Ipshita Majhi <ipmajhi at alaska.edu>
> wrote:
>
>> ; 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
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140911/7093cf15/attachment.html
More information about the ncl-talk
mailing list