source: trunk/SRC/ToBeReviewed/GRILLE/fmask.pro @ 248

Last change on this file since 248 was 231, 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.1 KB
RevLine 
[2]1;+
2;
[142]3; @file_comments
4; calculate fmask. Economize memory (we do not need to keep fmask anymore)
[2]5;
[142]6; @categories
7; Utilities
[2]8;
[142]9; @returns
10; A 3d array corresponding to fmask.
[2]11;
[142]12; @examples
13; Used like if fmask was a known array by substituing fmask by (fmask())
[226]14; For example: Instead of write fmask[domainef] we have to write (fmask())[domainef]
[2]15;
[142]16; @history
[157]17; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[142]18;                       11/12/98
[2]19;
[142]20; @version
21; $Id$
22;
[2]23;-
[231]24;
[2]25FUNCTION fmask
[114]26;
27  compile_opt idl2, strictarrsubs
28;
[13]29@cm_4mesh
30  IF NOT keyword_set(key_forgetold) THEN BEGIN
31@updatenew
32  ENDIF
33;---------------------------------------------------------
[142]34  tempsun = systime(1)          ; For key_performance
[226]35;
[13]36  CASE size(tmask, /n_dimensions) OF
37    2:res = tmask*shift(tmask, -1, 0)*shift(tmask, 0, -1)*shift(tmask, -1, -1)
38    3:res = tmask*shift(tmask, -1, 0, 0)*shift(tmask, 0, -1, 0)*shift(tmask, -1, -1, 0)
39  ENDCASE
40;
41  if NOT keyword_set(key_periodic) then res[jpi-1, *, *] = fmaskredy
42  res[*, jpj-1, *] = fmaskredx
43;
[226]44  if keyword_set(key_performance) THEN print, 'temps fmask', systime(1)-tempsun
45
[13]46  return, res
[2]47end
Note: See TracBrowser for help on using the repository browser.