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

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

improvements/corrections of some *.pro headers

  • 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;-
44;
45FUNCTION triangule, maskentree, BASIC = basic, COINMONTE = coinmonte, COINDESCEND = coindescend, _EXTRA = ex
46;
47  compile_opt idl2, strictarrsubs
48;
49@common
50;
51  szmsk = size(maskentree)
52  IF szmsk[0] EQ 0 THEN BEGIN
53    nx = jpi
54    ny = jpj
55  ENDIF ELSE BEGIN
56    nx = szmsk[1]
57    ny = szmsk[2]
58  ENDELSE
59  IF nx EQ 1 OR ny EQ 1 THEN return, -1
60;
61  IF arg_present(coinmonte) THEN coinmonte = 1
62  IF arg_present(coindescend) THEN coindescend = 1
63;
64   if keyword_set(basic) then $
65     return, triangule_c(maskentree, /BASIC, COINMONTE = coinmonte $
66                         , COINDESCEND = coindescend, _extra = ex)
67;
68   if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c'
69   if n_elements(maskentree) EQ 0 then maskentree = tmask[*, *, 0]
70   case strmid(key_gridtype, 0, 1) of
71      'e':res = triangule_e(maskentree, _extra = ex)
72      'c':res = triangule_c(maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex)
73   endcase
74   return, res
75end
Note: See TracBrowser for help on using the repository browser.