source: trunk/SRC/ToBeReviewed/GRILLE/umask.pro @ 199

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

header improvements + xxx doc

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
6; @file_comments
7; calculate umask. Economize memory (we do not need to keep umask anymore)
8;
9; @categories
10; Utilities
11;
12; @returns
13; A 3d array corresponding to umask.
14;
15; @uses
16; common.pro
17;
18; @examples
19; Used like if umask was a known array by substituing umask by (umask())
20; For example: Instaed of write umask[domainef] we have to write (umask())[domainef]
21;
22; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr)
23;                       11/12/98
24;                       ??/6/99 introduction of the key_shift
25;                       20/9/99 cas jpk=1 (Thanks to  jpblod\@ipsl.jussieu.fr)
26;
27; @version
28; $Id$
29;
30;-
31;------------------------------------------------------------
32;------------------------------------------------------------
33;------------------------------------------------------------
34FUNCTION umask
35;---------------------------------------------------------
36;
37  compile_opt idl2, strictarrsubs
38;
39@cm_4mesh
40  IF NOT keyword_set(key_forgetold) THEN BEGIN
41@updatenew
42  ENDIF
43;---------------------------------------------------------
44  tempsun = systime(1)          ; For key_performance
45;
46  CASE size(tmask, /n_dimensions) OF
47    2:res = tmask*shift(tmask, -1, 0)
48    3:res = tmask*shift(tmask, -1, 0, 0)
49  ENDCASE
50;   
51  if NOT keyword_set(key_periodic) then res[jpi-1, *, *] = umaskred
52  if keyword_set(key_performance) THEN print, 'temps umask', systime(1)-tempsun
53;
54  return, res
55end
Note: See TracBrowser for help on using the repository browser.