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

Last change on this file since 495 was 495, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines; trailing blanks

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