;+ ; @file_comments ; ; ; @categories ; ; ; @param MASKENTREE {in}{optional}{type=2d array} ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, ; ...TRIANGULATION=triangule(mask) ; If this argument is not specified, the function use tmask ; ; @keyword BASIC ; Specify that the mask is on a basic grid (use the triangulation for vertical cuts and hovmoellers) ; ; @keyword COINMONTE {type=array} ; To obtain the array of "ascending land corner" to be treated with ; completecointerre.pro in the variable array instead of make it pass by the global ; variable twin_corners_up. ; ; @keyword COINDESCEND {type=array} ; See COINMONTE ; ; @keyword _EXTRA ; Used to pass keywords ; ; @returns ; ; @uses ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; $Id$ ; ; @todo ; seb ; ;- FUNCTION triangule, maskentree, BASIC=basic $ , COINMONTE=coinmonte, COINDESCEND=coindescend, _EXTRA=ex ; compile_opt idl2, strictarrsubs ; @common ; szmsk = size(maskentree) IF szmsk[0] EQ 0 THEN BEGIN nx = jpi ny = jpj ENDIF ELSE BEGIN nx = szmsk[1] ny = szmsk[2] ENDELSE IF nx EQ 1 OR ny EQ 1 THEN return, -1 ; IF arg_present(coinmonte) THEN coinmonte = 1 IF arg_present(coindescend) THEN coindescend = 1 ; if keyword_set(basic) then $ return, triangule_c(maskentree, /BASIC, COINMONTE = coinmonte $ , COINDESCEND = coindescend, _extra = ex) ; if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c' if n_elements(maskentree) EQ 0 then maskentree = tmask[*, *, 0] case strmid(key_gridtype, 0, 1) of 'e':res = triangule_e(maskentree, _extra = ex) 'c':res = triangule_c(maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex) endcase return, res end