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