Changeset 238 for trunk/SRC/ToBeReviewed
- Timestamp:
- 03/27/07 15:43:18 (17 years ago)
- Location:
- trunk/SRC/ToBeReviewed
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/CALCULS/hdyn.pro
r231 r238 37 37 ; Give a depth to this keyword which will be considered as the reference depth 38 38 ; (in this case, LEVEL has not any effect). the calculation will be effectuated 39 ; until this depth effecting an interpolation between the thelast W level above39 ; until this depth effecting an interpolation between the last W level above 40 40 ; PROFREF and PROFREF. 41 41 ; -
trunk/SRC/ToBeReviewed/CALCULS/remplit.pro
r232 r238 231 231 ; 232 232 z[coast] = temporary(zcoast)/ temporary(weight) 233 ; we update the theboundary conditions of z233 ; we update the boundary conditions of z 234 234 if keyword_set(key_periodic) AND nx EQ jpi then begin 235 235 z[0, *] = z[nx, *] -
trunk/SRC/ToBeReviewed/IMAGE/animgif.pro
r157 r238 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; Build a gif animation 8 5 ; 9 ; @categories 6 ; @categories 10 7 ; Animated drawings. 11 8 ; 12 ; @param NOMFIC {in}{required} 9 ; @param NOMFIC {in}{required} 13 10 ; It is the name of the gif file containing the animation. 14 11 ; Comment: this file is placed in the directory defined by iodir. 15 12 ; 16 ; @uses 13 ; @uses 17 14 ; common.pro 18 15 ; 19 ; @restrictions 16 ; @restrictions 20 17 ; We use the Z buffer to go faster!. 21 18 ; So, if it failed in animgif, you have to do: … … 24 21 ; IDL> retall 25 22 ; 26 ; @restrictions 23 ; @restrictions 27 24 ; If we want to delete the \@common, 28 ; we have to define manually the picture's size 25 ; we have to define manually the picture's size 29 26 ; (variables xsize and ysize) just as iodir. 30 27 ; 31 ; @history 28 ; @history 32 29 ; Guillaume Roullet (grlod\@ipsl.jussieu.fr) 33 30 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 34 31 ; 30/4/1999 35 32 ; 36 ; @version 33 ; @version 37 34 ; $Id$ 38 35 ; 39 36 ;- 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 42 ;------------------------------------------------------------ 37 ; 43 38 PRO animgif, nomfic 44 39 ; … … 53 48 ; It completes the current palette on 256 colors. 54 49 ; 55 red = [rouge, replicate(255, 256-n_elements(rouge))] 56 green = [vert, replicate(255, 256-n_elements(rouge))] 57 blue = [bleu, replicate(255, 256-n_elements(rouge))] 50 red = [rouge, replicate(255, 256-n_elements(rouge))] 51 green = [vert, replicate(255, 256-n_elements(rouge))] 52 blue = [bleu, replicate(255, 256-n_elements(rouge))] 58 53 ; 59 54 ; It rocks on the z device, allowing to create the picture without display it. … … 67 62 device, set_resolution = [xsize, ysize] 68 63 ; 69 ; Beginning of the gif file. Writing of an empty picture. 64 ; Beginning of the gif file. Writing of an empty picture. 70 65 ; 71 66 reinitplt … … 80 75 ; Loop of picture's creation. 81 76 ; 82 calen = TIMEGEN(366, START=JULDAY(1,1,2000)) 77 calen = TIMEGEN(366, START=JULDAY(1,1,2000)) 83 78 debut = where(calen EQ 19810105) 84 79 debut = where(calen EQ 19790105) … … 103 98 ; plt, nlec('sss', date, 'ATF'), label = 2, /noerase 104 99 ; plt, nlec('htoth', date, 'RE3')-nlec('hpycn', date, 'RE3'), 10, 60, int = 5, /inv, /noerase 105 ; domdef, 290,340,-5,15 100 ; domdef, 290,340,-5,15 106 101 ; plt, norme(nlec('unsurf', date, 'RE3'), nlec('vnsurf', date, 'RE3')), 0, 1.2, int = .1, /noerase 107 102 ; … … 109 104 ; 110 105 write_gif,iodir+nomfic,tvrd(),red, green, blue, /multiple 111 ENDFOR 106 ENDFOR 112 107 ;---------------------------------------------------------------- 113 108 ; End of the part we want to change. … … 115 110 ; 116 111 ; Closing of the file. 117 write_gif,iodir+nomfic,/close 112 write_gif,iodir+nomfic,/close 118 113 ; Rerock on terminal X mode. 119 114 ; device, /close -
trunk/SRC/ToBeReviewed/INIT/initncdf.pro
r236 r238 139 139 zvarid = (where(namevar EQ 'nav_lev' or namevar EQ zaxisname OR namevar EQ 'level' OR namevar EQ 'lev' OR strmid(namevar, 0, 5) EQ 'depth'))[0] 140 140 if zvarid EQ -1 AND inside.ndims GT 3 then begin 141 ras = report( 'initncdf: the zaxis was not found..., check the theuse of ZAXISNAME keyword if you whant to find one...')141 ras = report( 'initncdf: the zaxis was not found..., check the use of ZAXISNAME keyword if you whant to find one...') 142 142 ; stop 143 143 endif -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r231 r238 69 69 ; 70 70 ; @keyword ZETAFILENAME {default=FILENAME}{type=string} 71 ; For ROMS outputs. The filename of the file where zeta v riable should be read71 ; For ROMS outputs. The filename of the file where zeta variable should be read 72 72 ; 73 73 ; @keyword ZETAZERO {default=0}{type=scalar: 0 or 1} -
trunk/SRC/ToBeReviewed/MATRICE/colle.pro
r163 r238 1 1 ;+ 2 ; @file_comments 3 ; This concatenation function exist in IDL so long 4 ; as we do not try to stick with a dimension superior or equal at 4. 2 ; @file_comments 3 ; This concatenation function exist in IDL so long 4 ; as we do not try to stick with a dimension superior or equal at 4. 5 5 ; 6 ; @categories 6 ; @categories 7 7 ; Utilities 8 8 ; … … 52 52 ; force to save the pointer array and arrays to be stuck 53 53 ; 54 ; @returns res=matrice resultat 54 ; @returns 55 ; matrice resultat 55 56 ; 56 ; @examples IDL> print, colle(replicate(1,2,2,2),indgen(2,2,2),2) 57 ; @examples 58 ; IDL> print, colle(replicate(1,2,2,2),indgen(2,2,2),2) 57 59 ; 1 1 58 60 ; 1 1 … … 65 67 ; 6 7 66 68 ; 67 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 69 ; @history 70 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 68 71 ; 13/1/98 69 72 ; 70 ; @version $Id$ 73 ; @version 74 ; $Id$ 71 75 ; 72 76 ;- 77 ; 73 78 FUNCTION colle, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, SAUVE = sauve 74 79 ; … … 111 116 res = [temporary(res), *ptrtab[n]] 112 117 if NOT keyword_set(sauve) then ptr_free, ptrtab[n] 113 ENDFOR 114 END 118 ENDFOR 119 END 115 120 2:BEGIN ; we paste following the dimension 2 116 121 res = *ptrtab[0] … … 119 124 res = [[temporary(res)], [*ptrtab[n]]] 120 125 if NOT keyword_set(sauve) then ptr_free, ptrtab[n] 121 ENDFOR 122 END 126 ENDFOR 127 END 123 128 3:BEGIN ; we paste following the dimension 3 124 129 res = *ptrtab[0] … … 127 132 res = [[[temporary(res)]], [[*ptrtab[n]]]] 128 133 if NOT keyword_set(sauve) then ptr_free, ptrtab[n] 129 ENDFOR 134 ENDFOR 130 135 END 131 ELSE:BEGIN 136 ELSE:BEGIN 132 137 ; We transpose res in order to put the dimension to be pasted number 1 133 ; To this, we contain the permuter vector which give the place that dimension 138 ; To this, we contain the permuter vector which give the place that dimension 134 139 ; in the transposed matrix must take. 135 140 siz = (size(*ptrtab[0]))[0] … … 143 148 FOR n = 1,nbretab-1 DO BEGIN ; we paste following the dimension 1on colle suivant la dimension 1 144 149 if (size(*ptrtab[n]))[0] LT direc then $ 145 *ptrtab[n] = reform(*ptrtab[n], [(size(*ptrtab[n]))[1:siz], replicate(1, direc-siz)]) 150 *ptrtab[n] = reform(*ptrtab[n], [(size(*ptrtab[n]))[1:siz], replicate(1, direc-siz)]) 146 151 res = [temporary(res), transpose(*ptrtab[n], permute)] 147 152 if NOT keyword_set(sauve) then ptr_free, ptrtab[n] … … 149 154 res = transpose(temporary(res), permute) 150 155 END 151 ENDCASE 156 ENDCASE 152 157 ;------------------------------------------------------------ 153 158 if NOT keyword_set(sauve) then undefine, ptrtab 154 159 sortie: 155 160 return, res 156 157 158 END 159 160 ;------------------------------------------------------------ 161 END -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checkfield.pro
r237 r238 79 79 return, report(['Error in "' + type + '" type plot with a 2D input array:' $ 80 80 , 'the array dimensions ' + tostr(sz[1:2]) + ' are incompatible' $ 81 , 'with the thedomain dimensions ' $81 , 'with the domain dimensions ' $ 82 82 , '[jpi/nx, jpj/ny, jpk/nz, jpt] = [' $ 83 83 + strtrim(jpi, 1) + '/' + strtrim(nx, 1) $ … … 125 125 return, report(['Error in "' + type + '" type plot with a 3D input array:' $ 126 126 , 'the array dimensions ' + tostr(sz[1:3]) + ' are incompatible' $ 127 , 'with the thedomain dimensions ' $127 , 'with the domain dimensions ' $ 128 128 , '[jpi/nx, jpj/ny, jpk/nz, jpt] = [' $ 129 129 + strtrim(jpi, 1) + '/' + strtrim(nx, 1) $ -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/velovect.pro
r231 r238 15 15 ; 16 16 ; @param V {in}{required} 17 ; The Y component of the two dimensional field. 18 ; the same dimensions as X. 17 ; The Y component of the two dimensional field. Y must have 18 ; the same dimensions as X. The vector at point [i,j] has a 19 19 ; magnitude of: 20 20 ; … … 26 26 ; 27 27 ; @param X {in}{optional}{type=vector} 28 ; Optional abscissa values. 28 ; Optional abscissa values. X must be a vector with a length 29 29 ; equal to the first dimension of U and V. 30 30 ; 31 31 ; @param Y {in}{optional}{type=vector} 32 ; Optional ordinate values. 32 ; Optional ordinate values. Y must be a vector with a length 33 33 ; equal to the first dimension of U and V. 34 34 ; … … 39 39 ; Set this keyword to 1 to place a dot at each missing point. 40 40 ; Set this keyword to 0 or omit it to draw nothing for missing 41 ; points. 41 ; points. Has effect only if MISSING is specified. 42 42 ; 43 43 ; @keyword LENGTH {default=1.0} 44 ; Length factor. 44 ; Length factor. The default of 1.0 makes the longest (U,V) 45 45 ; vector the length of a cell. 46 46 ; 47 47 ; @keyword MISSING 48 ; Missing data value. 48 ; Missing data value. Vectors with a LENGTH greater 49 49 ; than MISSING are ignored. 50 50 ; 51 51 ; @keyword OVERPLOT 52 ; Set this keyword to make VELOVECT "overplot". 52 ; Set this keyword to make VELOVECT "overplot". That is, the 53 53 ; current graphics screen is not erased, no axes are drawn, and 54 54 ; the previously established scaling remains in effect. … … 62 62 ; 63 63 ; @restrictions 64 ; Plotting on the selected device is performed. 64 ; Plotting on the selected device is performed. System 65 65 ; variables concerning plotting are changed. 66 66 ; Note: All other keywords are passed directly to the PLOT procedure … … 73 73 ; Added TITLE, Oct, 1990. 74 74 ; Added POSITION, NOERASE, COLOR, Feb 91, RES. 75 ; August, 1993. 75 ; August, 1993. Vince Patrick, Adv. Visualization Lab, U. of Maryland, 76 76 ; fixed errors in math. 77 77 ; August, 1993. DMS, Added _EXTRA keyword inheritance. … … 82 82 ; OPLOT to PLOTS. 83 83 ; September, 1996, GGS. Changed denominator of x_step and y_step vars. 84 ; February, 1998, DLD. 85 ; June, 1998, DLD. 84 ; February, 1998, DLD. Add support for CLIP and NO_CLIP keywords. 85 ; June, 1998, DLD. Add support for OVERPLOT keyword. 86 86 ; 87 ; Copyright (c) 1983-1998, Research Systems, Inc. 87 ; Copyright (c) 1983-1998, Research Systems, Inc. All rights reserved. 88 88 ; Unauthorized reproduction prohibited. 89 89 ; -
trunk/SRC/ToBeReviewed/POSTSCRIPT/ps.pro
r232 r238 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; Redirect the content of the graphic window in a postscript, … … 90 91 for i = 2, n_elements(vectjournal)-3 DO $ 91 92 printf, !journal, vectjournal[i] 92 93 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/STRING/chkeywd.pro
r232 r238 2 2 ; 3 3 ; @file_comments 4 ; In a string containing an order to execute with EXECUTE by example. 4 ; In a string containing an order to execute with EXECUTE by example. 5 5 ; We change the value of one of keywords. 6 6 ; More generally, in a string, we look for the character chain: ', keywdname= ..., … … 10 10 ; String, keywords 11 11 ; 12 ;13 12 ; @param STRINGIN {in}{required}{type=string} 14 13 ; it is a string … … 17 16 ; it is a string designating the name of keyword to look for. 18 17 ; 19 ; @param KEYWDVALUE {in}{required} 18 ; @param KEYWDVALUE {in}{required} 20 19 ; The new value of the keyword to considerate in STRINGIN 21 20 ; 22 21 ; @keyword SEPARATOR 23 ; To look for the keyword, we look for the first sign = which follow 24 ; the position of keywdname. By default, we substitute the string 25 ; before the comma. With the keyword SEPARATOR,we can modify the cut 26 ; of the string. SEPARATOR give a Character before the one we have to 22 ; To look for the keyword, we look for the first sign = which follow 23 ; the position of keywdname. By default, we substitute the string 24 ; before the comma. With the keyword SEPARATOR,we can modify the cut 25 ; of the string. SEPARATOR give a Character before the one we have to 27 26 ; look for the comma which delimit the keyword in the string. 28 27 ; (see examples) 29 28 ; 30 29 ; @keyword AFTER 31 ; To look for the keyword, we look for the first sign = which follow 32 ; the position of keywdname. By default, we substitute the string 33 ; before the comma. With the keyword AFTER,we can modify the cut 34 ; of the string. AFTER give a Character after the one we have to 30 ; To look for the keyword, we look for the first sign = which follow 31 ; the position of keywdname. By default, we substitute the string 32 ; before the comma. With the keyword AFTER,we can modify the cut 33 ; of the string. AFTER give a Character after the one we have to 35 34 ; look for the comma which delimit the keyword in the string. 36 35 ; (see examples) 37 36 ; 38 ; @returns 37 ; @returns 39 38 ; stringout=stringin modified if keywdname has been found in stringin 40 39 ; 41 ; @uses 40 ; @uses 42 41 ; common.pro 43 42 ; … … 46 45 ; 47 46 ; @restrictions 48 ; Beware, this function has loops, ifs ad cases everywhere. So it can 49 ; not be used by big keywords (with a lot of elements which are big 50 ; arrays). The input keyword must not contain Complex floatings, structure, 51 ; Double-precision complex, Pointer, Object reference, Unsigned Integer, 47 ; Beware, this function has loops, ifs ad cases everywhere. So it can 48 ; not be used by big keywords (with a lot of elements which are big 49 ; arrays). The input keyword must not contain Complex floatings, structure, 50 ; Double-precision complex, Pointer, Object reference, Unsigned Integer, 52 51 ; Unsigned Longword Integer, 64-bit Integer or Unsigned 64-bit Integer. 53 ; 52 ; 54 53 ; 55 54 ; @examples … … 72 71 ; 18/10/1999 73 72 ; 24/11/1999: adaptation for keywords starting by / 74 ; 73 ; 75 74 ; @version 76 75 ; $Id$ … … 93 92 poskeywd = poskeywd+strlen(ajoute) 94 93 poskeywd = strpos(stringout, keywdname, poskeywd) 95 ENDIF ELSE BEGIN 94 ENDIF ELSE BEGIN 96 95 ; change a keyword sarting by toto= 97 96 posegal = strpos(stringout, '=', poskeywd) … … 107 106 ; 108 107 poskeywd = strpos(stringout, keywdname, posvirgule+1) 109 ENDELSE 108 ENDELSE 110 109 endwhile 111 110 -
trunk/SRC/ToBeReviewed/STRING/strwhere.pro
r232 r238 13 13 ; the character to look for 14 14 ; 15 ; @returns COUNT {out}{optional}16 ; The number of matches that were found 15 ; @returns 16 ; The number of matches that were found 17 17 ; 18 ; The function returns an index array similar to the 18 ; The function returns an index array similar to the 19 19 ; result of the where function 20 20 ; 21 21 ; @examples 22 ; 23 ; 24 ; ; returns[ 0, 3, 6 ]22 ; IDL> ind = strwhere('abcabcabc','a') 23 ; IDL> print, ind 24 ; [ 0, 3, 6 ] 25 25 ; 26 26 ; @history 27 27 ; mgs, 02 Jun 1998: VERSION 1.00 28 ; bmy, 30 Jun 1998: - now returns COUNT, the number 28 ; bmy, 30 Jun 1998: - now returns COUNT, the number 29 29 ; of matches that are found (this is 30 30 ; analogous to the WHERE command) … … 44 44 ; with subject "IDL routine strwhere" 45 45 ; 46 functionstrwhere,str,schar,Count46 FUNCTION strwhere,str,schar,Count 47 47 ; 48 48 compile_opt idl2, strictarrsubs 49 49 ; 50 51 52 50 if (n_elements(str) eq 0) then return,-1 53 51 54 52 ; convert to byte 55 53 BStr = byte(Str) 56 54 BSC = (byte(schar))[0] 57 55 58 56 ; Search for matches 59 57 Ind = where( Bstr eq BSC, Count ) … … 63 61 64 62 end 65 -
trunk/SRC/ToBeReviewed/UTILITAIRE/oups.pro
r237 r238 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; Kind of UNDO: 5 ; Allows to redo all the chain of drawing since the opening of the last window without 6 ; reexecute the last order Example: I do a drawing with 10 plot over it, if I make a 5 ; Allows to redo all the chain of drawing since the opening of the last window without 6 ; reexecute the last order Example: I do a drawing with 10 plot over it, if I make a 7 7 ; mistake, I execute this program and i can redo the only plot missed. 8 8 ; 9 ; @categories 9 ; @categories 10 10 ; utilities 11 11 ; 12 ; @restrictions 13 ; compatible with \@<pro>ps</pro> 12 ; @restrictions 13 ; compatible with \@<pro>ps</pro> 14 14 ; \@<pro>vzoom</pro> text_box... 15 15 ; 16 ; @history 16 ; @history 17 17 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 18 18 ; 19 ; @version 19 ; @version 20 20 ; $Id$ 21 21 ; 22 ; @todo 22 ; @todo 23 23 ; seb 24 24 ; … … 64 64 IF strpos(vectjournal[n_elements(vectjournal)-1],';,pos=[' ) NE -1 then $ 65 65 vectjournal[n_elements(vectjournal)-2] = '' $ 66 ELSE vectjournal[n_elements(vectjournal)-1] = '' 66 ELSE vectjournal[n_elements(vectjournal)-1] = '' 67 67 ; we rewrite idlsave.pro 68 68 putfile, myuniquetmpdir+'idlsave.pro', vectjournal … … 70 70 path_cache, /rebuild 71 71 ; apply idlsave 72 @idlsave 73 ; the journal has just been reopened, and we put elements of vectjournal in it. 72 @idlsave 73 ; the journal has just been reopened, and we put elements of vectjournal in it. 74 74 for i = 0, n_elements(vectjournal)-1 DO $ 75 75 journal, vectjournal[i] 76 77 76 78 77 78 -
trunk/SRC/ToBeReviewed/UTILITAIRE/vzoom.pro
r232 r238 1 1 ;+ 2 2 ; 3 ; @file_comments 4 ; Make a real zoom in a plot, contrarly at the function 3 ; @file_comments 4 ; Make a real zoom in a plot, contrarly at the function 5 5 ; ZOOM prewritten by IDL which just get pixels bigger. 6 6 ; 7 ; @categories 7 ; @categories 8 8 ; utilities 9 9 ; 10 ; @restrictions 10 ; @restrictions 11 11 ; use the journal. 12 ; 12 ; 13 13 ; @history 14 14 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 15 15 ; 29/4/1999 16 16 ; 17 ; @version 18 ; $Id$ 17 ; @version 18 ; $Id$ 19 19 ; 20 20 ; @todo … … 69 69 path_cache, /rebuild 70 70 ; apply idlsave 71 @idlsave 72 ; the journal has just been reopened, and we put in elements of vectjournal. 71 @idlsave 72 ; the journal has just been reopened, and we put in elements of vectjournal. 73 73 for i = 0, n_elements(vectjournal)-1 DO $ 74 74 journal, vectjournal[i] 75 76 77 -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro
r232 r238 224 224 ; 225 225 ; now we try to find the attribut called calendar... 226 ; the theattribute "calendar" exists?226 ; the attribute "calendar" exists? 227 227 ; If no, we suppose that the calendar is gregorian calendar 228 228 ; -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro
r232 r238 2 2 ; 3 3 ; @file_comments 4 ;5 4 ; 6 5 ; @categories -
trunk/SRC/ToBeReviewed/WIDGET/slec.pro
r231 r238 24 24 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 25 25 ; 6 elements: The extraction is made on Boxzoom 26 ; Where lon1,lon2,lat1,lat2 are global variables defined at the last domdef!26 ; where lon1,lon2,lat1,lat2 are global variables defined at the last domdef! 27 27 ; 28 28 ; @keyword _EXTRA … … 48 48 ; 49 49 FUNCTION slec,name,debut,fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 50 ;---------------------------------------------------------51 50 ; 52 51 compile_opt idl2, strictarrsubs
Note: See TracChangeset
for help on using the changeset viewer.