Changeset 231 for trunk/SRC/ToBeReviewed/CALCULS
- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- Location:
- trunk/SRC/ToBeReviewed/CALCULS
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/depth2floatlevel.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; Rather comparable to depth2level but here, the calculated level is in float. … … 40 38 ; 41 39 ;- 42 ;------------------------------------------------------------ 43 ;------------------------------------------------------------ 44 ;------------------------------------------------------------ 40 ; 45 41 FUNCTION depth2floatlevel, tab, NOMASK = nomask 46 42 ; -
trunk/SRC/ToBeReviewed/CALCULS/depth2level.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 44 41 ; $Id$ 45 42 ;- 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 43 ; 49 44 FUNCTION depth2level, tab, LOWER = lower, UPPER = upper, CLOSER = closer $ 50 45 , NOMASK = nomask, _extra = ex -
trunk/SRC/ToBeReviewed/CALCULS/depth2mask.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 15 12 ; 16 13 ; @keyword _EXTRA 17 ; used to pass yourkeywords14 ; Used to pass keywords 18 15 ; 19 16 ; @returns 20 ; It is a 3d array containing the mas associated to the 2d sill depth array17 ; It is a 3d array containing the mask associated to the 2d sill depth array 21 18 ; 22 19 ; @uses … … 31 28 ; 32 29 ;- 33 ;------------------------------------------------------------34 ;------------------------------------------------------------35 ;------------------------------------------------------------36 30 FUNCTION depth2mask, tab, _extra = ex 37 ;------------------------------------------------------------38 31 ; 39 32 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/CALCULS/determ3.pro
r163 r231 24 24 ; defined by in10 = z2ds[1, 0, *] 25 25 ; 26 ;27 26 ; @param IN11 {in}{required} 28 27 ; It is an n element array 29 28 ; defined by in11 = z2ds[1, 1, *] 30 ;31 29 ; 32 30 ; @param IN12 {in}{required} … … 34 32 ; defined by in12 = z2ds[1, 2, *] 35 33 ; 36 ;37 34 ; @param IN20 {in}{required} 38 35 ; It is an n element array 39 36 ; defined by in20 = z2ds[2, 0, *] 40 ;41 37 ; 42 38 ; @param IN21 {in}{required} … … 44 40 ; defined by in21 = z2ds[2, 1, *] 45 41 ; 46 ;47 42 ; @param IN22 {in}{required} 48 43 ; It is an n element array 49 44 ; defined by in22 = z2ds[2, 2, *] 50 45 ; 51 ; @returns 46 ; @returns 52 47 ; n elements array, the determinant of each 3*3 arrays 53 48 ; -
trunk/SRC/ToBeReviewed/CALCULS/floatlevel2depth.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Rather comparable to level2depth. It is the invert function of depth2floatlevel 4 ; Rather comparable to <pro>level2depth<pro>. 5 ; It is the invert function of <pro>depth2floatlevel</pro>. 8 6 ; 9 7 ; @categories … … 36 34 ; 37 35 ;- 38 ;------------------------------------------------------------39 ;------------------------------------------------------------40 ;------------------------------------------------------------41 36 FUNCTION floatlevel2depth, tab, NOMASK = nomask 42 37 ; -
trunk/SRC/ToBeReviewed/CALCULS/fsfzpt.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param PFS 9 7 ; 10 ;11 8 ; @param PFP 12 ;13 9 ; 14 10 ; @returns 15 11 ; 16 ;17 12 ; @uses 18 ;19 13 ; 20 14 ; @restrictions 21 15 ; 22 ;23 16 ; @examples 24 ;25 17 ; 26 18 ; @history … … 45 37 ; 46 38 ;- 39 ; 47 40 FUNCTION fsfzpt, pfs, pfp 48 41 ; -
trunk/SRC/ToBeReviewed/CALCULS/grossemoyenne.pro
r223 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 80 77 ; $Id$ 81 78 ;- 82 79 ; 83 80 function grossemoyenne, tab, direc, BOXZOOM = boxzoom, INTEGRATION = integration $ 84 81 , NAN = nan, NODOMDEF = nodomdef, WDEPTH = wdepth $ -
trunk/SRC/ToBeReviewed/CALCULS/hdyn.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 68 65 ; 69 66 ;- 70 ;------------------------------------------------------------ 71 ;------------------------------------------------------------ 72 ;------------------------------------------------------------ 67 ; 73 68 FUNCTION hdyn, tabsn, tabtn, TREF = tref, SREF = sref, PROFREF = profref, LEVEL = level, GILL = gill, SURFACE_LEVEL = surface_level 74 69 ; -
trunk/SRC/ToBeReviewed/CALCULS/level2depth.pro
r226 r231 1 ;2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 ;------------------------------------------------------------5 1 ;+ 6 2 ; … … 32 28 ; 33 29 ;- 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 36 ;------------------------------------------------------------ 30 ; 37 31 FUNCTION level2depth, tab, NOMASK = nomask 38 32 ; -
trunk/SRC/ToBeReviewed/CALCULS/level2index.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 7 ; We want, from a 3d matrix, to extract a 2d (x,y) array whose each element 8 ; has been extract from a level specified by the 2d level array (typically, 3 ; @file_comments 4 ; We want, from a 3d matrix, to extract a 2d (x,y) array whose each element 5 ; has been extract from a level specified by the 2d level array (typically, 9 6 ; we want to obtain the salinity along an isopycn we have repered by its level). 10 ; level2index is a function who give, in function of level, a 2d indexes array 7 ; level2index is a function who give, in function of level, a 2d indexes array 11 8 ; which will allow to extract the 2d array from the 3d array... 12 9 ; … … 28 25 ; 29 26 ;- 30 ;------------------------------------------------------------ 31 ;------------------------------------------------------------ 32 ;------------------------------------------------------------ 27 ; 33 28 FUNCTION level2index, level 34 ; An element of 3d array (whose the two first dimensions are nx and ny) whose 29 ; An element of 3d array (whose the two first dimensions are nx and ny) whose 35 30 ; coordinates are i, j and k have for index in the same 3d array i + j*nx + k*(nx*ny) 36 31 ; level given, for each point of level, we know i, j et k, -
trunk/SRC/ToBeReviewed/CALCULS/level2mask.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Allow to pass from a 2d sill level array to the 3d mask array with 1s in 4 ; Allow to pass from a 2d sill level array to the 3d mask array with 1s in 8 5 ; levels above the sill level and 0s below (and on it) 9 6 ; 10 ; @categories 7 ; @categories 11 8 ; Without loop 12 9 ; … … 32 29 ; 33 30 ;- 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 36 ;------------------------------------------------------------ 31 ; 37 32 FUNCTION level2mask, tab 38 ;------------------------------------------------------------39 33 ; 40 34 compile_opt idl2, strictarrsubs … … 68 62 ;------------------------------------------------------------ 69 63 ;------------------------------------------------------------ 70 if keyword_set(key_performance) THEN print, 'temps level2mask', systime(1)-tempsun 64 if keyword_set(key_performance) THEN print, 'temps level2mask', systime(1)-tempsun 71 65 return, mask 72 66 end -
trunk/SRC/ToBeReviewed/CALCULS/moyenne.pro
r223 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 67 64 ; 68 65 ;- 69 66 ; 70 67 function moyenne, tab, direc, BOXZOOM = boxzoom, INTEGRATION = integration $ 71 68 , NAN = nan, NODOMDEF = nodomdef, WDEPTH = wdepth $ -
trunk/SRC/ToBeReviewed/CALCULS/norme.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 12 9 ; temporal average because the average of the norm is not equal to the 13 10 ; norm of averages 14 15 11 ; 16 12 ; @categories … … 48 44 ; a geographic domain on which fields U and V are extracted on same points 49 45 ; 50 ; @restrictions51 46 ; To know what type of array we work with, we test its size and dates 52 47 ; gave by time[0] and time[jpt-1] to know if thee is a temporal dimension. … … 67 62 ; 68 63 ;- 69 ;------------------------------------------------------------ 70 ;------------------------------------------------------------ 71 ;------------------------------------------------------------ 64 ; 72 65 FUNCTION norme, composanteu, composantev, BOXZOOM = boxzoom, DIREC = direc, _extra = ex 73 ;---------------------------------------------------------74 66 ; 75 67 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 46 43 ; 47 44 ;- 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 45 ; 51 46 FUNCTION projectondepth, arrayin, depthin 52 47 ; -
trunk/SRC/ToBeReviewed/CALCULS/remplit.pro
r226 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 5 ; 7 ;8 6 ; @param ZINPUT 9 7 ; 10 ;11 8 ; @keyword NAN 12 9 ; 13 ;14 10 ; @keyword NITER 15 11 ; 16 ;17 12 ; @keyword BASIQUE 18 13 ; 19 ;20 14 ; @keyword MASK 21 15 ; 22 ;23 16 ; @keyword FILLXDIR 24 17 ; 25 ;26 18 ; @keyword FILLYDIR 27 19 ; 28 ;29 20 ; @keyword FILLVAL 30 21 ; 31 ;32 22 ; @keyword _EXTRA 33 ; Used to pass yourkeywords23 ; Used to pass keywords 34 24 ; 35 25 ; @returns 36 26 ; 37 ;38 27 ; @uses 39 28 ; 40 ;41 29 ; @restrictions 42 30 ; 43 ;44 31 ; @examples 45 32 ; 46 ;47 33 ; @history 48 ;49 34 ; 50 35 ; @version … … 68 53 ; 69 54 ;- 55 ; 70 56 FUNCTION remplit, zinput, NAN = nan, NITER = niter, BASIQUE = basique, mask = mask, FILLXDIR = fillxdir, FILLYDIR = fillydir, FILLVAL = fillval, _extra = ex 71 57 ; -
trunk/SRC/ToBeReviewed/CALCULS/rhon.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param SN 9 7 ; 10 ;11 8 ; @param TN 12 ;13 9 ; 14 10 ; @keyword INSITU 15 11 ; 16 ;17 12 ; @keyword SIGMA_N 18 ;19 13 ; 20 14 ; @returns 21 15 ; 22 ;23 16 ; @uses 24 ;25 17 ; 26 18 ; @restrictions 27 19 ; 28 ;29 20 ; @examples 30 21 ; 31 ;32 22 ; @history 33 ;34 23 ; 35 24 ; @version 36 25 ; $Id$ 37 26 ; 38 ;; 39 ;; Calcul de la fonction d'etat (issue de eos.F) 40 ;; 41 ;; Creation : 1997 / G. Roullet 42 ;; adaptation pour les tableaux z,zt,xyz,xyzt 43 ;; par seb. 44 ;; 45 ; 27 ;; 28 ;; Calcul de la fonction d'etat (issue de eos.F) 29 ;; 30 ;; Creation : 1997 / G. Roullet 31 ;; adaptation pour les tableaux z,zt,xyz,xyzt 32 ;; par seb. 33 ;; 46 34 ; @todo seb 47 35 ; 48 36 ;- 37 ; 49 38 FUNCTION rhon, sn, tn, INSITU = insitu, SIGMA_N = sigma_n 50 39 ; … … 64 53 zrhop=0d 65 54 jkmax = 1 66 END 55 END 67 56 1:BEGIN ;z 68 57 zrhop=dblarr(taille[1]) 69 58 jkmax = taille[1] 70 END 59 END 71 60 2:BEGIN ;xy (jpt=1) ou zt 72 61 zrhop=dblarr(taille[1],taille[2]) 73 62 if jpt EQ 1 then jkmax = 1 ELSE jkmax = taille[1] 74 END 63 END 75 64 3:BEGIN ;xyz (jpt=1) ou xyt 76 65 zrhop=dblarr(taille[1],taille[2],taille[3]) 77 66 if jpt EQ 1 then jkmax = taille[3] ELSE jkmax = 1 78 END 67 END 79 68 4:BEGIN ;xyzt 80 69 zrhop=dblarr(taille[1],taille[2],taille[3],taille[4] ) 81 70 jkmax = taille[3] 82 END 71 END 83 72 endcase 84 73 85 74 86 75 … … 91 80 ztt = tn 92 81 zs = sn 93 END 82 END 94 83 1:BEGIN ;z 95 84 ztt = tn[jk] 96 zs = sn[jk] 97 END 85 zs = sn[jk] 86 END 98 87 2:BEGIN ;xy (jpt=1) ou zt 99 88 if jpt EQ 1 then begin … … 102 91 ENDIF ELSE BEGIN 103 92 ztt = tn[jk, *] 104 zs = sn[jk, *] 93 zs = sn[jk, *] 105 94 ENDELSE 106 END 95 END 107 96 3:BEGIN ;xyz (jpt=1) ou xyt 108 97 if jpt EQ 1 then begin 109 98 ztt = tn[*, *, jk] 110 zs = sn[*, *,jk] 99 zs = sn[*, *,jk] 111 100 endif ELSE BEGIN 112 101 ztt = tn 113 102 zs = sn 114 103 ENDELSE 115 END 104 END 116 105 4:BEGIN ;xyzt 117 106 ztt = tn[*, *, jk, *] 118 zs = sn[*, *,jk, *] 119 END 107 zs = sn[*, *,jk, *] 108 END 120 109 endcase 121 110 if n_elements(sigma_n) NE 0 then zh = 1000.*sigma_n ELSE zh = gdept[jk] … … 133 122 0: zrhop = (zr4*zs + zr3*zsr + zr2)*zs + zr1 134 123 1: zrhop[jk]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 135 2:BEGIN 124 2:BEGIN 136 125 if jpt EQ 1 then zrhop = (zr4*zs + zr3*zsr + zr2)*zs + zr1 $ 137 126 ELSE zrhop[jk, *]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 138 127 END 139 3:BEGIN 128 3:BEGIN 140 129 if jpt EQ 1 then zrhop[*, *,jk]= (zr4*zs + zr3*zsr + zr2)*zs + zr1 $ 141 130 ELSE zrhop = (zr4*zs + zr3*zsr + zr2)*zs + zr1 … … 144 133 endcase 145 134 146 IF n_elements(insitu) EQ 1 THEN BEGIN 135 IF n_elements(insitu) EQ 1 THEN BEGIN 147 136 ; ... add the compression terms 148 137 ze = (-3.508914e-8*ztt-1.248266e-8)*ztt-2.595994e-6 … … 164 153 0: zrhop = zrhop / (1.0-zh/(zk0-zh*(za-zh*zb))) 165 154 1: zrhop[jk] = zrhop[jk] / (1.0-zh/(zk0-zh*(za-zh*zb))) 166 2:BEGIN 155 2:BEGIN 167 156 if jpt EQ 1 then zrhop = zrhop / (1.0-zh/(zk0-zh*(za-zh*zb))) $ 168 157 ELSE zrhop[jk, *] = zrhop[jk, *] / (1.0-zh/(zk0-zh*(za-zh*zb))) 169 158 END 170 3:BEGIN 159 3:BEGIN 171 160 if jpt EQ 1 then zrhop[*, *,jk] = zrhop[*, *,jk] / (1.0-zh/(zk0-zh*(za-zh*zb))) $ 172 161 ELSE zrhop = zrhop / (1.0-zh/(zk0-zh*(za-zh*zb))) … … 174 163 4: zrhop[*, *,jk, *] = zrhop[*, *,jk, *] / (1.0-zh/(zk0-zh*(za-zh*zb))) 175 164 endcase 176 177 ENDIF 178 ENDFOR 179 165 166 ENDIF 167 ENDFOR 168 180 169 terre = where(tn GE 1e6) 181 170 if terre[0] NE -1 then zrhop[terre] = valmask 182 171 183 if keyword_set(key_performance) THEN print, 'temps rhon', systime(1)-tempsun 184 185 186 return, zrhop 187 END 172 if keyword_set(key_performance) THEN print, 'temps rhon', systime(1)-tempsun 188 173 189 174 175 return, zrhop 176 END
Note: See TracChangeset
for help on using the changeset viewer.