RE: [ncl-talk] average of domain

From: Debasish Pai Mazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Thu, 20 Mar 2008 15:27:37 -0800

Dear Erik,

To plot time series bar chart you need to calculate the average over your
domain

r_time =new((/60/), float, -999)

do t=0,59

r_time(t)= dim_avg(ndtooned(r(t,:,:)))

end do

Now the dimension of accumulate precipitation is only time and now use
example 1 from the webpage
 http://www.ncl.ucar.edu/Applications/bar.shtml

to make the time series

Good luck

Debasish

-----Original Message-----
From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf
Of Erik Noble
Sent: Thursday, March 20, 2008 3:10 PM
To: ncl-talk_at_ucar.edu
Subject: average of domain

I have a variable "r".

Variable: r

Dimensions and sizes: [time | 60] x [lat | 109] x [lon | 139]
Coordinates:
Number Of Attributes: 4
  units : mm
  long_name : Accumulated Precipitation
  description : Precipitation Tendency
  _FillValue : -999

What function helps me create an average of "r" over all of my domain
(average of lat and lon) over all my time?
I intend to make a time series bar chart, similar to example 1 here,
but I have http://www.ncl.ucar.edu/Applications/Scripts/bar_1.ncl

Thank you,
Erik

Erik_at_noble:/Volumes/Data_and_Models/ncl_scripts:ncl Bar_Chart.ncl
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.

Variable: r
Type: float
Total Size: 3636240 bytes
            909060 values
Number of Dimensions: 3
Dimensions and sizes: [time | 60] x [lat | 109] x [lon | 139]
Coordinates:
Number Of Attributes: 4
  units : mm
  long_name : Accumulated Precipitation
  description : Precipitation Tendency
  _FillValue : -999
fatal:Number of subscripts do not match number of dimensions of
variable,(2) Subscripts used, (3) Subscripts expected
fatal:Execute: Error occurred at or near line 8707 in file
$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl

fatal:Execute: Error occurred at or near line 41 in file Bar_Chart.ncl

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 20 2008 - 17:27:37 MDT

This archive was generated by hypermail 2.2.0 : Sun Mar 23 2008 - 15:01:36 MDT