Re: regional mean precipitation

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu May 01 2014 - 10:59:36 MDT

The error in the graphics not in the computation of the mean.

Did you look at the output from the following?

printVarSummary(precAvg)
printVarSummary(pr0Avg)
printVarSummary(pr1Avg)
printVarSummary(pr2Avg)

Please carefully read:
http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_areaave_Wrap.shtml

====

[1] These are *time series* ==> precAvg(time)

     *not* spatial grids that can be *contoured* ==> (lat,lon)

[2] You should be using (say)

      plot(0) = gsn_csm_xy(wks, time, precAvg, res1)

[3] I would suggest not using unweighted areal means

pr0Avg = wgt_areaave_Wrap(pr0(:,{lat1:lat2},{lon1:lon2}),1.0,1.0, 0)

but (say) cosine(latitude) weighting

clat0 = cos(0.01745329*pr0&lat)
pr0Avg = wgt_areaave_Wrap(pr0(:,{lat1:lat2},{lon1:lon2}),1.0,1.0, 0)

On 4/25/14, 12:31 PM, azizul haque wrote:
>
> Hi
> Shea,
> I am
> trying to compute regional mean precipitation using
> precAvg = wgt_areaave_Wrap(prec(:,{lat1:lat2},{lon1:lon2}),1.0,1.0,
> 0)
> pr0Avg = wgt_areaave_Wrap(pr0(:,{lat1:lat2},{lon1:lon2}),1.0,1.0, 0)
> pr1Avg = wgt_areaave_Wrap(pr1(:,{lat1:lat2},{lon1:lon2}),1.0,1.0, 0)
> pr2Avg = wgt_areaave_Wrap(pr2(:,{lat1:lat2},{lon1:lon2}),1.0,1.0, 0)
> four model data. I found following fatal
> error message.
>
>
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
> warning:create:
> Bad HLU id passed to create, ignoring it
> (0) Error: scalar_field: If the input data is
> 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of
> the same length.
>
>
>
> Please
> find the attached script for your help.
>
> Regards
> Azizul
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 01 10:59:45 2014

This archive was generated by hypermail 2.1.8 : Sun May 04 2014 - 12:38:56 MDT