11.07.2015 Views

PyClimate 1.1. A set of C and Python routines for the ... - Starship

PyClimate 1.1. A set of C and Python routines for the ... - Starship

PyClimate 1.1. A set of C and Python routines for the ... - Starship

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

hh(2)(3)‚¦”“•” ‡Method: HDIVERGENCE.hdivergence(u,v,R=6.37e6)From <strong>the</strong> zonal (u) <strong>and</strong> meridional (v) components <strong>of</strong> a vectorial field, find <strong>the</strong> horizontaldivergence z. The function returns a bidimensional arraywith <strong>the</strong> divergence field.Class: VCURLMethod: VCURL. init (self,lats,lons,asdegrees=1,PBlon=0)Default constructor, with parameters defined as <strong>for</strong> <strong>the</strong> gradient operator.Method: VCURL.vcurl(u,v,R=6.37e6)i]j_klVmonRpeq pvu9wj_k+lmyx pmFrom <strong>the</strong> zonal (u) <strong>and</strong> meridional (v) components <strong>of</strong> a vectorial field, findpVrts<strong>the</strong> verticalcomponent <strong>of</strong> <strong>the</strong> curl operator on <strong>the</strong> sphere,The functionreturns a scalar field with <strong>the</strong> vertical component <strong>of</strong> <strong>the</strong> curl <strong>of</strong> <strong>the</strong> vectorial field.pvu9qj_k+lem}x pVrg| npew i{j_klm12 Multivariate <strong>and</strong> Univariate Kernel based ProbabilityDensity Function Estimation: KPDF.cpm z.Histograms are useful <strong>and</strong> simple estimators <strong>for</strong> <strong>the</strong> Probability Density Function (PDF)associated with physical or modelling experiments. However, <strong>the</strong> estimation <strong>of</strong> PDFsby means <strong>of</strong> histograms presents some drawbacks like <strong>the</strong> instability to <strong>the</strong> selection<strong>of</strong> <strong>the</strong> bins (bin number <strong>and</strong> bin origin) or <strong>the</strong> lack <strong>of</strong> derivability. Thus, it has beenproposed [14] <strong>the</strong> use <strong>of</strong> a kernel based approach to <strong>the</strong> estimation <strong>of</strong> <strong>the</strong> PDF. Thismodule provides functions to per<strong>for</strong>m univariate <strong>and</strong> multivariate PDF estimation. Therelevant equations <strong>for</strong> this module are (2) <strong>for</strong> univariate density estimation <strong>and</strong> (3) <strong>for</strong>multivariate series.~€–ˆ‚!ƒ › hŒh‰ ‹ ž‡˜$Ÿ–det—˜š ‚¤£—˜h–|¡ ¢‘ |C ¥‘with†<strong>the</strong> number <strong>of</strong> points,‡a scalar which holds <strong>the</strong> b<strong>and</strong>width used in <strong>the</strong> estim-hŒh †ˆ‡œation, ‘<strong>and</strong> experimental points, <strong>and</strong>–<strong>the</strong> points where <strong>the</strong> PDF is being‘<strong>the</strong>estimated, is <strong>the</strong> function used as <strong>the</strong> <strong>and</strong>— kernel is <strong>the</strong> scaling matrix which canoptionally be used in <strong>the</strong> multivariate estimators, usually, <strong>the</strong> covariance matrix.Function: def UPDFEpanechnikov(edata,gdata,h)Returns a NumPy array with <strong>the</strong> PDF associated to <strong>the</strong> experimental data edata evaluatedat points gdata (NumPy array, too) using a b<strong>and</strong>width h. For this <strong>and</strong> next functions,edata <strong>and</strong> gdata must be NumPy arrays <strong>and</strong> <strong>the</strong> function returns a NumPy array<strong>of</strong> typecode Float64. The kernel used in <strong>the</strong> estimation is a Epanechnikov one. It raisesTypeError if edata or gdata is not a 1-D NumPy array It raises MemoryError ifit is unable to allocate <strong>the</strong> returned array or some temporal arrays which are needed asworking space.Function: def UPDFBiweight(edata,gdata,h)Same as <strong>the</strong> previous function, but use a biweight kernel, instead (S86, Table 3.1). Itraises TypeError if edata or gdata is not a 1-D NumPy array It raises MemoryErrorif it is unable to allocate <strong>the</strong> returned array or some temporal arrays which areinternally needed as working space.Function: def UPDFTriangular(edata,gdata,h)Same as <strong>the</strong> previous function, but using a triangular kernel function (see S86, Table~€¥‚„ƒ …†ˆ‡Š‰ ‹Ž |C’‘15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!