source: trunk/SRC/Documentation/idldoc_html_output/ReadWrite/ncdf_getmask.html

Last change on this file was 402, checked in by smasson, 15 years ago

update documentation

File size: 12.8 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>ncdf_getmask.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="ncdf_getmask.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" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../ReadWrite//ncdf_getmask.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../idldoc-help.html" 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="ncdf_getaxis.html">&lt;&lt;prev file</a> | <a href="ncdf_gettime.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="ncdf_getmask.html" target="_TOP">view single page</a> | <a href="./../index.html" 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">ReadWrite/</a></h1>
82      <h2 class="pro_file">ncdf_getmask.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 get the land/sea mask array from a NetCDF file
91</div>
92
93     
94
95     
96
97     
98
99     
100
101      <div id="routine_details">
102       
103
104        <div class="routine_details" id="_ncdf_getmask">
105
106          <h2><a class="top" href="#container">top</a>ncdf_getmask <span class="categories">
107 Read NetCDF file
108</span></h2>
109       
110          <p class="header">
111            <span class="result">result = </span>ncdf_getmask(<span class="result"><a href="#_ncdf_getmask_param_fileid">fileid</a></span>, <a href="#_ncdf_getmask_keyword_ADDSCL_BEFORE">ADDSCL_BEFORE</a>=<span class="result">scalar: 0 or 1</span>, <a href="#_ncdf_getmask_keyword_MASKNAME">MASKNAME</a>=<span class="result">string</span>, <a href="#_ncdf_getmask_keyword_USEASMASK">USEASMASK</a>=<span class="result">scalar string</span>, <a href="#_ncdf_getmask_keyword_MISSING_VALUE">MISSING_VALUE</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_INVMASK">INVMASK</a>=<span class="result">scalar: 0 or 1</span>, <a href="#_ncdf_getmask_keyword_XMINMESH">XMINMESH</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_XMAXMESH">XMAXMESH</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_YMINMESH">YMINMESH</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_YMAXMESH">YMAXMESH</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_ZMINMESH">ZMINMESH</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_ZMAXMESH">ZMAXMESH</a>=<span class="result">scalar</span>, <a href="#_ncdf_getmask_keyword_TESTOP">TESTOP</a>=<span class="result">scalar string, for example 'GT 0.5'</span>, <a href="#_ncdf_getmask_keyword__EXTRA">_EXTRA</a>=<span class="result">_EXTRA</span>)</p>
112       
113          <div class="comments">
114</div>
115
116          <h3>Return value</h3><div class="preformat">
117 the land/sea mask 2D or 3D array or -1 in case of error or mask absence
118</div>
119
120         
121            <h3>Parameters</h3>
122       
123           
124            <h4 id="_ncdf_getmask_param_fileid">fileid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
125              <span class="attr">in</span>
126             
127             
128              <span class="attr">required</span>
129             
130              <span class="attr">type:</span> <span class="value">salar string or long</span>
131             
132             
133            </h4>
134       
135          <div class="comments">
136 if fileid is a scalar string then it is the name of the file (with
137 the full path) to be opened (in that case, the file will be opened
138 and closed within ncdf_getmask).
139
140 if fileid is a scalar then it is the id of the file return by a call
141 to ncdf_open outside of ncdf_getmask (in that case, the file will
142 NOT be opened and closed within ncdf_getmask)
143</div>
144           
145
146         
147
148         
149
150            <h3>Keywords</h3>
151           
152            <h4 id="_ncdf_getmask_keyword_ADDSCL_BEFORE">ADDSCL_BEFORE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
153             
154             
155             
156             
157             
158              <span class="attr">type:</span> <span class="value">scalar: 0 or 1</span>
159              <span class="attr">default:</span> <span class="value">0</span>
160             
161            </h4>
162       
163            <div class="comments">
164 put 1 to apply add_offset and scale factor on data before looking for
165 missing values when using USEASMASK keyword
166</div>
167           
168            <h4 id="_ncdf_getmask_keyword_MASKNAME">MASKNAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
169             
170             
171             
172             
173             
174              <span class="attr">type:</span> <span class="value">string</span>
175             
176             
177            </h4>
178       
179            <div class="comments">
180 A string giving the name of the variable in the file
181 that contains the land/sea mask
182</div>
183           
184            <h4 id="_ncdf_getmask_keyword_USEASMASK">USEASMASK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
185             
186             
187             
188             
189             
190              <span class="attr">type:</span> <span class="value">scalar string</span>
191             
192             
193            </h4>
194       
195            <div class="comments">
196 A string giving the name of the variable in the file
197 that will be used to build the land/sea mask. In this case the
198 mask is based on the first record (if record dimension
199 exists). The mask is build according to operator defined by TESTOP
200 keyword (default NE) and the testing values defined as
201   1) the second word of TESTOP if existing
202   2) MISSING_VALUE keyword
203   3) attribute missing_value or _fillvalue of the variable USEASMASK
204   4) !Values.f_nan (can be used only with NE and EQ operators)
205</div>
206           
207            <h4 id="_ncdf_getmask_keyword_MISSING_VALUE">MISSING_VALUE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
208             
209             
210             
211             
212             
213              <span class="attr">type:</span> <span class="value">scalar</span>
214             
215             
216            </h4>
217       
218            <div class="comments">
219 To define (or redefine if the attribute is already existing) the
220 missing values used with USEASMASK keyword. Note that this value is
221 not used if TESTOP keyword is given and contains 2 words. 
222</div>
223           
224            <h4 id="_ncdf_getmask_keyword_INVMASK">INVMASK&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
225             
226             
227             
228             
229             
230              <span class="attr">type:</span> <span class="value">scalar: 0 or 1</span>
231              <span class="attr">default:</span> <span class="value">0</span>
232             
233            </h4>
234       
235            <div class="comments">
236 Inverse the land/sea mask (that should have 0/1 values for land/sea): mask = 1-mask
237</div>
238           
239            <h4 id="_ncdf_getmask_keyword_XMINMESH">XMINMESH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
240             
241             
242             
243             
244             
245              <span class="attr">type:</span> <span class="value">scalar</span>
246              <span class="attr">default:</span> <span class="value">0L</span>
247             
248            </h4>
249       
250            <div class="comments">
251       Define common (cm_4mesh) variables ixminmesh used to define the localization
252       of the first point of the grid along the x direction in a zoom of the original grid
253</div>
254           
255            <h4 id="_ncdf_getmask_keyword_XMAXMESH">XMAXMESH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
256             
257             
258             
259             
260             
261              <span class="attr">type:</span> <span class="value">scalar</span>
262              <span class="attr">default:</span> <span class="value">jpiglo-1</span>
263             
264            </h4>
265       
266            <div class="comments">
267       Define common (cm_4mesh) variables ixmaxmesh used to define the localization
268       of the last point of the grid along the x direction in a zoom of the original grid
269       Note that if XMAXMESH < 0 then ixmaxmesh is defined as ixmaxmesh = jpiglo -1 + xmaxmesh
270</div>
271           
272            <h4 id="_ncdf_getmask_keyword_YMINMESH">YMINMESH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
273             
274             
275             
276             
277             
278              <span class="attr">type:</span> <span class="value">scalar</span>
279              <span class="attr">default:</span> <span class="value">0L</span>
280             
281            </h4>
282       
283            <div class="comments">
284       Define common (cm_4mesh) variables iyminmesh used to define the localization
285       of the first point of the grid along the y direction in a zoom of the original grid
286</div>
287           
288            <h4 id="_ncdf_getmask_keyword_YMAXMESH">YMAXMESH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
289             
290             
291             
292             
293             
294              <span class="attr">type:</span> <span class="value">scalar</span>
295              <span class="attr">default:</span> <span class="value">jpjglo-1</span>
296             
297            </h4>
298       
299            <div class="comments">
300       Define common (cm_4mesh) variables iymaxmesh used to define the localization
301       of the last point of the grid along the y direction in a zoom of the original grid
302       Note that if YMAXMESH < 0 then iymaxmesh is defined as iymaxmesh = jpjglo -1 + ymaxmesh
303</div>
304           
305            <h4 id="_ncdf_getmask_keyword_ZMINMESH">ZMINMESH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
306             
307             
308             
309             
310             
311              <span class="attr">type:</span> <span class="value">scalar</span>
312              <span class="attr">default:</span> <span class="value">0L</span>
313             
314            </h4>
315       
316            <div class="comments">
317       Define common (cm_4mesh) variables izminmesh used to define the localization
318       of the first point of the grid along the z direction in a zoom of the original grid
319</div>
320           
321            <h4 id="_ncdf_getmask_keyword_ZMAXMESH">ZMAXMESH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
322             
323             
324             
325             
326             
327              <span class="attr">type:</span> <span class="value">scalar</span>
328              <span class="attr">default:</span> <span class="value">jpkglo-1</span>
329             
330            </h4>
331       
332            <div class="comments">
333       Define common (cm_4mesh) variables izmaxmesh used to define the localization
334       of the last point of the grid along the z direction in a zoom of the original grid
335       Note that if ZMAXMESH < 0 then izmaxmesh is defined as izmaxmesh = jpkglo -1 + maxmesh
336</div>
337           
338            <h4 id="_ncdf_getmask_keyword_TESTOP">TESTOP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
339             
340             
341             
342             
343             
344              <span class="attr">type:</span> <span class="value">scalar string, for example 'GT 0.5'</span>
345              <span class="attr">default:</span> <span class="value">'NE'</span>
346             
347            </h4>
348       
349            <div class="comments">
350 a string describing the type of test that will be done to define the
351 mask. The test is performed on the variable specified by USEASMASK
352 keyword.
353
354 TESTOP can contain 1 or 2 words. The first word is the operator
355 definition: "EQ" "NE" "GE" "GT" "LE" "LT" (default is NE). The
356 second word define the testing value. If TESTOP contains only 1
357 word, then the test value is denifed by
358   1) MISSING_VALUE keyword
359   2) attribute missing_value or _fillvalue of the variable USEASMASK
360   3) !Values.f_nan (can be used only with NE and EQ operators)
361</div>
362           
363            <h4 id="_ncdf_getmask_keyword__EXTRA">_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
364             
365             
366             
367             
368             
369             
370             
371             
372            </h4>
373       
374            <div class="comments"> to be able to call ncdf_getmask with _extra keyword
375</div>
376           
377         
378
379          <h3>Examples</h3><div class="preformat">
380
381   IDL> mask = ncdf_getmask('HadISST1_1m_187001_200702_sst_reg1m.nc',useasmask = 'sst', missing_value = -1.00000e+30)
382
383   IDL> mask = ncdf_getmask('meshmaskORCA2.nc', maskname = 'tmask')
384
385   IDL> mask = ncdf_getmask('t106.nc', useasmask = 'SLM', testop = 'le 0.5')
386</div>
387          <h3>Version history</h3>
388         
389          <h4>Version</h4><div class="preformat">
390 $Id: ncdf_getmask.pro 399 2009-07-02 08:38:54Z smasson $
391</div>
392          <h4>History</h4><div class="preformat">
393 August 2007: Sebastien Masson (smasson@lodyc.jussieu.fr)
394</div>
395         
396         
397         
398         
399         
400         
401         
402       
403         
404         
405         
406         
407         
408         
409         
410       
411          <h3>Statistics</h3>
412          <table class="statistics">
413            <tr><td>McCabe cyclic</td><td>          43</td></tr>
414            <tr><td>McCabe essential</td><td>           5</td></tr>
415            <tr><td>McCabe modular design</td><td>           5</td></tr>
416          </table>
417         
418       
419        </div>
420       
421      </div>
422
423     
424
425      <div id="tagline">Produced by IDLdoc 2.0.</div>
426
427    </div>
428
429  </body>
430</html>
Note: See TracBrowser for help on using the repository browser.