Changeset 142 for trunk/SRC/ToBeReviewed/CALCULS/level2mask.pro
- Timestamp:
- 07/21/06 14:47:49 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/level2mask.pro
r134 r142 3 3 ;------------------------------------------------------------ 4 4 ;+ 5 ; NAME:level2mask6 5 ; 7 ; PURPOSE: permet de passer d''un tableau 2d de niveau seuil au8 ; tableau 3d de mask avec des 1 ds les niveaux au dessus du9 ; niveau seuil et des 0 en dessous (et sur).6 ; @file_comments 7 ; Allow to pass from a 2d sill level array to the 3d mask array with 1s in 8 ; levels above the sill level and 0s below (and on it) 10 9 ; 11 ; CATEGORY: SANS BOUCLE 10 ; @categories 11 ; without loop 12 12 ; 13 ; CALLING SEQUENCE: res=level2mask(niveau) 13 ; @param TAB {in}{required} 14 ; 2d level array of sill level (or a structure respecting litchamp criterions) 14 15 ; 15 ; INPUTS: niveau tableau 2d de niveaux seuil (ou une structure repondant16 ; aux criteres de litchamp)16 ; @returns 17 ; It is a 3d array containing the mask associated to the 2d sill level array 17 18 ; 18 ; KEYWORD PARAMETERS: 19 ; @uses 20 ; common.pro 19 21 ; 20 ; OUTPUTS: un tableau 3d contenant le mask associe au tableau 2d de 21 ; niveaux seuil 22 ; 23 ; COMMON BLOCKS: 24 ; common.pro 25 ; 26 ; SIDE EFFECTS: 27 ; 28 ; RESTRICTIONS: 29 ; 30 ; EXAMPLE: 31 ; 32 ; MODIFICATION HISTORY: Sebastien Masson (smasson@lodyc.jussieu.fr) 22 ; @history 23 ; Sebastien Masson (smasson@lodyc.jussieu.fr) 33 24 ; 17/6/1999 34 25 ; Setp 2004: boundary level have 0 values and not 1 (as it was 35 26 ; explained before in the header). see: 36 27 ; print, array_equal(niveau, total(level2mask(niveau),3)) 28 ; 29 ; 30 ; @version 31 ; $Id$ 37 32 ; 38 33 ;- … … 45 40 compile_opt idl2, strictarrsubs 46 41 ; 47 tempsun = systime(1) ; pourkey_performance42 tempsun = systime(1) ; To key_performance 48 43 @common 49 44 ;------------------------------------------------------------ 50 ; lecture du champ d''entree et recuperation de la taille du sous 51 ; domaine utilise 45 ; Reading of the input field and recovery of the size of the used subdomain 52 46 ;------------------------------------------------------------ 53 47 niveaux = litchamp(tab) 54 48 grille,maskterre, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 55 49 ;--------------------------------------------------------------- 56 ; verification de la coherence entre la taille du tableau et le domaine definit par domdef50 ; verification of the coherence between the array's size and the defined by domdef domain 57 51 ;--------------------------------------------------------------- 58 52 IF ny EQ 1 THEN niveaux = reform(niveaux, nx, ny, /over) … … 66 60 ;------------------------------------------------------------ 67 61 ;------------------------------------------------------------ 68 ; on transforme le tableau 2d de niveaux en tableau 3d de mask62 ; We transform the 2d leval array in 3d mask array 69 63 ;------------------------------------------------------------ 70 64 mask = reform( niveaux[*]#(1./(indgen(nz)+1)), nx, ny, nz )
Note: See TracChangeset
for help on using the changeset viewer.