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

Last change on this file since 325 was 325, checked in by pinsard, 17 years ago

modification of some headers (+some corrections) to prepare usage of the new idldoc

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 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 keywords
26;
27; @returns
28;
29; @uses
30;
31; @restrictions
32;
33; @examples
34;
35; @history
36;
37; @version
38; $Id$
39;
40; @todo
41; seb
42;
43;-
44FUNCTION triangule, maskentree, BASIC = basic, COINMONTE = coinmonte, COINDESCEND = coindescend, _EXTRA = ex
45;
46  compile_opt idl2, strictarrsubs
47;
48@common
49;
50  szmsk = size(maskentree)
51  IF szmsk[0] EQ 0 THEN BEGIN
52    nx = jpi
53    ny = jpj
54  ENDIF ELSE BEGIN
55    nx = szmsk[1]
56    ny = szmsk[2]
57  ENDELSE
58  IF nx EQ 1 OR ny EQ 1 THEN return, -1
59;
60  IF arg_present(coinmonte) THEN coinmonte = 1
61  IF arg_present(coindescend) THEN coindescend = 1
62;
63   if keyword_set(basic) then $
64     return, triangule_c(maskentree, /BASIC, COINMONTE = coinmonte $
65                         , COINDESCEND = coindescend, _extra = ex)
66;
67   if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c'
68   if n_elements(maskentree) EQ 0 then maskentree = tmask[*, *, 0]
69   case strmid(key_gridtype, 0, 1) of
70      'e':res = triangule_e(maskentree, _extra = ex)
71      'c':res = triangule_c(maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex)
72   endcase
73   return, res
74end
Note: See TracBrowser for help on using the repository browser.