source: trunk/SRC/ToBeReviewed/GRILLE/umask.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.1 KB
RevLine 
[2]1;+
2;
[142]3; @file_comments
4; calculate umask. Economize memory (we do not need to keep umask anymore)
[2]5;
[142]6; @categories
[268]7; Grid
[2]8;
[142]9; @returns
[231]10; A 3d array corresponding to umask.
[2]11;
[142]12; @uses
13; common.pro
[2]14;
[142]15; @examples
16; Used like if umask was a known array by substituing umask by (umask())
[268]17; For example: Instead of write umask[domainef] we have to write (umask())[domainef]
[2]18;
[231]19; @history
20; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[142]21;                       11/12/98
22;                       ??/6/99 introduction of the key_shift
[157]23;                       20/9/99 cas jpk=1 (Thanks to  jpblod\@ipsl.jussieu.fr)
[2]24;
[142]25; @version
26; $Id$
[2]27;
28;-
29FUNCTION umask
[114]30;
31  compile_opt idl2, strictarrsubs
32;
[13]33@cm_4mesh
34  IF NOT keyword_set(key_forgetold) THEN BEGIN
35@updatenew
36  ENDIF
37;---------------------------------------------------------
[142]38  tempsun = systime(1)          ; For key_performance
[2]39;
[13]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
[231]44;
[13]45  if NOT keyword_set(key_periodic) then res[jpi-1, *, *] = umaskred
[231]46  if keyword_set(key_performance) THEN print, 'temps umask', systime(1)-tempsun
[2]47;
[13]48  return, res
[2]49end
Note: See TracBrowser for help on using the repository browser.