source: trunk/SRC/ToBeReviewed/TRIANGULATION/triangule.pro @ 163

Last change on this file since 163 was 163, checked in by navarro, 18 years ago

header improvements : type of parameters and keywords, default values, spell checking + idldoc assistant (IDL online_help)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1;+
2; @file_comments
3;
4;
5; @categories
6;
7;
8; @param MASKENTREE {in}{optional}{type=2d array}
9; It is a 2d array which will serve to mask the field we will trace after with CONTOUR,
10; ...TRIANGULATION=triangule(mask)
11; If this argument is not specified, the function use tmask
12;
13; @keyword BASIC
14; Specify that the mask is on a basic grid (use the triangulation for vertical cuts and hovmoellers)
15;
16; @keyword COINMONTE {type=array}
17; To obtain the array of "ascending land corner" to be treated with
18; completecointerre.pro in the variable array instead of make it pass by the global
19; variable twin_corners_up.
20;
21; @keyword COINDESCEND {type=array}
22; See COINMONTE
23;
24; @keyword _EXTRA
25; Used to pass your keywords
26;
27; @returns
28;
29;
30; @uses
31;
32;
33; @restrictions
34;
35;
36; @examples
37;
38;
39; @history
40;
41;
42; @version
43; $Id$
44;
45; @todo
46; seb
47;
48;-
49;------------------------------------
50FUNCTION triangule, maskentree, BASIC = basic, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex
51;
52  compile_opt idl2, strictarrsubs
53;
54@common
55;
56  szmsk = size(maskentree)
57  IF szmsk[0] EQ 0 THEN BEGIN
58    nx = jpi
59    ny = jpj
60  ENDIF ELSE BEGIN
61    nx = szmsk[1]
62    ny = szmsk[2]
63  ENDELSE
64  IF nx EQ 1 OR ny EQ 1 THEN return, -1
65;
66  IF arg_present(coinmonte) THEN coinmonte = 1
67  IF arg_present(coindescend) THEN coindescend = 1
68;
69   if keyword_set(basic) then $
70     return, triangule_c(maskentree, /BASIC, COINMONTE = coinmonte $
71                         , COINDESCEND = coindescend, _extra = ex)
72;
73   if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c'
74   if n_elements(maskentree) EQ 0 then maskentree = tmask[*, *, 0]
75   case key_gridtype of
76      'e':res = triangule_e(maskentree, _extra = ex)
77      'c':res = triangule_c(maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex)
78   endcase
79   return, res
80end
Note: See TracBrowser for help on using the repository browser.