Re: Number of bins in pdfx function

From: Ioannis Koletsis <koletsis_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 04 2013 - 08:56:37 MDT

Thanks Maria for your reply..

 

I calculated the number of bins as

 

opt = True

opt@bin_spacing = 0.2

max_ws = max(ws)

min_ws= min(ws)

nbins = floattointeger(((max_ws - min_ws)/0.2)+1)

 

wspdf = pdfx(ws,nbins,opt)

 

I hope these lines to be useful for someone who want to calculate
automatically the number of bins ..

 

Thanks a lot

 

Ioannis

 

 

 

 

From: Maria Gehne [mailto:mgehne@ucar.edu]
Sent: Wednesday, July 03, 2013 8:21 PM
To: Ioannis Koletsis
Cc: ncl-talk@ucar.edu
Subject: Re: Number of bins in pdfx function

 

Hi Ioannis,

I don't know of a way to directly specify the bin spacing in pdfx. But if
you know the min and max values of your data it should be easy to work out
the number of bins to use to get the spacing you want.

Something along the lines of

nbins = (max - min)/bin_spacing

( just make sure this is an integer number)

You can also specify the bin_min and bin_max you want to use as attributes
to the opt argument. This way you can be sure what these values are when
calculating the pdf and that nbins is an integer.

Hope this helps,
Maria

On 07/03/2013 08:30 AM, Ioannis Koletsis wrote:

Dear NCL users,

 

I would like to calculate the pdf of wind speed using bin spacing of 0.2
m/s, but the function pdfx obligate me to define the number of bins..

Is there any way to calculate the pdf, setting only the bin_spacing without
specifying the number of bins?

 

Thanks in advance

 

 

 

 

Dr. Ioannis Koletsis

National Observatory of Athens
Institute for Environmental Research
Lofos Koufou
15236-Penteli
Athens-Greece
Tel: +30 210 8109 <tel:210%208109127> 203, Fax: +30 210 8103236
<tel:210%208103236>
e-mail: <mailto:lagouvar@meteo.noa.gr> koletsis@meteo.noa.gr

----------------------------------------------------------------------------
------------
Weather forecasts: http://www.noa.gr/forecast (in english)
or http://www.meteo.gr <http://www.meteo.gr/> (in greek)
Weather forecasts for Europe: http://www.eurometeo.gr
<http://www.eurometeo.gr/> (in english)

----------------------------------------------------------------------------
------------

 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
Maria Gehne
Postdoctoral Fellow
NCAR/CGD/CAS
P.O. Box 3000
Boulder, CO 80307
  _____  
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2904 / Virus Database: 3204/6462 - Release Date: 07/03/13

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 4 08:56:41 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 05 2013 - 13:06:49 MDT