source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/spl_keep_mean.html @ 107

Last change on this file since 107 was 107, checked in by smasson, 18 years ago

bugfix in ead/write_oasis

File size: 7.1 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>spl_keep_mean.pro (SAXO Documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="spl_keep_mean.pro (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO Documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../overview.html?format=raw" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../idldoc-categories.html?format=raw" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../idldoc-index.html?format=raw" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../search-page.html?format=raw" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td >Source</td>
58     
59
60     
61      <td><a href="./../idldoc-help.html?format=raw" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="spl_incr.html">&lt;&lt;prev file</a> | <a href="square2quadrilateral.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="spl_keep_mean.html?format=raw" target="_TOP">view single page</a> | <a href="./../index.html?format=raw" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html?format=raw">Interpolation/</a></h1>
82      <h2 class="pro_file">spl_keep_mean.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90
91 Given the arrays X and Y, which tabulate a function (with the X[i]
92 AND Y[i] in ascending order), and given an input value X2, the
93 SPL_INCR function returns an interpolated value for the given values
94 of X2. The interpolation method is based on cubic spline, corrected
95 in a way that integral of the interpolated values is the same as the
96 integral of the input values. (-> for exemple to build daily data
97 from monthly mean and keep the monthly mean of the computed daily
98 data equa to the original values)
99</div>
100
101     
102
103     
104
105     
106
107     
108
109      <div id="routine_details">
110       
111
112        <div class="routine_details" id="_spl_keep_mean">
113
114          <h2><a class="top" href="#container">top</a>spl_keep_mean </h2>
115       
116          <p class="header">
117            <span class="result">result = </span>spl_keep_mean(<span class="result"><a href="#_spl_keep_mean_param_x">x</a>, <a href="#_spl_keep_mean_param_yin">yin</a>, <a href="#_spl_keep_mean_param_x2">x2</a></span>, <a href="#_spl_keep_mean_keyword_YP0">YP0</a>=<span class="result">YP0</span>, <a href="#_spl_keep_mean_keyword_YPN_1">YPN_1</a>=<span class="result">YPN_1</span>, <a href="#_spl_keep_mean_keyword_GE0">GE0</a>=<span class="result">GE0</span>)</p>
118       
119          <div class="comments"></div>
120
121          <h3>Return value</h3><div class="value"> 
122
123    y2: the meean value between two consecutive values of x2. This
124    array has one element less than y2. y2 has double precision.
125</div>
126
127         
128            <h3>Parameters</h3>
129       
130           
131            <h4 id="_spl_keep_mean_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
132              <span class="attr">in</span>
133             
134             
135              <span class="attr">required</span>
136             
137             
138             
139             
140            </h4>
141       
142          <div class="comments">  An n-element (at least 2) input vector that specifies the
143    tabulate points in a strict ascending order.
144</div>
145           
146            <h4 id="_spl_keep_mean_param_yin">yin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
147              <span class="attr">in</span>
148             
149             
150              <span class="attr">required</span>
151             
152             
153             
154             
155            </h4>
156       
157          <div class="comments">  an array with one element less than x. y[i] represents the
158    mean value between x[i] and x[i+1]. if /GE0 is activated, y must
159    have positive values.
160</div>
161           
162            <h4 id="_spl_keep_mean_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
163              <span class="attr">in</span>
164             
165             
166              <span class="attr">required</span>
167             
168             
169             
170             
171            </h4>
172       
173          <div class="comments">  The input values for which the interpolated values are
174    desired. Its values must be strictly monotonically increasing.
175
176</div>
177           
178
179         
180
181         
182
183            <h3>Keywords</h3>
184           
185            <h4 id="_spl_keep_mean_keyword_YP0">YP0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
186             
187             
188             
189             
190             
191             
192             
193             
194            </h4>
195       
196            <div class="comments"> The first derivative of the interpolating function at the
197    point X0. If YP0 is omitted, the second derivative at the
198    boundary is set to zero, resulting in a "natural spline."
199</div>
200           
201            <h4 id="_spl_keep_mean_keyword_YPN_1">YPN_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
202             
203             
204             
205             
206             
207             
208             
209             
210            </h4>
211       
212            <div class="comments"> The first derivative of the interpolating function at the
213    point Xn-1. If YPN_1 is omitted, the second derivative at the
214    boundary is set to zero, resulting in a "natural spline."
215</div>
216           
217            <h4 id="_spl_keep_mean_keyword_GE0">GE0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
218             
219             
220             
221             
222             
223             
224             
225             
226            </h4>
227       
228            <div class="comments"> to force that y2 is always GE than 0. In that case, y must
229    also be GE than 0.
230</div>
231           
232         
233
234          <h3>Examples</h3><div class="value">  y2 =  spl_keep_mean(x, y, x2)
235
236 
237
238    12 monthly values of precipitations into daily values:
239
240    yr1 = 1990
241    yr2 = 1992
242    nyr = yr2-yr1+1
243    n1 = 12*nyr+1
244    x = julday(1+findgen(n1), replicate(1, n1) $
245           , replicate(yr1, n1), fltarr(n1))
246    n2 = 365*nyr + total(leapyr(yr1+indgen(nyr))) + 1
247    x2 = julday(replicate(1, n2), 1+findgen(n2) $
248               , replicate(yr1, n2), fltarr(n2))
249    y = abs(randomn(0, n1-1))
250    y2 = spl_keep_mean(x, y, x2, /ge0)
251
252    print, min(x, max = ma), ma
253    print, min(x2, max = ma), ma
254    print, vairdate([min(x, max = ma), ma])
255    print, total(y*(x[1:n1-1]-x[0:n1-2]))
256    print, total(y2*(x2[1:n2-1]-x2[0:n2-2]))
257</div>
258          <h3>Version history</h3>
259         
260         
261          <h4>History</h4><div class="value">
262  Sebastien Masson (smasson@lodyc.jussieu.fr): May 2005</div>
263         
264         
265          <h3>Known issues</h3>
266         
267         
268         
269          <h4>Restrictions</h4><div class="value">
270   It might be possible that y2 has very small negative values
271   (amplitude smaller than 1.e-6)...
272
273</div>
274       
275         
276         
277         
278         
279         
280         
281         
282       
283         
284       
285        </div>
286       
287      </div>
288
289     
290
291      <div id="tagline">Produced by IDLdoc 2.0.</div>
292
293    </div>
294
295  </body>
296</html>
Note: See TracBrowser for help on using the repository browser.