- Timestamp:
- 03/19/07 18:15:51 (17 years ago)
- Location:
- trunk/SRC
- Files:
-
- 290 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Calendar/caldat.pro
r205 r231 3 3 ; @file_comments 4 4 ; Return the calendar date and time given julian date. 5 ; This is the inverse of the function JULDAY. 6 ; 3 calendars are available according to the value of key_caltype 5 ; This is the inverse of the function 6 ; <pro>julday</pro>. 7 ; 3 calendars are available according to the value of key_caltype 7 8 ; (variable of the common file cm_4cal): 'greg', '360d', 'noleap' 8 9 ; 9 10 ; @categories Calendar 10 11 ; 11 ; @param JULIAN {in}{required} 12 ; @param JULIAN {in}{required} {type=long integer} 12 13 ; contains the Julian Day Number (which begins at noon) of the 13 ; specified calendar date. It should be a long integer.14 ; 15 ; @param MONTH {out} 14 ; specified calendar date. 15 ; 16 ; @param MONTH {out} {type=integer} 16 17 ; Number of the desired month (1 = January, ..., 12 = December). 17 18 ; 18 ; @param DAY {out} 19 ; @param DAY {out} {type=integer} 19 20 ; Number of day of the month. 20 21 ; 21 ; @param YEAR {out} 22 ; @param YEAR {out} {type=integer} 22 23 ; Number of the desired year. 23 24 ; 24 ; @param HOUR {out} 25 ; @param HOUR {out} {type=integer} 25 26 ; Hour of the day 26 27 ; 27 ; @param Minute {out} 28 ; @param Minute {out} {type=integer} 28 29 ; Minute of the day 29 30 ; 30 ; @param Second {out} 31 ; @param Second {out} {type=float} 31 32 ; Second (and fractions) of the day. 32 33 ; 33 ; @keyword NDAYSPM { default=30}34 ; To use a calendar with fixed number of days per month s.34 ; @keyword NDAYSPM {type=integer} {default=30} 35 ; To use a calendar with fixed number of days per month. 35 36 ; see also the use of key_caltype (variable of the common file cm_4cal) 36 37 ; 37 38 ; @uses cm_4cal 38 39 ; 39 ; @restrictions 40 ; Accuracy using IEEE double precision numbers is approximately 1/10000th of a 40 ; @restrictions 41 ; Accuracy using IEEE double precision numbers is approximately 1/10000th of a 41 42 ; second. 42 43 ; 43 ; @history 44 ; @history 44 45 ; Translated from "Numerical Recipies in C", by William H. Press, 45 46 ; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. … … 55 56 ; AB, 3 January 2000, Make seconds output as DOUBLE in array output. 56 57 ; 57 ; Sebastien Masson, May 2006, add different calenda t with key_caltype58 ; Sebastien Masson, May 2006, add different calendar with key_caltype 58 59 ; (variable of the common file cm_4cal) 59 60 ; 60 ; @version $Id$ 61 ; @version 62 ; $Id$ 61 63 ;- 64 ; 62 65 pro caldat, julian, month, day, year, hour, minute, second, NDAYSPM = ndayspm 63 ; ------------------------------------------------------------66 ; 64 67 @cm_4cal 65 ; ------------------------------------------------------------66 COMPILE_OPT idl268 ; 69 compile_opt idl2, strictarrsubs 67 70 68 71 ON_ERROR, 2 ; Return to caller if errors … … 112 115 year = year - (year LE 0) 113 116 114 END 117 END 115 118 '360d':BEGIN 116 119 117 120 IF keyword_set(ndayspm) THEN BEGIN 118 121 IF ndayspm EQ 1 THEN ndayspm = 30 … … 137 140 neg = where(year LT 0) 138 141 IF neg[0] NE -1 THEN year[neg] = year[neg]-1 139 END 142 END 140 143 'noleap':BEGIN 141 144 … … 150 153 + (day GT 273) + (day GT 304) + (day GT 334) 151 154 month = long(month) 152 ; 155 ; 153 156 day = day - 31L * (day GT 31) - 28L * (day GT 59) - 31L * (day GT 90) $ 154 157 - 30L * (day GT 120) - 31L * (day GT 151) - 30L * (day GT 181) $ … … 160 163 month[zero] = 12L 161 164 day[zero] = 31L 162 ENDIF 163 ; 164 END 165 ENDIF 166 ; 167 END 165 168 ELSE:BEGIN 166 169 ng = report('only 3 types of calendar are accepted: greg, 360d and noleap') … … 180 183 second = (TEMPORARY(fraction) - minute/1440d) * 86400d 181 184 ENDIF 182 185 183 186 ; if julian is an array, reform all output to correct dimensions 184 187 IF (SIZE(julian, /N_DIMENSION) GT 0) THEN BEGIN -
trunk/SRC/Calendar/date2jul.pro
r205 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 10 7 ; Calendar 11 8 ; 12 ; @param date {in}{required} 9 ; @param date {in}{required} {type=string} 13 10 ; date in yyyymmdd format 14 11 ; … … 31 28 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) June 2005 32 29 ; 33 ; @version $Id$ 30 ; @version 31 ; $Id$ 34 32 ; 35 33 ;- 36 ;------------------------------------------------------------ 37 ;------------------------------------------------------------ 38 ;------------------------------------------------------------ 34 ; 39 35 function date2jul, date, GRADS = grads 40 ;------------------------------------------------------------41 36 ; 42 37 compile_opt idl2, strictarrsubs -
trunk/SRC/Calendar/date2string.pro
r157 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; … … 5 4 ; create a nice and readable format to print a date 6 5 ; 7 ; @categories 6 ; @categories 8 7 ; Calendar, String 9 8 ; 10 ; @param yyyymmdd {in}{required} 11 ; the date in the format yyyymmdd. Can be scalar or array9 ; @param yyyymmdd {in}{required} {type=scalor or array} 10 ; the date in the format yyyymmdd. 12 11 ; 13 ; @keyword _EXTRA 14 ; used to pass your keywords to other procedures, for example 15 ; keyword FORMAT of string function (see example bellow) 12 ; @keyword _EXTRA 13 ; Used to pass keywords 16 14 ; 17 15 ; @returns … … 30 28 ; update/review June 2005 Sebastien Masson. 31 29 ; 32 ; @version $Id$ 30 ; @version 31 ; $Id$ 33 32 ; 34 33 ;- 35 ; ------------------------------------------------------------34 ; 36 35 FUNCTION date2string, yyyymmdd, _EXTRA = ex 37 ;38 36 ; 39 37 compile_opt idl2, strictarrsubs -
trunk/SRC/Calendar/daysinmonth.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 10 7 ; Calendar 11 8 ; 12 ; @param YEAR {in}{optional} {default=from "time" common variable of cm_4cal}9 ; @param YEAR {in}{optional} {default=from "time" common variable of cm_4cal} 13 10 ; To specify the year of the month. Used only if the common variable 14 11 ; key_caltype = 'greg'. In that case, month and year must have the same 15 12 ; number of elements. 16 13 ; 17 ; @param MONTH 14 ; @param MONTH {in}{optional} {type=integer} 15 ; month number 18 16 ; 19 17 ; @returns … … 35 33 ; 36 34 ;- 37 ;------------------------------------------------------------ 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 35 ; 40 36 function daysinmonth, month, year 41 ;------------------------------------------------------------42 ; include commons43 37 ; 44 38 compile_opt idl2, strictarrsubs -
trunk/SRC/Calendar/jul2date.pro
r227 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; … … 5 4 ; gives yyyymmdd date equivalent of a Julian day 6 5 ; 7 ; @categories 6 ; @categories 8 7 ; Calendar 9 8 ; 10 ; @param jday {in}{required} 9 ; @param jday {in}{required} {type=double} 11 10 ; Julian day 12 11 ; 13 ; @returns 12 ; @returns 14 13 ; date in yyyymmdd format 15 14 ; … … 19 18 ; 19991223 20 19 ; 21 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 20 ; @history 21 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 22 22 ; June 2005 23 23 ; 24 ; @version $Id$ 24 ; @version 25 ; $Id$ 25 26 ; 26 27 ;- 27 ; ------------------------------------------------------------28 ; 28 29 function jul2date, jday 29 30 ; -
trunk/SRC/Calendar/julday.pro
r226 r231 3 3 ; @file_comments 4 4 ; Calculate the Julian Day Number for a given month, day, and year. 5 ; This is the inverse of the library function CALDAT. 5 ; This is the inverse of the library function 6 ; <pro>CALDAT</pro>. 6 7 ; 3 calendars are available according to the value of key_caltype 7 8 ; (variable of the common file cm_4cal): 'greg', '360d', 'noleap' 8 9 ; 9 ; @categories Calendar 10 ; 11 ; @param MONTH {in}{required} 10 ; @categories 11 ; Calendar 12 ; 13 ; @param MONTH {in}{required} {type=scalar (integer or double) or array of scalars} 12 14 ; Number of the desired month (1 = January, ..., 12 = December). 13 ; Can be scalar or array 14 ; 15 ; @param DAY {in}{required} 16 ; Number of day of the month.Can be scalar or array 17 ; 18 ; @param YEARin {in}{required} 15 ; 16 ; @param DAY {in}{required} {type=scalar (integer or double) or array of scalars} 17 ; Number of day of the month. 18 ; 19 ; @param YEARin {in}{required} {type=scalar (integer or double) or array of scalars} 19 20 ; Number of the desired year.Year parameters must be valid 20 21 ; values from the civil calendar. Years B.C.E. are represented … … 26 27 ; O but we change it for year 654321L (the same trick is done in 27 28 ; caldat so caldat, julday(1,1,0) gives you back Jan 1st of year 0) 28 ; Can be scalar or array 29 ; 30 ; @param HOUR {in}{optional}{default=12} 31 ; Number of the hour of the day. Can be scalar or array 32 ; 33 ; @param MINUTE {in}{optional}{default=0} 34 ; Number of the minute of the hour. Can be scalar or array 35 ; 36 ; @param SECOND {in}{optional}{default=0} 37 ; Number of the second of the minute. Can be scalar or array 29 ; 30 ; @param HOUR {in}{optional} {type=scalar (integer or double) or array of scalars} {default=12} 31 ; Number of the hour of the day. 32 ; 33 ; @param MINUTE {in}{optional} {type=scalar (integer or double) or array of scalars} {default=0} 34 ; Number of the minute of the hour. 35 ; 36 ; @param SECOND {in}{optional} {type=scalar (integer or double) or array of scalars} {default=0} 37 ; Number of the second of the minute. 38 38 ; 39 39 ; @restrictions 40 ; The Result will have the same dimensions as the smallest array, or40 ; The result will have the same dimensions as the smallest array, or 41 41 ; will be a scalar if all arguments are scalars. 42 42 ; 43 ; @keyword NDAYSPM {default=30} 44 ; To use a calendar with fixed number of days per month s.43 ; @keyword NDAYSPM {default=30} {type=integer} 44 ; To use a calendar with fixed number of days per month. 45 45 ; see also the use of key_caltype (variable of the common file cm_4cal) 46 46 ; … … 51 51 ; number. 52 52 ; 53 ; @uses cm_4cal 53 ; @uses 54 ; cm_4cal 54 55 ; 55 56 ; @restrictions … … 83 84 ; 84 85 function julday, MONTH, DAY, YEARin, Hour, Minute, Second, NDAYSPM = ndayspm 85 ; ------------------------------------------------------------86 ; 86 87 @cm_4cal 87 ;------------------------------------------------------------ 88 89 COMPILE_OPT idl2 88 89 compile_opt idl2, strictarrsubs 90 90 91 91 ON_ERROR, 2 ; Return to caller if errors -
trunk/SRC/Calendar/leapyr.pro
r157 r231 1 ;-----------------------------------------------------------------2 1 ;+ 3 2 ; … … 10 9 ; Calendar 11 10 ; 12 ; @param year {in}{required} 13 ; year to be tested as a leap year. Can be scalar or array11 ; @param year {in}{required} {type= scalar or array} 12 ; year to be tested as a leap year. 14 13 ; 15 14 ; @returns … … 17 16 ; with the same number of elements than year. 18 17 ; 19 ; @uses cm_4cal 18 ; @uses 19 ; cm_4cal 20 20 ; 21 21 ; @examples … … 39 39 ; June 2005 update for new commons, Sebastien Masson. 40 40 ; 41 ; @version $Id$ 41 ; @version 42 ; $Id$ 42 43 ; 43 44 ;- 44 ; ------------------------------------------------------------45 ; 45 46 function leapyr, year 46 ; include commons47 47 ; 48 48 compile_opt idl2, strictarrsubs -
trunk/SRC/Calendar/monthname.pro
r157 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; … … 5 4 ; gives the name of a month 6 5 ; 7 ; @categories 6 ; @categories 8 7 ; Calendar,String 9 8 ; 10 ; @param month {in}{required} 11 ; the month number (from 1 to 12). Can be scalar or array9 ; @param month {in}{required} {type=scalar or array} 10 ; the month number (from 1 to 12). 12 11 ; 13 12 ; @keyword _EXTRA 14 ; used to pass your keywords to other procedures, for example 15 ; keyword FORMAT of string function (see example bellow) 13 ; Used to pass keywords 16 14 ; 17 15 ; @returns … … 21 19 ; IDL> name=monthname(2) 22 20 ; 23 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 21 ; @history 22 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 24 23 ; 1 October 2001 25 24 ; 26 ; @version $Id$ 25 ; @version 26 ; $Id$ 27 27 ; 28 28 ;- 29 ; ------------------------------------------------------------29 ; 30 30 FUNCTION monthname, month, _EXTRA = ex 31 31 ; -
trunk/SRC/Colors/color24.pro
r163 r231 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; The purpose of this function is to convert a RGB color triple 5 ; into the equivalent 24-big long integer. 5 ; into the equivalent 24-big long integer. 6 ; This routine was written to be used with routines like COLORS or 7 ; <pro>GETCOLOR</pro>. 6 8 ; 7 ; @categories Graphics, Color 9 ; @categories 10 ; Graphics, Color 8 11 ; 9 ; @param rgb_triple {in}{required} 10 ; A three-element column or row array representing 12 ; @param rgb_triple {in}{required} 13 ; A three-element column or row array representing 11 14 ; a color triple. The values of the elements must be between 0 and 255. 12 15 ; 13 ; @returns 14 ; a 24-bit long integer that is equivalent the input color. 16 ; @returns 17 ; a 24-bit long integer that is equivalent the input color. 15 18 ; The color is described in terms of a hexadecimal number (e.g., FF206A) 16 ; where the left two digits represent the blue color, the 17 ; middle two digits represent the green color, and the right 19 ; where the left two digits represent the blue color, the 20 ; middle two digits represent the green color, and the right 18 21 ; two digits represent the red color. 19 22 ; 20 ; @examples 21 ; To convert the color triple for the color YELLOW, 22 ; (255, 255, 0), to the hexadecimal value '00FFFF'x 23 ; @examples 24 ; To convert the color triple for the color YELLOW, 25 ; (255, 255, 0), to the hexadecimal value '00FFFF'x 23 26 ; or the decimal number 65535, type: 24 27 ; 25 28 ; IDL> color = COLOR24([255, 255, 0]) 26 ; 27 ; This routine was written to be used with routines like COLORS or GETCOLOR 29 ; 28 30 ; 29 31 ; @history 30 32 ; Written by: David Fanning, 3 February 96. 31 33 ; 32 ; @version $Id$ 34 ; @version 35 ; $Id$ 33 36 ; 34 37 ;- … … 36 39 ; 37 40 compile_opt idl2, strictarrsubs 38 ; 41 ; 39 42 ON_ERROR, 1 40 43 … … 51 54 FOR j=0,2 DO num24bit = num24bit + ((rgb_triple[j] MOD 16) * base16[0,j]) + $ 52 55 (Fix(rgb_triple[j]/16) * base16[1,j]) 53 56 54 57 RETURN, num24bit 55 END 58 END -
trunk/SRC/Colors/colorbar.pro
r163 r231 5 5 ; graphics window. 6 6 ; 7 ; @categories Graphics, Widget 7 ; @categories 8 ; Graphics, Widget 8 9 ; 9 10 ; @keyword BOTTOM {default=0B} … … 25 26 ; This is title for the color bar. 26 27 ; 27 ; @keyword DISCRETE 28 ; @keyword DISCRETE 28 29 ; Vector which contain color's indexes to trace in a color bar. Therefore 29 ; we obtain a discrete colorbar which contains only the specified colors 30 ; we obtain a discrete colorbar which contains only the specified colors 30 31 ; in the order they appear in the vector 31 32 ; … … 100 101 ; IDL> COLORBAR, NCOLORS=100 101 102 ; 102 ; @history 103 ; @history 103 104 ; Written by: David Fanning, 10 JUNE 96. 104 105 ; 10/27/96: Added the ability to send output to PostScript. DWF … … 112 113 ; 03/03/98: Add DISCRETE keyword, sebastien masson (smasson\@lodyc.jussieu.fr) 113 114 ; 114 ; @version $Id$ 115 ; @version 116 ; $Id$ 115 117 ; 116 118 ;- 119 ; 117 120 PRO colorbar, BOTTOM=bottom, CB_CHARSIZE=cb_charsize, CB_CHARTHICK=cb_charthick $ 118 121 , CB_COLOR=cb_color, DIVISIONS=divisions, DISCRETE=discrete $ -
trunk/SRC/Colors/getcolor.pro
r163 r231 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; The original purpose of this function was to enable the 5 5 ; user to specify one of the 16 colors supported by the … … 15 15 ; table offered on the IDL newsgroup by Liam Gumley.) 16 16 ; 17 ; @categories Graphics, Color 18 ; 19 ; @param thisColor {in}{optional} 17 ; @categories 18 ; Graphics, Color 19 ; 20 ; @param thisColor {in}{optional} 20 21 ; A string with the "name" of the color. Valid names are: 21 22 ; black … … 39 40 ; Case is unimportant. 40 41 ; 41 ; 42 ; @param index {in}{optional} 42 ; @param index {in}{optional} 43 43 ; The color table index where the specified color should be loaded. 44 44 ; … … 68 68 ; 69 69 ; 70 ; @keyword NAMES 70 ; @keyword NAMES 71 71 ; If this keyword is set, the return value of the function is 72 72 ; a 16-element string array containing the names of the colors. … … 77 77 ; listID = Widget_List(baseID, Value=GetColor(/Names), YSize=16) 78 78 ; 79 ; @keyword LOAD 79 ; @keyword LOAD 80 80 ; If this keyword is set, all 16 colors are automatically loaded 81 81 ; starting at the color index specified by the START keyword. … … 96 96 ; IDL 5.2 and higher. 97 97 ; 98 ; @keyword TRUE 98 ; @keyword TRUE 99 99 ; If this keyword is set, the specified color triple is returned 100 100 ; as a 24-bit integer equivalent. The lowest 8 bits correspond to … … 104 104 ; were set. 105 105 ; 106 ; @restrictions 106 ; @restrictions 107 107 ; The TRUE keyword causes the START keyword to be ignored. 108 ; The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be 108 ; The NAMES keyword causes the COLOR, INDEX, START, and TRUE parameters to be 109 109 ; ignored. 110 110 ; The COLOR parameter is ignored if the LOAD keyword is used. … … 113 113 ; returned if color decomposition is ON. 114 114 ; 115 ; @examples 115 ; @examples 116 116 ; To load a yellow color in color index 100 and plot in yellow, type: 117 117 ; … … 177 177 ; IDL> PLOT, data, Color=colors.yellow 178 178 ; 179 ; @history 179 ; @history 180 180 ; Written by: David Fanning, 10 February 96. 181 181 ; Fixed a bug in which N_ELEMENTS was spelled wrong. 7 Dec 96. DWF … … 187 187 ; Added LOAD AND START keywords. 7 June 99. DWF. 188 188 ; 189 ; @version $Id$ 189 ; @version 190 ; $Id$ 190 191 ;- 191 192 ; 192 193 FUNCTION getcolor, thisColor, index, TRUE=truecolor, $ 193 194 NAMES=colornames, LOAD=load, START=start -
trunk/SRC/Colors/lct.pro
r163 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; 4 ; @file_comments 3 ; @file_comments 5 4 ; Fastest than type loadct, file = 'palette.tbl' 6 5 ; 7 ; @categories 6 ; @categories 8 7 ; Graphics, Color 9 8 ; … … 11 10 ; number of the color palette we want to select in the file palette.tbl 12 11 ; 13 ; @keyword LIGHTNESS 12 ; @keyword LIGHTNESS 14 13 ; a scalar used to change the Lightness of the color 15 14 ; palette to be able to adjust according to the printer we use, 16 ; the media (paper or slide)... 15 ; the media (paper or slide)... 17 16 ; lightness < 1 to get lighter colors 18 17 ; > 1 to get darker colors … … 26 25 ; 27 26 ; @keyword _EXTRA 28 ; Used to pass loadct keywords27 ; Used to pass keywords to <pro>loadct</pro> 29 28 ; 30 29 ; @history … … 33 32 ; 6/7/1999: mac/windows compatibility 34 33 ; 35 ; @version $Id$ 34 ; @version 35 ; $Id$ 36 36 ; 37 37 ;- 38 ; ------------------------------------------------------------38 ; 39 39 PRO lct, numpal, FILE = file, GET_NAME = get_name, LIGHTNESS = Lightness, _EXTRA = ex 40 40 ; … … 63 63 n = 0 64 64 repeat begin 65 res = findfile(nametbl[n]) 65 res = findfile(nametbl[n]) 66 66 n = n+1 67 endrep until res[0] NE '' OR n EQ n_elements(nametbl) 67 endrep until res[0] NE '' OR n EQ n_elements(nametbl) 68 68 if res[0] NE '' then BEGIN 69 69 nametbl = nametbl[n-1] 70 if n_elements(ex) NE 0 then $ 70 if n_elements(ex) NE 0 then $ 71 71 if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl 72 72 ; if we are in POSTSCRIPT mode, we have to pass in X mode in order to change the color palette 73 73 oldname = !d.name 74 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN 74 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN 75 75 thisOS = !VERSION.OS_FAMILY 76 76 thisOS = STRMID(thisOS, 0, 3) … … 90 90 loadct, file = nametbl, GET_NAME = get_name, _EXTRA = ex $ 91 91 ELSE loadct, numpal, file = nametbl, /silent, GET_NAME = get_name, _EXTRA = ex 92 ENDIF ELSE BEGIN 92 ENDIF ELSE BEGIN 93 93 if n_elements(numpal) EQ 0 then loadct, file = nametbl, _EXTRA = ex $ 94 94 ELSE loadct, numpal, file = nametbl, /silent, _EXTRA = ex 95 ENDELSE 95 ENDELSE 96 96 ; 97 if oldname EQ 'PS' AND keyword_set(lightness) then palit, lightness 97 if oldname EQ 'PS' AND keyword_set(lightness) then palit, lightness 98 98 ; 99 99 set_plot, oldname -
trunk/SRC/Colors/newpalette.pro
r226 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; … … 11 10 ; 12 11 ; @param namepal {in}{required}{type=string} 13 ; a string containingthe name of the new palette we want to write.12 ; the name of the new palette we want to write. 14 13 ; 15 14 ; @keyword OVER 16 ; the number of the palette we want to replace 15 ; the number of the palette we want to replace. 17 16 ; 18 17 ; @keyword FILE {default='palette.tbl'} … … 20 19 ; 21 20 ; @keyword _EXTRA 22 ; Used to pass modifyct keywords21 ; Used to pass keywords to <pro>modifyct</pro> 23 22 ; 24 ; @history Guillaume Roulet (gr\@lodyc.jussieu.fr) 23 ; @history 24 ; Guillaume Roulet (gr\@lodyc.jussieu.fr) 25 25 ; 30/3/1999 s.masson, add _extra, research of the full name, OVER 26 26 ; 5/5/1999 s.masson 27 27 ; 28 ; @version $Id$ 28 ; @version 29 ; $Id$ 29 30 ; 30 31 ;- 31 ; ------------------------------------------------------------32 ; 32 33 pro newpalette, namepal, FILE = file, OVER = over, _EXTRA = ex 33 34 ; -
trunk/SRC/Colors/xlct.pro
r163 r231 2 2 ; @hidden 3 3 ;- 4 ; 4 5 PRO xlct_psave ;Save/Restore our plotting state. 5 6 ; Swaps our state with the current state each time its called. … … 396 397 397 398 ;+ 398 ; @file_comments 399 ; Like xloadct but fastest to write and call by default the palette 399 ; @file_comments 400 ; Like xloadct but fastest to write and call by default the palette 400 401 ; palette.tbl which can be in any directory 401 402 ; 402 ; @categories Widget, Color 403 ; @categories 404 ; Widget, Color 403 405 ; 404 406 ; @keyword FILE {default='palette.tbl'} … … 407 409 ; allows multiple IDL users to have their own color table file. 408 410 ; 409 ; @keyword GROUP 411 ; @keyword GROUP 410 412 ; The widget ID of the widget that calls Xlct. When this ID is 411 413 ; specified, a death of the caller results in a death of Xlct … … 419 421 ; BOTTOM+NCOLORS-1. 420 422 ; 421 ; @keyword SILENT 423 ; @keyword SILENT 422 424 ; Normally, no informational message is printed when a color map 423 425 ; is loaded. If this keyword is present and zero, this message is printed. … … 458 460 ; will be undefined. 459 461 ; 460 ; @history 5/5/1999 copy of xloadct par Sebastien Masson (smasson\@lodyc.jussieu.fr) 461 ; 462 ; @version $Id$ 462 ; @history 463 ; 5/5/1999 copy of xloadct par Sebastien Masson (smasson\@lodyc.jussieu.fr) 464 ; 465 ; @version 466 ; $Id$ 463 467 ; 464 468 ;- … … 493 497 ; Changes made by S.Masson 494 498 ;----------------------------------------------------------------------------- 495 IF N_ELEMENTS(file) GT 0 THEN filename = file ELSE BEGIN 499 IF N_ELEMENTS(file) GT 0 THEN filename = file ELSE BEGIN 496 500 filename = find('palette.tbl') 497 501 filename = filename[0] 498 502 if filename EQ 'NOT FOUND' then filename=filepath('colors1.tbl',subdir=['resource', 'colors']) 499 ENDELSE 503 ENDELSE 500 504 file = filename 501 505 ;----------------------------------------------------------------------------- -
trunk/SRC/Colors/xpal.pro
r163 r231 7 7 ; @hidden 8 8 ;- 9 ; 9 10 function xp_new_colors 10 11 ; … … 568 569 ; will be undefined. 569 570 ; 570 ; @history 571 ; @history 571 572 ; Adaptation of xpalette to add a save button by 572 573 ; Grima Nicolas (nglod\@ipsl.jussieu.fr) and by Masson 573 574 ; Sebastien (smlod\@ipsl.jussieu.fr) 574 575 ; 576 ; @version 575 577 ; $Id$ 576 578 ; -
trunk/SRC/Commons/cm_4cal.pro
r157 r231 4 4 ; June 2005 5 5 ;- 6 ; 6 7 @cm_general 7 8 ; -
trunk/SRC/Commons/cm_4data.pro
r172 r231 4 4 ; June 2005 5 5 ;- 6 ; 6 7 @cm_general 7 8 ; -
trunk/SRC/Commons/cm_4mesh.pro
r172 r231 4 4 ; June 2005 5 5 ;- 6 ; 6 7 @cm_general 7 8 ; -
trunk/SRC/Commons/cm_4ps.pro
r157 r231 4 4 ; June 2005 5 5 ;- 6 ; 6 7 @cm_general 7 8 ; -
trunk/SRC/Commons/cm_demomode.pro
r163 r231 2 2 ; @file_comments this common is use only when we are in demo mode (7 minutes test) 3 3 ;- 4 ; 4 5 COMMON instead_of_save, boxzoomparam, colorbarparam -
trunk/SRC/Computation/curl.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 41 38 ; T, U, V and F grids, it is possible that these two arrays do not have the same 42 39 ; size and refer to different indexes. In this case, arrays are re-cut on 43 ; common indexes. To avoid these re-cuts, use the keyword /memeindice in domdef.pro 40 ; common indexes. To avoid these re-cuts, use the keyword /memeindice in 41 ; <pro>domdef</pro> 44 42 ; - When computing the divergence, we update, vargrid, varname, varunits and the 45 43 ; grid position parameters (firstxf, lastxf, nxf, firstyf, lastyf, nyf). … … 62 60 ; code the 4d case 63 61 ;- 64 ;------------------------------------------------------------ 65 ;------------------------------------------------------------ 66 ;------------------------------------------------------------ 62 ; 67 63 FUNCTION curl, uu, vv, DIREC = DIREC 68 64 ; -
trunk/SRC/Computation/div.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 41 38 ; T, U, V and F grids, it is possible that these two arrays do not have the same 42 39 ; size and refer to different indexes. In this case, arrays are re-cut on 43 ; common indexes. To avoid these re-cuts, use the keyword /memeindice in domdef.pro 40 ; common indexes. To avoid these re-cuts, use the keyword /memeindice in 41 ; <pro>domdef</pro> 44 42 ; - When computing the divergence, we update, vargrid, varname, varunits and the 45 43 ; grid position parameters (firstxt, lastxt, nxt, firstyt, lastyt, nyt). … … 61 59 ; code the 4d case 62 60 ;- 63 ;------------------------------------------------------------ 64 ;------------------------------------------------------------ 65 ;------------------------------------------------------------ 61 ; 66 62 FUNCTION div, uu, vv, DIREC = DIREC 67 63 ; -
trunk/SRC/Computation/grad.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 45 42 ; 46 43 ;- 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 44 ; 50 45 FUNCTION grad, field, direc 51 46 ; -
trunk/SRC/ForOldVersion/keep_compatibility.pro
r175 r231 26 26 ; 27 27 ;- 28 ; 28 29 PRO keep_compatibility, flag 29 30 ; -
trunk/SRC/ForOldVersion/updatekwd.pro
r136 r231 19 19 ; 20 20 ;- 21 ; 21 22 ; if ex is a structure... 22 23 IF size(ex, /type) EQ 8 THEN BEGIN -
trunk/SRC/Grid/changemsk.pro
r230 r231 1 ;------------------------------------------------------------ 2 ;------------------------------------------------------------ 3 ;------------------------------------------------------------ 4 ; 1 ;+ 5 2 ; @file_comments 6 3 ; add land points on a 2D land-sea mask 7 4 ; 8 ; @categories 5 ; @categories 9 6 ; Grid 10 7 ; 11 ; @param TAB {in}{required} 8 ; @param TAB {in}{required} 12 9 ; a 2D land-sea mask, with 1 on sea and 0 on land 13 10 ; 14 ; @keyword CELLSIZE 11 ; @keyword CELLSIZE 15 12 ; size (in pixel) of the square 16 13 ; representing one point of the mask 17 14 ; 18 ; @returns 15 ; @returns 19 16 ; newmsk the new 2D land-sea mask 20 17 ; … … 28 25 ; June 2006 29 26 ; 30 ; @version 27 ; @version 31 28 ; $Id$ 32 29 ; 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 30 ;- 31 ; 36 32 function changemsk,tab, CELLSIZE = cellsize 37 33 ; -
trunk/SRC/Grid/checkperio.pro
r226 r231 42 42 ; $Id$ 43 43 ;- 44 ; 44 45 PRO checkperio, file, WRITE = write 45 46 -
trunk/SRC/Grid/computegrid.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ;8 4 ; compute the grid parameters (cm_4mesh) common 9 5 ; … … 117 113 ; @keyword STRCALLING {type=string} 118 114 ; a string containing the calling command used to 119 ; call computegrid (this is used by xxx.pro)115 ; call computegrid (this is used by <pro>xxx</pro>) 120 116 ; 121 117 ; @keyword STRIDE {default=[1, 1, 1]}{type=3 elements vector} … … 240 236 ; 241 237 ;- 242 ;------------------------------------------------------------ 243 ;------------------------------------------------------------ 244 ;------------------------------------------------------------ 238 ; 245 239 PRO computegrid, startx, starty, stepxin, stepyin, nxin, nyin $ 246 240 , XAXIS = xaxis, YAXIS = yaxis, ZAXIS = zaxis $ … … 254 248 , UBASE2TBASE = ubase2tbase, VBASE2TBASE = vbase2tbase, FBASE2TBASE = fbase2tbase $ 255 249 , STRCALLING = strcalling, ROMSH = romsh, _extra = ex 256 ;---------------------------------------------------------257 250 ; 258 251 compile_opt idl2, strictarrsubs -
trunk/SRC/Grid/micromeshmask.pro
r157 r231 1 1 ;+ 2 2 ; 3 ; @file_comments 3 ; @file_comments 4 4 ; Reduce the size of the NetCDF meshmask created by OPA by 5 5 ; using bit (and not byte) format for the masks and the float format 6 6 ; for the other fields. 7 7 ; 8 ; @categories 8 ; @categories 9 9 ; For OPA 10 10 ; … … 17 17 ; July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 18 18 ; 19 ; @version 19 ; @version 20 20 ; $Id$ 21 21 ; 22 22 ;- 23 ;------------------------------------------------------ 24 ;------------------------------------------------------ 23 ; 25 24 PRO ncdf_transfer, inid, outid, inname, outname 26 25 ; -
trunk/SRC/Grid/n128gaussian.pro
r157 r231 1 1 ;+ 2 ; @file_comments compute the latitudes of the n128 gaussian grid. See: 3 ; http://www.ecmwf.int/products/data/technical/gaussian/n128FIS.html 2 ; 3 ; @file_comments 4 ; compute the latitudes of the n128 gaussian grid. See: 5 ; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n128FIS.html">Gaussian 128</a> 4 6 ; 5 7 ; @categories 6 8 ; Grid 7 9 ; 8 ; @examples 10 ; @examples 9 11 ; IDL> lat=n128gaussian() 10 12 ; … … 15 17 ; June 2004 16 18 ; 17 ; @version $Id$ 19 ; @version 20 ; $Id$ 18 21 ; 19 22 ;- -
trunk/SRC/Grid/n160gaussian.pro
r157 r231 1 1 ;+ 2 2 ; 3 ; @file_comments compute the latitudes of the n160 gaussian grid. See: 4 ; http://www.ecmwf.int/products/data/technical/gaussian/n160FIS.html 3 ; @file_comments 4 ; compute the latitudes of the n160 gaussian grid. See: 5 ; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n160FIS.html">Gaussian 160</a> 5 6 ; 6 ; @categories 7 ; @categories 7 8 ; Grid 8 9 ; 9 ; @examples 10 ; @examples 10 11 ; IDL>lat=n160gaussian() 11 12 ; … … 16 17 ; June 2004 17 18 ; 18 ; @version $Id$ 19 ; @version 20 ; $Id$ 19 21 ; 20 22 ;- -
trunk/SRC/Grid/n256gaussian.pro
r157 r231 1 1 ;+ 2 2 ; 3 ; @file_comments compute the latitudes of the n256 gaussian grid. See: 4 ; http://www.ecmwf.int/products/data/technical/gaussian/n256FIS.html 5 ; 6 ; @categories 3 ; @file_comments 4 ; compute the latitudes of the n256 gaussian grid. See: 5 ; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n256FIS.html">Gaussian 256</a> 6 ; 7 ; @categories 7 8 ; Grid 8 9 ; … … 16 17 ; June 2004 17 18 ; 18 ; @version $Id$ 19 ; @version 20 ; $Id$ 19 21 ; 20 22 ;- -
trunk/SRC/Grid/n48gaussian.pro
r157 r231 1 1 ;+ 2 2 ; 3 ; @file_comments compute the latitudes of the n48 gaussian grid. See: 4 ; http://www.ecmwf.int/products/data/technical/gaussian/n48FIS.html 3 ; @file_comments 4 ; compute the latitudes of the n48 gaussian grid. See: 5 ; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n48FIS.html">Gaussian 48</a> 5 6 ; 6 ; @categories 7 ; @categories 7 8 ; Grid 8 9 ; … … 16 17 ; June 2004 17 18 ; 18 ; @version $Id$ 19 ; @version 20 ; $Id$ 19 21 ; 20 22 ;- -
trunk/SRC/Grid/n80gaussian.pro
r157 r231 2 2 ; 3 3 ; @file_comments compute the latitudes of the n80 gaussian grid. See: 4 ; http://www.ecmwf.int/products/data/technical/gaussian/n80FIS.html4 ; <a href="http://www.ecmwf.int/products/data/technical/gaussian/n80FIS.html">Gaussian 80</a> 5 5 ; 6 ; @categories 6 ; @categories 7 7 ; Grid 8 8 ; … … 16 16 ; June 2004 17 17 ; 18 ; @version $Id$ 18 ; @version 19 ; $Id$ 19 20 ; 20 21 ;- -
trunk/SRC/Grid/ncdf_meshread.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments read NetCDF meshmask file created by OPA 3 ; @file_comments 4 ; read NetCDF meshmask file created by OPA 7 5 ; 8 6 ; @categories … … 24 22 ; defined according to GLAMBOUNDARY. 25 23 ; 26 ; @keyword CHECKDAT Suppressed. Use micromeshmask.pro to create an 24 ; @keyword CHECKDAT 25 ; Suppressed. Use <pro>micromeshmask</pro> to create an 27 26 ; appropriate meshmask. 28 27 ; … … 51 50 ; 52 51 ; @keyword STRCALLING {type=scalar string} 53 ; the calling command used to call computegrid (this is used by xxx.pro)52 ; the calling command used to call computegrid (this is used by <pro>xxx<pro>) 54 53 ; 55 54 ; @keyword STRIDE {default=[1, 1, 1]}{type=3 elements vector} … … 57 56 ; value will be stored in the common (cm_4mesh) variable key_stride 58 57 ; 59 ; @keyword _EXTRA used to pass isafile keywords 60 ; 61 ; @uses cm_4mesh cm_4data cm_4cal 58 ; @keyword _EXTRA 59 ; Used to pass keywords to <pro>isafile</pro> 60 ; 61 ; @uses 62 ; cm_4mesh 63 ; cm_4data 64 ; cm_4cal 62 65 ; 63 66 ; @restrictions 64 ; 65 ; ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 66 ; be defined before calling ncdf_meshread. if some of those value 67 ; are equal to -1 they will be automatically defined 67 ; ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 68 ; be defined before calling ncdf_meshread. if some of those value 69 ; are equal to -1 they will be automatically defined 68 70 ; 69 71 ; @history … … 80 82 ; 81 83 ;- 82 ;------------------------------------------------------------ 83 ;------------------------------------------------------------ 84 ;------------------------------------------------------------ 84 ; 85 85 PRO ncdf_meshread, filename, GLAMBOUNDARY = glamboundary, CHECKDAT = checkdat $ 86 86 , ONEARTH = onearth, GETDIMENSIONS = getdimensions $ 87 87 , PERIODIC = periodic, SHIFT = shift, STRIDE = stride $ 88 88 , STRCALLING = strcalling, _EXTRA = ex 89 ;90 ;---------------------------------------------------------91 89 ; 92 90 compile_opt idl2, strictarrsubs -
trunk/SRC/Grid/ncdf_meshroms.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments read NetCDF grid file created by ROMS 3 ; @file_comments 4 ; read NetCDF grid file created by ROMS 7 5 ; 8 6 ; @categories … … 58 56 ; value will be stored in the common (cm_4mesh) variable key_stride 59 57 ; 60 ; @keyword _EXTRA used to pass isafile keywords 61 ; 62 ; @uses cm_4mesh cm_4data cm_4cal 58 ; @keyword _EXTRA 59 ; Used to pass keywords to <pro>isafile</pro> 60 ; 61 ; @uses 62 ; cm_4mesh 63 ; cm_4data 64 ; cm_4cal 63 65 ; 64 66 ; @restrictions 65 ; 66 ; ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 67 ; be defined before calling ncdf_meshread. if some of those value 68 ; are equal to -1 they will be automatically defined 69 ; 70 ; In the original ROMS grid, if F grid has (jpi,jpj) points then T 71 ; grid will have (jpi+1,jpj+1) points, U grid will have (jpi,jpj+1) 72 ; points and V grid will have (jpi+1,jpj) points. 73 ; By default C-grid used in this package needs the same number of 74 ; points for T,U,V and F grid, with a T point at the bottom left 75 ; corner of the grid. We therefore ignore the last column of T and 76 ; V points and the last line of T and U points. 77 ; 78 ; Scale factors are compuited using the distance between the points 79 ; (which is not the exact definition for irregular grid). 67 ; ixminmesh,ixmaxmesh,iyminmesh,iymaxmesh,izminmesh,izmaxmesh must 68 ; be defined before calling ncdf_meshread. if some of those value 69 ; are equal to -1 they will be automatically defined 70 ; 71 ; In the original ROMS grid, if F grid has (jpi,jpj) points then T 72 ; grid will have (jpi+1,jpj+1) points, U grid will have (jpi,jpj+1) 73 ; points and V grid will have (jpi+1,jpj) points. 74 ; By default C-grid used in this package needs the same number of 75 ; points for T,U,V and F grid, with a T point at the bottom left 76 ; corner of the grid. We therefore ignore the last column of T and 77 ; V points and the last line of T and U points. 78 ; 79 ; Scale factors are compuited using the distance between the points 80 ; (which is not the exact definition for irregular grid). 80 81 ; 81 82 ; @history … … 86 87 ; 87 88 ;- 88 ;------------------------------------------------------------ 89 ;------------------------------------------------------------ 90 ;------------------------------------------------------------ 89 ; 91 90 PRO ncdf_meshroms, filename, NRHO = nrho, GLAMBOUNDARY = glamboundary $ 92 91 , ONEARTH = onearth, GETDIMENSIONS = getdimensions $ 93 92 , PERIODIC = periodic, SHIFT = shift, STRIDE = stride $ 94 93 , STRCALLING = strcalling, _EXTRA = ex 95 ;96 ;---------------------------------------------------------97 94 ; 98 95 compile_opt idl2, strictarrsubs -
trunk/SRC/Grid/numbisland.pro
r197 r231 22 22 ; 23 23 ;- 24 ; 24 25 PRO mskneig, msk, nx, ny, indin, numb 25 26 ; flag the point 26 27 msk[indin] = numb 27 28 ; find its neighbourgs 28 indx = (indin MOD nx) + [-1L, 0L, 1L] 29 indx = (indin MOD nx) + [-1L, 0L, 1L] 29 30 indx = (temporary(indx) + nx) MOD nx ; x periodicity 30 indy = (indin/nx) + [-1L, 0L, 1L] 31 indy = (indin/nx) + [-1L, 0L, 1L] 31 32 indy = 0 > temporary(indy) < (ny-1L) ; y periodicity 32 33 ; build 1d index 33 34 ind = temporary(indx)#replicate(1L, 3) + replicate(nx, 3)#temporary(indy) 34 35 ; for each neighbourgs on the same island, call again mskneig 35 FOR i = 0, n_elements(ind)-1 DO BEGIN 36 FOR i = 0, n_elements(ind)-1 DO BEGIN 36 37 IF msk[ind[i]] EQ 0 THEN mskneig, msk, nx, ny, ind[i], numb 37 ENDFOR 38 ENDFOR 38 39 39 40 return … … 82 83 IF (islnumb-9) MOD 10 EQ 0 THEN print, 'island number :'+strtrim(islnumb-9, 1) 83 84 84 mskneig, msk, nx, ny, land, islnumb 85 85 mskneig, msk, nx, ny, land, islnumb 86 86 87 land = (where(msk EQ 0, count))[0] 87 88 islnumb = islnumb + 1 … … 91 92 msk[where(msk EQ -8)] = 0 92 93 93 print, 'time:', systime(1)-time1 94 print, 'time:', systime(1)-time1 94 95 95 96 RETURN, msk -
trunk/SRC/Grid/restoreboxparam.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments restore all the zoom parameters (defined by calling domdef) 7 ; previously defined by saveboxparam 3 ; @file_comments 4 ; restore all the zoom parameters (defined by calling <pro>domdef</pro>) 5 ; previously defined by <pro>saveboxparam</pro> 8 6 ; 9 7 ; @param filename {in}{required} 10 8 ; a scalar string defining the file name 11 9 ; 12 ; @uses cm_4mesh (and cm_demomode_used if we are in demo mode) 10 ; @uses 11 ; cm_4mesh (and cm_demomode_used if we are in demo mode) 13 12 ; 14 ; @restrictions call def_myuniquetmpdir, if myuniquetmpdir is undefined: 13 ; @restrictions 14 ; call def_myuniquetmpdir, if myuniquetmpdir is undefined: 15 15 ; => define, create and add it to !path 16 16 ; … … 18 18 ; IDL> restoreboxparam, filename 19 19 ; 20 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 20 ; @history 21 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 21 22 ; July 2005 22 23 ; 23 ; @version $Id$ 24 ; @version 25 ; $Id$ 24 26 ; 25 27 ;- 26 ;------------------------------------------------------------ 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 28 ; 29 29 PRO restoreboxparam, filename 30 30 ; … … 88 88 return 89 89 end 90 -
trunk/SRC/Grid/romsdepth.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; compute depth of ROMS outputs according to ROMS parameters … … 22 23 ; $Id$ 23 24 ;- 25 ; 24 26 FUNCTION romsdepth 25 27 ; -
trunk/SRC/Grid/saveboxparam.pro
r155 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments save all the zoom parameters (defined by calling domdef) 3 ; @file_comments 4 ; save all the zoom parameters (defined by calling <pro>domdef</pro>) 7 5 ; in a file (using save command) located in myuniquetmpdir 8 6 ; (common variable defined by def_myuniquetmpdir) 9 ;10 ; @param filename {in}{required} a scalar string defining the file name11 7 ; 12 ; @uses cm_4mesh (and cm_demomode_used if we are in demo mode) 8 ; @param filename {in}{required} 9 ; a scalar string defining the file name 13 10 ; 14 ; @restrictions call def_myuniquetmpdir, if myuniquetmpdir is undefined: 11 ; @uses 12 ; cm_4mesh (and cm_demomode_used if we are in demo mode) 13 ; 14 ; @restrictions 15 ; call def_myuniquetmpdir, if myuniquetmpdir is undefined: 15 16 ; => define, create and add it to !path 16 17 ; … … 18 19 ; IDL> saveboxparam, filename 19 20 ; 20 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 21 ; @history 22 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 21 23 ; June 2005 22 24 ; 23 ; @version $Id$ 25 ; @version 26 ; $Id$ 24 27 ; 25 28 ;- 26 ;------------------------------------------------------------ 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 29 ; 29 30 PRO saveboxparam, filename 30 31 ; -
trunk/SRC/Grid/smallmeshmask.pro
r157 r231 1 1 ;+ 2 2 ; 3 ; 4 ; @categories 3 ; @categories 5 4 ; For OPA 6 5 ; … … 13 12 ; July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 14 13 ; 15 ; @version 14 ; @version 16 15 ; $Id$ 17 16 ; 18 17 ;- 19 ;------------------------------------------------------ 20 ;------------------------------------------------------ 18 ; 21 19 PRO ncdf_transfer, inid, outid, inname, outname 22 20 ; … … 30 28 ; 31 29 ;+ 32 ; @file_comments 30 ; @file_comments 33 31 ; Reduce the size of the NetCDF meshmask created by OPA by 34 32 ; using byte format for the masks and the float format for the other … … 45 43 ; xxx.mask.nc. In that case, the meshmask is split into 3 files. 46 44 ; 47 ; @param ncfileout {in}{optional}{default=smallmeshmask.nc} 48 ; the name of the reduced meshmask file. 45 ; @param ncfileout {in}{optional}{default=smallmeshmask.nc} 46 ; the name of the reduced meshmask file. 49 47 ; 50 48 ; @examples … … 52 50 ; IDL> smallmeshmask, 'meshmask_ORCA_R05.nc',iodir=meshdir 53 51 ; 54 ; @categories 52 ; @categories 55 53 ; For OPA 56 54 ; … … 58 56 ; July 2004 Sebastien Masson (smasson\@lodyc.jussieu.fr) 59 57 ; 60 ; @version 58 ; @version 61 59 ; $Id$ 62 60 ; … … 86 84 ; get the horizontal dimensions 87 85 IF n_elements(filein_hgr) NE 0 THEN cdfid = ncdf_open(filein_hgr) $ 88 ELSE cdfid = ncdf_open(filein) 86 ELSE cdfid = ncdf_open(filein) 89 87 ncdf_diminq, cdfid, 'x', name, jpi 90 88 ncdf_diminq, cdfid, 'y', name, jpj … … 95 93 ENDIF 96 94 listdims = strlowcase(ncdf_listdims(cdfid)) 97 IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpk ELSE BEGIN 95 IF (where(listdims EQ 'z'))[0] NE -1 THEN ncdf_diminq, cdfid, 'z', name, jpk ELSE BEGIN 98 96 dimid = (where(strmid(listdims, 0, 5) EQ 'depth'))[0] 99 IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpk ELSE BEGIN 97 IF dimid NE -1 THEN ncdf_diminq, cdfid, dimid, name, jpk ELSE BEGIN 100 98 dummy = report('We could not find the vertical dimension..., its name must be z or start with depth') 101 99 return 102 ENDELSE 103 ENDELSE 100 ENDELSE 101 ENDELSE 104 102 ; get the variables list related to the partial steps 105 103 varlist_ps = ncdf_listvars(cdfid) … … 112 110 ;------------------------------------------------------ 113 111 IF n_elements(ncfileout) EQ 0 THEN ncfileout = 'smallmeshmask.nc' 114 112 115 113 cdfidout = ncdf_create(isafile(FILE = ncfileout, IODIR = iodir, /NEW), /clobber) 116 114 ncdf_control, cdfidout, /nofill … … 184 182 FOR z = 0, n_elements(zgrlist)-1 DO $ 185 183 ncdf_transfer, cdfid, cdfidout, zgrlist[z] 186 ; partial step variables 184 ; partial step variables 187 185 IF (where(varlist_ps EQ 'hdept'))[0] NE -1 THEN $ 188 186 ncdf_transfer, cdfid, cdfidout, 'hdept' -
trunk/SRC/Interpolation/angle.pro
r202 r231 1 ;---------2 1 ;+ 3 2 ; @file_comments 4 3 ; north stereographic polar projection 5 4 ; 6 ; @categories 5 ; @categories 7 6 ; Interpolation 8 7 ; … … 38 37 RETURN, {x:x, y:y} 39 38 END 40 ;---------41 39 ;+ 42 40 ; @file_comments Compute angles between grid lines and direction of the North pole 43 41 ;(fom angle.F,v 2.2 in OPA8.2) 44 42 ; 45 ; @categories 43 ; @categories 46 44 ; Interpolation 47 45 ; … … 91 89 ; Feb 2005: IDL adaptation S. Masson 92 90 ; 93 ; @version $Id$ 91 ; @version 92 ; $Id$ 94 93 ;- 95 ;---------96 94 ; 97 95 PRO angle, fileocemesh, gcosu, gsinu, gcosv, gsinv, gcost, gsint $ -
trunk/SRC/Interpolation/clickincell.pro
r163 r231 6 6 ; Grid 7 7 ; 8 ; @keyword CELLTYPE = 'T', 'W', 'U', 'V' or 'F' This this the type of point 8 ; @keyword CELLTYPE 9 ; = 'T', 'W', 'U', 'V' or 'F' This this the type of point 9 10 ; that is located in the center of the cell which the click is 10 11 ; located. default is T type of cell (with corner defined by F 11 12 ; points). 12 13 ; 13 ; @keyword DRAWCELL to draw the cell in which we clicked 14 ; 15 ; @keyword COLOR the color used to draw the cells (Clicking one more 16 ; time in the same cell will draw the cell with the white color) 17 ; 18 ; @keyword ORIGINAL to get the position of the cell regarding the original 19 ; grid (with no key_shift, ixminmesh, iyminmesh...) 20 ; 21 ; @keyword IJ see outputs 22 ; 23 ; @keyword _EXTRA to pass extra keywords to inquad and plot (when /drawcell) 14 ; @keyword DRAWCELL 15 ; to draw the cell in which we clicked 16 ; 17 ; @keyword COLOR 18 ; the color used to draw the cells (Clicking one more 19 ; time in the same cell will draw the cell with the white color) 20 ; 21 ; @keyword ORIGINAL 22 ; to get the position of the cell regarding the original 23 ; grid (with no key_shift, ixminmesh, iyminmesh...) 24 ; 25 ; @keyword IJ 26 ; see outputs 27 ; 28 ; @keyword _EXTRA 29 ; Used to pass extra keywords to <pro>inquad</pro> and <pro>plot</pro> 30 ; (when /drawcell) 24 31 ; 25 32 ; @returns 26 ; the index of the selected cells regarding to the grid which 27 ; is in memory in the variable of the common. If /ij keyword is 28 ; activated give 2D array (2, n) which are the i,j position of the 29 ; n selected cells. 30 ; 31 ; @uses common.pro 33 ; the index of the selected cells regarding to the grid which 34 ; is in memory in the variable of the common. If /ij keyword is 35 ; activated give 2D array (2, n) which are the i,j position of the 36 ; n selected cells. 37 ; 38 ; @uses 39 ; common.pro 32 40 ; 33 41 ; @examples 34 ;35 42 ; IDL> res = clickincell() 36 43 ; Click with the left button to select a cell. Clicking one more … … 45 52 ; August 2003 46 53 ; 47 ; @version $Id$ 54 ; @version 55 ; $Id$ 48 56 ; 49 57 ;- 58 ; 50 59 FUNCTION clickincell, CELLTYPE = celltype, DRAWCELL = drawcell, COLOR = color, ORIGINAL = original, IJ = ij, _EXTRA = extra 51 60 ; -
trunk/SRC/Interpolation/compute_fromreg_imoms3_weigaddr.pro
r226 r231 53 53 ; March 2006: works for rectangular grids 54 54 ; 55 ; @version $Id$ 55 ; @version 56 ; $Id$ 56 57 ; 57 58 ;- 58 ;59 ;----------------------------------------------------------60 ;----------------------------------------------------------61 59 ; 62 60 PRO compute_fromreg_imoms3_weigaddr, alonin, alatin, olonin, olat, weig, addr $ -
trunk/SRC/Interpolation/cutpar.pro
r163 r231 4 4 ; cut p parallelogram(s) into p*n^2 parallelograms 5 5 ; 6 ; @categories basic work 6 ; @categories 7 ; basic work 7 8 ; 8 9 ; @param x0 {in}{required} … … 34 35 ; of each piece of the parallelograms 35 36 ; 36 ; @uses cutsegment.pro 37 ; @uses 38 ; <pro>cutsegment</pro> 37 39 ; 38 40 ; @examples … … 56 58 ; July 5th, 2002 57 59 ; 58 ; @version $Id$ 60 ; @version 61 ; $Id$ 59 62 ; 60 63 ;- 64 ; 61 65 FUNCTION cutpar, x0, y0, x1, y1, x2, y2, x3, y3, n, ENDPOINTS = endpoints, ONSPHERE = onsphere 62 66 ; -
trunk/SRC/Interpolation/cutsegment.pro
r163 r231 4 4 ; cut p segments into p*n equal parts 5 5 ; 6 ; @categories basic work 6 ; @categories 7 ; basic work 7 8 ; 8 9 ; @param x0 {in}{required} … … 45 46 ; July 5th, 2002 46 47 ; 47 ; @version $Id$ 48 ; @version 49 ; $Id$ 48 50 ; 49 51 ;- 52 ; 50 53 FUNCTION cutsegment, x0, y0, x1, y1, n, ENDPOINTS = endpoints, ONSPHERE = onsphere 51 54 ; -
trunk/SRC/Interpolation/extrapolate.pro
r226 r231 51 51 ; 52 52 ;- 53 ; 53 54 FUNCTION extrapolate, zinput, maskinput, nb_iteration, x_periodic = x_periodic $ 54 55 , MINVAL = minval, MAXVAL = maxval, GE0 = ge0 -
trunk/SRC/Interpolation/extrapsmooth.pro
r226 r231 5 5 ; extrapolate data where maskinput eq 0 by filling 6 6 ; step by step the coastline points with the mean value of the 8 neighbourgs. 7 ;8 7 ; 9 8 ; @categories … … 45 44 ; $Id$ 46 45 ;- 46 ; 47 47 FUNCTION extrapsmooth, in, mskin, x_periodic = x_periodic, MINVAL = minval, MAXVAL = maxval, GE0 = ge0 48 48 ; -
trunk/SRC/Interpolation/fromirr.pro
r228 r231 5 5 ; Only 1 method available = bilinear 6 6 ; 7 ; @categories 7 ; @categories 8 8 ; Interpolation 9 9 ; … … 38 38 ; 39 39 ; @keyword ADDR {type=2d array} 40 ; 1) at the first call of fromirr: 40 ; 1) at the first call of fromirr: 41 41 ; This keyword can be set to a named variable (undefined or equal to 0) into which the 42 42 ; addresses used to perform the interpolation will be copied when the current routine exits. … … 81 81 ; June 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr) 82 82 ; 83 ; @version $Id$ 83 ; @version 84 ; $Id$ 84 85 ; 85 86 ;- 86 ;----------------------------------------------------------87 ;----------------------------------------------------------88 87 ; 89 88 FUNCTION fromirr, method, datain, lonin, latin, mskin, lonout, latout, mskout $ -
trunk/SRC/Interpolation/fromreg.pro
r228 r231 81 81 ; November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr) 82 82 ; 83 ; @version $Id$ 83 ; @version 84 ; $Id$ 84 85 ; 85 86 ;- 86 ;----------------------------------------------------------87 ;----------------------------------------------------------88 87 ; 89 88 FUNCTION fromreg, method, datain, lonin, latin, lonout, latout $ -
trunk/SRC/Interpolation/get_gridparams.pro
r226 r231 71 71 ; November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr) 72 72 ; 73 ; @version $Id$ 73 ; @version 74 ; $Id$ 74 75 ; 75 76 ;- 76 ;77 ;----------------------------------------------------------78 ;----------------------------------------------------------79 77 ; 80 78 PRO get_gridparams, in1, in2, in3, in4, in5, in6, in7, in8, DOUBLE = double -
trunk/SRC/Interpolation/imoms3.pro
r134 r231 4 4 ; @param xin {in}{required} 5 5 ; 6 ; @version $Id$ 6 ; @version 7 ; $Id$ 7 8 ; 8 9 ;- 10 ; 9 11 FUNCTION imoms3, xin 10 12 ; -
trunk/SRC/Interpolation/inquad.pro
r226 r231 71 71 ; IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 72 72 ; 73 ; On a sphere see clickincell.pro... 73 ; On a sphere see 74 ; <pro>clickincell.pro</pro> ... 74 75 ; 75 76 ; @history … … 78 79 ; Based on Convert_clic_ij.pro written by Gurvan Madec 79 80 ; 80 ; @version $Id$ 81 ; @version 82 ; $Id$ 81 83 ; 82 84 ;- 85 ; 83 86 FUNCTION inquad, x, y, x1, y1, x2, y2, x3, y3, x4, y4, ONSPHERE = onsphere, DOUBLE = double, ZOOMRADIUS = zoomradius, NOPRINT = noprint, NEWCOORD = newcoord 84 87 ; -
trunk/SRC/Interpolation/inrecgrid.pro
r163 r231 51 51 ; October 3rd, 2003: use value_locate 52 52 ; 53 ; @version $Id$ 53 ; @version 54 ; $Id$ 54 55 ; 55 56 ;- 57 ; 56 58 FUNCTION inrecgrid, x1d, y1d, left, bottom, OUTPUT2D = output2d, CHECKOUT = checkout 57 59 ; -
trunk/SRC/Interpolation/ll_narcs_distances.pro
r163 r231 10 10 ; 1395. Equations (5-5) and (5-6). 11 11 ; 12 ; @categories Mapping, geography 12 ; @categories 13 ; Mapping, geography 13 14 ; 14 15 ; @param Lon0 {in}{required} … … 63 64 ; August 2005 64 65 ; 65 ; @version $Id$ 66 ; @version 67 ; $Id$ 66 68 ; 67 69 ;- -
trunk/SRC/Interpolation/map_npoints.pro
r163 r231 9 9 ; without do loop. 10 10 ; 11 ; @categories Maps 11 ; @categories 12 ; Maps 12 13 ; 13 14 ; @param Lon0 {in}{required} … … 97 98 ; October 2003 98 99 ; 99 ; @version $Id$ 100 ; @version 101 ; $Id$ 100 102 ; 101 103 ;- 104 ; 102 105 Function map_npoints, lon0, lat0, lon1, lat1, AZIMUTH = azimuth $ 103 106 , RADIANS = radians, RADIUS = radius, MIDDLE = middle, TWO_BY_TWO = two_by_two 104 107 105 COMPILE_OPTidl2, strictarrsubs108 compile_opt idl2, strictarrsubs 106 109 107 110 IF (N_PARAMS() LT 4) THEN $ -
trunk/SRC/Interpolation/neighbor.pro
r136 r231 5 5 ; P1 Which can be on a sphere 6 6 ; 7 ; @categories Maps 7 ; @categories 8 ; Maps 8 9 ; 9 10 ; @param p0lon {in}{required} … … 40 41 ; October 2003 41 42 ; 42 ; @version $Id$ 43 ; @version 44 ; $Id$ 43 45 ; 44 46 ;- 47 ; 45 48 FUNCTION neighbor, p0lon, p0lat, neighlon, neighlat, sphere = sphere, distance = distance, radians = radians 46 49 ; -
trunk/SRC/Interpolation/quadrilateral2square.pro
r163 r231 8 8 ; (x2,y2) -> (1,1) 9 9 ; (x3,y3) -> (0,1) 10 ; This is the inverse function of square2quadrilateral.pro 10 ; This is the inverse function of <pro>square2quadrilateral</pro>. 11 ; 11 12 ; The mapping is done using perspective transformation which preserve 12 13 ; lines in all orientations and permit quadrilateral to quadrilateral 13 14 ; mappings. see ref. bellow. 14 15 ; 15 ; @categories 16 ; @categories 16 17 ; Picture, Grid 17 18 ; … … 70 71 ; 71 72 ; 72 ; @version $Id$ 73 ; @version 74 ; $Id$ 73 75 ; 74 76 ;- 75 ;------------------------------------------------------------ 76 ;------------------------------------------------------------ 77 ;------------------------------------------------------------ 77 ; 78 78 FUNCTION quadrilateral2square, x0in, y0in, x1in, y1in, x2in, y2in, x3in, y3in, xxin, yyin, PERF = perf 79 ;80 79 ; 81 80 compile_opt idl2, strictarrsubs -
trunk/SRC/Interpolation/spl_fstdrv.pro
r186 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 39 36 ; Sebastien Masson (smasson\@lodyc.jussieu.fr): May 2005 40 37 ; 41 ; @version $Id$ 38 ; @version 39 ; $Id$ 42 40 ; 43 41 ;- 44 ;------------------------------------------------------------ 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 42 ; 47 43 FUNCTION spl_fstdrv, x, y, yscd, x2 48 44 ; -
trunk/SRC/Interpolation/spl_incr.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 62 59 ; Sebastien Masson (smasson\@lodyc.jussieu.fr): May-Dec 2005 63 60 ; 64 ; @version $Id$ 61 ; @version 62 ; $Id$ 65 63 ; 66 64 ;- 67 ;------------------------------------------------------------ 68 ;------------------------------------------------------------ 69 ;------------------------------------------------------------ 65 ; 70 66 FUNCTION pure_concave, x1, x2, y1, y2, der2, x 71 67 ; X^n type -
trunk/SRC/Interpolation/spl_keep_mean.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 73 70 ; Sebastien Masson (smasson\@lodyc.jussieu.fr): May 2005 74 71 ; 75 ; @version $Id$ 72 ; @version 73 ; $Id$ 76 74 ; 77 75 ;- 78 ;------------------------------------------------------------ 79 ;------------------------------------------------------------ 80 ;------------------------------------------------------------ 76 ; 81 77 FUNCTION spl_keep_mean, x, yin, x2, YP0 = yp0, YPN_1 = ypn_1, GE0 = ge0 82 78 ; -
trunk/SRC/Interpolation/square2quadrilateral.pro
r163 r231 12 12 ; mappings. see ref. bellow. 13 13 ; 14 ; @categories 14 ; @categories 15 15 ; Picture, Grid 16 16 ; … … 63 63 ; 64 64 ; 65 ; @version $Id$ 65 ; @version 66 ; $Id$ 66 67 ; 67 68 ;- 68 ;------------------------------------------------------------ 69 ;------------------------------------------------------------ 70 ;------------------------------------------------------------ 69 ; 71 70 FUNCTION square2quadrilateral, x0in, y0in, x1in, y1in, x2in, y2in, x3in, y3in, xxin, yyin 72 71 ; -
trunk/SRC/Matrix/different.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 44 41 ; 45 42 ;- 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 43 ; 49 44 FUNCTION different, a, b 50 45 ; -
trunk/SRC/Matrix/extrac2.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 80 77 ; 81 78 ;- 82 ;------------------------------------------------------------ 83 ;------------------------------------------------------------ 84 ;------------------------------------------------------------ 79 ; 85 80 FUNCTION extrac2, array, index1, index2, index3, index4 86 ;------------------------------------------------------------87 81 ; 88 82 compile_opt idl2, strictarrsubs … … 90 84 taille = size(array) 91 85 ;------------------------------------------------------------ 92 ; test of the numb reof parameters86 ; test of the number of parameters 93 87 ; and of the nature of the index (for THE case 'x') 94 88 ;------------------------------------------------------------ -
trunk/SRC/Matrix/inter.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 35 32 ; 36 33 ;- 37 ;------------------------------------------------------------ 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 40 34 ; 41 35 FUNCTION inter, a, b 42 36 ; -
trunk/SRC/Matrix/make_selection.pro
r223 r231 68 68 ; mgs, 28 Aug 1998: VERSION 1.00 69 69 ; mgs, 29 Aug 1998: - changed behavior and added ONLY_VALID keyword 70 ;71 ; @version72 ; $Id$73 ;74 ;-75 70 ; Copyright (C) 1998, Martin Schultz, Harvard University 76 71 ; This software is provided as is without any warranty … … 82 77 ; Bugs and comments should be directed to mgs@io.harvard.edu 83 78 ; with subject "IDL routine make_selection" 84 ;------------------------------------------------------------- 85 86 79 ; 80 ; @version 81 ; $Id$ 82 ; 83 ;- 84 ; 87 85 function make_selection,names,selnames, $ 88 86 only_valid=only_valid,required=required, $ -
trunk/SRC/Matrix/union.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; calculate the union between 2 matrices of whole numbers 8 5 ; 9 ; @categories 6 ; @categories 10 7 ; Calculation 11 8 ; 12 ; @param a {in}{required} arrays of positive integers, which need 9 ; @param a {in}{required} 10 ; arrays of positive integers, which need 13 11 ; not be sorted. Duplicate elements are ignored, as they have no 14 12 ; effect on the result … … 16 14 ; @param b {in}{required} see a 17 15 ; 18 ; @returns tableau 16 ; @returns 17 ; tableau 19 18 ; 20 ; @restrictions The empty set is denoted by an array with the first element equal to21 ; -1.19 ; @restrictions 20 ; The empty set is denoted by an array with the first element equal to -1. 22 21 ; 23 22 ; @restrictions These functions will not be efficient on sparse sets with wide … … 26 25 ; resulting set. 27 26 ; 28 ; @examples a = [2,4,6,8] 29 ; b = [6,1,3,2] 30 ; union(a,b) = [ 1, 2, 3, 4, 6, 8] ; Elements in either set 27 ; @examples 28 ; IDL> a = [2,4,6,8] 29 ; IDL> b = [6,1,3,2] 30 ; IDL> union(a,b) = [ 1, 2, 3, 4, 6, 8] ; Elements in either set 31 31 ; 32 ; @history http://www.dfanning.com/tips/set_operations.html 32 ; @history 33 ; http://www.dfanning.com/tips/set_operations.html 33 34 ; 34 ; @version $Id$ 35 ; @version 36 ; $Id$ 35 37 ; 36 38 ;- 37 ;------------------------------------------------------------ 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 39 ; 40 40 FUNCTION union, a, b 41 41 ; -
trunk/SRC/Matrix/zero_one.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 20 17 ; 21 18 ;- 22 ;------------------------------------------------------------ 23 ;------------------------------------------------------------ 24 ;------------------------------------------------------------ 19 ; 25 20 function zero_one, n1,n2 26 21 ; -
trunk/SRC/Obsolete/common.pro
r134 r231 2 2 ; @obsolete 3 3 ; 4 ; @version $Id$ 4 ; @version 5 ; $Id$ 5 6 ; 6 7 ;- -
trunk/SRC/Obsolete/congridseb.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 48 45 ; 49 46 ;- 50 ;------------------------------------------------------------ 51 ;------------------------------------------------------------ 52 ;------------------------------------------------------------ 47 ; 53 48 function congridseb, tableau, x, y 54 49 ; -
trunk/SRC/Obsolete/cp.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 13 10 ; @param filenameout {in}{required} 14 11 ; 15 ; @keyword _EXTRA used to pass your keywords 12 ; @keyword _EXTRA 13 ; Used to pass keywords 16 14 ; 17 15 ; @history 18 16 ; June 2005: Sebastien Masson => obsolete routine 19 17 ; 20 ; @version $Id$ 18 ; @version 19 ; $Id$ 21 20 ; 22 21 ;- 23 ;------------------------------------------------------------ 24 ;------------------------------------------------------------ 25 ;------------------------------------------------------------ 22 ; 26 23 PRO cp, filenamein, filenameout, _extra = ex 27 24 ; -
trunk/SRC/Obsolete/extrait.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 7 ; extraction of subdomains of matrices; 3 ; @file_comments 4 ; extraction of subdomains of matrices; 8 5 ; Even if the subdomain is "pierced" (see the example) 9 6 ; By default, IDL can make extractions of subdomain: 10 7 ; 11 ; IDL> a=indgen(5,5) 12 ; IDL> print, a 8 ; IDL> a=indgen(5,5) 9 ; IDL> print, a 13 10 ; 0 1 2 3 4 14 11 ; 5 6 7 8 9 … … 16 13 ; 15 16 17 18 19 17 14 ; 20 21 22 23 24 18 ; IDL> print, a[[0,2],3] 15 ; IDL> print, a[[0,2],3] 19 16 ; 15 17 20 ; IDL> print, a[[0,2],*] 17 ; IDL> print, a[[0,2],*] 21 18 ; 0 2 22 19 ; 5 7 … … 25 22 ; 20 22 26 23 ; but 27 ; IDL> print, a[[0,2],[3,4]] 24 ; IDL> print, a[[0,2],[3,4]] 28 25 ; 15 22 29 26 ; while 30 ; IDL> print, extrait(a,[0,2],[3,4]) 27 ; IDL> print, extrait(a,[0,2],[3,4]) 31 28 ; 15 17 32 29 ; 20 22 … … 37 34 ; @obsolete 38 35 ; 39 ; @categories 36 ; @categories 40 37 ; Utilities 41 38 ; 42 ; @param tab {in}{required} 39 ; @param tab {in}{required} 43 40 ; a 1,2,3 or 4 dim table 44 41 ; 45 ; @param indicex {in}{required} 42 ; @param indicex {in}{required} 46 43 ; can have 2 forms: 47 44 ; 1)a vector containing indexes of lines we want to keep 48 45 ; 2)the string '*' if we want to keep all lines. 49 46 ; 50 ; @param indicey {in}{required} 47 ; @param indicey {in}{required} 51 48 ; the same thing that indicex but for dim 2. 52 49 ; 53 ; @param indicez {in}{required} 50 ; @param indicez {in}{required} 54 51 ; the same thing that indicex but for dim 3. 55 ; 56 ; @param indicet {in}{required} 52 ; 53 ; @param indicet {in}{required} 57 54 ; the same thing that indicex but for dim 4. 58 55 ; 59 ; @returns 56 ; @returns 60 57 ; a matrix 1,2,3 or 4d extract from tab 58 ; -1 in case of mistake 61 59 ; 62 ; @restrictions 63 ; res=-1 in case of mistake 64 ; 65 ; @examples 66 ; I have a dim 2 matrix named A. I want extract a small intersection 60 ; @examples 61 ; I have a dim 2 matrix named A. I want extract a small intersection 67 62 ; matrix 2d of the line 2,3 and 7 and of the column 0 and 1: 68 ; 63 ; 69 64 ; IDL> res=extrait(A,[2,3,7],[0,1]) 70 65 ; 71 66 ; other ex: 72 ; IDL> print, a 67 ; IDL> print, a 73 68 ; a b c 74 69 ; d e f 75 70 ; g h i 76 ; IDL> print, extrait(a,[0,2],[0,2]) 71 ; IDL> print, extrait(a,[0,2],[0,2]) 77 72 ; a c 78 73 ; g i 79 ; 74 ; 80 75 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 81 76 ; 12/1/1999 … … 85 80 ; 86 81 ;- 87 ;------------------------------------------------------------ 88 ;------------------------------------------------------------ 89 ;------------------------------------------------------------ 82 ; 90 83 FUNCTION extrait, tab, indicex, indicey, indicez, indicet 91 ;------------------------------------------------------------92 84 ; 93 85 compile_opt idl2, strictarrsubs -
trunk/SRC/Obsolete/ficdate.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 9 6 ; @obsolete 10 7 ; 11 ; @param vdate {in} date vairmer ex:930124 8 ; @param vdate {in} 9 ; date vairmer ex:930124 12 10 ; 13 ; @param dim {in} 'so' ou 'vo' par defaut so est choisi 11 ; @param dim {in} 12 ; 'so' ou 'vo' par defaut so est choisi 14 13 ; 15 ; @param nomexp {in} nom de l'experience en trois lettres par defaut prefix 14 ; @param nomexp {in} 15 ; nom de l'experience en trois lettres par defaut prefix 16 16 ; 17 ; @returns le nom du fichier vairmer (depuis iodir) 17 ; @returns 18 ; le nom du fichier vairmer (depuis iodir) 18 19 ; 19 ; @uses common.pro 20 ; @uses 21 ; common.pro 20 22 ; 21 23 ; @examples 22 24 ; IDL> fic = ficdate(930124) 23 25 ; 24 ; @history Jerome Vialard (jv\@lodyc.jussieu.fr) 25 ;1/7/98 26 ; @history 27 ; Jerome Vialard (jv\@lodyc.jussieu.fr) 28 ; 1/7/98 26 29 ; 27 ; @version $Id$ 30 ; @version 31 ; $Id$ 28 32 ; 29 33 ;- 30 ;------------------------------------------------------------ 31 ;------------------------------------------------------------ 32 ;------------------------------------------------------------ 34 ; 33 35 function ficdate, vdate, dim, nomexp 34 36 ; -
trunk/SRC/Obsolete/fictype.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 9 6 ; @param vdate {in}{required} 10 7 ; 11 ; @param dim unused 8 ; @param dim 9 ; unused 12 10 ; 13 ; @uses common.pro 11 ; @uses 12 ; common.pro 14 13 ; 15 14 ; @examples … … 22 21 ; 23 22 ;- 24 ;------------------------------------------------------------ 25 ;------------------------------------------------------------ 26 ;------------------------------------------------------------ 23 ; 27 24 function fictype, vdate, dim 28 25 ; -
trunk/SRC/Obsolete/imprime.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 14 11 ; @keyword NB 15 12 ; 16 ; @uses printps 13 ; @uses 14 ; printps 17 15 ; 18 16 ; @history 19 17 ; June 2005: Sebastien Masson, english version 20 18 ; 21 ; @version $Id$ 19 ; @version 20 ; $Id$ 22 21 ; 23 22 ;- 24 ;------------------------------------------------------------ 25 ;------------------------------------------------------------ 26 ;------------------------------------------------------------ 23 ; 27 24 PRO imprime, filename, TRANS = trans, NB = nb 28 25 ; -
trunk/SRC/Obsolete/jourdsmois.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments 6 ; used daysinmonth instead...3 ; used <pro>daysinmonth<pro> instead 7 4 ; 8 5 ; @obsolete … … 12 9 ; @param annee {in}{optional} 13 10 ; 14 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 11 ; @history 12 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 15 13 ; June 2005: Sebastien Masson, english version 16 14 ; 17 ; @version $Id$ 15 ; @version 16 ; $Id$ 18 17 ; 19 18 ;- 20 ;------------------------------------------------------------ 21 ;------------------------------------------------------------ 22 ;------------------------------------------------------------ 19 ; 23 20 function jourdsmois, mois, annee 24 21 ; -
trunk/SRC/Obsolete/juldate.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; @file_comments 2 ; @file_comments 6 3 ; gives julian date equivalent of a date in vairmer 7 4 ; ( yymmdd or yyyymmdd ) format … … 12 9 ; @obsolete 13 10 ; 14 ; @categories 11 ; @categories 15 12 ; Calendar 16 13 ; 17 ; @param vvdate {in} date de la forme yymmdd ou yyyymmdd 14 ; @param vvdate {in} 15 ; date de la forme yymmdd ou yyyymmdd 18 16 ; 19 ; @keyword _EXTRA used to pass your keywords 17 ; @keyword _EXTRA 18 ; Used to pass keywords 20 19 ; 21 ; @uses common.pro vraidate 20 ; @uses 21 ; common.pro 22 ; vraidate 22 23 ; 23 ; @returns date en jour julien 24 ; @returns 25 ; date en jour julien 24 26 ; l'annee 0 n'existant pas, qd year est nulle on calcule le 25 27 ; jour julien de l'annee -1. … … 31 33 ; IDL> date = juldate(930124) 32 34 ; 33 ; @history Jerome Vialard (jv\@lodyc.jussieu.fr) 35 ; @history 36 ; Jerome Vialard (jv\@lodyc.jussieu.fr) 34 37 ; 2/7/98 35 38 ; 36 ; @version $Id$ 39 ; @version 40 ; $Id$ 37 41 ; 38 42 ;- 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 43 ; 42 44 function juldate, vvdate, _EXTRA = ex 43 45 ; -
trunk/SRC/Obsolete/lec.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 21 18 ; IDL> resultat=lec('nom_Vairmer'[,date[,'nom_experience']]) 22 19 ; 23 ; @param nomchamp {in}{required} 2 choix possibles: 20 ; @param nomchamp {in}{required} 21 ; 2 choix possibles: 24 22 ; 1) nom de champ Vairmer (chaine de 8 caracteres en majuscule ou 25 23 ; minuscule commencant par vo ou so). Dans cette methode on saute directement … … 29 27 ; plus rapide car elle va directement chercher le fichier qui nous interesse. 30 28 ; 31 ; @param date {in}{optional} nombres de 6 ou 8 chiffres (anneemoisjour, par ex:19980507) 32 ; 33 ; @param nomexp {in}{optional} trois lettres designant le nom de l'experience 34 ; 35 ; 36 ; @keyword ANOM {in} type du fichier vairmer par rapport auquel on doit calculer 29 ; @param date {in}{optional} 30 ; nombres de 6 ou 8 chiffres (anneemoisjour, par ex:19980507) 31 ; 32 ; @param nomexp {in}{optional} 33 ; trois lettres designant le nom de l'experience 34 ; 35 ; 36 ; @keyword ANOM {in} 37 ; type du fichier vairmer par rapport auquel on doit calculer 37 38 ; l'anomalie ('EX','AN','SE','MO','') 38 39 ; 39 ; @keyword ECRIT {in} permet d'imprimer tous les noms vairmer que contient le fichier. 40 ; @keyword ECRIT {in} 41 ; permet d'imprimer tous les noms vairmer que contient le fichier. 40 42 ; ds ce cas en input on met seulement 'vo' ou 'so' la fonction retourne le 41 43 ; nombre de fichiers lus. … … 43 45 ; @keyword BOITE 44 46 ; 45 ; @keyword EXPANOM {in} si on calcule l'anom par rapport a une exper 46 ; differente 47 ; 48 ; @keyword FILENAME string pour passer directement le nom du champ sans 47 ; @keyword EXPANOM {in} 48 ; si on calcule l'anom par rapport a une exper differente 49 ; 50 ; @keyword FILENAME 51 ; string pour passer directement le nom du champ sans 49 52 ; utiliser les inputs: nom_Vairmer',date,'nom_experience'. Rq si 50 53 ; ces inputs sont qd meme donnes ils ne sont pas modifies par 51 54 ; filename. 52 55 ; 53 ; @keyword GRID lorsque ce mot clef est active, lec retourne la liste 56 ; @keyword GRID 57 ; lorsque ce mot clef est active, lec retourne la liste 54 58 ; des types de grilles (T, U...) auxquelles se rapportent les 55 59 ; variables. ds ce cas en input on met seulement 'vo' ou 'so'. 56 60 ; 57 ; @keyword NAME lorsque ce mot clef est active, lec retourne la liste 61 ; @keyword NAME 62 ; lorsque ce mot clef est active, lec retourne la liste 58 63 ; des noms des variables. ds ce cas en input on met seulement 59 64 ; 'vo' ou 'so'. 60 65 ; 61 ; @keyword TOUT oblige lec a lire le champ sur tout le domaine qui a 66 ; @keyword TOUT 67 ; oblige lec a lire le champ sur tout le domaine qui a 62 68 ; etait selectionne pour la cession en cours (jpi,jpj,jpk) 63 69 ; 64 ; @returns un tableau 2 ou 3d. sans le mot cle /TOUT, sa taille est 70 ; @returns 71 ; un tableau 2 ou 3d. sans le mot cle /TOUT, sa taille est 65 72 ; celle du sous domaine definit par domdef (nx,ny,nz). avec /TOUT le 66 73 ; champ a la taille du domaine qui a etait selectionne pour la 67 74 ; cession en cours (jpi,jpj,jpk). 68 75 ; pour les sous domaines cf: 69 ; http://www.ipsl.jussieu.fr/~smlod/sousdomaine.html76 ; <a href="http://www.ipsl.jussieu.fr/~smlod/sousdomaine.html"> 70 77 ; Retourne -1 en cas d'erreur. 71 78 ; 72 ; @uses common.pro isnumber.pro fivardate.pro 79 ; @uses 80 ; common.pro 81 ; isnumber.pro 82 ; fivardate.pro 73 83 ; 74 84 ; @history … … 83 93 ; 2/99 84 94 ; 85 ; @version 95 ; @version 86 96 ; $Id$ 87 ; 88 ;;- 89 ;-------------------------------------------------------------- 90 ;-------------------------------------------------------------- 91 ;-------------------------------------------------------------- 97 ;- 98 ; 92 99 function lec, nomchamp,date,nomexp,ECRIT=ecrit,ANOM=anom, BOITE = boite,EXPANOM=expanom, TOUT = tout, GRID = grid, NAME = name, filename = FILENAME 93 100 ; -
trunk/SRC/Obsolete/lect.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 14 11 ; @obsolete 15 12 ; 16 ; @categories 13 ; @categories 17 14 ; Graphics, Reading 18 15 ; … … 47 44 ; par defaut la meme que nomexp 48 45 ; 49 ; @uses common vraidate juldate 50 ; 51 ; @history Jerome Vialard (jv\@lodyc.jussieu.fr) 46 ; @uses 47 ; common 48 ; vraidate 49 ; juldate 50 ; 51 ; @history 52 ; Jerome Vialard (jv\@lodyc.jussieu.fr) 52 53 ; 2/7/98 53 54 ; 54 ; @version $Id$ 55 ; @version 56 ; $Id$ 55 57 ; 56 58 ;- 57 ;-------------------------------------------------------------- 58 ;-------------------------------------------------------------- 59 ;-------------------------------------------------------------- 59 ; 60 60 ; 1 2 3 4 5 61 61 function lect, nomchamp,date1,date2,nomexp,direc,BOITE=boite, $ -
trunk/SRC/Obsolete/meshlec.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; lecture du mask des sorties d'OPA. les sources se trouvent ds les 8 5 ; repertoires sur maia du type: … … 14 11 ; IDL> meshmask[,' nomfich'] 15 12 ; 16 ; @param nomfich {in}{required} string, c''est le nom du fichier a lire. Par defaut, c''est meshmask. 17 ; 18 ; @keyword GLAMBOUNDARY {in} un vecteur de 2 elements specifaint le min et le 13 ; @param nomfich {in}{required} 14 ; string, c''est le nom du fichier a lire. Par defaut, c''est meshmask. 15 ; 16 ; @keyword GLAMBOUNDARY {in} 17 ; un vecteur de 2 elements specifaint le min et le 19 18 ; max qui doivent etre imposes en longitude (obligatoire si le 20 19 ; tableau depasse 360 degres) 21 20 ; 22 ; @keyword pasblabla {in} pour suprimer les blablas 23 ; 24 ; @keyword DOUBLE {in} pour forcer a lire les tableaux en double 21 ; @keyword pasblabla {in} 22 ; pour supprimer les blablas 23 ; 24 ; @keyword DOUBLE {in} 25 ; pour forcer a lire les tableaux en double 25 26 ; precision. ce Mot clef est maintenant active 26 27 ; automatiquement. … … 28 29 ; @keyword GETDIMENSIONS 29 30 ; 30 ; @uses common.pro 31 ; @uses 32 ; common.pro 31 33 ; 32 34 ; @restrictions … … 36 38 ; possible les mettre toutes a -1 et meshlec les calculera. 37 39 ; 38 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 40 ; @history 41 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 39 42 ; Marina Levy : lecture en double precision (cas calcul sur shine) 40 43 ; 41 ; @version $Id$ 44 ; @version 45 ; $Id$ 42 46 ; 43 47 ;- 44 ;------------------------------------------------------------ 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 47 pro meshlec, nomfich, PASBLABLA = pasblabla,DOUBLE = double, GLAMBOUNDARY = glamboundary, GETDIMENSIONS = GETDIMENSIONS 48 ; 49 PRO meshlec, nomfich, PASBLABLA = pasblabla,DOUBLE = double, GLAMBOUNDARY = glamboundary, GETDIMENSIONS = GETDIMENSIONS 48 50 ; 49 51 compile_opt idl2, strictarrsubs, obsolete -
trunk/SRC/Obsolete/ncdf_meshlec.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; @file_comments 6 ; use ncdf_meshread instead...2 ; @file_comments 3 ; use <pro>ncdf_meshread</pro> instead 7 4 ; 8 5 ; @obsolete … … 10 7 ; @param filename 11 8 ; 12 ; @keyword _EXTRA used to pass your keywords 9 ; @keyword _EXTRA 10 ; Used to pass keywords 13 11 ; 14 12 ; @history 15 13 ; Aug. 2005, Sebastien Masson: switch to ncdf_meshread 16 14 ; 17 ; @version $Id$ 15 ; @version 16 ; $Id$ 18 17 ; 19 18 ;- 20 ;------------------------------------------------------------ 21 ;------------------------------------------------------------ 22 ;------------------------------------------------------------ 19 ; 23 20 PRO ncdf_meshlec, filename, _EXTRA = ex 24 ;25 21 ; 26 22 compile_opt idl2, strictarrsubs, obsolete -
trunk/SRC/Obsolete/nlec.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; @file_comments 2 ; @file_comments 6 3 ; lit les fichiers Net-Cdf de l'experience TOTEM/ECMWF qui sont sur 7 4 ; maia: /u/rech/eee/reee217/TOTEM/REF/OUTPUTS … … 9 6 ; @obsolete 10 7 ; 11 ; @param name {in}{required} nom du tableau contenant le champ que l'on veut (le 8 ; @param name {in}{required} 9 ; nom du tableau contenant le champ que l'on veut (le 12 10 ; trouver avec ncdflec,fichier,/var 13 11 ; 14 ; @param debut {in} nombres de 6 ou 8 chiffres (anneemoisjour, par ex:19980507) 15 ; @param fin {in} nombres de 6 ou 8 chiffres (anneemoisjour, par ex:19980507) 16 ; @param nomexperience {in}{optional} trois lettres designant le nom de l'experience 17 ; 18 ; 19 ; @keyword BOITE boite sur laquelle integrer (par defaut tt le domaine) 20 ; 21 ; @keyword DIREC 'x' 'y' 'z' 'xy' 'xz' 'yz' 'xyz' directions selon lesquelles 22 ; effectuer les moyennes (si rien n'est donne on n'effectue pas de moyenne) 23 ; 24 ; @keyword GRILLE impose la grille a laquelle est rapporte le champ. rq permet 12 ; @param debut {in} 13 ; nombres de 6 ou 8 chiffres (anneemoisjour, par ex:19980507) 14 ; 15 ; @param fin {in} 16 ; nombres de 6 ou 8 chiffres (anneemoisjour, par ex:19980507) 17 ; 18 ; @param nomexperience {in}{optional} 19 ; trois lettres designant le nom de l'experience 20 ; 21 ; @keyword BOITE 22 ; boite sur laquelle integrer (par defaut tt le domaine) 23 ; 24 ; @keyword DIREC 25 ; 'x' 'y' 'z' 'xy' 'xz' 'yz' 'xyz' directions selon lesquelles 26 ; effectuer les moyennes (si rien n'est donne on n'effectue pas de moyenne) 27 ; 28 ; @keyword GRILLE 29 ; impose la grille a laquelle est rapporte le champ. rq permet 25 30 ; d'aller plus vite ds la lecture 26 31 ; 27 ; @keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef 32 ; @keyword TOUT 33 ; oblige a lire le tableau entier en non pas celui reduit a domdef 34 ; 28 35 ; @keyword STRUCTURE 36 ; 29 37 ; @keyword SEUILMIN 38 ; 30 39 ; @keyword SEUILMAX 40 ; 31 41 ; @keyword NAN 32 42 ; 33 ; @keyword _EXTRA used to pass your keywords 34 ; 35 ; @uses common.pro vraidate juldate nlec5j nlecserie 36 ; 37 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 43 ; @keyword _EXTRA 44 ; Used to pass keywords 45 ; 46 ; @uses 47 ; common.pro 48 ; vraidate 49 ; juldate 50 ; nlec5j 51 ; nlecserie 52 ; 53 ; @history 54 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 38 55 ; 14/8/98 39 56 ; 40 ; @version $Id$ 57 ; @version 58 ; $Id$ 41 59 ; 42 60 ;- … … 47 65 ;REF.07.790101.grid.W.nc 48 66 ;------------------------------------------------------------ 49 ; ------------------------------------------------------------67 ; 50 68 function nlec,name,debut,fin,nomexperience,BOITE=boite,DIREC=direc,GRILLE=grille,TOUT=tout $ 51 69 , STRUCTURE = structure, SEUILMIN = seuilmin, SEUILMAX = seuilmax, NAN = nan $ -
trunk/SRC/Obsolete/nlec5j.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; @file_comments 2 ; @file_comments 6 3 ; lit les fichiers Net-Cdf de l'experience TOTEM/ECMWF qui 7 4 ; contiennent les sorties a 5j regroupees par type de grille par … … 11 8 ; @obsolete 12 9 ; 13 ; @categories 10 ; @categories 14 11 ; Reading 15 12 ; … … 17 14 ; IDL> res=nlec5j( nom, numsortie, nbretps) 18 15 ; 19 ; @param nom {in}{required} nom du tableau contenant le champ que l'on veut (le 16 ; @param nom {in}{required} 17 ; nom du tableau contenant le champ que l'on veut (le 20 18 ; trouver avec ncdflec,fichier,/var 21 19 ; … … 24 22 ; fichier (compte a partir de 1) a partir de year 25 23 ; 26 ; @param nbretps {in}{required} nombre de pas de temps a extraire 27 ; 28 ; @keyword BOITE boite sur laquelle integrer (par defaut tt le domaine) 29 ; 30 ; @keyword GRILLE impose la grille a laquelle est rapporte le champ. rq permet 24 ; @param nbretps {in}{required} 25 ; nombre de pas de temps a extraire 26 ; 27 ; @keyword BOITE 28 ; boite sur laquelle integrer (par defaut tt le domaine) 29 ; 30 ; @keyword GRILLE 31 ; impose la grille a laquelle est rapporte le champ. rq permet 31 32 ; d'aller plus vite ds la lecture 32 33 ; 33 ; @keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef 34 ; 35 ; @keyword _EXTRA used to pass your keywords 34 ; @keyword TOUT 35 ; oblige a lire le tableau entier en non pas celui reduit a domdef 36 ; 37 ; @keyword _EXTRA 38 ; Used to pass keywords 36 39 37 ; @returns tableau 2d (qd on ne demande pas de serie) ou 3d ou 4d ds le cas dune serie 38 ; 39 ; @uses common.pro 40 ; 41 ; @restrictions appele par nlec 42 ; 43 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 44 ; 45 ; 46 ; @version $Id$ 40 ; @returns 41 ; tableau 2d (qd on ne demande pas de serie) ou 3d ou 4d ds le cas dune serie 42 ; 43 ; @uses 44 ; common.pro 45 ; 46 ; @restrictions 47 ; appele par <pro>nlec</pro> 48 ; 49 ; @history 50 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 51 ; 52 ; @version 53 ; $Id$ 47 54 ; 48 55 ;- 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 ;------------------------------------------------------------ 56 ; 52 57 function nlec5j, nom, numsortie, nbretps,BOITE = boite, GRILLE=grille,TOUT=tout, _EXTRA = ex 53 58 ; -
trunk/SRC/Obsolete/nlecan.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 14 11 ; IDL> res=nlecan(nom, numsortie79, nbretps) 15 12 ; 16 ; @param nom {in}{required} nom du tableau contenant le champ que l'on veut (le 13 ; @param nom {in}{required} 14 ; nom du tableau contenant le champ que l'on veut (le 17 15 ; trouver avec ncdflec,fichier,/var 18 16 ; 19 ; @param numsortie79 {in}{required} le numero du pas de temps que l'on veut sortir du 17 ; @param numsortie79 {in}{required} 18 ; le numero du pas de temps que l'on veut sortir du 20 19 ; fichier (compte a partir de 1) a partir de 79 21 20 ; 22 ; @param nbretps {in}{required} nombre de pas de temps a extraire 21 ; @param nbretps {in}{required} 22 ; nombre de pas de temps a extraire 23 23 ; 24 ; @keyword BOITE boite sur laquelle integrer (par defaut tt le domaine) 24 ; @keyword BOITE 25 ; boite sur laquelle integrer (par defaut tt le domaine) 25 26 ; 26 ; @keyword GRILLE impose la grille a laquelle est rapporte le champ. rq permet 27 ; @keyword GRILLE 28 ; impose la grille a laquelle est rapporte le champ. rq permet 27 29 ; d'aller plus vite ds la lecture 28 30 ; 29 ; @keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef 31 ; @keyword TOUT 32 ; oblige a lire le tableau entier en non pas celui reduit a domdef 30 33 ; 31 ; @keyword _EXTRA used to pass your keywords 34 ; @keyword _EXTRA 35 ; Used to pass keywords 32 36 ; 33 ; @returns tableau 2d (qd la serie ne fait que 1 pas de temps) ou 37 ; @returns 38 ; tableau 2d (qd la serie ne fait que 1 pas de temps) ou 34 39 ; 3d (valable ds 1 premier tps que pour les tableaux 2d) 35 40 ; 36 ; @uses common.pro 41 ; @uses 42 ; common.pro 37 43 ; 38 ; @restrictions appele par nlec 44 ; @restrictions 45 ; appele par <pro>nlec</pro> 39 46 ; 40 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 47 ; @history 48 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 41 49 ; 42 ; @version $Id$ 50 ; @version 51 ; $Id$ 43 52 ; 44 53 ;- 45 54 ;------------------------------------------------------------ 46 ;------------------------------------------------------------47 55 ;REF.moyenne.annuelle.grid.T.nc 48 56 ;------------------------------------------------------------ 57 ; 49 58 function nlecan, nom, numsortie79, nbretps,BOITE = boite,GRILLE=grille,TOUT=tout, _EXTRA = ex 50 59 ; -
trunk/SRC/Obsolete/nlecmois.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 11 8 ; @obsolete 12 9 ; 13 ; @keyword BOITE boite sur laquelle integrer (par defaut tt le domaine) 10 ; @keyword BOITE 11 ; boite sur laquelle integrer (par defaut tt le domaine) 14 12 ; 15 ; @keyword GRILLE impose la grille a laquelle est rapporte le champ. rq permet 13 ; @keyword GRILLE 14 ; impose la grille a laquelle est rapporte le champ. rq permet 16 15 ; d'aller plus vite ds la lecture 17 16 ; 18 ; @keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef 17 ; @keyword TOUT 18 ; oblige a lire le tableau entier en non pas celui reduit a domdef 19 19 ; 20 ; @keyword _EXTRA used to pass your keywords 20 ; @keyword _EXTRA 21 ; Used to pass keywords 21 22 ; 22 ; @uses common.pro 23 ; @uses 24 ; common.pro 23 25 ; 24 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 26 ; @history 27 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 25 28 ; 26 ; @version $Id$ 29 ; @version 30 ; $Id$ 27 31 ; 28 32 ;- 29 33 ;------------------------------------------------------------ 30 ;------------------------------------------------------------31 34 ;REF.moyenne.mensuelle.79-81.grid.T.nc 32 35 ;------------------------------------------------------------ 36 ; 33 37 function nlecmois,nom,numsortie79,nbretps ,BOITE=boite,GRILLE=grille,TOUT=tout, _EXTRA = ex 34 38 ; -
trunk/SRC/Obsolete/nlecsaison.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 9 6 ; @obsolete 10 7 ; 11 ; @categories 8 ; @categories 12 9 ; Reading 13 10 ; … … 15 12 ; IDL> res=nlecsaison(nom, numsortie79, nbretps) 16 13 ; 17 ; @param nom {in}{required} nom du tableau contenant le champ que l'on veut (le 14 ; @param nom {in}{required} 15 ; nom du tableau contenant le champ que l'on veut (le 18 16 ; trouver avec ncdflec,fichier,/var 19 17 ; 20 ; @param numsortie79 {in}{required} le numero du pas de temps que l'on veut sortir du 18 ; @param numsortie79 {in}{required} 19 ; le numero du pas de temps que l'on veut sortir du 21 20 ; fichier (compte a partir de 1) a partir de 79 22 21 ; 23 ; @param nbretps {in}{required} nombre de pas de temps a extraire 22 ; @param nbretps {in}{required} 23 ; nombre de pas de temps a extraire 24 24 ; 25 ; @keyword BOITE boite sur laquelle integrer (par defaut tt le domaine) 25 ; @keyword BOITE 26 ; boite sur laquelle integrer (par defaut tt le domaine) 26 27 ; 27 ; @keyword GRILLE impose la grille a laquelle est rapporte le champ. rq permet 28 ; @keyword GRILLE 29 ; impose la grille a laquelle est rapporte le champ. rq permet 28 30 ; d'aller plus vite ds la lecture 29 31 ; 30 ; @keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef 32 ; @keyword TOUT 33 ; oblige a lire le tableau entier en non pas celui reduit a domdef 31 34 ; 32 ; @keyword _EXTRA used to pass your keywords 35 ; @keyword _EXTRA 36 ; Used to pass keywords 33 37 ; 34 ; @returns tableau 2d (qd la serie ne fait que 1 pas de temps) ou 38 ; @returns 39 ; tableau 2d (qd la serie ne fait que 1 pas de temps) ou 35 40 ; 3d (valable ds 1 premier tps que pour les tableaux 2d) 36 41 ; 37 ; @uses common.pro 42 ; @uses 43 ; common.pro 38 44 ; 39 ; @restrictions appele par nlec 45 ; @restrictions 46 ; appele par <pro>nlec</.pro> 40 47 ; 41 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 48 ; @history 49 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 42 50 ; 43 ; 44 ; @version$Id$51 ; @version 52 ; $Id$ 45 53 ; 46 54 ;- … … 49 57 ;------------------------------------------------------------ 50 58 ;------------------------------------------------------------ 59 ; 51 60 function nlecsaison, nom, numsortie79, nbretps,BOITE = boite, GRILLE=grille,TOUT=tout, _EXTRA = ex 52 61 ; -
trunk/SRC/Obsolete/nlecserie.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 9 6 ; @obsolete 10 7 ; 11 ; @categories 8 ; @categories 12 9 ; Reading 13 10 ; … … 15 12 ; IDL> res=nlecserie(nom, date1, date2) 16 13 ; 17 ; @param nom {in}{required} nom du tableau contenant le champ que l'on veut (le 14 ; @param nom {in}{required} 15 ; nom du tableau contenant le champ que l'on veut (le 18 16 ; trouver avec ncdflec,fichier,/var 19 17 ; 20 ; @param date1 {in}{required} 21 ; @param date2 {in}{required} 18 ; @param date1 {in}{required} 19 ; @param date2 {in}{required} 22 20 ; les dates vermairs qui delimitent la serie temporelle 23 21 ; 24 ; @keyword BOITE boite sur laquelle integrer (par defaut tt le domaine) 22 ; @keyword BOITE 23 ; boite sur laquelle integrer (par defaut tt le domaine) 25 24 ; 26 ; @keyword GRILLE impose la grille a laquelle est rapporte le champ. rq permet 25 ; @keyword GRILLE 26 ; impose la grille a laquelle est rapporte le champ. rq permet 27 27 ; d'aller plus vite ds la lecture 28 28 ; 29 ; @keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef 29 ; @keyword TOUT 30 ; oblige a lire le tableau entier en non pas celui reduit a domdef 30 31 ; 31 ; @keyword _EXTRA used to pass your keywords 32 ; @keyword _EXTRA 33 ; Used to pass keywords 32 34 ; 33 ; @returns tableau 2d (qd la serie ne fait que 1 pas de temps) ou 35 ; @returns 36 ; tableau 2d (qd la serie ne fait que 1 pas de temps) ou 34 37 ; 3d (valable ds 1 premier tps que pour les tableaux 2d) 35 38 ; 36 ; @uses common.pro 39 ; @uses 40 ; common.pro 37 41 ; 38 ; @restrictions appele par nlec 42 ; @restrictions 43 ; appele par <pro>nlec</pro> 39 44 ; 40 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 45 ; @history 46 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 41 47 ; 42 ; @version $Id$ 48 ; @version 49 ; $Id$ 43 50 ; 44 51 ;- … … 47 54 ;REF.sss.grid.T.nc 48 55 ;------------------------------------------------------------ 56 ; 49 57 function nlecserie, nom, date1, date2,BOITE = boite, GRILLE=grille,TOUT=tout, _EXTRA = ex 50 58 ; -
trunk/SRC/Obsolete/strrepl.pro
r192 r231 1 ;-------------------------------------------------------------2 1 ;+ 3 2 ; 4 ; @file_comments 3 ; @file_comments 5 4 ; replace one (or more) character(s)/string(s) in a string 6 ; --- OBSOLETE --- you should better use strsed.pro5 ; --- OBSOLETE --- you should better use <pro>strsed</pro> 7 6 ; 8 7 ; @categories … … 21 20 ; another string 22 21 ; 23 ; @restrictions 22 ; @restrictions 24 23 ; Known shortcoming: if index is an array, it must contain all 25 24 ; valid elements (only the first entry is checked). … … 49 48 ; @history 50 49 ; mgs, 02 Jun 1998: VERSION 1.00 51 ; sebastien Masson (smlod\@ipsl.jussieu.fr)52 ;53 ; @version54 ; $Id$55 ;56 ;-57 50 ; Copyright (C) 1998, Martin Schultz, Harvard University 58 51 ; This software is provided as is without any warranty … … 64 57 ; Bugs and comments should be directed to mgs@io.harvard.edu 65 58 ; with subject "IDL routine strrepl" 66 ;------------------------------------------------------------- 67 68 59 ; 60 ; sebastien Masson (smlod\@ipsl.jussieu.fr) 61 ; 62 ; @version 63 ; $Id$ 64 ; 65 ;- 66 ; 69 67 function strrepl,str,arg2,rchar 70 68 ; 71 69 compile_opt idl2, strictarrsubs, obsolete 72 70 ; 73 71 74 72 if (n_elements(str) eq 0) then return,'' 75 73 76 74 ; convert strign and replace character to byte 77 75 BStr = byte(str) … … 110 108 ; return result as string 111 109 return,string(BStr) 112 110 113 111 end -
trunk/SRC/Obsolete/vairdate.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 8 5 ; sets month, day and year to the corresp values 9 6 ; 10 ; you better use jul2date7 ; you better use <pro>jul2date</pro> 11 8 ; 12 9 ; @obsolete … … 15 12 ; IDL> vdate = vairdate(1755087) 16 13 ; 17 ; @param jdate {in}{required} date en jours juliens 14 ; @param jdate {in}{required} 15 ; date en jours juliens 18 16 ; 19 ; @keyword MENSUEL a activer si on veut pour que les dates dont le jour est 17 ; @keyword MENSUEL 18 ; a activer si on veut pour que les dates dont le jour est 20 19 ; 15 deviennent avec un jour egale a 0. par ex: 21 20 ; 19990115 -> 19990100 22 21 ; 23 ; @keyword ANNUEL a activer si on veut pour que les dates dont le mois est 22 ; @keyword ANNUEL 23 ; a activer si on veut pour que les dates dont le mois est 24 24 ; 6 et dont le jour est 1 deviennent avec un mois et jour egale a 25 25 ; 0. par ex: 26 26 ; 19990601 -> 19990000 27 27 ; 28 ; @keyword _EXTRA used to pass your keywords 28 ; @keyword _EXTRA 29 ; Used to pass keywords 29 30 ; 30 ; @returns vdate date vairmer31 ; 31 ; @returns 32 ; vdate date vairmer plus year, month et day 32 33 ; 33 ; @uses common 34 ; @uses 35 ; common 34 36 ; 35 ; 36 ; @historyJerome Vialard (jv\@lodyc.jussieu.fr)37 ; @history 38 ; Jerome Vialard (jv\@lodyc.jussieu.fr) 37 39 ; 2/7/98 38 40 ; 13/9/1999, Sebastien Masson (smasson\@lodyc.jussieu.fr) … … 41 43 ; tableaux 42 44 ; 43 ; @version $Id$ 45 ; @version 46 ; $Id$ 44 47 ; 45 48 ;- 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 49 ; 49 50 function vairdate, jdate, ANNUEL = annuel, MENSUEL = mensuel, _EXTRA = ex 50 51 ; … … 52 53 ; 53 54 @common 54 ;------------------------------------------------------------55 55 caldat, jdate, month, day, year, _EXTRA = ex 56 56 index = where(year eq -1) -
trunk/SRC/Obsolete/vraidate.pro
r134 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 8 5 ; @obsolete 9 6 ; 10 ; @param date {in}{required} une date du type yyyymmdd 7 ; @param date {in}{required} 8 ; une date du type yyyymmdd 11 9 ; 12 ; @keyword GRADS if 1 le year le 49 then year = 2000+year 13 ; if 50 le year le 99 then year = 1900+year 10 ; @keyword GRADS 11 ; if 1 le year le 49 then year = 2000+year 12 ; if 50 le year le 99 then year = 1900+year 14 13 ; 15 ; @keyword _EXTRA used to pass your keywords 14 ; @keyword _EXTRA 15 ; Used to pass keywords 16 16 ; 17 ; @returns une date vairmer du type yyyymmdd 17 ; @returns 18 ; une date vairmer du type yyyymmdd 18 19 ; si year est nulle ou egale a -1 ne change rien 19 20 ; … … 23 24 ; donne 19980703 qui est un long 24 25 ; 25 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 26 ; @history 27 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 26 28 ; 3/7/98 27 29 ; remove automatic change from year 1 to 1901... Aug 2004 28 30 ; 29 ; @version $Id$ 31 ; @version 32 ; $Id$ 30 33 ; 31 34 ;- 32 ;------------------------------------------------------------ 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ; 35 36 function vraidate, date, GRADS = grads, _EXTRA = ex 36 ;------------------------------------------------------------37 37 ; 38 38 compile_opt idl2, strictarrsubs, obsolete -
trunk/SRC/Obsolete/zeroun.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 ; @file_comments 2 ; 3 ; @file_comments 6 4 ; Send back a vector or a matrix constituate of 0 and 1 in alternation 7 5 ; 8 ; you better use zero_one6 ; you better use <pro>zero_one</pro> 9 7 ; 10 8 ; @obsolete 11 9 ; 12 ; @categories 10 ; @categories 13 11 ; Function, Matrix 14 12 ; 15 ; @param n1 {in}{required} number of elements in the first dimension16 ; @param n2 {in}{required} numbre of elements in the seconddimension13 ; @param n1 {in}{required} 14 ; number of elements in the first dimension 17 15 ; 18 ; @returns resultat 19 ; 20 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 16 ; @param n2 {in}{required} 17 ; number of elements in the second dimension 18 ; 19 ; @returns 20 ; resultat 21 ; 22 ; @history 23 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 21 24 ; 1/12/98 22 25 ; 23 ; @version $Id$ 26 ; @version 27 ; $Id$ 24 28 ; 25 29 ;- 26 ;------------------------------------------------------------ 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 29 function zeroun, n1,n2 30 ; 31 FUNCTION zeroun, n1,n2 30 32 ; 31 33 compile_opt idl2, strictarrsubs -
trunk/SRC/Picture/image_viewer.pro
r163 r231 30 30 ; $Id$ 31 31 ;_ 32 32 ; 33 33 PRO image_viewer_open_files,event 34 34 ;THIS PROCEDURE IS CALLED WHEN A USER SELECTS "File > Open Picture Files" FROM THE MAIN MENU -
trunk/SRC/Picture/imdisp.pro
r230 r231 1 ;-------------------------------------------------------------------------------2 1 ;+ 3 2 ; @hidden 4 3 ;- 4 ; 5 5 FUNCTION imdisp_getpos, ASPECT, POSITION=POSITION, MARGIN=MARGIN 6 6 ; … … 49 49 50 50 END 51 ;-------------------------------------------------------------------------------52 51 ;+ 53 52 ; @hidden … … 83 82 84 83 END 85 ;-------------------------------------------------------------------------------86 84 ;+ 87 85 ; @hidden … … 127 125 128 126 END 129 ;-------------------------------------------------------------------------------130 127 ;+ 131 128 ; @hidden … … 484 481 ; 485 482 ;- 486 ; -------------------------------------------------------------------------------483 ; 487 484 PRO imdisp, IMAGE, RANGE=RANGE, BOTTOM=BOTTOM, NCOLORS=NCOLORS, $ 488 485 MARGIN=MARGIN, INTERP=INTERP, DITHER=DITHER, ASPECT=ASPECT, $ -
trunk/SRC/Picture/saveimage.pro
r230 r231 92 92 ; 93 93 ;- 94 ; 94 95 PRO saveimage, FILE, BMP=BMP, PNG=PNG, PICT=PICT, JPEG=JPEG, TIFF=TIFF, $ 95 96 QUALITY=QUALITY, DITHER=DITHER, CUBE=CUBE, QUIET=QUIET, MULTIPLE = multiple -
trunk/SRC/Picture/showimage.pro
r230 r231 58 58 ; 59 59 ;- 60 ; 60 61 PRO showimage, FILE, DITHER=DITHER, CURRENT=CURRENT 61 62 ; -
trunk/SRC/Postscript/closeps.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 12 9 ; 13 10 ; @keyword INFOWIDGET {type=long integer} 14 ; id of the information widget (created by 15 ; <a href="./openps.html">openps</a> 11 ; id of the information widget (created by; <pro>OPENPS</pro>) 16 12 ; that we have to destroy at the end of closeps (when the postscript is done). 17 13 ; … … 28 24 ; 29 25 ;- 30 ;------------------------------------------------------------ 31 ;------------------------------------------------------------ 32 ;------------------------------------------------------------ 26 ; 33 27 PRO closeps, INFOWIDGET = infowidget 34 28 ; 29 compile_opt idl2, strictarrsubs 35 30 ; 36 compile_opt idl2, strictarrsubs 31 IF lmgr(/demo) EQ 1 THEN return 37 32 ; 38 IF lmgr(/demo) EQ 1 THEN return39 ;------------------------------------------------------------40 ; include commons41 33 @cm_4ps 42 34 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/Postscript/openps.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 12 9 ; 13 10 ; @keyword FILENAME 14 ; to define the name of the postscript file through a keyword rather than with 11 ; to define the name of the postscript file through a keyword rather than with 15 12 ; nameps input argument (in this case the keyword can be pass through 16 13 ; different routines via _EXTRA keyword). 17 14 ; 18 15 ; @keyword INFOWIDGET 19 ; If INFOWIDGET is present, it specifies a named variable into which the id of 20 ; the widget giving information about the postscript creation is stored as a 16 ; If INFOWIDGET is present, it specifies a named variable into which the id of 17 ; the widget giving information about the postscript creation is stored as a 21 18 ; long integer. 22 ; This id is needed by <a href="./closeps.html">closeps</a> to kill 23 ; the information widget. 19 ; This id is needed by <pro>closeps</pro> to kill the information widget. 24 20 ; 25 21 ; @keyword KEEP_PFONT … … 40 36 ; 41 37 ; @keyword _EXTRA 42 ; used to pass any keyword to device procedure.38 ; Used to pass keywords to <pro>device<pro>. 43 39 ; 44 ; @uses cm_4ps 40 ; @uses 41 ; cm_4ps 45 42 ; 46 43 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) … … 54 51 ; 55 52 ;- 56 ;------------------------------------------------------------ 57 ;------------------------------------------------------------ 58 ;------------------------------------------------------------ 53 ; 59 54 pro openps, namepsin, FILENAME = filename, INFOWIDGET = infowidget $ 60 55 , KEEPPFONT = keeppfont, KEEP_PFONT = keep_pfont $ … … 69 64 return 70 65 ENDIF 71 ;------------------------------------------------------------ 72 ; include commons 66 ; 73 67 @cm_4ps 74 68 IF NOT keyword_set(key_forgetold) THEN BEGIN … … 139 133 RETURN 140 134 END 141 142 143 144 145 146 147 148 149 150 151 152 -
trunk/SRC/Postscript/printps.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 47 44 ; 48 45 ;- 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 ;------------------------------------------------------------ 46 ; 52 47 PRO printps_event, event 53 ;------------------------------------------------------------54 ; include commons55 48 ; 56 49 compile_opt idl2, strictarrsubs … … 235 228 ELSE: 236 229 ENDCASE 237 ;------------------------------------------------------------ 238 ; include commons 230 ; 239 231 @cm_4ps 240 232 IF NOT keyword_set(key_forgetold) THEN BEGIN -
trunk/SRC/ReadWrite/ncdf_getaxis.pro
r225 r231 58 58 ; $Id$ 59 59 ;- 60 ; 60 61 PRO ncdf_getaxis, cdfid, dimidx, dimidy, xaxis, yaxis $ 61 62 , XAXISNAME = xaxisname, YAXISNAME = yaxisname $ -
trunk/SRC/ReadWrite/ncdf_timeget.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 40 37 ; @version $Id$ 41 38 ;- 42 ;------------------------------------------------------------ 43 ;------------------------------------------------------------ 44 ;------------------------------------------------------------ 39 ; 45 40 FUNCTION ncdf_timeget, cdfid, timeid, YYYYMMDD = yyyymmdd, _EXTRA = ex 46 41 ; -
trunk/SRC/ReadWrite/read_grads.pro
r223 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 34 31 ; @keyword EVERYTHING 35 32 ; 36 ;37 33 ; @keyword NOSTRUCT 38 34 ; 39 ;40 35 ; @keyword _EXTRA 41 ; Used to pass yourkeywords36 ; Used to pass keywords 42 37 ; 43 38 ; @returns … … 65 60 ; 66 61 ;- 67 ;------------------------------------------------------------ 68 ;------------------------------------------------------------ 69 ;------------------------------------------------------------ 70 62 ; 71 63 FUNCTION read_grads, var, date1, date2, FILENAME = filename, BOX=box, TIMESTEP = timestep, EVERYTHING = everything, NOSTRUCT = nostruct, _EXTRA = ex 72 ;---------------------------------------------------------73 64 ; 74 65 compile_opt idl2, strictarrsubs -
trunk/SRC/ReadWrite/read_oasis.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 38 35 ; @version $Id$ 39 36 ;- 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 42 ;------------------------------------------------------------ 43 44 37 ; 45 38 FUNCTION read_oasis, filename, varname, jpi, jpj, I2 = I2, I4 = i4, I8 = i8, R4 = r4 46 39 ; -
trunk/SRC/ReadWrite/readbat.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 23 20 ; 24 21 ;- 22 ; 25 23 FUNCTION readbat, filename, ZERO = zero 26 24 ; -
trunk/SRC/ReadWrite/readoldopadistcoast.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 29 26 ; @version $Id$ 30 27 ;- 31 ;------------------------------------------------------------ 32 ;------------------------------------------------------------ 33 ;------------------------------------------------------------ 34 28 ; 35 29 FUNCTION read3fromopa, unit, params, num 36 30 ; -
trunk/SRC/ReadWrite/readoldoparestart.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 24 21 ; $Id$ 25 22 ;- 26 ;------------------------------------------------------------ 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 29 30 23 ; 31 24 FUNCTION read2fromopa, unit, params, num 32 25 ; -
trunk/SRC/ReadWrite/scanctl.pro
r136 r231 9 9 ; @version $Id$ 10 10 ;- 11 ; 11 12 PRO scanctl, filename, filesname, jpt1file, varsname, varslev, swapbytes, bigendian, littleendian, f77sequential, fileheader, theader, xyheader, VARFMT = varfmt, _EXTRA = ex 12 13 ; -
trunk/SRC/ReadWrite/scanoasis.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 21 18 ; @version $Id$ 22 19 ;- 23 ;------------------------------------------------------------ 24 ;------------------------------------------------------------ 25 ;------------------------------------------------------------ 26 20 ; 27 21 PRO scanoasis, filename 28 22 ; -
trunk/SRC/ReadWrite/write_oasis.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 34 31 ; @version $Id$ 35 32 ;- 36 ;------------------------------------------------------------ 37 ;------------------------------------------------------------ 38 ;------------------------------------------------------------ 39 40 33 ; 41 34 PRO write_oasis, filename, varname, z2d, I2 = i2, I4 = i4, I8 = i8, R4 = r4, APPEND = append 42 35 ; -
trunk/SRC/ReadWrite/writebat.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 22 19 ; @version $Id$ 23 20 ;- 21 ; 24 22 PRO writebat, zbat, filename 25 23 ; -
trunk/SRC/Tests/tst_basic.pro
r131 r231 9 9 ; @version $Id$ 10 10 ;- 11 ; 11 12 PRO tst_basic 12 13 ; -
trunk/SRC/Tests/tst_initlev.pro
r131 r231 3 3 ; Sebastien Masson 4 4 ; 5 ; @version $Id$ 5 ; @version 6 ; $Id$ 6 7 ;- 8 ; 7 9 file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' 8 10 initncdf, file, glamboundary = [20, 380], useasmask = 'votemper' $ -
trunk/SRC/Tests/tst_initlev_index.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' 8 9 initncdf, file, glamboundary = [20, 380], useasmask = 'votemper' $ -
trunk/SRC/Tests/tst_initlev_index_stride.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' 8 9 initncdf, file, glamboundary = [20, 380], useasmask = 'votemper' $ -
trunk/SRC/Tests/tst_initlev_stride.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' 8 9 initncdf, file, glamboundary = [20, 380], useasmask = 'votemper' $ -
trunk/SRC/Tests/tst_initorca05.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 @cm_4mesh 8 9 @cm_4cal -
trunk/SRC/Tests/tst_initorca05_short.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc' 8 9 initncdf, file, glamboundary = [20, 380], xminmesh = 1, xmaxmesh = -1 $ -
trunk/SRC/Tests/tst_initorca05_short_stride.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc' 8 9 initncdf, file, glamboundary = [20, 380], xminmesh = 1, xmaxmesh = -1 $ -
trunk/SRC/Tests/tst_initorca2_short.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc' 8 9 initncdf, file, glamboundary = [20, 380], xminmesh = 1, xmaxmesh = 180 $ -
trunk/SRC/Tests/tst_initorca2_short_stride.pro
r131 r231 5 5 ; @version $Id$ 6 6 ;- 7 ; 7 8 file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc' 8 9 initncdf, file, glamboundary = [20, 380], xminmesh = 1, xmaxmesh = 180 $ -
trunk/SRC/Tests/tst_plt.pro
r157 r231 14 14 ; $Id$ 15 15 ;- 16 ; 16 17 PRO tst_plt, IMAGE = image 17 18 ; commons -
trunk/SRC/Tests/tst_pltt.pro
r157 r231 14 14 ; $Id$ 15 15 ;- 16 ; 16 17 PRO tst_pltt, IMAGE = image 17 18 ; commons -
trunk/SRC/Tests/tst_pltz.pro
r157 r231 14 14 ; $Id$ 15 15 ;- 16 ; 16 17 PRO tst_pltz, IMAGE = image 17 18 ; commons -
trunk/SRC/Textoidl/strcnt.pro
r163 r231 47 47 ; $Id$ 48 48 ;- 49 ; 49 50 FUNCTION strcnt, strn, substrn, startpos, $ 50 51 HELP=Help -
trunk/SRC/Textoidl/sub_sup_idl.pro
r134 r231 25 25 ; 26 26 ; MODIFICATION HISTORY: 27 ; $Id : sub_sup_idl.pro,v 1.1 1996/01/31 18:47:37 mcraig Exp$27 ; $Id$ 28 28 ; $Log: sub_sup_idl.pro,v $ 29 29 ; Revision 1.1 1996/01/31 18:47:37 mcraig … … 33 33 ; $Name: Rel_2_1_2 $ 34 34 ;- 35 ; 35 36 FUNCTION Sub_sup_idl, token, FORCE_UD = force_ud 36 37 ; -
trunk/SRC/Textoidl/textable.pro
r163 r231 60 60 ; $Id$ 61 61 ;- 62 ; 62 63 FUNCTION textable, POSTSCRIPT=ps, VECTOR=vec, HELP=Help 63 64 ; -
trunk/SRC/Textoidl/translate_sub_super.pro
r226 r231 64 64 ; $Id$ 65 65 ;- 66 ; 66 67 FUNCTION sub_sup_idl, token, FORCE_UD = force_ud 67 68 ; -
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 -
trunk/SRC/ToBeReviewed/GRILLE/changegrid.pro
r163 r231 1 ; +1 ; + 2 2 ; @file_comments 3 ;4 3 ; 5 4 ; @categories 6 5 ; 7 ;8 6 ; @param NEWGRID 9 ;10 7 ; 11 8 ; @returns 12 9 ; 13 ;14 10 ; @uses 15 ;16 11 ; 17 12 ; @restrictions 18 13 ; 19 ;20 14 ; @examples 21 15 ; 22 ;23 16 ; @history 24 ;25 17 ; 26 18 ; @version 27 19 ; $Id$ 28 20 ; 29 ; 30 ; @todoseb21 ; @todo 22 ; seb 31 23 ; 32 24 ;- 25 ; 33 26 function changegrid, newgrid 34 ;35 27 ; 36 28 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/GRILLE/cmpgrid.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param NEWGRID 9 7 ; 10 ;11 8 ; @returns 12 ;13 9 ; 14 10 ; @uses 15 11 ; 16 ;17 12 ; @restrictions 18 ;19 13 ; 20 14 ; @examples 21 15 ; 22 ;23 16 ; @history 24 ;25 17 ; 26 18 ; @version 27 19 ; $Id$ 28 20 ; 29 ; 30 ; @todoseb21 ; @todo 22 ; seb 31 23 ; 32 24 ;- 25 ; 33 26 FUNCTION cmpgrid, newgrid 34 ;35 27 ; 36 28 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/GRILLE/decoupeterre.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 17 14 ; @param MASK 18 15 ; 19 ;20 16 ; @param GLAM 21 17 ; 22 ;23 18 ; @param GPHI 24 19 ; 25 ;26 20 ; @param GDEP 27 21 ; 28 ;29 22 ; @keyword TYPE 30 23 ; 31 ;32 24 ; @keyword INDICEZOOM 33 25 ; 34 ;35 26 ; @keyword COINMONTE 36 27 ; 37 ;38 28 ; @keyword COINDESCEND 39 29 ; 40 ;41 30 ; @keyword REALSECTION 42 31 ; 43 ;44 32 ; @keyword USETRI 45 33 ; 46 ;47 34 ; @keyword _EXTRA 48 ; Used to pass yourkeywords35 ; Used to pass keywords 49 36 ; 50 37 ; @keyword TRI … … 53 40 ; is passed in the variable we have equate at TRI. 54 41 ; For example: grille,...,tri=triangulation_reduite. 55 ; This keyword is used in plt.pro42 ; This keyword is used in <pro>plt</pro>. 56 43 ; 57 44 ; @keyword WDEPTH … … 69 56 ; $Id$ 70 57 ; 71 ; @todo seb : manque tous les param et plein de keywords. 72 ; 73 ; 74 ; 58 ; @todo 59 ; seb : manque tous les param et plein de keywords. 75 60 ; 76 61 ;- 77 ;------------------------------------------------------------ 78 ;------------------------------------------------------------ 79 ;------------------------------------------------------------ 62 ; 80 63 PRO decoupeterre, mask, glam, gphi, gdep, TYPE = type, TRI = tri, INDICEZOOM = indicezoom, COINMONTE = coinmonte, COINDESCEND = coindescend, WDEPTH = wdepth, REALSECTION = realsection, USETRI = usetri, _extra = ex 81 ;---------------------------------------------------------82 64 ; 83 65 compile_opt idl2, strictarrsubs … … 310 292 return 311 293 end 312 -
trunk/SRC/ToBeReviewed/GRILLE/domdef.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 86 83 ; $Id$ 87 84 ; 88 ; @todo seb: output pas clair/ pas d'input required? 85 ; @todo 86 ; seb: output pas clair/ pas d'input required? 89 87 ;- 90 ;------------------------------------------------------------ 91 ;------------------------------------------------------------ 92 ;------------------------------------------------------------ 93 pro domdef, x1, x2, y1, y2, z1, z2, FINDALWAYS = findalways $ 88 ; 89 PRO domdef, x1, x2, y1, y2, z1, z2, FINDALWAYS = findalways $ 94 90 , GRIDTYPE = gridtype, MEMEINDICES = memeindices $ 95 91 , XINDEX = xindex, YINDEX = yindex, ZINDEX = zindex $ 96 92 , ENDPOINTS = endpoints, TYPE = type $ 97 93 , INDEX = index, _extra = ex 98 ;------------------------------------------------------------99 ; include commons100 94 ; 101 95 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/GRILLE/f2v.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Allows to pass a field referring to the grid F on the grid V, 8 ; thanks to the average: 9 ; res = 0.5*(res + shift(res, 1, 0)) 4 ; Allows to pass a field referring to the grid F on the grid V, 5 ; thanks to the average: 6 ; res = 0.5*(res + shift(res, 1, 0)) 10 7 ; 11 ; @categories 8 ; @categories 12 9 ; Grid 13 10 ; … … 21 18 ; common.pro 22 19 ; 23 ; @restrictions 24 ; Force parameters of the zoom on the grid V to be the same as 20 ; @restrictions 21 ; Force parameters of the zoom on the grid V to be the same as 25 22 ; those on the grid T. 26 23 ; 27 ; @restrictions 28 ; Points which can not be calculated are put at the value NaN 24 ; @restrictions 25 ; Points which can not be calculated are put at the value NaN 29 26 ; consecrated by IDL: !values.f_nan 30 27 ; … … 38 35 ; 39 36 ;- 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 42 ;------------------------------------------------------------ 37 ; 43 38 FUNCTION f2v, temp 44 ;---------------------------------------------------------45 39 ; 46 40 compile_opt idl2, strictarrsubs … … 68 62 ; case on tha array's size and application 69 63 taille = size(temp) 70 CASE taille[0] OF 64 CASE taille[0] OF 71 65 1: res = -1 72 2: BEGIN 66 2: BEGIN 73 67 case 1 of 74 68 taille[1] eq nxf and taille[2] eq nyf: … … 79 73 endcase 80 74 mask = (fmask())[firstxf:lastxf, firstyf:lastyf, 0] 81 terre = where(mask EQ 0) 75 terre = where(mask EQ 0) 82 76 IF terre[0] NE -1 THEN res[terre] = !values.f_nan 83 77 res = 0.5*(res + shift(res, 1, 0)) 84 78 if NOT (keyword_set(key_periodic) AND nxf EQ jpi) then res[0, *] = !values.f_nan 85 79 mask = (vmask())[firstxf:lastxf, firstyf:lastyf, 0] 86 terre = where(mask EQ 0) 80 terre = where(mask EQ 0) 87 81 IF terre[0] NE -1 THEN res[terre] = valmask 88 82 END 89 3: BEGIN 83 3: BEGIN 90 84 case 1 of 91 85 taille[1] eq nxf and taille[2] eq nyf AND taille[3] EQ nzt: … … 105 99 mask = reform(mask, nxf, nyf, jpt, /over) 106 100 ENDIF ELSE mask = (fmask())[firstxf:lastxf, firstyf:lastyf, firstzt:lastzt] 107 terre = where(temporary(mask) EQ 0) 101 terre = where(temporary(mask) EQ 0) 108 102 IF terre[0] NE -1 THEN res[temporary(terre)] = !values.f_nan 109 103 res = 0.5*(res + shift(res, 1, 0, 0)) … … 114 108 mask = reform(mask, nxf, nyf, jpt, /over) 115 109 ENDIF ELSE mask = (vmask())[firstxf:lastxf, firstyf:lastyf, firstzt:lastzt] 116 terre = where(temporary(mask) EQ 0) 110 terre = where(temporary(mask) EQ 0) 117 111 IF terre[0] NE -1 THEN res[temporary(terre)] = valmask 118 112 END 119 4: BEGIN 113 4: BEGIN 120 114 case 1 of 121 115 taille[1] eq nxf and taille[2] eq nyf AND taille[3] EQ nzt AND taille[4] EQ jpt: … … 130 124 mask = temporary(mask[*])#replicate(1, jpt) 131 125 mask = reform(mask, nxf, nyf, nzt, jpt, /over) 132 terre = where(temporary(mask) EQ 0) 126 terre = where(temporary(mask) EQ 0) 133 127 IF terre[0] NE -1 THEN res[temporary(terre)] = !values.f_nan 134 128 res = 0.5*(res + shift(res, 1, 0, 0, 0)) … … 137 131 mask = temporary(mask[*])#replicate(1, jpt) 138 132 mask = reform(mask, nxf, nyf, nzt, jpt, /over) 139 terre = where(temporary(mask) EQ 0) 133 terre = where(temporary(mask) EQ 0) 140 134 IF terre[0] NE -1 THEN res[temporary(terre)] = valmask 141 135 END … … 144 138 IF NOT keyword_set(key_forgetold) THEN BEGIN 145 139 @updateold 146 ENDIF 147 140 ENDIF 141 148 142 return, res 149 143 END 150 -
trunk/SRC/ToBeReviewed/GRILLE/fmask.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 25 22 ; 26 23 ;- 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 29 ;------------------------------------------------------------ 24 ; 30 25 FUNCTION fmask 31 ;---------------------------------------------------------32 26 ; 33 27 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/GRILLE/grille.pro
r172 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 7 4 ; Choose the grid which must be used to do the graph in function of 8 5 ; vargrid and send back corresponding parameters calculated in 9 ; domdef.pro and reduced at the domain defined by domdef (contrarily10 ; to grandegrille.pro)11 ; BEWARE!! The choice of the grid is made from the value of the 6 ; <pro>domdef</pro> and reduced at the domain defined by 7 ; <pro>domdef</pro> (contrarily to <pro>grandegrille</pro>) 8 ; BEWARE!! The choice of the grid is made from the value of the 12 9 ; global variable vargrid, which can be equal to 'T', 'U', 'V', 'W' ou 'F'. 13 10 ; 14 11 ; @categories 15 12 ; 16 ; @keyword TRI 13 ; @keyword TRI 17 14 ; This keyword serve to obtain, thanks to grille, the triangulation which 18 15 ; refer to the grid but only on the part of the zoom. This of triangulation 19 16 ; is passed in the variable we have equate at TRI. 20 17 ; For example: grille,...,tri=triangulation_reduite. 21 ; This keyword is used in plt.pro18 ; This keyword is used in <pro>plt</pro>. 22 19 ; 23 20 ; @keyword WDEPTH 24 ; To specify that the field is at W depth instead of T 21 ; To specify that the field is at W depth instead of T 25 22 ; depth (automatically activated if vargrid eq 'W') 26 ; 23 ; 27 24 ; @keyword FORPLT 28 ; In plt, we want that land points, glam and gphi, be equal to glamt and 25 ; In <pro>plt</pro>, we want that land points, 26 ; glam and gphi, be equal to glamt and 29 27 ; gphit regardless of the grid. 30 28 ; 31 29 ; @keyword NOTRI 32 ; Useful only when TRI is activated. In this case, grill send back -1 in the 33 ; variable tri even if the variable of the common triangles_list is defined 30 ; Useful only when TRI is activated. In this case, grill send back -1 in the 31 ; variable tri even if the variable of the common triangles_list is defined 34 32 ; and different of-1 35 ; 36 ; @keyword _EXTRA 37 ; Used to pass yourkeywords33 ; 34 ; @keyword _EXTRA 35 ; Used to pass keywords 38 36 ; 39 37 ; @keyword TOUT 40 38 ; 41 39 ; @param MASK {out}{optional} 42 ; For the definition, see domdefand the management of subdomains on the web.43 ; 44 ; @param 45 ; For the definition, see domdefand the management of subdomains on the web.46 ; 47 ; @param 48 ; For the definition, see domdefand the management of subdomains on the web.49 ; 50 ; @param 51 ; For the definition, see domdefand the management of subdomains on the web.52 ; 53 ; @param 54 ; For the definition, see domdefand the management of subdomains on the web.55 ; 56 ; @param 57 ; For the definition, see domdefand the management of subdomains on the web.58 ; 59 ; @param 60 ; For the definition, see domdefand the management of subdomains on the web.61 ; 62 ; @param 63 ; For the definition, see domdefand the management of subdomains on the web.64 ; 65 ; @param 66 ; For the definition, see domdefand the management of subdomains on the web.67 ; 68 ; @param 69 ; For the definition, see domdefand the management of subdomains on the web.70 ; 40 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 41 ; 42 ; @param GLAM {out}{optional} 43 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 44 ; 45 ; @param GPHI {out}{optional} 46 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 47 ; 48 ; @param GDEP {out}{optional} 49 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 50 ; 51 ; @param NX {out}{optional} 52 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 53 ; 54 ; @param NY {out}{optional} 55 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 56 ; 57 ; @param NZ {out}{optional} 58 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 59 ; 60 ; @param FIRSTX {out}{optional} 61 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 62 ; 63 ; @param FIRSTY {out}{optional} 64 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 65 ; 66 ; @param FIRSTZ {out}{optional} 67 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 68 ; 71 69 ; @param LASTX {out}{optional} 72 ; For the definition, see domdefand the management of subdomains on the web.73 ; 74 ; @param 75 ; For the definition, see domdefand the management of subdomains on the web.76 ; 77 ; @param 78 ; For the definition, see domdefand the management of subdomains on the web.79 ; 80 ; @param 81 ; For the definition, see domdefand the management of subdomains on the web.82 ; 83 ; @param 84 ; For the definition, see domdefand the management of subdomains on the web.85 ; 86 ; @param 87 ; For the definition, see domdefand the management of subdomains on the web.70 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 71 ; 72 ; @param LASTY {out}{optional} 73 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 74 ; 75 ; @param LASTZ {out}{optional} 76 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 77 ; 78 ; @param E1 {out}{optional} 79 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 80 ; 81 ; @param E2 {out}{optional} 82 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 83 ; 84 ; @param E3 {out}{optional} 85 ; For the definition, see <pro>domdef</pro> and the management of subdomains on the web. 88 86 ; 89 87 ; @uses 90 ; cm_4mesh 88 ; cm_4mesh 91 89 ; cm_4data 92 90 ; 93 ; @restrictions 91 ; @restrictions 94 92 ; Use the variable vargrid 95 93 ; … … 103 101 ; 104 102 ; @version 105 ; $Id$ 106 ; 107 ; @todo Comment ecrire la remarque sur les inputs? 108 ; 103 ; $Id$ 104 ; 105 ; @todo 106 ; Comment ecrire la remarque sur les inputs? 107 ; 109 108 ;- 110 ;------------------------------------------------------------ 111 ;------------------------------------------------------------ 112 ;------------------------------------------------------------ 113 pro grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, TRI = tri, NOTRI = notri, TOUT = tout, FORPLT = forplt, TYPE = type, WDEPTH = wdepth, _EXTRA = ex 114 ;------------------------------------------------------------ 115 ; include commons 109 ; 110 PRO grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz, e1, e2, e3, TRI = tri, NOTRI = notri, TOUT = tout, FORPLT = forplt, TYPE = type, WDEPTH = wdepth, _EXTRA = ex 116 111 ; 117 112 compile_opt idl2, strictarrsubs … … 138 133 ;------------------------------------------------------------ 139 134 IF keyword_set(wdepth) THEN BEGIN 140 firstz = firstzw 135 firstz = firstzw 141 136 lastz = lastzw 142 137 nz = nzw … … 148 143 ;------------------------------------------------------------ 149 144 ;------------------------------------------------------------ 150 CASE 1 OF 145 CASE 1 OF 151 146 ;------------------------------------------------------------ 152 147 ; grid T and W … … 165 160 IF arg_present(e1) THEN e1 = e1t[firstx:lastx, firsty:lasty] 166 161 IF arg_present(e2) THEN e2 = e2t[firstx:lastx, firsty:lasty] 167 ;3d vectors 162 ;3d vectors 168 163 IF keyword_set(forplt) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz] $ 169 164 ELSE IF arg_present(mask) THEN mask = tmask[firstx:lastx, firsty:lasty, firstz:lastz] … … 204 199 no1 = temporary(tmp1)*temporary(tmp2) 205 200 tmp = temporary(eastboarder)*temporary(no1)*mask 206 mask[0:nx-2, *] = 0b 201 mask[0:nx-2, *] = 0b 207 202 tmp = temporary(tmp)+temporary(mask) 208 203 tmp = where(tmp GE 1) … … 233 228 IF arg_present(glam) THEN glam = glamv[firstx:lastx, firsty:lasty] 234 229 IF arg_present(gphi) THEN gphi = gphiv[firstx:lastx, firsty:lasty] 235 if keyword_set(forplt) then BEGIN 230 if keyword_set(forplt) then BEGIN 236 231 mask = 1b-tmask[firstx:lastx, firsty:lasty, firstz] 237 232 northboarder = mask-shift(mask, 0, 1)*mask … … 271 266 ; grid F 272 267 ;------------------------------------------------------------ 273 vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $ 268 vargrid eq 'OPAPTDHF' or vargrid eq 'OPAPT3DF' $ 274 269 or vargrid eq 'F': begin 275 270 ;scalars … … 283 278 IF arg_present(glam) THEN glam = glamf[firstx:lastx, firsty:lasty] 284 279 IF arg_present(gphi) THEN gphi = gphif[firstx:lastx, firsty:lasty] 285 if keyword_set(forplt) then BEGIN 280 if keyword_set(forplt) then BEGIN 286 281 mask = 1b-tmask[firstx:lastx, firsty:lasty, firstz] 287 282 eastboarder = mask-shift(mask, 1, 0)*mask … … 313 308 no1 = temporary(tmp1)*temporary(tmp2) 314 309 tmp = (temporary(northboarder)+temporary(eastboarder))*mask*temporary(no1) 315 mask[0:nx-2, *] = 0b 316 mask[*, 0:ny-2] = 0b 310 mask[0:nx-2, *] = 0b 311 mask[*, 0:ny-2] = 0b 317 312 tmp = temporary(tmp)+temporary(mask) 318 313 tmp = where(tmp GE 1) … … 324 319 IF arg_present(e1) THEN e1 = e1f[firstx:lastx, firsty:lasty] 325 320 IF arg_present(e2) THEN e2 = e2f[firstx:lastx, firsty:lasty] 326 ;3d vectors 321 ;3d vectors 327 322 IF keyword_set(forplt) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz] $ 328 323 ELSE IF arg_present(mask) THEN mask = (fmask())[firstx:lastx, firsty:lasty, firstz:lastz] 329 324 END 330 325 ;------------------------------------------------------------ 331 ELSE:BEGIN 326 ELSE:BEGIN 332 327 ras = report('Wrong definition of vargrid = '+vargrid+'. Only T, U, V, W or F are acceptable') 333 328 stop … … 391 386 IF keyword_set(type) AND n_elements(romszinfos) NE 0 THEN BEGIN 392 387 romsdp = romsdepth() 393 IF romsdp[0] NE -1 THEN BEGIN 388 IF romsdp[0] NE -1 THEN BEGIN 394 389 IF jpt EQ 1 THEN BEGIN 395 390 CASE type OF … … 400 395 ELSE: 401 396 ENDCASE 402 ENDIF ELSE BEGIN 397 ENDIF ELSE BEGIN 403 398 CASE type OF 404 399 'z':gdep = moyenne(temporary(romsdp), 'xyt') … … 420 415 ;------------------------------------------------------------ 421 416 if arg_present(TRI) then $ 422 if triangles_list[0] EQ -1 OR keyword_set(notri) then tri = -1 ELSE BEGIN 417 if triangles_list[0] EQ -1 OR keyword_set(notri) then tri = -1 ELSE BEGIN 423 418 tempdeux = systime(1) ; pour key_performance =2 424 419 msk = bytarr(jpi, jpj) … … 444 439 445 440 if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4grille.dat' 446 if keyword_set(key_performance) THEN print, 'temps grille', systime(1)-tempsun 441 if keyword_set(key_performance) THEN print, 'temps grille', systime(1)-tempsun 447 442 448 443 ;------------------------------------------------------------ 449 444 IF NOT keyword_set(key_forgetold) THEN BEGIN 450 445 @updateold 451 ENDIF 446 ENDIF 452 447 ;--------------------- 453 448 return 454 449 455 450 end 456 457 458 459 460 461 462 -
trunk/SRC/ToBeReviewed/GRILLE/t2v.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 37 34 ; 38 35 ;- 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 36 ; 42 37 FUNCTION t2v, temp 43 ;---------------------------------------------------------44 38 ; 45 39 compile_opt idl2, strictarrsubs … … 148 142 return, res 149 143 END 150 -
trunk/SRC/ToBeReviewed/GRILLE/tracegrille.pro
r209 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 8 5 ; 9 6 ; @categories 10 ; 7 ; 11 8 ; @param GLAMIN {in}{required} 12 ; The 1d or 2d array in longitude of points of the grid.If GLAM/GLAMIN 13 ; is not specified, it trace the grid specified by vargrid, on the 9 ; The 1d or 2d array in longitude of points of the grid.If GLAM/GLAMIN 10 ; is not specified, it trace the grid specified by vargrid, on the 14 11 ; domain defined by domdef. 15 12 ; 16 13 ; @param GPHIIN {in}{required} 17 ; The 1d or 2d array in latitude of points of the grid.If GPHI/GPHIIN 18 ; is not specified, it trace the grid specified by vargrid, on the 14 ; The 1d or 2d array in latitude of points of the grid.If GPHI/GPHIIN 15 ; is not specified, it trace the grid specified by vargrid, on the 19 16 ; domain defined by domdef. 20 17 ; 21 ; @keyword XSTRIDE {type=integer} 22 ; It specify that we want to trace only one line of 18 ; @keyword XSTRIDE {type=integer} 19 ; It specify that we want to trace only one line of 23 20 ; constant i every xstride points 24 21 ; 25 22 ; @keyword YSTRIDE {type=integer} 26 ; It specify that we want to trace only one line of 23 ; It specify that we want to trace only one line of 27 24 ; constant j every xstride points 28 25 ; 29 ; @keyword OCEAN 26 ; @keyword OCEAN 30 27 ; To trace the grid only on ocean points. 31 ; 28 ; 32 29 ; @keyword EARTH 33 30 ; To trace the grid only on land points. … … 38 35 ; 39 36 ; @keyword _EXTRA 40 ; Used to pass your keywords.41 ; 37 ; Used to pass keywords 38 ; 42 39 ; @uses 43 40 ; common.pro 44 ; 41 ; 45 42 ; @examples 46 43 ; … … 56 53 ; @version 57 54 ; $Id$ 58 ; 55 ; 59 56 ;- 60 ;------------------------------------------------------------ 61 ;------------------------------------------------------------ 62 ;------------------------------------------------------------ 57 ; 63 58 PRO tracegrille, glamin, gphiin, OCEAN = ocean, EARTH = earth $ 64 59 , XSTRIDE = xstride, YSTRIDE = ystride, RMOUT = rmout $ 65 60 , _extra = extra 66 ;---------------------------------------------------------67 61 ; 68 62 compile_opt idl2, strictarrsubs … … 116 110 gphi = gphiin 117 111 IF (size(glam))[0] EQ 1 AND (size(gphi))[0] EQ 1 THEN BEGIN 118 nx = n_elements(glam) 119 ny = n_elements(gphi) 112 nx = n_elements(glam) 113 ny = n_elements(gphi) 120 114 glam = glam#replicate(1, ny) 121 115 gphi = replicate(1, nx)#gphi … … 191 185 endcase 192 186 193 if keyword_set(key_performance) THEN print, 'temps trace grille', systime(1)-tempsun 187 if keyword_set(key_performance) THEN print, 'temps trace grille', systime(1)-tempsun 194 188 !except = oldexcept 195 189 -
trunk/SRC/ToBeReviewed/GRILLE/u2t.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Allows to pass a field referring to the grid U on the grid T, 8 ; thanks to the average: 9 ; res = 0.5*(res + shift(res, 1, 0)) 4 ; Allows to pass a field referring to the grid U on the grid T, 5 ; thanks to the average: 6 ; res = 0.5*(res + shift(res, 1, 0)) 10 7 ; 11 ; @categories 8 ; @categories 12 9 ; Grid 13 10 ; … … 21 18 ; common.pro 22 19 ; 23 ; @restrictions 24 ; Force parameters of the zoom on the grid V to be the same as 20 ; @restrictions 21 ; Force parameters of the zoom on the grid V to be the same as 25 22 ; those on the grid T. 26 23 ; 27 ; @restrictions 28 ; Points which can not be calculated are put at the value NaN 24 ; @restrictions 25 ; Points which can not be calculated are put at the value NaN 29 26 ; consecrated by IDL: !values.f_nan 30 27 ; … … 38 35 ; 39 36 ;- 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 42 ;------------------------------------------------------------ 37 ; 43 38 FUNCTION u2t, temp 44 ;---------------------------------------------------------45 39 ; 46 40 compile_opt idl2, strictarrsubs … … 68 62 ; case on tha array's size and application 69 63 taille = size(temp) 70 CASE taille[0] OF 64 CASE taille[0] OF 71 65 1: res = -1 72 2: BEGIN 66 2: BEGIN 73 67 case 1 of 74 68 taille[1] eq nxu and taille[2] eq nyu: … … 79 73 endcase 80 74 mask = (umask())[firstxu:lastxu, firstyu:lastyu, 0] 81 terre = where(mask EQ 0) 75 terre = where(mask EQ 0) 82 76 IF terre[0] NE -1 THEN res[terre] = !values.f_nan 83 77 res = 0.5*(res + shift(res, 1, 0)) 84 78 if NOT (keyword_set(key_periodic) AND nxu EQ jpi) then res[0, *] = !values.f_nan 85 79 mask = tmask[firstxu:lastxu, firstyu:lastyu, 0] 86 terre = where(mask EQ 0) 80 terre = where(mask EQ 0) 87 81 IF terre[0] NE -1 THEN res[terre] = valmask 88 82 END 89 3: BEGIN 83 3: BEGIN 90 84 case 1 of 91 85 taille[1] eq nxu and taille[2] eq nyu AND taille[3] EQ nzt: … … 105 99 mask = reform(mask, nxu, nyu, jpt, /over) 106 100 ENDIF ELSE mask = (umask())[firstxu:lastxu, firstyu:lastyu, firstzt:lastzt] 107 terre = where(temporary(mask) EQ 0) 101 terre = where(temporary(mask) EQ 0) 108 102 IF terre[0] NE -1 THEN res[temporary(terre)] = !values.f_nan 109 103 res = 0.5*(res + shift(res, 1, 0, 0)) … … 114 108 mask = reform(mask, nxu, nyu, jpt, /over) 115 109 ENDIF ELSE mask = tmask[firstxu:lastxu, firstyu:lastyu, firstzt:lastzt] 116 terre = where(temporary(mask) EQ 0) 110 terre = where(temporary(mask) EQ 0) 117 111 IF terre[0] NE -1 THEN res[temporary(terre)] = valmask 118 112 END 119 4: BEGIN 113 4: BEGIN 120 114 case 1 of 121 115 taille[1] eq nxu and taille[2] eq nyu AND taille[3] EQ nzt AND taille[4] EQ jpt: … … 130 124 mask = temporary(mask[*])#replicate(1, jpt) 131 125 mask = reform(mask, nxu, nyu, nzt, jpt, /over) 132 terre = where(temporary(mask) EQ 0) 126 terre = where(temporary(mask) EQ 0) 133 127 IF terre[0] NE -1 THEN res[temporary(terre)] = !values.f_nan 134 128 res = 0.5*(res + shift(res, 1, 0, 0, 0)) … … 137 131 mask = temporary(mask[*])#replicate(1, jpt) 138 132 mask = reform(mask, nxu, nyu, nzt, jpt, /over) 139 terre = where(temporary(mask) EQ 0) 133 terre = where(temporary(mask) EQ 0) 140 134 IF terre[0] NE -1 THEN res[temporary(terre)] = valmask 141 135 END … … 144 138 IF NOT keyword_set(key_forgetold) THEN BEGIN 145 139 @updateold 146 ENDIF 147 140 ENDIF 141 148 142 return, res 149 143 END 150 -
trunk/SRC/ToBeReviewed/GRILLE/umask.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 8 5 ; 9 6 ; @categories 10 ; Utilities 7 ; Utilities 11 8 ; 12 9 ; @returns 13 ; A 3d array corresponding to umask. 10 ; A 3d array corresponding to umask. 14 11 ; 15 12 ; @uses … … 20 17 ; For example: Instaed of write umask[domainef] we have to write (umask())[domainef] 21 18 ; 22 ; MODIFICATION HISTORY: Sebastien Masson (smasson\@lodyc.jussieu.fr) 19 ; @history 20 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 23 21 ; 11/12/98 24 22 ; ??/6/99 introduction of the key_shift … … 29 27 ; 30 28 ;- 31 ;------------------------------------------------------------ 32 ;------------------------------------------------------------ 33 ;------------------------------------------------------------ 29 ; 34 30 FUNCTION umask 35 ;---------------------------------------------------------36 31 ; 37 32 compile_opt idl2, strictarrsubs … … 48 43 3:res = tmask*shift(tmask, -1, 0, 0) 49 44 ENDCASE 50 ; 45 ; 51 46 if NOT keyword_set(key_periodic) then res[jpi-1, *, *] = umaskred 52 if keyword_set(key_performance) THEN print, 'temps umask', systime(1)-tempsun 47 if keyword_set(key_performance) THEN print, 'temps umask', systime(1)-tempsun 53 48 ; 54 49 return, res -
trunk/SRC/ToBeReviewed/GRILLE/v2t.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Allows to pass a field referring to the grid V on the grid T, 8 ; thanks to the average: 9 ; res = 0.5*(res + shift(res, 1, 0)) 4 ; Allows to pass a field referring to the grid V on the grid T, 5 ; thanks to the average: 6 ; res = 0.5*(res + shift(res, 1, 0)) 10 7 ; 11 ; @categories 8 ; @categories 12 9 ; Grid 13 10 ; … … 21 18 ; common.pro 22 19 ; 23 ; @restrictions 24 ; Force parameters of the zoom on the grid V to be the same as 20 ; @restrictions 21 ; Force parameters of the zoom on the grid V to be the same as 25 22 ; those on the grid T. 26 23 ; 27 ; @restrictions 28 ; Points which can not be calculated are put at the value NaN 24 ; @restrictions 25 ; Points which can not be calculated are put at the value NaN 29 26 ; consecrated by IDL: !values.f_nan 30 27 ; … … 37 34 ; $Id$ 38 35 ; 39 ; @todo seb: nom du input? 36 ; @todo 37 ; seb: nom du input? 40 38 ; 41 39 ;- 42 ;------------------------------------------------------------ 43 ;------------------------------------------------------------ 44 ;------------------------------------------------------------ 40 ; 45 41 FUNCTION v2t, temp 46 ;---------------------------------------------------------47 42 ; 48 43 compile_opt idl2, strictarrsubs … … 70 65 ; case on tha array's size and application 71 66 taille = size(temp) 72 CASE taille[0] OF 67 CASE taille[0] OF 73 68 1: res = -1 74 2: BEGIN 69 2: BEGIN 75 70 case 1 of 76 71 taille[1] eq nxv and taille[2] eq nyv: … … 81 76 endcase 82 77 mask = (vmask())[firstxv:lastxv, firstyv:lastyv, 0] 83 terre = where(mask EQ 0) 78 terre = where(mask EQ 0) 84 79 IF terre[0] NE -1 THEN res[terre] = !values.f_nan 85 80 res = 0.5*(res + shift(res, 0, +1)) 86 81 res[*, 0] = !values.f_nan 87 82 mask = tmask[firstxv:lastxv, firstyv:lastyv, 0] 88 terre = where(mask EQ 0) 83 terre = where(mask EQ 0) 89 84 IF terre[0] NE -1 THEN res[terre] = valmask 90 85 END 91 3: BEGIN 86 3: BEGIN 92 87 case 1 of 93 88 taille[1] eq nxv and taille[2] eq nyv AND taille[3] EQ nzt: … … 107 102 mask = reform(mask, nxv, nyv, jpt, /over) 108 103 ENDIF ELSE mask = (vmask())[firstxv:lastxv, firstyv:lastyv, firstzt:lastzt] 109 terre = where(temporary(mask) EQ 0) 104 terre = where(temporary(mask) EQ 0) 110 105 IF terre[0] NE -1 THEN res[temporary(terre)] = !values.f_nan 111 106 res = 0.5*(res + shift(res, 0, +1, 0)) … … 116 111 mask = reform(mask, nxv, nyv, jpt, /over) 117 112 ENDIF ELSE mask = tmask[firstxv:lastxv, firstyv:lastyv, firstzt:lastzt] 118 terre = where(temporary(mask) EQ 0) 113 terre = where(temporary(mask) EQ 0) 119 114 IF terre[0] NE -1 THEN res[temporary(terre)] = valmask 120 115 END 121 4: BEGIN 116 4: BEGIN 122 117 case 1 of 123 118 taille[1] eq nxv and taille[2] eq nyv AND taille[3] EQ nzt AND taille[4] EQ jpt: … … 132 127 mask = temporary(mask[*])#replicate(1, jpt) 133 128 mask = reform(mask, nxv, nyv, nzt, jpt, /over) 134 terre = where(temporary(mask) EQ 0) 129 terre = where(temporary(mask) EQ 0) 135 130 IF terre[0] NE -1 THEN res[temporary(terre)] = !values.f_nan 136 131 res = 0.5*(res + shift(res, 0, +1, 0, 0)) … … 139 134 mask = temporary(mask[*])#replicate(1, jpt) 140 135 mask = reform(mask, nxv, nyv, nzt, jpt, /over) 141 terre = where(temporary(mask) EQ 0) 136 terre = where(temporary(mask) EQ 0) 142 137 IF terre[0] NE -1 THEN res[temporary(terre)] = valmask 143 138 END … … 146 141 IF NOT keyword_set(key_forgetold) THEN BEGIN 147 142 @updateold 148 ENDIF 143 ENDIF 149 144 150 145 return, res 151 146 END 152 -
trunk/SRC/ToBeReviewed/GRILLE/vmask.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 26 23 ; 27 24 ;- 28 ;------------------------------------------------------------ 29 ;------------------------------------------------------------ 30 ;------------------------------------------------------------ 25 ; 31 26 FUNCTION vmask 32 27 ; … … 42 37 ; 43 38 res[*, jpj-1, *] = vmaskred 44 if keyword_set(key_performance) THEN print, 'temps vmask', systime(1)-tempsun 45 ; 39 if keyword_set(key_performance) THEN print, 'temps vmask', systime(1)-tempsun 40 46 41 return, res 47 42 end -
trunk/SRC/ToBeReviewed/HOPE/computehopegrid.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 40 37 ; 41 38 ;- 42 ;------------------------------------------------------------ 43 ;------------------------------------------------------------ 44 ;------------------------------------------------------------ 39 ; 45 40 PRO computehopegrid, xaxis, yaxis, zaxis, linetype, FORTHEMASK = forthemask, WPOINT = wpoint, FIRSTS = firsts, LASTS = lasts, PTTYPE = pttype 46 41 ;--------------------------------------------------------- -
trunk/SRC/ToBeReviewed/HOPE/createhopestruct.pro
r163 r231 30 30 ; 31 31 ;- 32 ; 32 33 FUNCTION createhopestruct, event 33 34 ; … … 84 85 ENDIF 85 86 tint = time[where(yyyymmdd GE tlimits[0] AND yyyymmdd LE tlimits[1])] 86 ; 87 ; 87 88 ; limits of the domain 88 89 ; … … 90 91 nyt = n_elements(yint) 91 92 nzt = n_elements(zint) 92 jpt = n_elements(tint) 93 jpt = n_elements(tint) 93 94 ; 94 95 firstx = (where(xaxis GE xint[0]))[0] … … 140 141 if (where(attnames EQ 'missing_value'))[0] EQ -1 then valmask = 1e20 $ 141 142 ELSE ncdf_attget,cdfid,varid,'missing_value', valmask 142 ENDIF ELSE BEGIN 143 ENDIF ELSE BEGIN 143 144 varunit = '' 144 145 valmask = 1e20 -
trunk/SRC/ToBeReviewed/HOPE/cw_selectinterval.pro
r163 r231 44 44 ; return 45 45 ; end 46 ;-------------------------------------------------------------------------- 47 ;-------------------------------------------------------------------------- 48 ;-------------------------------------------------------------------------- 46 ; 49 47 ;+ 50 ; @file_comments 51 ; 52 ; 48 ; @file_comments 49 ; 53 50 ; @categories 54 51 ; Compound widget 55 ; 52 ; 56 53 ; @param ID 57 ; 58 ; 54 ; 59 55 ; @returns 60 ; 61 ; 56 ; 62 57 ; @restrictions 63 ; 64 ; 58 ; 65 59 ; @examples 66 60 ; 67 ;68 61 ; @history 69 ;70 62 ; 71 63 ; @version 72 64 ; $Id$ 73 65 ;- 66 ; 74 67 function cw_selectinterval_get_value, id 75 68 ; … … 96 89 if selected[0] eq -1 then return, -1 else return, vecteur[selected] 97 90 END 98 ; --------------------------------------------------------------------------91 ; 99 92 ;+ 100 ; @file_comments 101 ; 102 ; 93 ; @file_comments 94 ; 103 95 ; @categories 104 96 ; Compound widget 105 ; 97 ; 106 98 ; @param EVENT 107 ; 108 ; 99 ; 109 100 ; @returns 110 ; 111 ; 101 ; 112 102 ; @restrictions 113 ; 114 ; 103 ; 115 104 ; @examples 116 105 ; 117 ;118 106 ; @history 119 ;120 107 ; 121 108 ; @version 122 109 ; $Id$ 123 110 ;- 111 ; 124 112 function cw_selectinterval_event, event 125 113 ; … … 140 128 return, {ID:event.handler, TOP:event.top, HANDLER:0L} 141 129 END 142 143 ;-------------------------------------------------------------------------- 130 ; 144 131 ;+ 145 ; @file_comments 146 ; 147 ; 132 ; @file_comments 133 ; 148 134 ; @categories 149 ; Compound widget 150 ; 151 ; @param PARENT 135 ; Compound widget 136 ; 137 ; @param PARENT 152 138 ; The widget ID of the parent widget. 153 ; 139 ; 154 140 ; @param VECTEUR {type=vector} 155 ; A vector whose the first element must be the smallest one and the last 141 ; A vector whose the first element must be the smallest one and the last 156 142 ; must be the biggest one. 157 ; 143 ; 158 144 ; @keyword _EXTRA 159 ; Used to pass yourkeywords160 ; 145 ; Used to pass keywords 146 ; 161 147 ; @returns 162 ; 163 ; 148 ; 164 149 ; @restrictions 165 ; 166 ; 150 ; 167 151 ; @examples 168 152 ; 169 ;170 153 ; @history 171 ;172 154 ; 173 155 ; @version 174 156 ; $Id$ 175 157 ;- 158 ; 176 159 function cw_selectinterval, parent, vecteur, _extra = ex 177 160 ; -
trunk/SRC/ToBeReviewed/HOPE/domainpart.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param TOP_UVALUE 9 ;10 8 ; 11 9 ; @param BASEDOMAIN 12 10 ; 13 ;14 11 ; @param SELECTED 15 ;16 12 ; 17 13 ; @keyword DESTROY 18 14 ; 19 ;20 15 ; @returns 21 ;22 16 ; 23 17 ; @uses 24 18 ; 25 ;26 19 ; @restrictions 27 ;28 20 ; 29 21 ; @examples 30 22 ; 31 ;32 23 ; @history 33 ;34 24 ; 35 25 ; @version … … 95 85 ; 96 86 end 97 ; -
trunk/SRC/ToBeReviewed/HOPE/findlineandpointtype.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 6 ; 7 ;8 7 ; @param SECTYPE 9 8 ; 10 ;11 9 ; @param XAXIS 12 10 ; 13 ;14 11 ; @param YAXIS 15 12 ; 16 ;17 13 ; @param IODIR 18 14 ; 19 ;20 15 ; @returns 21 16 ; 22 ;23 17 ; @uses 24 18 ; 25 ;26 19 ; @restrictions 27 20 ; 28 ;29 21 ; @examples 30 22 ; 31 ;32 23 ; @history 33 ;34 24 ; 35 25 ; @version … … 39 29 ; 40 30 ;- 31 ; 41 32 FUNCTION findlineandpointtype, sectype, xaxis, yaxis, iodir 42 33 ; the file 'HOPE_lonlat.nc' is used in this function, This file must -
trunk/SRC/ToBeReviewed/HOPE/read_hope.pro
r230 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 10 ;11 9 ; @returns 12 10 ; 13 ;14 11 ; @restrictions 15 12 ; 16 ;17 13 ; @examples 18 14 ; 19 15 ; @history 20 ;21 16 ; 22 17 ; @version … … 25 20 ;- 26 21 ; 27 proread_hope_event, event22 PRO read_hope_event, event 28 23 ; 29 24 compile_opt idl2, strictarrsubs … … 206 201 end 207 202 ; 208 ;------------------------------------------------------------209 ;------------------------------------------------------------210 ;------------------------------------------------------------211 203 ;+ 212 204 ; … … 258 250 ; 259 251 ; @keyword _EXTRA 260 ; Used to pass yourkeywords252 ; Used to pass keywords 261 253 ; 262 254 ; @returns … … 264 256 ; version) 265 257 ; 266 ; A structure which but be read by litchamp.proand is258 ; A structure which but be read by <pro>litchamp</pro> and is 267 259 ; necessary to complete the grid associated to the data (see 268 260 ; the example). … … 324 316 ; 325 317 ;- 326 ;------------------------------------------------------------ 327 ;------------------------------------------------------------ 328 ;------------------------------------------------------------ 318 ; 329 319 FUNCTION read_hope, typein, varnamein, FILENAME = filename, XLIMITS = xlimits, YLIMITS = ylimits, ZLIMITS = zlimits, TLIMITS = tlimits, ODDPT = oddpt, ODDEVENPT = oddevenpt, EVENPT = evenpt, _extra = ex 330 320 ; -
trunk/SRC/ToBeReviewed/HOPE/rh_alldomains.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param TOPID 9 ;10 8 ; 11 9 ; @param SELECTED 12 10 ; 13 ;14 11 ; @returns 15 ;16 12 ; 17 13 ; @uses 18 14 ; 19 ;20 15 ; @restrictions 21 ;22 16 ; 23 17 ; @examples 24 18 ; 25 ;26 19 ; @history 27 ;28 20 ; 29 21 ; @version … … 33 25 ; 34 26 ;- 27 ; 35 28 PRO rh_alldomains, topid, selected 36 29 ; -
trunk/SRC/ToBeReviewed/HOPE/sortdim.pro
r163 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param DIMS 9 ;10 8 ; 11 9 ; @keyword INVERSE 12 10 ; 13 ;14 11 ; @returns 15 ;16 12 ; 17 13 ; @uses 18 14 ; 19 ;20 15 ; @restrictions 21 ;22 16 ; 23 17 ; @examples 24 18 ; 25 ;26 19 ; @history 27 ;28 20 ; 29 21 ; @version … … 33 25 ; 34 26 ;- 35 36 27 ; 37 28 function sortdim, dims, inverse=inverse 38 29 ; 39 ; IDL> a=['x','y','t','z'] 40 ; IDL> b=a[sortdim(a)] 41 ; IDL> print, a 30 ; IDL> a=['x','y','t','z'] 31 ; IDL> b=a[sortdim(a)] 32 ; IDL> print, a 42 33 ; x y t z 43 ; IDL> print, b 34 ; IDL> print, b 44 35 ; x y z t 45 ; IDL> print, b[sortdim(a,/inv)] 36 ; IDL> print, b[sortdim(a,/inv)] 46 37 ; x y t z 47 38 ; IDL> a='xytz' … … 66 57 67 58 end 68 ;69 -
trunk/SRC/ToBeReviewed/HOPE/xrh.pro
r163 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ; 4 ; procedure to call <pro>read_hope</pro> in the widget mode 4 5 ; 5 6 ; @categories 6 7 ; 7 ;8 8 ; @keyword _EXTRA 9 ; Used to pass yourkeywords9 ; Used to pass keywords 10 10 ; 11 11 ; @returns 12 12 ; 13 ;14 13 ; @uses 15 ;16 14 ; 17 15 ; @restrictions 18 16 ; 19 ;20 17 ; @examples 21 18 ; 22 ;23 19 ; @history 24 ;25 20 ; 26 21 ; @version … … 30 25 ; 31 26 ;- 32 ; procedure to call read_hope in the widget mode27 ; 33 28 PRO xrh, _extra = ex 34 29 ; -
trunk/SRC/ToBeReviewed/INIT/initncdf.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 10 7 ; @categories 11 8 ; Grid 12 ; 9 ; 13 10 ; @param NCFILEIN {in}{required}{type=scalar string} 14 11 ; A string giving the name of the NetCdf file … … 18 15 ; 19 16 ; @keyword MASKNAME {type=string} 20 ; A string giving the name of the variable in the file 17 ; A string giving the name of the variable in the file 21 18 ; that contains the land/sea mask 22 19 ; … … 31 28 ; 32 29 ; @keyword USEASMASK {type=scalar string} 33 ; A string giving the name of the variable in the file 30 ; A string giving the name of the variable in the file 34 31 ; that will be used to build the land/sea mask. In this case the 35 32 ; mask is based on the first record (if record dimension … … 40 37 ; 41 38 ; @keyword ZAXISNAME {default='z', 'level', 'lev', 'depth...'}{type=scalar string} 42 ; A string giving the name of the variable in the file 43 ; that contains the [xyz]axis. 39 ; A string giving the name of the variable in the file 40 ; that contains the [xyz]axis. 44 41 ; 45 42 ; @keyword XYINDEX {default=0}{type=scalar: 0 or 1} 46 43 ; To define the x/y axis with index instead of using 47 ; the values contained in X/YAXISNAME. 48 ; x/yaxis = keyword_set(start1) + findgen(jpi/jpj) 44 ; the values contained in X/YAXISNAME. 45 ; x/yaxis = keyword_set(start1) + findgen(jpi/jpj) 49 46 ; this forces key_onearth = 0 50 47 ; 51 48 ; @keyword ZINDEX {default=0}{type=scalar: 0 or 1} 52 49 ; To define the z axis with index instead of using 53 ; the values contained in ZAXISNAME. 54 ; zaxis = keyword_set(start1) + findgen(jpk) 55 ; 50 ; the values contained in ZAXISNAME. 51 ; zaxis = keyword_set(start1) + findgen(jpk) 52 ; 56 53 ; @keyword _EXTRA 57 ; Used to pass keywords to computegrid and ncdf_getaxis54 ; Used to pass keywords to <pro>computegrid</pro> and <pro>ncdf_getaxis</pro> 58 55 ; 59 56 ; @uses … … 61 58 ; 62 59 ; @restrictions 63 ; Change the grid parameters (see computegrid)60 ; Change the grid parameters (see <pro>computegrid</pro>) 64 61 ; 65 62 ; @restrictions … … 67 64 ; 68 65 ; @examples 69 ; 66 ; IDL> initncdf,'toto.nc',glam=[-180,180] 70 67 ; 71 68 ; @history … … 77 74 ; 78 75 ;- 79 ;------------------------------------------------------------ 80 ;------------------------------------------------------------ 81 ;------------------------------------------------------------ 76 ; 82 77 PRO initncdf, ncfilein $ 83 78 , ZAXISNAME = zaxisname, MASKNAME = maskname $ … … 86 81 , XYINDEX = xyindex, ZINDEX = zindex $ 87 82 , _EXTRA = ex 88 ;89 83 ; 90 84 compile_opt idl2, strictarrsubs … … 99 93 endif 100 94 ; if the file is stored on tape 101 if !version.os_family EQ 'unix' then spawn, 'file '+ncfile+' > /dev/null' 95 if !version.os_family EQ 'unix' then spawn, 'file '+ncfile+' > /dev/null' 102 96 ;---------------------------------------------------------- 103 97 ; open the file … … 109 103 namedim = strarr(inside.ndims) 110 104 for dimiq = 0, inside.ndims-1 do begin 111 ncdf_diminq, cdfid, dimiq, tmpname, value 105 ncdf_diminq, cdfid, dimiq, tmpname, value 112 106 namedim[dimiq] = strlowcase(tmpname) 113 107 ENDFOR … … 126 120 ; find the zaxis 127 121 IF keyword_set(romsgrid) THEN BEGIN 128 FOR i = 0, inside.ndims-1 DO BEGIN 122 FOR i = 0, inside.ndims-1 DO BEGIN 129 123 ncdf_diminq, cdfid, i, name, size 130 124 CASE strlowcase(name) OF … … 136 130 ELSE: 137 131 ENDCASE 138 ENDFOR 132 ENDFOR 139 133 IF (where(namevar EQ 'h'))[0] NE -1 THEN BEGIN 140 134 ncdf_varget, cdfid, 'h', romsh 141 135 ENDIF ELSE romsh = -1 142 ENDIF ELSE BEGIN 136 ENDIF ELSE BEGIN 143 137 if keyword_set(zaxisname) then zaxisname = strlowcase(zaxisname) ELSE zaxisname = 'z' 144 138 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] … … 149 143 ; read the zaxis 150 144 if zvarid NE -1 THEN ncdf_varget, cdfid, zvarid, zaxis 151 ENDELSE 145 ENDELSE 152 146 IF keyword_set(zindex) AND keyword_set(zaxis) THEN $ 153 147 zaxis = keyword_set(start1) + findgen(n_elements(zaxis)) … … 158 152 keyword_set(maskname):BEGIN 159 153 mskid = (where(namevar EQ strlowcase(maskname)))[0] 160 if mskid NE -1 THEN BEGIN 154 if mskid NE -1 THEN BEGIN 161 155 mskinq = ncdf_varinq(cdfid, mskid) 162 156 ; is the mask variable containing the record dimension? 163 157 withrcd = (where(mskinq.dim EQ inside.recdim))[0] 164 158 IF withrcd NE -1 THEN BEGIN 165 ; in order to read only the first record 159 ; in order to read only the first record 166 160 ; we need to get the size of each dimension 167 161 count = replicate(1L, mskinq.ndims) … … 172 166 ENDIF 173 167 ENDFOR 174 ; read the variable for the first record 168 ; read the variable for the first record 175 169 ncdf_varget, cdfid, mskid, tmask, count = count 176 170 ENDIF ELSE ncdf_varget, cdfid, mskid, tmask 177 ; check if we need to applay add_offset and scale factor 171 ; check if we need to applay add_offset and scale factor 178 172 FOR a = 0, mskinq.natts-1 DO BEGIN 179 attname = ncdf_attname(cdfid, mskid, a) 173 attname = ncdf_attname(cdfid, mskid, a) 180 174 CASE strlowcase(attname) OF 181 175 'add_offset':ncdf_attget, cdfid, mskid, attname, add_offset … … 188 182 if keyword_set(invmask) then tmask = 1-tmask 189 183 tmask = byte(round(tmask)) 190 ENDIF ELSE tmask = -1 184 ENDIF ELSE tmask = -1 191 185 END 192 186 ;.................. 193 187 keyword_set(useasmask):BEGIN 194 188 mskid = (where(namevar EQ strlowcase(useasmask)))[0] 195 if mskid NE -1 THEN BEGIN 189 if mskid NE -1 THEN BEGIN 196 190 mskinq = ncdf_varinq(cdfid, mskid) 197 191 ; is the mask variable containing the record dimension? 198 192 withrcd = (where(mskinq.dim EQ inside.recdim))[0] 199 193 IF withrcd NE -1 THEN BEGIN 200 ; in order to read only the first record 194 ; in order to read only the first record 201 195 ; we need to get the size of each dimension 202 196 count = replicate(1L, mskinq.ndims) … … 207 201 ENDIF 208 202 ENDFOR 209 ; read the variable for the first record 203 ; read the variable for the first record 210 204 ncdf_varget, cdfid, mskid, tmask, count = count 211 205 ENDIF ELSE ncdf_varget, cdfid, mskid, tmask 212 ; check if we need to applay add_offset and scale factor 206 ; check if we need to applay add_offset and scale factor 213 207 FOR a = 0, mskinq.natts-1 DO BEGIN 214 attname = ncdf_attname(cdfid, mskid, a) 208 attname = ncdf_attname(cdfid, mskid, a) 215 209 CASE strlowcase(attname) OF 216 210 'add_offset':ncdf_attget, cdfid, mskid, attname, add_offset … … 236 230 IF min(tmask) EQ 1 THEN BEGIN 237 231 print, 'missing or nan values not found...' 238 tmask = -1 232 tmask = -1 239 233 ENDIF 240 234 ENDELSE 241 ENDIF ELSE tmask = -1 235 ENDIF ELSE tmask = -1 242 236 END 243 237 ;.................. … … 248 242 ; 249 243 ; compute the grid 250 if NOT keyword_set(zaxis) then BEGIN 244 if NOT keyword_set(zaxis) then BEGIN 251 245 computegrid, xaxis = xaxis, yaxis = yaxis $ 252 , mask = tmask, onearth = 1b - keyword_set(xyindex), ROMSH = romsh, _EXTRA = ex 253 ENDIF ELSE BEGIN 246 , mask = tmask, onearth = 1b - keyword_set(xyindex), ROMSH = romsh, _EXTRA = ex 247 ENDIF ELSE BEGIN 254 248 computegrid, xaxis = xaxis, yaxis = yaxis, zaxis = zaxis $ 255 249 , mask = tmask, onearth = 1b - keyword_set(xyindex), ROMSH = romsh, _EXTRA = ex 256 ENDELSE 250 ENDELSE 257 251 IF n_elements(time) EQ 0 THEN time = 0 258 jpt = n_elements(time) 252 jpt = n_elements(time) 259 253 ;---------------------------------------------------------- 260 254 -
trunk/SRC/ToBeReviewed/LECTURE/binary.pro
r223 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; Returns the binary representation of a number of any numerical type. … … 43 44 ; 44 45 ;- 45 function binary, number 46 ; 47 FUNCTION binary, number 46 48 ; 47 49 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/LECTURE/changeread.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param NEWREAD 9 7 ; 10 ;11 8 ; @returns 12 ;13 9 ; 14 10 ; @uses 15 11 ; 16 ;17 12 ; @restrictions 18 ;19 13 ; 20 14 ; @examples 21 15 ; 22 ;23 16 ; @history 24 ;25 17 ; 26 18 ; @version … … 30 22 ; 31 23 ;- 24 ; 32 25 FUNCTION changeread, newread 33 ;34 26 ; 35 27 compile_opt idl2, strictarrsubs … … 37 29 @common 38 30 ; 39 ;40 31 ; newread must be two structures 41 32 ; 42 33 if size(newread, /type) NE 8 then return, 0 43 34 ; 44 ; we compare the two structure which caracterise the read 35 ; we compare the two structure which caracterise the read 45 36 ; 46 37 case 1 of -
trunk/SRC/ToBeReviewed/LECTURE/inverse_binary.pro
r157 r231 2 2 ; 3 3 ; @file_comments 4 ; Inverse function of the binary.profunction => given a4 ; Inverse function of the <pro>binary</pro> function => given a 5 5 ; input array of 0/1, return its corresponding byte/integer/long 6 6 ; representation … … 10 10 ; @param BINNUMB {in}{required} 11 11 ; Must be a binary type array containing only 0 and 1. 12 ; According to binary.prooutputs, binnum array must have the12 ; According to <pro>binary</pro> outputs, binnum array must have the 13 13 ; following dimensions values: (8, t, d1, d2...) 14 14 ; t gives the output type: t = 1 -> byte 15 15 ; t = 2 -> integer 16 16 ; t = 4 -> long 17 ; 17 ; 18 18 ; (d1, d2...) are the output dimensions 19 19 ; 20 20 ; 21 ; @returns 21 ; @returns 22 22 ; A byte/integer/long array with (d1, d2...) dimensions 23 23 ; … … 34 34 ; 0 0 0 0 0 0 0 0 35 35 ; 0 0 0 0 0 0 0 0 36 ; 36 ; 37 37 ; 0 0 0 0 0 0 0 0 38 38 ; 0 0 0 0 0 0 0 1 39 ; 39 ; 40 40 ; 0 0 0 0 0 0 0 0 41 41 ; 0 0 0 0 0 0 1 0 42 ; 42 ; 43 43 ; 0 0 0 0 0 0 0 0 44 44 ; 0 0 0 0 0 0 1 1 45 ; 45 ; 46 46 ; 0 0 0 0 0 0 0 0 47 47 ; 0 0 0 0 0 1 0 0 … … 59 59 ; 60 60 ;- 61 ;------------------------------------------------------ 62 ;------------------------------------------------------ 61 ; 63 62 FUNCTION inverse_binary, binnumb 64 ;65 63 ; 66 64 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/LECTURE/litchamp.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 4 ; Allows to read an array or a structure corresponding to a field. 8 ; If we have in input: 5 ; If we have in input: 9 6 ; -an array, litchamp send back the array. 10 ; -a structure, litchamp send back the first element of the structure 7 ; -a structure, litchamp send back the first element of the structure 11 8 ; which must be the field in an array. 12 9 ; Litchamp profit of this to look other elements of the structure et 13 10 ; update if needed global variables which refer to the field: 14 ; vargrid, varname, varunit, vardate, varexp , valmask et time 11 ; vargrid, varname, varunit, vardate, varexp , valmask et time 15 12 ; 16 13 ; @categories … … 25 22 ; corresponding to the calendar to be associated with the field if it is a 26 23 ; temporal series. 27 ; -the order of elements (except the first) has not any importance. 24 ; -the order of elements (except the first) has not any importance. 28 25 ; -the other elements (except the first) are optional. 29 26 ; -they are recognize by the first letter of their names: … … 36 33 ; 37 34 ; @keyword GRID 38 ; We activate this keyword if we want litchamp to send back the variable 39 ; associated with the element of the structure starting by 'g' if it exist 35 ; We activate this keyword if we want litchamp to send back the variable 36 ; associated with the element of the structure starting by 'g' if it exist 40 37 ; and '' if it does not. 41 38 ; 42 39 ; @keyword UNIT 43 ; We activate this keyword if we want litchamp to send back the variable 44 ; associated with the element of the structure starting by 'u' if it exist 40 ; We activate this keyword if we want litchamp to send back the variable 41 ; associated with the element of the structure starting by 'u' if it exist 45 42 ; and '' if it does not. 46 43 ; 47 44 ; @keyword EXP 48 ; We activate this keyword if we want litchamp to send back the variable 49 ; associated with the element of the structure starting by 'u' if it exist 45 ; We activate this keyword if we want litchamp to send back the variable 46 ; associated with the element of the structure starting by 'u' if it exist 50 47 ; and '' if it does not. 51 48 ; 52 49 ; @keyword DATE 53 ; We activate this keyword if we want litchamp to send back the variable 54 ; associated with the element of the structure starting by 'd' if it exist 50 ; We activate this keyword if we want litchamp to send back the variable 51 ; associated with the element of the structure starting by 'd' if it exist 55 52 ; and '' if it does not. 56 53 ; 57 54 ; @keyword NAME 58 ; We activate this keyword if we want litchamp to send back the variable 59 ; associated with the element of the structure starting by 'n' if it exist 55 ; We activate this keyword if we want litchamp to send back the variable 56 ; associated with the element of the structure starting by 'n' if it exist 60 57 ; and '' if it does not. 61 58 ; 62 59 ; @keyword LEVEL 63 ; We activate this keyword if we want litchamp to send back the variable 64 ; associated with the element of the structure starting by 'l' if it exist 60 ; We activate this keyword if we want litchamp to send back the variable 61 ; associated with the element of the structure starting by 'l' if it exist 65 62 ; and -1 if it does not. 66 ; 63 ; 67 64 ; @keyword MASK 68 ; We activate this keyword if we want litchamp to send back the variable 69 ; associated with the element of the structure starting by 'm' if it exist 65 ; We activate this keyword if we want litchamp to send back the variable 66 ; associated with the element of the structure starting by 'm' if it exist 70 67 ; and -1 if it does not. 71 68 ; … … 81 78 ; 82 79 ; @examples 83 ; 84 ; IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp 85 ; T, , , 0, 86 ; IDL> help, litchamp({a:indgen(5), u:'C', name:'toto'}) 80 ; 81 ; IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp 82 ; T, , , 0, 83 ; IDL> help, litchamp({a:indgen(5), u:'C', name:'toto'}) 87 84 ; <Expression> INT = Array[5] 88 ; IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp 89 ; T, toto, C, 0, 90 ; IDL> help, litchamp({a:indgen(5), da:'1999'}) 85 ; IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp 86 ; T, toto, C, 0, 87 ; IDL> help, litchamp({a:indgen(5), da:'1999'}) 91 88 ; <Expression> INT = Array[5] 92 ; IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp 93 ; T, toto, C, 1999, 94 ; 89 ; IDL> print, vargrid,', ', varname,', ', varunit,', ', vardate,', ', varexp 90 ; T, toto, C, 1999, 91 ; 95 92 ; 96 93 ; @history … … 102 99 ; 103 100 ;- 104 ;------------------------------------------------------------ 105 ;------------------------------------------------------------ 106 ;------------------------------------------------------------ 101 ; 107 102 FUNCTION litchamp, struct, GRID = grid, NAME = name, UNIT = unit, EXP = exp, DATE = date $ 108 103 , LEVEL = level, MASK = mask … … 111 106 ; 112 107 @common 113 ; ------------------------------------------------------------108 ; 114 109 if size(struct, /type) ne 8 then BEGIN ; so contour is not a structure. 115 110 if keyword_set(grid) then return, '' … … 120 115 if keyword_set(level) then return, -1 121 116 if keyword_set(mask) then return, -1 122 return, struct 123 ENDIF 117 return, struct 118 ENDIF 124 119 ;------------------------------------------------------------ 125 120 IF n_tags(struct) EQ 1 then BEGIN ; The structure has only one element. … … 132 127 if keyword_set(mask) then return, -1 133 128 return, struct.(0) 134 ENDIF 129 ENDIF 135 130 ;------------------------------------------------------------ 136 131 nomelements = tag_names(struct) … … 157 152 valmask = struct.(i) 158 153 END 159 'd':BEGIN 160 if size(struct.(i),/type) EQ 7 THEN BEGIN 154 'd':BEGIN 155 if size(struct.(i),/type) EQ 7 THEN BEGIN 161 156 vardate = struct.(i) 162 157 ENDIF ELSE BEGIN … … 165 160 if jpt EQ 1 then vardate = strtrim(vairdate((struct.(i))[0]), 2)$ 166 161 ELSE vardate = strtrim(vairdate((struct.(i))[0]), 2)+' - ' $ 167 +strtrim(vairdate((struct.(i))[jpt-1]), 2) 162 +strtrim(vairdate((struct.(i))[jpt-1]), 2) 168 163 ENDELSE 169 164 if keyword_set(date) then return, vardate … … 175 170 , FORTHEMASK = struct.(0), pttype = (struct.(i)).pttype 176 171 END 177 ELSE:BEGIN 172 ELSE:BEGIN 178 173 ras = report('Le nom '+nomelements[i]+' ne correspont a aucun element reconnu de la structure. cf. IDL> xhelp, ''litchamp''') 179 174 end -
trunk/SRC/ToBeReviewed/LECTURE/ncdf_lec.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Give informations on a file net cdf and allows to recuperate 4 ; Give informations on a file net cdf and allows to recuperate 8 5 ; variables which are write in. 9 6 ; … … 15 12 ; 16 13 ; @keyword ATT 17 ; 'global' or at the name of a variable. Allows to see all attributes 14 ; 'global' or at the name of a variable. Allows to see all attributes 18 15 ; joined at a variable 19 16 ; … … 29 26 ; 30 27 ; @keyword _EXTRA 31 ; Allows to pass keywords defined by IDL to functions NETCDF ( particularly OFFSET32 ; and COUNT in ncdf_varget)28 ; Used to pass keywords defined by IDL to functions NETCDF (especially OFFSET 29 ; and COUNT in <pro>ncdf_varget</pro>) 33 30 ; 34 31 ; @returns … … 36 33 ; 37 34 ; @restrictions 38 ; Variables's names of the program are similar to these used by the IDL manual 35 ; Variables's names of the program are similar to these used by the IDL manual 39 36 ; 'scientific data formats' 40 37 ; … … 47 44 ; 48 45 ;- 49 ; ------------------------------------------------------------50 functionncdf_lec,nom,ATT=att,DIM=dim,VAR=var, IODIR = iodir, _extra = ex46 ; 47 FUNCTION ncdf_lec,nom,ATT=att,DIM=dim,VAR=var, IODIR = iodir, _extra = ex 51 48 ; 52 49 compile_opt idl2, strictarrsubs … … 72 69 wathinside=ncdf_inquire(cdfid) 73 70 ; print,'in the file, ',iodir+nom,', there are:' 74 if keyword_set(dim) then begin 71 if keyword_set(dim) then begin 75 72 print,'nombre de dimensions: ',strtrim(wathinside.ndims,1) 76 73 print,'numero de la dimension dont la valeur est infini: ',strtrim(wathinside.recdim,1) … … 98 95 ; Display of different dimensions. 99 96 ;------------------------------------------------------------ 100 if keyword_set(dim) then begin 97 if keyword_set(dim) then begin 101 98 print, '----------------------------' 102 99 print,'DIMENSIONS' … … 108 105 nomdim[dimiq]=name 109 106 tailledim[dimiq]=value 110 if keyword_set(dim) then begin 107 if keyword_set(dim) then begin 111 108 print,'dimension numero ',strtrim(dimiq,1),', nom: ',nomdim[dimiq] $ 112 109 ,', valeur: ' ,strtrim(tailledim[dimiq],1) … … 117 114 ;------------------------------------------------------------ 118 115 ; 119 if keyword_set(att) or keyword_set(var) then begin 116 if keyword_set(att) or keyword_set(var) then begin 120 117 ; var's value? string or 1 121 118 help, var, output = nature … … 125 122 ncdf_varget, cdfid, var, res, _extra = ex 126 123 GOTO, sortie 127 ENDIF 124 ENDIF 128 125 ; If it is to have pieces of information. 129 126 if not keyword_set(att) then att='rien' -
trunk/SRC/ToBeReviewed/LECTURE/read_ftp.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; … … 6 7 ; @param U 7 8 ; 8 ;9 9 ; @param CMD 10 10 ; 11 ;12 11 ; @param RES 13 12 ; 14 13 ; @keyword OUT 15 ;16 14 ; 17 15 ; @keyword COUNT … … 24 22 ; @examples 25 23 ; 26 ;27 24 ; @history 28 ;29 25 ; 30 26 ; @version 31 27 ; $Id$ 32 28 ;- 33 34 pro ftp_post, u, cmd, res, out=out, count=count 35 compile_opt idl2 29 ; 30 PRO ftp_post, u, cmd, res, out=out, count=count 31 ; 32 compile_opt idl2, strictarrsubs 33 ; 36 34 if (cmd ne '') then begin 37 35 printf, u, cmd, format='(a)' … … 55 53 endwhile 56 54 end 55 ; 57 56 ;+ 57 ; 58 58 ; @file_comments 59 59 ; … … 65 65 ; @param HOST 66 66 ; 67 ;68 67 ; @param PORT 69 68 ; 70 69 ; @restrictions 71 ;72 70 ; 73 71 ; @examples … … 77 75 ; @version 78 76 ; $Id$ 77 ; 79 78 ;- 80 81 proftp_parse_pasv, text, host, port79 ; 80 PRO ftp_parse_pasv, text, host, port 82 81 t=strtrim(text,2) 83 82 ind=where(strcmp(t,'227',3)) … … 91 90 endif 92 91 end 92 ; 93 93 ;+ 94 94 ; … … 178 178 ; 179 179 ;- 180 pro read_ftp, site, files, dir, port, data=data, file=file, user=user, $ 180 ; 181 PRO read_ftp, site, files, dir, port, data=data, file=file, user=user, $ 181 182 pass=pass, ptr=ptr 183 ; 182 184 compile_opt idl2 185 ; 183 186 if n_elements(port) eq 0 then port='ftp' 184 187 if n_elements(files) eq 0 then begin -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; Reading function for the file net_cdf. … … 74 75 ; 75 76 ; @keyword _EXTRA 76 ; Used to pass yourkeywords77 ; Used to pass keywords 77 78 ; 78 79 ; @returns 79 ; Structure readable by litchamp.proor an array if NOSTRUCT is activated.80 ; Structure readable by <pro>litchamp</pro> or an array if NOSTRUCT is activated. 80 81 ; 81 82 ; @uses … … 92 93 ; $Id$ 93 94 ;- 94 ;--------------------------------------------------------- 95 ;--------------------------------------------------------- 96 ;--------------------------------------------------------- 97 95 ; 98 96 FUNCTION read_ncdf, name, beginning, ending, compatibility, BOXZOOM = boxzoom, FILENAME = filename $ 99 97 , PARENTIN = parentin, TIMESTEP = timestep, TIMEVAR = timevar $ … … 102 100 , ZETAFILENAME = zetafilename, ZETAZERO = zetazero $ 103 101 , _EXTRA = ex 104 ;---------------------------------------------------------105 102 ; 106 103 compile_opt idl2, strictarrsubs … … 544 541 545 542 END 546 547 548 549 550 551 -
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf_varget.pro
r216 r231 76 76 IF keyword_set(key_periodic) THEN BEGIN 77 77 key_shift = key_shift-1 78 ENDIF ELSE BEGIN 78 ENDIF ELSE BEGIN 79 79 firstx = firstx+1 80 lastx = lastx+1 81 ENDELSE 80 lastx = lastx+1 81 ENDELSE 82 82 ENDIF 83 83 IF (key_gridtype EQ 'c_v' OR key_gridtype EQ 'c_f') $ … … 133 133 ,count=[nx,ny] 134 134 END 135 ELSE:BEGIN ; we have to extract the array in 2 pieces... 135 ELSE:BEGIN ; we have to extract the array in 2 pieces... 136 136 ; ......... part, first part... 137 137 ncdf_varget,cdfid,name,tab1,offset=[jpi-key+ixmin+firstx $ … … 151 151 case 1 OF ; case sur la facon de fire le champ 152 152 ; --------- part, we can directly extract the array in one piece 153 firstx*key_stride[0] GE key:BEGIN 153 firstx*key_stride[0] GE key:BEGIN 154 154 ncdf_varget,cdfid,name,res,offset=[ixmin $ 155 155 +(key_stride[0]-1)-((key-1) MOD key_stride[0]) $ … … 159 159 END 160 160 ; ......... part, we can directly extract the array in one piece 161 lastx*key_stride[0] LE key-1:BEGIN 161 lastx*key_stride[0] LE key-1:BEGIN 162 162 ncdf_varget,cdfid,name,res,offset=[jpitotal-key+ixmin+firstx*key_stride[0] $ 163 163 ,firsty*key_stride[1]+iymin] $ … … 338 338 ; --------- part, we can directly extract the array in one piece 339 339 case 1 OF ; case sur la facon de fire le champ 340 firstx*key_stride[0] GE key:BEGIN 340 firstx*key_stride[0] GE key:BEGIN 341 341 ncdf_varget,cdfid,name,res,offset=[ixmin $ 342 342 +(key_stride[0]-1)-((key-1) MOD key_stride[0]) $ … … 347 347 END 348 348 ; ......... part, we can directly extract the array in one piece 349 lastx*key_stride[0] LE key-1:BEGIN 349 lastx*key_stride[0] LE key-1:BEGIN 350 350 ncdf_varget,cdfid,name,res,offset=[jpitotal-key+ixmin+firstx*key_stride[0] $ 351 351 ,firsty*key_stride[1]+iymin $ … … 353 353 ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 354 354 END 355 ELSE:BEGIN 355 ELSE:BEGIN 356 356 ; ......... part, first part... 357 357 ncdf_varget,cdfid,name,tab1,offset=[jpitotal-key+ixmin+firstx*key_stride[0] $ … … 480 480 481 481 ; we apply reverse 482 IF keyword_set(key_yreverse) AND ny NE 1 THEN BEGIN 482 IF keyword_set(key_yreverse) AND ny NE 1 THEN BEGIN 483 483 IF varcontient.ndims - ((where(varcontient.dim EQ contient.recdim))[0] NE -1) EQ 2 THEN $ 484 484 res = reverse(reform(res, nx, ny, jpt, /overwrite), 2) $ -
trunk/SRC/ToBeReviewed/LECTURE/xncdf_lec.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Reading of a Net Cdf file with widgets ! 8 ; 9 ; @categories 4 ; Reading of a Net Cdf file with widgets ! 5 ; 6 ; @categories 10 7 ; Widget 11 8 ; 12 ; @param NAME {in}{optional}{type=string} 13 ; It give the name of the file to be opened. If NAME 14 ; does not contain the separating character of directories ('/' under 9 ; @param NAME {in}{optional}{type=string} 10 ; It give the name of the file to be opened. If NAME 11 ; does not contain the separating character of directories ('/' under 15 12 ; unix for example), the file will be looked for in the current directory. 16 13 ; 17 14 ; @keyword IODIR {type=string} 18 15 ; It contains the directory where to go look for the file to be read. 19 ; If NAME does not contain the separating character of directories ('/' under 16 ; If NAME does not contain the separating character of directories ('/' under 20 17 ; unix for example), the file will be called iodir+nom_fichier. 21 18 ; … … 29 26 ; The widget ID of the widget that calls XNCDF_LEC. When 30 27 ; this ID is specified, a death of the caller results in a death 31 ; of XNCDF_LEC. 28 ; of XNCDF_LEC. 32 29 ; 33 30 ; @keyword OFFSET {type=vector}{default=[0, 0,...]} … … 36 33 ; 37 34 ; @keyword SHIFT {type=vector}{default=[0, 0,...]} 38 ; A vector of integers, specifying for each dimension how much we have to shift it. 39 ; By default, it is [0,0,...]. See the function shift for more explanations. BEWARE, 40 ; the shift is done on the biggest array before a possible reduction determined 41 ; by OFFSET and COUNT. On the other hand, it is done after the possible extraction 35 ; A vector of integers, specifying for each dimension how much we have to shift it. 36 ; By default, it is [0,0,...]. See the function shift for more explanations. BEWARE, 37 ; the shift is done on the biggest array before a possible reduction determined 38 ; by OFFSET and COUNT. On the other hand, it is done after the possible extraction 42 39 ; created by the STRIDE. 43 40 ; … … 51 48 ; 1) None attribute has been selected. In this case, res is the array we 52 49 ; wanted to read. 53 ; 2) Some attributes has been selected. In this case, res is a structure 54 ; whose the first element having the name of the variable is the values 50 ; 2) Some attributes has been selected. In this case, res is a structure 51 ; whose the first element having the name of the variable is the values 55 52 ; array and the other arguments are the select arguments. 56 53 ; … … 68 65 ; $Id$ 69 66 ;- 70 ;------------------------------------------------------------ 71 ;------------------------------------------------------------ 72 ;------------------------------------------------------------ 67 ; 73 68 FUNCTION xncdf_lec, name, ATT = att, COUNT = count, GROUP = group, OFFSET = offset, IODIR = iodir, SHIFT = shift, STRIDE = stride, VAR = var 74 69 ; … … 103 98 mciodir = iodir 104 99 ; We complete IODIR with a separating character if needed. 105 IF rstrpos(iodir, sep) NE strlen(iodir)-1 THEN iodir = iodir+sep 100 IF rstrpos(iodir, sep) NE strlen(iodir)-1 THEN iodir = iodir+sep 106 101 if n_elements(name) EQ 0 then BEGIN ; If NAME is not defined, we find one thanks to the program dialog_pickfile. 107 name = dialog_pickfile(filter = iodir+'*.nc') 102 name = dialog_pickfile(filter = iodir+'*.nc') 108 103 if name[0] EQ '' then return, -1 ;If we do not have find anything, we go out. 109 104 ;We complete NAME by IODIR if NAME does not contain any directory separating character. … … 132 127 ;------------------------------------------------------------ 133 128 base1 = widget_base(base, /column, /align_center) 134 rien = widget_label(base1, value = 'Net Cdf filename', /align_center) 129 rien = widget_label(base1, value = 'Net Cdf filename', /align_center) 135 130 rien = widget_text(base1, value = name, /align_center, uvalue=1, /editable) ;File's name we can change 136 131 rien = widget_label(base1, value = ' ') ; We jump a line … … 207 202 ; 208 203 ;+ 204 ; 209 205 ; @file_comments 210 206 ; Procedure called by xmanager when we press on a button of a second widget created by wid_var. 211 ; 207 ; 212 208 ; @param EVENT {in}{required} 213 209 ; A structure caracterizing the type of event which arrive to a widget number1 2 … … 215 211 ; @uses 216 212 ; wididbase,resultat,infovariable,indicewid,motcle 217 ; 213 ; 218 214 ; @version 219 215 ; $Id$ 220 216 ;- 221 ;------------------------------------------------------------ 222 ;------------------------------------------------------------ 223 ;------------------------------------------------------------ 224 pro wid_var_event, event 217 ; 218 PRO wid_var_event, event 225 219 ; 226 220 compile_opt idl2, strictarrsubs … … 246 240 if event.y GT (size(table))[2] then return 247 241 if size(table[event.x, event.y], /type) GE 6 $ 248 OR size(table[event.x, event.y], /type) EQ 0 then BEGIN 242 OR size(table[event.x, event.y], /type) EQ 0 then BEGIN 249 243 if event.x EQ 1 then $ 250 244 widget_control, widbase1, use_table_select = [1, event.y,1, event.y] $ … … 347 341 ; We redefine the command allowing to cut dimensions which has not been cut yet (ones we shift). 348 342 commande = 'res=res[' ; initialization of the command 349 for dim = 0, varcontient.ndims-1 do BEGIN 343 for dim = 0, varcontient.ndims-1 do BEGIN 350 344 if mcshift[dim] EQ 0 then commande = commande+'*,' $ 351 345 ELSE commande=commande+string(mcoffset[dim])+':'+string(mccount[dim]+mcoffset[dim]-1)+',' … … 380 374 return 381 375 end 382 ;------------------------------------------------------------ 383 ;------------------------------------------------------------ 384 ;------------------------------------------------------------ 376 ; 385 377 ;+ 378 ; 386 379 ; @file_comments 387 ; This procedure manage the second created whiget when we call xncdf_lec. 380 ; This procedure manage the second created whiget when we call xncdf_lec. 388 381 ; This widget concern the reading of the variable. 389 382 ; 390 383 ; @param WIDID_PERE {type=scalar}{in}{required} 391 ; It contains the identity of the father widget which was 384 ; It contains the identity of the father widget which was 392 385 ; created by xncdf_lec and which has allowed to select the variable to be read. 393 386 ; 394 387 ; OUTPUTS: indirectement res (le tableau ou la structure resultat) 395 388 ; 396 ; @uses 389 ; @uses 397 390 ; resultat,infovariable,indicewid_var,motcle 398 391 ; … … 400 393 ; $Id$ 401 394 ;- 402 ;------------------------------------------------------------ 403 ;------------------------------------------------------------ 404 ;------------------------------------------------------------ 395 ; 405 396 PRO wid_var, widid_pere 406 397 ; … … 416 407 widbase = widget_base(/column, title='variable: '+varcontient.name, /align_center, group_leader = widid_pere) 417 408 ;------------------------------------------------------------ 418 ; Opening of the base subwindow 409 ; Opening of the base subwindow 419 410 ;------------------------------------------------------------ 420 411 ; widbase1 array of offsets … … 457 448 rien = widget_label(widbase, value = ' ') ; We jump a line 458 449 widbase2 = widget_base(widbase, /column) 459 ; To each attribute, we created a widget (widbase21) containing in line a button 460 ; yes/no (widbase211), and two wigdet text (widbase212, widbase213) comprising the 450 ; To each attribute, we created a widget (widbase21) containing in line a button 451 ; yes/no (widbase211), and two wigdet text (widbase212, widbase213) comprising the 461 452 ; name and the value of the attribute. 462 453 widbase21 = lonarr(varcontient.natts) … … 492 483 return 493 484 end 494 ;------------------------------------------------------------ 495 496 ;------------------------------------------------------------ 497 ;------------------------------------------------------------ 498 ;------------------------------------------------------------ 485 ; 499 486 ;+ 487 ; 500 488 ; @file_comments 501 ; Procedure called by xmanager when we press a button of the first widget 489 ; Procedure called by xmanager when we press a button of the first widget 502 490 ; created by par xncdf_lec 503 ; 491 ; 504 492 ; @param EVENT 505 493 ; A structure caracterising the event type which arrive at the widget number 1. … … 511 499 ; $Id$ 512 500 ;- 513 ;------------------------------------------------------------ 514 ;------------------------------------------------------------ 515 ;------------------------------------------------------------ 501 ; 516 502 PRO xncdf_lec_event, event 517 503 ; … … 531 517 ;We call back xncdf_lec 532 518 res = xncdf_lec(nom[0], ATT = mcatt, COUNT = mccount, OFFSET = mcoffset, IODIR = mciodir $ 533 , SHIFT = mcshift, STRIDE = mcstride, VAR = mcvar) 519 , SHIFT = mcshift, STRIDE = mcstride, VAR = mcvar) 534 520 return 535 521 END -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt.pro
r171 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; Draw horizontal graph (map) with CONTOUR procedure 8 5 ; 9 ; @categories 6 ; @categories 10 7 ; Graphics 11 8 ; 12 ; @param TAB1 {in}{required} 9 ; @param TAB1 {in}{required} 13 10 ; The field whose we want to make the horizontal map can be: 14 11 ; 1) an array. if needed, its mean along the z and t direction 15 12 ; will be automatically performed. 16 13 ; 2) a structure respecting all criterions specified by 17 ; litchamp.pro.cf. IDL> xhelp,'litchamp'18 ; 19 ; @param PARAM2 {in}{optional}{default=min of tab1 (on ocean points)} 14 ; <pro>litchamp</pro> cf. IDL> xhelp,'litchamp' 15 ; 16 ; @param PARAM2 {in}{optional}{default=min of tab1 (on ocean points)} 20 17 ; Min value we want to consider in the contour's drawing. 21 18 ; Note: Could also be the type of plot that can be only 'xy' for plt 22 19 ; 23 ; @param PARAM3 {in}{optional}{default=max of tab1 (on ocean points)} 20 ; @param PARAM3 {in}{optional}{default=max of tab1 (on ocean points)} 24 21 ; Max value we want to consider in the contour's drawing. 25 22 ; Note: if param2 is defined as 'xy' then param3 is used to define the min (see param2) 26 23 ; 27 ; @param PARAM4 {in}{optional}{default='xy'} 24 ; @param PARAM4 {in}{optional}{default='xy'} 28 25 ; Type of plot (can be only 'xy' for plt). 29 26 ; Note: if param2 is defined as 'xy' then param4 is used to define the max (see param3) 30 27 ; 31 28 ; @keyword BOXZOOM {type=vector} 32 ; Vector indicating the geographic zone on which we want to cut the map. 29 ; Vector indicating the geographic zone on which we want to cut the map. 33 30 ; If BOXZOOM has : 34 31 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 40 37 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 41 38 ; 42 ; @keyword REALCONT 39 ; @keyword REALCONT 43 40 ; Allow to draw continents defined in IDL. REALCONT can have 2 form: 44 41 ; /REALCONT: we draw continents in place of the mask 45 ; REALCONT=2 we draw continent's contour over the mask (this allows 42 ; REALCONT=2 we draw continent's contour over the mask (this allows 46 43 ; to see if the mask correspond at real continents). 47 44 ; 48 ; @keyword CONTINTERVALLE 49 ; When CONTOUR is activated, it is the value between 2 isolines 50 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 51 ; in this case, does not control colored isolines in color anymore. If there is noone 52 ; specified min, we choose a contour min which goes well with the specified interval! 53 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 45 ; @keyword CONTINTERVALLE 46 ; When CONTOUR is activated, it is the value between 2 isolines 47 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 48 ; in this case, does not control colored isolines in color anymore. If there is noone 49 ; specified min, we choose a contour min which goes well with the specified interval! 50 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 54 51 ; 55 52 ; @keyword CONTLABEL {type=integer} 56 53 ; It is an integer n. When CONTOUR is activated, if n 57 ; is different of 0, choose the label type corresponding to n cases for 58 ; the traced by a traitisolines. To specify the type of label of the 54 ; is different of 0, choose the label type corresponding to n cases for 55 ; the traced by a traitisolines. To specify the type of label of the 59 56 ; colored contour, use LABEL 60 57 ; 61 58 ; @keyword CONTMAX {default=The max of the array passed in the keyword CONTOUR (on ocean points)} 62 ; When CONTOUR is activated, max value we want to consider in the isoline 59 ; When CONTOUR is activated, max value we want to consider in the isoline 63 60 ; traced by a trait's line 64 61 ; 65 62 ; @keyword CONTMIN {default=The min of the array passed in the keyword CONTOUR (on ocean points)} 66 ; When CONTOUR is activated, min value we want to consider in the isoline 63 ; When CONTOUR is activated, min value we want to consider in the isoline 67 64 ; traced by a trait's line. 68 65 ; … … 72 69 ; CONTLABEL=0) 73 70 ; 74 ; @keyword CONTOUR 75 ; If we want to trace contours of a different field than the one 76 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 71 ; @keyword CONTOUR 72 ; If we want to trace contours of a different field than the one 73 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 77 74 ; It must be a field respecting same characteristics than the argument number one of plt. 78 75 ; … … 80 77 ; Comment: In this case, we should use a structure like field. 81 78 ; 82 ; @keyword INTERVALLE 83 ; Value of an internal between to isoline. If there is none specified min, 84 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 85 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 86 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 79 ; @keyword INTERVALLE 80 ; Value of an internal between to isoline. If there is none specified min, 81 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 82 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 83 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 87 84 ; between 2 isolines traced by a trait, use CONTINTERVALLE. 88 85 ; 89 ; @keyword INV 90 ; Invert the color vector used to color the graph 86 ; @keyword INV 87 ; Invert the color vector used to color the graph 91 88 ; (without use the black, the white and the used palette) 92 ; 89 ; 93 90 ; @keyword LABEL {type=integer} 94 ; It is an integer n. If n different of 0, it choose the label's type 95 ; corresponding to cases n. cf label.pro96 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 91 ; It is an integer n. If n different of 0, it choose the label's type 92 ; corresponding to cases n. cf <pro>label</pro> 93 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 97 94 ; For these one traced by a trait, use CONTLABEL. 98 95 ; … … 101 98 ; This keyword can be of two types: 102 99 ; MAP=[P0lat,P0lon,Rot]. For the description of these 3 values (see the online help of MAP_SET). 103 ; /MAP: In this case, map is automatically calculated have the value: 100 ; /MAP: In this case, map is automatically calculated have the value: 104 101 ; map = [0, (lon1+lon2)/2., 0] 105 102 ; Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo: 106 103 ; IDL> demo 107 104 ; Then choose earth sciences and mapping. 108 ; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map). 105 ; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map). 109 106 ; If we want an other projection, MAP must be activated and we have to add the keyword: /nom_projection. 110 107 ; For example, for a polar projection centered on the south pole: … … 115 112 ; Corresponds to label keywords of map_set. 116 113 ; 117 ; @keyword MAXIN 114 ; @keyword MAXIN 118 115 ; to specify the max value we want to plot with a keyword instead of with the 119 116 ; input parameter max. If max is defined by both, parameter and keyword, the 120 117 ; keyword is retained. 121 118 ; 122 ; @keyword MININ 119 ; @keyword MININ 123 120 ; to specify the min value we want to plot with a keyword instead of with the 124 121 ; input parameter min. If min is defined by both, parameter and keyword, the … … 129 126 ; LABEL=0 or is not specified. 130 127 ; 131 ; @keyword NOTRI 132 ; To force not to use the triangulation. Beware, in this case, the 133 ; drawing only works if the grid is undeformed (It means that each point of a longitude 134 ; give one latitude and each point of a latitude give one longitude) except if we use 135 ; the keyword CELL_FILL=2. 128 ; @keyword NOTRI 129 ; To force not to use the triangulation. Beware, in this case, the 130 ; drawing only works if the grid is undeformed (It means that each point of a longitude 131 ; give one latitude and each point of a latitude give one longitude) except if we use 132 ; the keyword CELL_FILL=2. 136 133 ; Comment: if the field contain points !values.f_nan, then we even do a triangulation. 137 134 ; 138 ; @keyword OVERPLOT 139 ; To make a plot over an other one. 140 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 135 ; @keyword OVERPLOT 136 ; To make a plot over an other one. 137 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 141 138 ; does not the caption and/or the color bar. 142 139 ; 143 ; @keyword STRICTFILL 144 ; Activate this keyword to that the filling of contours be 145 ; precisely done between the min and the max specified letting values inferior at the 140 ; @keyword STRICTFILL 141 ; Activate this keyword to that the filling of contours be 142 ; precisely done between the min and the max specified letting values inferior at the 146 143 ; specified min and values superior at the specified max in white. 147 144 ; … … 158 155 ; 159 156 ; @keyword _EXTRA 160 ; used to pass yourkeywords161 ; 162 ; @keyword CONT_NOFILL 163 ; Activate it not to fill the point mask to let them transparent! 157 ; Used to pass keywords 158 ; 159 ; @keyword CONT_NOFILL 160 ; Activate it not to fill the point mask to let them transparent! 164 161 ; Comment: Nevertheless, we trace mask's contour. 165 ; 162 ; 166 163 ; @keyword USETRI 167 164 ; To force using triangulation. 168 ; 169 ; @keyword MASKFILL 170 ; 165 ; 166 ; @keyword MASKFILL 167 ; 171 168 ; @keyword DUPLICATE 172 169 ; … … 176 173 ; common.pro 177 174 ; 178 ; @history 175 ; @history 179 176 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 180 177 ; 7/1999 181 178 ; Sebastien Masson 08/02/2000 checkfield and 182 179 ; notri keyword (or triangule = -1) . 183 ; 180 ; 184 181 ; @version 185 182 ; $Id$ 186 ; 187 ; @todo seb 183 ; 184 ; @todo seb 188 185 ; Changer param "tab1",keyword "REMPLI", "UNLABSUR", "UNSUR2", 189 186 ; "UNVECTSUR"+ quelques trucs dans la routine. 190 187 ;- 191 ;------------------------------------------------------------ 192 ;------------------------------------------------------------ 193 ;------------------------------------------------------------ 194 pro plt, tab1, param2, param3, param4, REALCONT = realcont, CONTOUR = contour $ 188 ; 189 PRO plt, tab1, param2, param3, param4, REALCONT = realcont, CONTOUR = contour $ 195 190 , INTERVALLE = intervalle, INV = inv, GRIDTYPE = gridtype, BOXZOOM = boxzoom $ 196 191 , CONTINTERVALLE = contintervalle, LABEL = label, CONTLABEL = contlabel $ … … 201 196 , DUPLICATE = duplicate, STRICTFILL = strictfill, OVERPLOT = overplot $ 202 197 , DECIMATETRI = decimatetri, LABMAP = labmap, _extra = ex 203 ;---------------------------------------------------------204 ; include common205 198 ; 206 199 compile_opt idl2, strictarrsubs … … 239 232 if n_elements(param3) NE 0 then min = param3 240 233 if n_elements(param4) NE 0 then max = param4 241 if n_elements(minin) NE 0 then min = minin 234 if n_elements(minin) NE 0 then min = minin 242 235 if n_elements(maxin) NE 0 then max = maxin 243 236 checktypeminmax, 'plt', TYPE = type, MIN = min, MAX = max, _extra = ex 244 z2d = checkfield(tab1, 'plt', TYPE = type, BOXZOOM = boxzoom, DIREC = direc, VECTEUR = vecteur, _extra = ex) 245 if z2d[0] EQ -1 then BEGIN 237 z2d = checkfield(tab1, 'plt', TYPE = type, BOXZOOM = boxzoom, DIREC = direc, VECTEUR = vecteur, _extra = ex) 238 if z2d[0] EQ -1 then BEGIN 246 239 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt.dat' 247 240 return … … 249 242 IF n_elements(usetri) EQ 0 THEN BEGIN 250 243 ; do we have holes in the triangulation? 251 holeintri = n_elements(triangles_list)/3 LT (jpi-1+keyword_set(key_periodic))*(jpj-1)*2 ; -> the triangulation must be used to draw the field 244 holeintri = n_elements(triangles_list)/3 LT (jpi-1+keyword_set(key_periodic))*(jpj-1)*2 ; -> the triangulation must be used to draw the field 252 245 ; do we have a triangulation? 253 246 wehavetri = triangles_list[0] NE -1 ; -> the triangulation must be used to draw the continents … … 260 253 'F':nx = nxf 261 254 ENDCASE 262 mapperio = keyword_set(map)*keyword_set(key_periodic)*(nx eq jpi) 255 mapperio = keyword_set(map)*keyword_set(key_periodic)*(nx eq jpi) 263 256 usetri = (wehavetri*(wehavetri+holeintri+mapperio+keyword_set(key_irregular))) < 2 264 257 IF n_elements(notri) NE 0 THEN usetri = 0 > (2-notri) … … 273 266 ;--------------------------------------------------------------- 274 267 IF strupcase(vargrid) EQ 'W' THEN profond = firstzw NE 0 $ 275 ELSE profond = firstzt NE 0 268 ELSE profond = firstzt NE 0 276 269 ; do we need to extract now the triangulation that will be use for 277 270 ; contouring the field? … … 288 281 ENDELSE 289 282 ;---------------------------------------------------------------------------- 290 ; I5 determination of the mi:min and of the ma:max of z2d in the same way 283 ; I5 determination of the mi:min and of the ma:max of z2d in the same way 291 284 ; as max: max and min: min for the drawing. 292 285 ;----------------------------------------------------------------------------- 293 286 masknan = finite(z2d) 294 nan = total(masknan) NE n_elements(z2d) 287 nan = total(masknan) NE n_elements(z2d) 295 288 ; Do we need to do an autoscale ??? 296 289 autoscale = testvar(var = min) EQ testvar(var = max) AND NOT keyword_set(intervalle) … … 302 295 ;-------------------------------------------------------------- 303 296 ;-------------------------------------------------------------- 304 ; II) We put the drawing in its place on the window or the page 297 ; II) We put the drawing in its place on the window or the page 305 298 ; and possible opening of the window or of the page. 306 299 ;-------------------------------------------------------------- … … 361 354 ;---------------------------------------------------------- 362 355 ; check mask and triangulation according to the grid type and NaN 363 ;---------------------------------------------------------- 364 ; If we make a drawing at depth, we must redefine a triangulation 356 ;---------------------------------------------------------- 357 ; If we make a drawing at depth, we must redefine a triangulation 365 358 ; on the zoom because the land/sea mask at depth may differ from 366 359 ; the one at the surface. … … 385 378 ; IF n_elements(twin_corners_up) EQ 0 THEN coinmontemask = -1 ELSE coinmontemask = twin_corners_up 386 379 ; IF n_elements(twin_corners_dn) EQ 0 THEN coindescendmask = -1 ELSE coindescendmask = twin_corners_dn 387 if vargrid EQ 'T' OR vargrid EQ 'W' then BEGIN 380 if vargrid EQ 'T' OR vargrid EQ 'W' then BEGIN 388 381 glammsk = glam 389 382 gphimsk = gphi 390 383 ENDIF ELSE begin 391 ; decoupe terre: To draw the coast in a clean way, we try to take additionally 384 ; decoupe terre: To draw the coast in a clean way, we try to take additionally 392 385 ; points to draw the land. Like that, we do not see gap between T and U/V/F grid. 393 386 ; It is what decoupeterre do. We also redefine trimsk. … … 402 395 ;------------------------------------------------------------ 403 396 typetrace = 'classique' 404 if keyword_set(map) AND key_onearth then BEGIN 397 if keyword_set(map) AND key_onearth then BEGIN 405 398 ; Call of mapset when we want to do projections. 406 399 IF n_elements(map) NE 3 THEN map = [0, ((lon1+lon2)/2.) MOD 360, 0] … … 410 403 map_rot = map[2] 411 404 if chkstru(ex, 'TITLE') then begin 412 maptitre = ex.title 405 maptitre = ex.title 413 406 ex.title = '' 414 407 endif … … 418 411 if n_elements(trifield) GE 2 then trifield = ciseauxtri(trifield, glam, gphi, _EXTRA = ex) 419 412 if n_elements(trimsk) GE 2 then trimsk = ciseauxtri(trimsk, glammsk, gphimsk, _EXTRA = ex) 420 if n_elements(trinan) GE 2 then BEGIN 413 if n_elements(trinan) GE 2 then BEGIN 421 414 trinan = ciseauxtri(trinan, glam, gphi, _EXTRA = ex) 422 415 if trinan[0] EQ -1 then undefine, trinan 423 416 endif 424 ENDIF ELSE BEGIN 417 ENDIF ELSE BEGIN 425 418 ;To axes of coordinates be considerated. 426 419 if !x.type EQ 0 AND n_elements(contour) LE 4 then $ 427 plot, [0], [0], /nodata, xstyle = 5, ystyle = 5, title = '', subtitle = '', /noerase 420 plot, [0], [0], /nodata, xstyle = 5, ystyle = 5, title = '', subtitle = '', /noerase 428 421 if keyword_set(key_periodic) then BEGIN 429 ; In this case, triangulation is closed in x and cover all the sphere. 422 ; In this case, triangulation is closed in x and cover all the sphere. 430 423 ; We have to cut it at the level where we cut the sphere to make the drawing. 431 424 if n_elements(trifield) GE 2 then trifield = ciseauxtri(trifield, glam, gphi, _EXTRA = ex) … … 461 454 , Connout, vertices = Vertsout $ 462 455 , percent_vertices = decimatetri) 463 connout = reform(connout, 4, n_elements(connout)/4, /over) 456 connout = reform(connout, 4, n_elements(connout)/4, /over) 464 457 trifield = (temporary(connout))[1:3, *] 465 458 glam = reform(Vertsout[0, *]) … … 467 460 z2d = reform(Vertsout[2, *]) 468 461 undefine, Vertsout 469 print, 'temps decimatetri', systime(1)-tempsdeux 462 print, 'temps decimatetri', systime(1)-tempsdeux 470 463 ENDIF 471 464 pltbase, z2d, glam, gphi $ … … 486 479 return 487 480 endif 488 if keyword_set(contour) THEN BEGIN 481 if keyword_set(contour) THEN BEGIN 489 482 pourlegende = [1, 1, 1, 1] 490 483 oldattributs = saveatt() … … 507 500 ; V1) Possible add of vectors in double exposure. 508 501 ;------------------------------------------------------------ 509 if keyword_set(vecteur) then BEGIN 502 if keyword_set(vecteur) then BEGIN 510 503 oldattributs = saveatt() 511 504 ajoutvect, vecteur, vectlegende, _extra = ex … … 545 538 ;------------------------------------------------------------ 546 539 legende, mi, ma, 'xy', CONTOUR = pourlegende, VECTLEGENDE = vectlegende, INTERVALLE = intervalle, DIREC = direc, _EXTRA = ex 547 if n_elements(ex) NE 0 then BEGIN 540 if n_elements(ex) NE 0 then BEGIN 548 541 ; To keep frame's axes in black 549 542 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = coast_color … … 553 546 'classique': $ 554 547 plot, [0], [0], /nodata, /noerase, color = 0, xstyle = 1, ystyle = 1, _extra = ex 555 'projection': BEGIN 548 'projection': BEGIN 556 549 if chkstru(ex, 'NOERASE') then begin 557 550 oldnoerase = ex.noerase … … 592 585 sortie: 593 586 if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt.dat' 594 if keyword_set(key_performance) NE 0 THEN print, 'temps plt', systime(1)-tempsun 587 if keyword_set(key_performance) NE 0 THEN print, 'temps plt', systime(1)-tempsun 595 588 ;------------------------------------------------------------ 596 589 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/plt1d.pro
r172 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; … … 8 7 ; Graphics 9 8 ; 10 ; @param TAB {in}{required} 9 ; @param TAB {in}{required} 11 10 ; The field whose we want to make the hovmoller map can be 2 kind of thing: 12 11 ; 1) An array which can be: 13 ; * 2d, 3d or 4d: array xy, xyz. xyt or xyzt. In this case, the array will pass 14 ; in moyenne or grossemoyenne to be averaged and become an array 1d. 15 ; * 1d:Nevertheless, the type must be specified in order to we know which trace 12 ; * 2d, 3d or 4d: array xy, xyz. xyt or xyzt. In this case, the array will pass 13 ; in moyenne or grossemoyenne to be averaged and become an array 1d. 14 ; * 1d:Nevertheless, the type must be specified in order to we know which trace 16 15 ; it is about. To have a correct caption, respecify the extraction zone via BOXZOOM. 17 ; 2) a structure respecting all criterions specified by litchamp.pro.18 ; See IDL> xhelp,'litchamp'. The array contained in the structure 19 ; respecting criterions of case 1) 20 ; 21 ; @param PARAM2 {in}{required} 16 ; 2) a structure respecting all criterions specified by <pro>litchamp</pro> 17 ; See IDL> xhelp,'litchamp'. The array contained in the structure 18 ; respecting criterions of case 1) 19 ; 20 ; @param PARAM2 {in}{required} 22 21 ; Min value we want to consider in the contour's drawing. 23 22 ; Note: could also be the type of plot:'x','y','z' 24 ; 25 ; @param PARAM3 {in}{optional}{default=min/max of tab (on ocean points)} 23 ; 24 ; @param PARAM3 {in}{optional}{default=min/max of tab (on ocean points)} 26 25 ; Max value we want to consider in the contour's drawing. 27 26 ; Note: if param2 is defined as 'x','y','z' then param3 is used to define the min (see param2) 28 27 ; 29 ; @param PARAM4 {in}{optional}{default=max of tab (on ocean points)} 28 ; @param PARAM4 {in}{optional}{default=max of tab (on ocean points)} 30 29 ; Type of plot (can be only 'x','y','z' for plt1d). 31 30 ; Note: if param2 is defined as 'xy' then param4 is used to define the max (see param3) 32 31 ; 33 32 ; @keyword BOXZOOM 34 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 33 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 35 34 ; be done to do the hovmoeller. 36 35 ; If BOXZOOM has : … … 44 43 ; 45 44 ; @keyword COL1d 46 ; --OBSOLETE--Color number when we make a trace 1d by default, 0.It is better to use the 47 ; keyword COLOR used by plot. 48 ; 49 ; @keyword ENDPOINTS 50 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 51 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 52 ; coordinates. 53 ; 54 ; @keyword MAXIN 55 ; Allows to specify the max value we want to consider in the drawing of contour 56 ; helping by the keyword instead of the argument max. If the argument and the keyword are 57 ; specified in the same time, it is the value specified by the keyword which is retained. 58 ; 59 ; @keyword MININ 60 ; Allows to specify the min value we want to consider in the drawing of contour 61 ; helping by the keyword instead of the argument min. If the argument and the keyword are 62 ; specified in the same time, it is the value specified by the keyword which is retained. 45 ; --OBSOLETE--Color number when we make a trace 1d by default, 0. 46 ; It is better to use the keyword COLOR used by plot. 47 ; 48 ; @keyword ENDPOINTS 49 ; keyword specifying that we want to make a vertical cut in diagonal. 50 ; Then coordinated of extremities of these one are defined by the 4 elements 51 ; of the vector ENDPOINTS: [x1,y1,x2,y2] which are coordinates. 52 ; 53 ; @keyword MAXIN 54 ; Allows to specify the max value we want to consider in the drawing of contour 55 ; helping by the keyword instead of the argument max. 56 ; If the argument and the keyword are specified in the same time, it is the 57 ; value specified by the keyword which is retained. 58 ; 59 ; @keyword MININ 60 ; Allows to specify the min value we want to consider in the drawing of contour 61 ; helping by the keyword instead of the argument min. 62 ; If the argument and the keyword are specified in the same time, it is the 63 ; value specified by the keyword which is retained. 63 64 ; 64 65 ; @keyword OV1D 65 66 ; Allow the double exposure of an 1d curve to a precedent 1d trace. 66 67 ; 67 ; @keyword REVERSE_X 68 ; @keyword REVERSE_X 68 69 ; To invert the x axis (so as the drawing) 69 70 ; 70 ; @keyword REVERSE_Y 71 ; @keyword REVERSE_Y 71 72 ; To invert the y axis (so as the drawing) 72 73 ; 73 ; @keyword SIN 74 ; Activate this keyword if we want the x axis to be traced in sinus of the 74 ; @keyword SIN 75 ; Activate this keyword if we want the x axis to be traced in sinus of the 75 76 ; latitude when we make a drawing f(y) 76 77 ; 77 ; @keyword STY1D 78 ; @keyword STY1D 78 79 ; --OBSOLETE-- 79 ; Number of the style used when we make a 1d drawing. We should better use the 80 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 80 ; Number of the style used when we make a 1d drawing. We should better use the 81 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 81 82 ; useful if we want to d bars instead of curves, put sty1d='bar' 82 83 ; 83 84 ; @keyword TYPEIN 84 85 ; allows to specify the type of hovmoller we want to do 85 ; 'xt','yt','zt','t' 86 ; with help of a keyword rather than the argument type. If the argument and the 87 ; keyword are specified in the same time, it is the value specified by the 86 ; 'xt','yt','zt','t' 87 ; with help of a keyword rather than the argument type. If the argument and the 88 ; keyword are specified in the same time, it is the value specified by the 88 89 ; keyword which is retained. 89 90 ; 90 ; @keyword _EXTRA 91 ; used to pass yourkeywords92 ; 93 ; @history 94 ; creation 24/6/99 Eric Guilyardi 91 ; @keyword _EXTRA 92 ; Used to pass keywords 93 ; 94 ; @history 95 ; creation 24/6/99 Eric Guilyardi 95 96 ; (a partir routine pltt de Sebastien Masson) 96 ; 8/7/1999 Sebastien Masson (smasson\@lodyc.jussieu.fr) 97 ; 8/7/1999 Sebastien Masson (smasson\@lodyc.jussieu.fr) 97 98 ; inspection des travaux finis 98 99 ; 8/2/2000 Sebastien Masson: checkfield 99 100 ; 100 ; @version 101 ; @version 101 102 ; $Id$ 102 103 ; 103 104 ;- 104 ;------------------------------------------------------------ 105 ;------------------------------------------------------------ 106 ;------------------------------------------------------------ 107 pro plt1d, tab, param2, param3, param4, BOXZOOM = boxzoom, SIN = sin $ 105 ; 106 PRO plt1d, tab, param2, param3, param4, BOXZOOM = boxzoom, SIN = sin $ 108 107 , MININ = minin, MAXIN = maxin, TYPEIN = typein, ENDPOINTS = endpoints $ 109 108 , COL1D = col1d, STY1D = sty1d, OV1D = ov1d, X = x, Y = y, Z = z, TT = tt $ … … 137 136 if n_elements(maxin) NE 0 then max = maxin 138 137 if keyword_set(tt) then typein = 't' 139 if keyword_set(typein) then BEGIN 138 if keyword_set(typein) then BEGIN 140 139 if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 141 140 if n_elements(min) NE 0 then max = min … … 146 145 ; 147 146 checktypeminmax, 'plt1d', TYPE = type, MIN = min, MAX = max, ENDPOINTS = endpoints $ 148 , XX = keyword_set(x), YY = keyword_set(y), ZZ = keyword_set(z) 147 , XX = keyword_set(x), YY = keyword_set(y), ZZ = keyword_set(z) 149 148 if type EQ 't' then BEGIN 150 149 pltt, tab, type, min, max, BOXZOOM = boxzoom, SIN = sin, TYPEIN = typein $ … … 168 167 section, tab, z1d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 169 168 , BOXZOOM = boxzoom, DIREC = direc 170 nx = n_elements(glam) 169 nx = n_elements(glam) 171 170 ny = nx 172 171 if strupcase(vargrid) EQ 'W' then begin … … 177 176 nz = nzt 178 177 ENDELSE 179 ENDIF ELSE BEGIN 178 ENDIF ELSE BEGIN 180 179 z1d = checkfield(tab, 'plt1d', TYPE = type, BOXZOOM = boxzoom $ 181 180 , direc = direc, _extra = ex) 182 181 grille, mask, glam, gphi, gdep, nx, ny, nz, type = type 183 182 ENDELSE 184 if z1d[0] EQ -1 then BEGIN 183 if z1d[0] EQ -1 then BEGIN 185 184 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4plt1d.dat' 186 185 return 187 186 endif 188 ; We build the mask. For this, the array must be hidden (Automaticaly done at valmask 187 ; We build the mask. For this, the array must be hidden (Automaticaly done at valmask 189 188 ; value if we pass in moyenne or grossemoyenne) 190 189 mask = fltarr(n_elements(z1d)) … … 212 211 ;----------------------------------------------------------------------------- 213 212 ; definition of the abscisse and ordinate vectors. 214 ; The triangulation is defined in order to the drawing be done from the 215 ; left bottom to the right up. So the matrix have to be shown like this, 213 ; The triangulation is defined in order to the drawing be done from the 214 ; left bottom to the right up. So the matrix have to be shown like this, 216 215 ; from which some transpose and reverse 217 216 ;----------------------------------------------------------------------------- … … 220 219 'y': begin 221 220 yy = z1d 222 IF (size(gphi))[0] EQ 1 then xx = gphi ELSE BEGIN 223 IF keyword_set(key_irregular) THEN BEGIN 221 IF (size(gphi))[0] EQ 1 then xx = gphi ELSE BEGIN 222 IF keyword_set(key_irregular) THEN BEGIN 224 223 cln = (where(gphi EQ max(gphi)))[0] 225 224 xx = reform(gphi[cln MOD nx, *]) … … 233 232 xx = glam[*, 0] 234 233 min0 = lon1 & max0 = lon2 235 END 234 END 236 235 'z':begin 237 236 yy = reverse(gdep, 1) … … 247 246 endcase 248 247 if NOT keyword_set(ov1d) then !y.range = reverse(!y.range) 249 END 250 ENDCASE 248 END 249 ENDCASE 251 250 ;----------------------------------------------------------- 252 251 ;----------------------------------------------------------- … … 263 262 if type EQ 'z' then begin 264 263 idx = where(xx NE valmask) 265 if NOT keyword_set(ov1d) then BEGIN 264 if NOT keyword_set(ov1d) then BEGIN 266 265 if min EQ mi then !x.range = [min-abs(max-min)/5., max+abs(max-min)/5.] $ 267 266 ELSE !x.range = [min, max] 268 267 ENDIF 269 ENDIF ELSE BEGIN 268 ENDIF ELSE BEGIN 270 269 idx = where(yy NE valmask) 271 if NOT keyword_set(ov1d) then BEGIN 270 if NOT keyword_set(ov1d) then BEGIN 272 271 if min EQ mi then !y.range = [min-abs(max-min)/5., max+abs(max-min)/5.] $ 273 272 ELSE !y.range = [min, max] 274 273 ENDIF 275 ENDELSE 276 ; 277 if NOT keyword_set(ov1d) then BEGIN 274 ENDELSE 275 ; 276 if NOT keyword_set(ov1d) then BEGIN 278 277 legende, mi, ma, type, CONTOUR = contour, DIREC = direc, ENDPOINTS = endpoints, _EXTRA = ex 279 278 ; … … 283 282 xx = yy 284 283 yy = temporary(tmp) 285 if NOT keyword_set(ov1d) then BEGIN 284 if NOT keyword_set(ov1d) then BEGIN 286 285 tmp = !x 287 286 !x = !y … … 289 288 ENDIF 290 289 ENDIF 291 if NOT keyword_set(ov1d) then BEGIN 290 if NOT keyword_set(ov1d) then BEGIN 292 291 if keyword_set(reverse_x) then !x.range = reverse(!x.range) 293 292 if keyword_set(reverse_y) then !y.range = reverse(!y.range) … … 299 298 if keyword_set(sty1d) then BEGIN ;If we want to make bars 300 299 IF strlowcase(strtrim(sty1d)) EQ 'bar' then begin 301 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05, !y.range[1]] 300 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05, !y.range[1]] 302 301 bar_plot, yy, background = (!d.n_colors-1) < 255, $ 303 302 baselines = replicate(!y.range[0], n_elements(yy)), barnames = ['', ''], $ 304 303 colors = replicate(col1d, n_elements(yy)), /outline 305 if n_elements(ex) NE 0 then BEGIN 304 if n_elements(ex) NE 0 then BEGIN 306 305 ; To have a black frame 307 306 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 309 308 plot, [0], [0], /noerase, /nodata, _extra = ex 310 309 GOTO, fini 311 ENDIF 312 ENDIF 313 ; 314 if NOT keyword_set(ov1d) then BEGIN 310 ENDIF 311 ENDIF 312 ; 313 if NOT keyword_set(ov1d) then BEGIN 315 314 ; 316 315 plot, xx, yy, color = col1d, linestyle = sty1d, thick = 2, title = '', subtitle = '', _extra = ex 317 if n_elements(ex) NE 0 then BEGIN 316 if n_elements(ex) NE 0 then BEGIN 318 317 ; To have a 0 colored frame and trace a line at y=0 319 318 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 340 339 ;------------------------------------------------------------ 341 340 if n_elements(key_performance) NE 0 then $ 342 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 341 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 343 342 ;------------------------------------------------------------ 344 343 ;------------------------------------------------------------ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltbase.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 93 90 ; 94 91 ; @keyword _EXTRA 95 ; Used to pass yourkeywords92 ; Used to pass keywords 96 93 ; 97 94 ; @uses … … 113 110 ; 114 111 ;- 115 ;------------------------------------------------------------ 116 ;------------------------------------------------------------ 117 ;------------------------------------------------------------ 112 ; 118 113 PRO pltbase, z2d, x, y, mask, xm, ym, levels, colors, UNSUR2 = unsur2, CONTOUR = contour $ 119 114 , NOCONTOUR = nocontour, NOFILL = nofill $ -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltsc.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param TAB1 9 7 ; 10 ;11 8 ; @param TAB2 12 ;13 9 ; 14 10 ; @param MIN1 15 11 ; 16 ;17 12 ; @param MAX1 18 ;19 13 ; 20 14 ; @param MIN2 21 15 ; 22 ;23 16 ; @param MAX2 24 ;25 17 ; 26 18 ; @param VARNAME2 27 19 ; 28 ;29 20 ; @keyword BOXZOOM 30 ; Vector indicating the geographic zone on which we want to cut the map. 21 ; Vector indicating the geographic zone on which we want to cut the map. 31 22 ; If BOXZOOM has : 32 23 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 38 29 ; @keyword COL1D 39 30 ; 40 ;41 31 ; @keyword STY1D 42 ;43 32 ; 44 33 ; @keyword OV1D 45 34 ; 46 ;47 35 ; @keyword _EXTRA 48 ; Used to pass yourkeywords36 ; Used to pass keywords 49 37 ; 50 38 ; @returns 51 39 ; 52 ;53 40 ; @uses 54 ;55 41 ; 56 42 ; @restrictions 57 43 ; 58 ;59 44 ; @examples 60 45 ; 61 ;62 46 ; @history 63 ;64 47 ; 65 48 ; @version … … 74 57 ; scatter plot (inspired from plt1d) 75 58 ; 76 ;77 59 compile_opt idl2, strictarrsubs 78 60 ; 79 80 ;---------------------------------------------------------81 ; include common82 61 @cm_4mesh 83 62 @cm_4data … … 86 65 @updatekwd 87 66 ENDIF 88 ;--------------------------------------------------------------89 67 90 68 ; Comment: We do not reinitializate when we call back pltsc … … 92 70 ;; reduce data xyzt domain 93 71 94 if keyword_set(boxzoom) then BEGIN 72 if keyword_set(boxzoom) then BEGIN 95 73 Case 1 Of 96 74 N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]] … … 100 78 N_Elements(Boxzoom) Eq 6:bte = Boxzoom 101 79 Else: Begin 102 ras = report('Wrong Definition of Boxzoom') 80 ras = report('Wrong Definition of Boxzoom') 103 81 return 104 82 End … … 122 100 IF finite(min2) EQ 0 THEN min2 = min(tab2) 123 101 IF finite(max2) EQ 0 THEN max2 = max(tab2) 124 102 125 103 126 104 ; init plot if not overlay 127 105 128 106 IF NOT keyword_set(ov1d) THEN placedessin, 'yfx', posfenetre, posbar, $ 129 107 contour = contour, _extra = ex … … 137 115 IF (NOT keyword_set(sty1d)) THEN sty1d = 0 138 116 IF (NOT keyword_set(col1d)) THEN col1d = 0 139 IF NOT keyword_set(ov1d) THEN BEGIN 140 legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA = ex 117 IF NOT keyword_set(ov1d) THEN BEGIN 118 legende, min1, max1, 'yfx', VARNAME2 = varname2, NPTS = npts, _EXTRA = ex 141 119 ; 142 120 plot,xx,yy, background = 255, psym = sty1d+1, color=col1d, thick=2 $ 143 121 , title = '', subtitle = '',_extra = ex 144 122 145 if n_elements(ex) NE 0 then BEGIN 123 if n_elements(ex) NE 0 then BEGIN 146 124 ; To have a 0 colored frame and trace a line at y=0 147 125 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 162 140 ;------------------------------------------------------------ 163 141 if n_elements(key_performance) NE 0 then $ 164 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 142 IF key_performance EQ 1 THEN print, 'temps plt1d', systime(1)-tempsun 165 143 ;------------------------------------------------------------ 166 144 ;------------------------------------------------------------ … … 168 146 return 169 147 end 170 171 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro
r192 r231 1 ;------------------------------------------------------------2 1 ;+ 3 2 ; 4 ; @file_comments 3 ; @file_comments 5 4 ; Trace hovmoller graphs: xt,yt,zt,t 6 5 ; 7 6 ; @categories Graphics 8 7 ; 9 ; @param TAB {in}{required} 8 ; @param TAB {in}{required} 10 9 ; The field whose we want to make the hovmoller map can be 2 kind of thing: 11 10 ; 1) An array which can be: 12 ; * 3d or 4d: array 'xt','yt','zt','t'. The last component is the time. In this case, the array will 11 ; * 3d or 4d: array 'xt','yt','zt','t'. The last component is the time. In this case, the array will 13 12 ; pass in grossemoyenne to be averaged and become an 1d or 2d array. 14 ; * 2d: If the array is already 2d, it is not modified (beware, lands must 15 ; be masked at the value valmask) and nevertheless,type must be specified 13 ; * 2d: If the array is already 2d, it is not modified (beware, lands must 14 ; be masked at the value valmask) and nevertheless,type must be specified 16 15 ; to we know of which trace it is about. 17 16 ; To have a correct caption, respecify the extraction zone via BOXZOOM. 18 ; * 1d: only for traces of the 't' type. Nevertheless, type must be specified 17 ; * 1d: only for traces of the 't' type. Nevertheless, type must be specified 19 18 ; to we know of which trace it is about. 20 19 ; To have a correct caption, respecify the extraction zone via BOXZOOM. 21 ; 2) a structure respecting all criterions specified by litchamp.pro.22 ; See IDL> xhelp,'litchamp'. The array contained in the structure 23 ; respecting criterions of case 1) 24 ; 20 ; 2) a structure respecting all criterions specified by <pro>litchamp</pro> 21 ; See IDL> xhelp,'litchamp'. The array contained in the structure 22 ; respecting criterions of case 1) 23 ; 25 24 ; PARAM: 26 25 ; MAX: valeur maximum que l''on veut prendre en compte dans le trace … … 38 37 ; 39 38 ; @keyword BOXZOOM 40 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 39 ; Vector indicating the geographic zone (3d) on which the extraction of the field must 41 40 ; be done to do the hovmoeller. 42 41 ; If BOXZOOM has : … … 49 48 ; Where lon1, lon2,lat1,lat2,vert1,vert2 are global variables defined at the last domdef! 50 49 ; 51 ; @keyword CONTINTERVALLE 52 ; When CONTOUR is activated, it is the value between 2 isolines 53 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 54 ; in this case, does not control colored isolines in color anymore. If there is noone 55 ; specified min, we choose a contour min which goes well with the specified interval! 56 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 50 ; @keyword CONTINTERVALLE 51 ; When CONTOUR is activated, it is the value between 2 isolines 52 ; traced by a trait. So it can be different from the one specified by INTERVALLE which, 53 ; in this case, does not control colored isolines in color anymore. If there is noone 54 ; specified min, we choose a contour min which goes well with the specified interval! 55 ; If this keyword is not specified, we trace 20 isolines from the min to the max. 57 56 ; 58 57 ; @keyword CONTLABEL {type=integer} 59 58 ; When CONTOUR is activated, if n 60 ; is different of 0, choose the label type corresponding to n cases for 61 ; the traced by a traitisolines. To specify the type of label of the 59 ; is different of 0, choose the label type corresponding to n cases for 60 ; the traced by a traitisolines. To specify the type of label of the 62 61 ; colored contour, use LABEL 63 62 ; 64 63 ; @keyword CONTMAX {default=we take the max of the array passed in the keyword CONTOUR (on ocean points)} 65 ; When CONTOUR is activated, max value we want to consider in the isoline 66 ; traced by a trait's line. 64 ; When CONTOUR is activated, max value we want to consider in the isoline 65 ; traced by a trait's line. 67 66 ; 68 67 ; @keyword CONTMIN {default=we take the min of the array passed in the keyword CONTOUR (on ocean points)} 69 ; When CONTOUR is activated, min value we want to consider in the isoline 70 ; traced by a trait's line. 68 ; When CONTOUR is activated, min value we want to consider in the isoline 69 ; traced by a trait's line. 71 70 ; 72 71 ; @keyword CONTNLEVEL {default=20} … … 75 74 ; CONTLABEL=0). 76 75 ; 77 ; @keyword CONTOUR 78 ; If we want to trace contours of a different field than the one 79 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 76 ; @keyword CONTOUR 77 ; If we want to trace contours of a different field than the one 78 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 80 79 ; It must be a field respecting same characteristics than the argument number one of pltt. 81 80 ; 82 ; @keyword ENDPOINTS 83 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 84 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 85 ; coordinates. 81 ; @keyword ENDPOINTS 82 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 83 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 84 ; coordinates. 86 85 ; 87 86 ; @keyword EXCHANGE_XY 88 87 ; Allows to invert axes. 89 ; 88 ; 90 89 ; @keyword FILTER 91 90 ; Apply a slippery average of width FILTER 92 ; 93 ; @keyword INTERVALLE 94 ; Value of an internal between to isoline. If there is none specified min, 95 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 96 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 97 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 91 ; 92 ; @keyword INTERVALLE 93 ; Value of an internal between to isoline. If there is none specified min, 94 ; we choose a min contour which goes well with the specified interval!. If this keyword is not 95 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 96 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 98 97 ; between 2 isolines traced by a trait, use CONTINTERVALLE. 99 98 ; 100 ; @keyword INV 101 ; Invert the color vector used to color the graph 99 ; @keyword INV 100 ; Invert the color vector used to color the graph 102 101 ; (without use the black, the white and the used palette) 103 ; 102 ; 104 103 ; @keyword LABEL {type=integer} 105 ; If n different of 0, it choose the label's type 106 ; corresponding to cases n. cf label.pro107 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 108 ; For these one traced by a trait, use CONTLABEL. 104 ; If n different of 0, it choose the label's type 105 ; corresponding to cases n. cf <pro>label</pro> 106 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 107 ; For these one traced by a trait, use CONTLABEL. 109 108 ; 110 109 ; @keyword COL1d 111 ; --OBSOLETE--Color number when we make a trace 1d by default, 0.It is better to use the 110 ; --OBSOLETE--Color number when we make a trace 1d by default, 0.It is better to use the 112 111 ; keyword COLOR used by plot. 113 112 ; 114 ; @keyword MAXIN 113 ; @keyword MAXIN 115 114 ; to specify the max value we want to plot with a keyword instead of with the 116 115 ; input parameter max. If max is defined by both, parameter and keyword, the 117 116 ; keyword is retained. 118 117 ; 119 ; @keyword MININ 118 ; @keyword MININ 120 119 ; to specify the min value we want to plot with a keyword instead of with the 121 120 ; input parameter min. If min is defined by both, parameter and keyword, the … … 131 130 ; CONTLABEL=0). 132 131 ; 133 ; @keyword OV1D 132 ; @keyword OV1D 134 133 ; Allows to overprint a 1d curve over a precedent 1d drawing. 135 134 ; 136 ; @keyword OVERPLOT 137 ; To make a plot over an other one. 138 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 135 ; @keyword OVERPLOT 136 ; To make a plot over an other one. 137 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 139 138 ; does not the caption and/or the color bar. 140 139 ; 141 ; @keyword STRICTFILL 142 ; Activate this keyword to that the filling of contours be 143 ; precisely done between the min and the max specified letting values inferior at the 140 ; @keyword STRICTFILL 141 ; Activate this keyword to that the filling of contours be 142 ; precisely done between the min and the max specified letting values inferior at the 144 143 ; specified min and values superior at the specified max in white. 145 144 ; … … 147 146 ; Contour's style to adopt to draw isolines 148 147 ; 149 ; @keyword STY1D 148 ; @keyword STY1D 150 149 ; --OBSOLETE-- 151 ; Number of the style used when we make a 1d drawing. We should better use the 152 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 150 ; Number of the style used when we make a 1d drawing. We should better use the 151 ; keyword LINESTYLE which is tho one of the plot. Beware, this keyword is still 153 152 ; useful if we want to d bars instead of curves, put sty1d='bar' 154 153 ; 155 154 ; @keyword TREND_TYPE 156 ; Modify field by calling trends.pro155 ; Modify field by calling <pro>trends</pro> 157 156 ; 158 157 ; @keyword TYPEIN 159 158 ; allows to specify the type of hovmoller we want to do 160 ; 'xt','yt','zt','t' 161 ; with help of a keyword rather than the argument type. If the argument and the 162 ; keyword are specified in the same time, it is the value specified by the 159 ; 'xt','yt','zt','t' 160 ; with help of a keyword rather than the argument type. If the argument and the 161 ; keyword are specified in the same time, it is the value specified by the 163 162 ; keyword which is retained. 164 163 ; 165 164 ; @keyword _EXTRA 166 ; Used to pass yourkeywords165 ; Used to pass keywords 167 166 ; 168 167 ; @uses 169 168 ; common.pro 170 169 ; 171 ; @history 170 ; @history 172 171 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 173 172 ; 27/5/98 … … 177 176 ; 15/1/98 178 177 ; Adaptation for arrays 3 and 4d to the average be done in pltt rather than during the reading. 179 ; Sebastien Masson 14/8/98 180 ; 7/1999 178 ; Sebastien Masson 14/8/98 179 ; 7/1999 181 180 ; Eric Guilyardi 29/7/99 FILTER, TREND_TYPE, 182 ; REPEAT_C 181 ; REPEAT_C 183 182 ; Sebastien Masson 08/02/2000 checkfield and 184 183 ; usetri keyword. 185 ; 186 ; @version 184 ; 185 ; @version 187 186 ; $Id$ 188 187 ; 189 188 ; @todo seb: L.24 à 36, L.426 à 427, L. 492 à 493 190 189 ;- 191 ;------------------------------------------------------------ 192 ;------------------------------------------------------------ 193 ;------------------------------------------------------------ 190 ; 194 191 pro pltt,tab,giventype,givenmin,givenmax,datmin,datmax,BOXZOOM = boxzoom, CONTOUR=contour $ 195 192 ,ENDPOINTS=endpoints,INTERVALLE=intervalle,INV=inv $ … … 203 200 , EXCHANGE_XY = exchange_xy $ 204 201 , _extra = ex 205 ;---------------------------------------------------------206 ; include common207 202 ; 208 203 compile_opt idl2, strictarrsubs … … 237 232 if n_elements(minin) NE 0 then min = minin 238 233 if n_elements(maxin) NE 0 then max = maxin 239 if keyword_set(typein) then BEGIN 234 if keyword_set(typein) then BEGIN 240 235 if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 241 236 if n_elements(min) NE 0 then max = min … … 251 246 section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 252 247 , BOXZOOM = boxzoom, DIREC = direc 253 nx = n_elements(glam) 248 nx = n_elements(glam) 254 249 ny = nx 255 250 if strupcase(vargrid) EQ 'W' then begin … … 260 255 nz = nzt 261 256 ENDELSE 262 ENDIF ELSE BEGIN 257 ENDIF ELSE BEGIN 263 258 z2d = checkfield(tab, 'pltt', TYPE = type, BOXZOOM = boxzoom $ 264 259 , direc = direc, _extra = ex) 265 if z2d[0] EQ -1 then BEGIN 260 if z2d[0] EQ -1 then BEGIN 266 261 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltt.dat' 267 262 return … … 278 273 279 274 ;--------------------------------------------------------------- 280 ; Filtering of fields in the 't' case. 281 ;--------------------------------------------------------------- 282 283 IF type EQ 't' AND keyword_set(filter) THEN BEGIN 275 ; Filtering of fields in the 't' case. 276 ;--------------------------------------------------------------- 277 278 IF type EQ 't' AND keyword_set(filter) THEN BEGIN 284 279 print, ' Applying a running mean filter of width '+string(filter, format = '(I3)') 285 280 z2d = smooth(z2d, filter) 286 281 z2d[0:filter/2-1] = 0. 287 282 z2d[(size(z2d))[1]-filter/2-1:(size(z2d))[1]-1] = 0. 288 ENDIF 283 ENDIF 289 284 290 285 ;--------------------------------------------------------------- … … 302 297 z2d = z2d[*]#replicate(1, repeat_c) 303 298 z2d = reform(z2d, taille[1], taille[2]*repeat_c, /over) 304 END 305 ELSE: 299 END 300 ELSE: 306 301 ENDCASE 307 302 temps = [temps, (lindgen(jpt*(REPEAT_c-1))+1)*(temps[1]-temps[0])+temps[jpt-1]] 308 ENDIF 309 310 ;--------------------------------------------------------------- 311 ; Selection of graphic's type. 303 ENDIF 304 305 ;--------------------------------------------------------------- 306 ; Selection of graphic's type. 312 307 ;--------------------------------------------------------------- 313 308 taille=size(z2d) … … 332 327 end 333 328 endcase 334 ; We build the mask. For that, the table must be masked (automaticaly done at the 329 ; We build the mask. For that, the table must be masked (automaticaly done at the 335 330 ; value valmask if we pass in moyenne or grossemoyenne) 336 331 nan = total(finite(z2d,/nan)) < 1 … … 365 360 ;----------------------------------------------------------------------------- 366 361 ; definition of the abscisse and ordinate vectors. 367 ; The triangulation is defined in order to the drawing be done from the 368 ; left bottom to the right up. So the matrix have to be shown like this, 362 ; The triangulation is defined in order to the drawing be done from the 363 ; left bottom to the right up. So the matrix have to be shown like this, 369 364 ; from which some transpose and reverse 370 365 ;----------------------------------------------------------------------------- … … 401 396 end 402 397 type eq 'yt' : begin 403 IF (size(gphi))[0] EQ 1 then yy = gphi ELSE BEGIN 404 IF keyword_set(key_irregular) THEN BEGIN 398 IF (size(gphi))[0] EQ 1 then yy = gphi ELSE BEGIN 399 IF keyword_set(key_irregular) THEN BEGIN 405 400 cln = (where(gphi EQ max(gphi)))[0] 406 401 yy = reform(gphi[cln MOD nx, *]) … … 422 417 endcase 423 418 ;-------------------------------------------------------------- 424 if NOT keyword_set(overplot) THEN axe, type, tempsmin, tempsmax, _EXTRA = ex ELSE BEGIN 425 if type EQ 'xt' then BEGIN 426 !y.range=!y.range-tempsmin 419 if NOT keyword_set(overplot) THEN axe, type, tempsmin, tempsmax, _EXTRA = ex ELSE BEGIN 420 if type EQ 'xt' then BEGIN 421 !y.range=!y.range-tempsmin 427 422 !y.tickv=!y.tickv-tempsmin 428 ENDIF ELSE BEGIN 423 ENDIF ELSE BEGIN 429 424 !x.range=!x.range-tempsmin 430 425 !x.tickv=!x.tickv-tempsmin … … 469 464 , coindescend = coindescendmask) 470 465 usetri = 1 471 ENDIF ELSE triangulation = -1 466 ENDIF ELSE triangulation = -1 472 467 IF size(gdep, /n_dimensions) EQ 2 THEN BEGIN 473 468 usetri = 2 … … 475 470 triangulation = triangule(mask, /basic, coinmonte = coinmontemask $ 476 471 , coindescend = coindescendmask) 477 ENDIF 472 ENDIF 478 473 ;---------------------------------------------------------------------- 479 474 pltbase, z2d, xx, yy, mask, xx, yy, level_z2d, colnumb, contour = contour, /noerase $ … … 488 483 endif 489 484 ;------------------------------------------------------------ 490 if keyword_set(contour) then BEGIN 485 if keyword_set(contour) then BEGIN 491 486 pourlegende = [1, 1, 1, 1] 492 487 oldattributs = saveatt() … … 506 501 IF key_onearth THEN BEGIN 507 502 CASE type OF 508 'xt':oplot, [180, 180] - 360*(!x.range[1] LT 180), !y.range 503 'xt':oplot, [180, 180] - 360*(!x.range[1] LT 180), !y.range 509 504 'yt':oplot, !x.range, [0, 0] 510 505 ELSE: … … 523 518 ; the top (right) axis by hand using axis. 524 519 ; 525 if n_elements(ex) NE 0 then BEGIN 520 if n_elements(ex) NE 0 then BEGIN 526 521 ; pour avoir un cadre de la couleur noire 527 522 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 533 528 ; call axis for the missing axis. 534 529 IF type EQ 'xt' AND NOT keyword_set(endpoints) THEN BEGIN 535 if n_elements(ex) NE 0 then $ 530 if n_elements(ex) NE 0 then $ 536 531 if (where(tag_names(ex) EQ 'YTICKNAME'))[0] NE -1 then $ 537 532 ex.YTICKNAME = replicate(' ', n_elements(ex.YTICKNAME)) … … 540 535 ENDIF 541 536 IF (type EQ 'yt' OR type EQ 'zt') AND NOT keyword_set(endpoints) THEN BEGIN 542 if n_elements(ex) NE 0 then $ 537 if n_elements(ex) NE 0 then $ 543 538 if (where(tag_names(ex) EQ 'XTICKNAME'))[0] NE -1 then $ 544 539 ex.XTICKNAME = replicate(' ', n_elements(ex.XTICKNAME)) … … 564 559 if keyword_set(sty1d) then BEGIN ;if we want to make bars 565 560 IF strlowcase(strtrim(sty1d)) EQ 'bar' then begin 566 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05,!y.range[1]] 561 !y.range = [!y.range[0]-(!y.range[1]-!y.range[0])*.05,!y.range[1]] 567 562 bar_plot, yy, background = (!d.n_colors-1) < 255, $ 568 563 baselines = replicate(!y.range[0], n_elements(yy)), barnames = ['', ''], $ 569 564 colors = replicate(col1d, n_elements(yy)), /outline 570 if n_elements(ex) NE 0 then BEGIN 565 if n_elements(ex) NE 0 then BEGIN 571 566 ; To have a black frame 572 567 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 574 569 plot, [0], [0], /nodata, /noerase, _extra = ex 575 570 GOTO, fini 576 ENDIF 571 ENDIF 577 572 ENDIF 578 if NOT keyword_set(ov1d) then BEGIN 573 if NOT keyword_set(ov1d) then BEGIN 579 574 !y.range=[min-abs(max-min)/50.,max+abs(max-min)/50.] 580 575 legende,mi,ma,type, DIREC = direc, _extra = ex … … 596 591 ; use xstyle=1 then each axis (up and down) have majorticks with a 597 592 ; length of 1 (-> not very nice when xgridstyle=2), same if 598 ; xticklen=0.5 (not very nice in the middle). 593 ; xticklen=0.5 (not very nice in the middle). 599 594 ; => so we draw the top axis by hand using axis. 600 if n_elements(ex) NE 0 then BEGIN 595 if n_elements(ex) NE 0 then BEGIN 601 596 ; To have a black frame 602 597 if (where(tag_names(ex) EQ 'COLOR'))[0] NE -1 then ex.COLOR = 0 … … 606 601 , ystyle = 1+8*keyword_set(exchange_xy), _extra = ex 607 602 ; call axis for the missing axis. 608 if n_elements(ex) NE 0 then BEGIN 603 if n_elements(ex) NE 0 then BEGIN 609 604 ; force tickname to blank array 610 605 if (where(tag_names(ex) EQ 'YTICKNAME'))[0] NE -1 AND keyword_set(exchange_xy) then ex.YTICKNAME = replicate(' ', n_elements(ex.YTICKNAME)) … … 619 614 fini: 620 615 ;------------------------------------------------------------ 621 ; we reput time axis in IDL julian days and not in julian days count from tempsmin 622 ;------------------------------------------------------------ 623 if type EQ 'xt' then BEGIN 624 !y.range=!y.range+tempsmin 616 ; we reput time axis in IDL julian days and not in julian days count from tempsmin 617 ;------------------------------------------------------------ 618 if type EQ 'xt' then BEGIN 619 !y.range=!y.range+tempsmin 625 620 !y.tickv=!y.tickv+tempsmin 626 ENDIF ELSE BEGIN 621 ENDIF ELSE BEGIN 627 622 !x.range=!x.range+tempsmin 628 623 !x.tickv=!x.tickv+tempsmin … … 640 635 ;------------------------------------------------------------ 641 636 if n_elements(key_performance) NE 0 then $ 642 IF key_performance EQ 1 THEN print, 'temps pltt', systime(1)-tempsun 637 IF key_performance EQ 1 THEN print, 'temps pltt', systime(1)-tempsun 643 638 ;------------------------------------------------------------ 644 639 ;------------------------------------------------------------ … … 646 641 return 647 642 end 648 649 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltv.pro
r181 r231 1 ;------------------------------------------------------------2 1 ;+ 2 ; 3 3 ; @file_comments 4 4 ; Draw 2d plots with TV procedure … … 7 7 ; graphic 8 8 ; 9 ; @param DATA {in}{required} 9 ; @param DATA {in}{required} 10 10 ; The field we want to display can be: 11 11 ; 1) an array. If the array is not a 2D array, its mean along … … 13 13 ; (as it is done in plt). 14 14 ; 2) a structure respecting all criterions specified by 15 ; litchamp.pro.cf. IDL> xhelp,'litchamp'15 ; <pro>litchamp</pro> cf. IDL> xhelp,'litchamp' 16 16 ; 17 ; @param MIN {in}{optional}{default=min of DATA (on non-masked points)} 17 ; @param MIN {in}{optional}{default=min of DATA (on non-masked points)} 18 18 ; 19 ; @param MAX {in}{optional}{default=max of DATA (on non-masked points)} 19 ; @param MAX {in}{optional}{default=max of DATA (on non-masked points)} 20 20 ; 21 21 ; @keyword BOTTOM {default=0} 22 22 ; The lowest color index of the colors to be used 23 23 ; 24 ; @keyword BOXZOOM 25 ; Vector indicating the geographic zone on which we want to cut the map. 24 ; @keyword BOXZOOM 25 ; Vector indicating the geographic zone on which we want to cut the map. 26 26 ; If BOXZOOM has : 27 27 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 54 54 ; 55 55 ; @keyword _EXTRA 56 ; used to pass keywords to PLACEDESSIN, TV, AXE, LEGENDE, BARRECOULEUR, TERMINEDESSIN57 ; 56 ; Used to pass keywords to <pro>PLACEDESSIN</pro>, <pro>TV</pro>, <pro>AXE</pro>, <pro>LEGENDE</pro>, <pro>BARRECOULEUR</pro>, <pro>TERMINEDESSIN</pro> 57 ; 58 58 ; @examples 59 59 ; IDL> tvplus, dist(100) … … 66 66 ; 67 67 ;- 68 ;-------------------------------------------------------------- 69 68 ; 70 69 PRO pltv, data, min, max, BOTTOM = bottom, BOXZOOM = boxzoom $ 71 70 , C_MASK = c_mask, C_NAN = c_nan, MININ = minin, MAXIN = maxin $ … … 82 81 ; I2) Reading of the field and checkup. 83 82 ;-------------------------------------------------------------- 84 IF n_elements(minin) NE 0 THEN min = minin 83 IF n_elements(minin) NE 0 THEN min = minin 85 84 IF n_elements(maxin) NE 0 THEN max = maxin 86 85 IF size(data, /type) NE 8 THEN z2d = reform(float(data)) ELSE z2d = data … … 90 89 saveboxparam, 'boxparam4pltv.dat' 91 90 ENDIF 92 z2d = checkfield(temporary(z2d), 'plt', TYPE = 'xy', direc = direc, BOXZOOM = boxzoom) 93 if z2d[0] EQ -1 then BEGIN 91 z2d = checkfield(temporary(z2d), 'plt', TYPE = 'xy', direc = direc, BOXZOOM = boxzoom) 92 if z2d[0] EQ -1 then BEGIN 94 93 IF keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat' 95 94 return … … 114 113 ;------------------------------------------------------------ 115 114 IF n_elements(maskval) EQ 0 THEN maskval = 1.e20 116 IF abs(maskval) LT 1e6 THEN BEGIN 115 IF abs(maskval) LT 1e6 THEN BEGIN 117 116 IF keyword_set(nan) THEN z2d[nanind] = 1.e20 118 msk = z2d NE maskval 119 ENDIF ELSE BEGIN 117 msk = z2d NE maskval 118 ENDIF ELSE BEGIN 120 119 IF keyword_set(nan) THEN z2d[nanind] = 0 121 120 msk = abs(z2d) LT abs(maskval)/10. … … 129 128 z2d = min > temporary(z2d) < max 130 129 ;------------------------------------------------------------ 131 ; apply other keywords (nointerp, c_nan, c_mask) 130 ; apply other keywords (nointerp, c_nan, c_mask) 132 131 ;------------------------------------------------------------ 133 132 IF NOT keyword_set(nointerp) THEN BEGIN … … 137 136 z2d = m * temporary(z2d) + p 138 137 ENDIF 139 ; set c_nan for NaN values 138 ; set c_nan for NaN values 140 139 IF keyword_set(nan) THEN BEGIN 141 140 IF n_elements(c_nan) NE 0 THEN cnan = 0 > c_nan < (ncolmax -1) ELSE cnan = (ncolmax -1) … … 143 142 ENDIF 144 143 ; c_mask for masked values 145 IF keyword_set(masked) THEN BEGIN 144 IF keyword_set(masked) THEN BEGIN 146 145 IF n_elements(c_mask) NE 0 THEN cmask = 0 > c_mask < (ncolmax - 1) ELSE cmask = (ncolmax -1) 147 146 z2d[maskind] = cmask 148 ENDIF 149 z2d = round(temporary(z2d)) 147 ENDIF 148 z2d = round(temporary(z2d)) 150 149 ; use byte type to save memory 151 150 z2d = byte(temporary(z2d)) … … 161 160 xsize = !p.position[2] - !p.position[0] 162 161 ysize = !p.position[3] - !p.position[1] 163 IF !d.name EQ 'X' THEN BEGIN 162 IF !d.name EQ 'X' THEN BEGIN 164 163 xsize = ceil(xsize * !d.x_size) 165 164 ysize = ceil(ysize * !d.y_size) 166 165 z2d = congrid(z2d, xsize, ysize) 167 166 ENDIF 168 167 169 168 tv, z2d, !p.position[0], !p.position[1] $ 170 169 , xsize = xsize, ysize = ysize $ … … 185 184 ;------------------------------------------------------------ 186 185 barrecouleur, 0, min, max, 10, bottom = bottom, position = posbar, ncolors = (topcol-bottom+1), _extra = ex 187 ; 4) End of drawing 188 terminedessin, _extra=ex 186 ; 4) End of drawing 187 terminedessin, _extra=ex 189 188 ; 190 189 if keyword_set(savedbox) THEN restoreboxparam, 'boxparam4pltv.dat' 191 if keyword_set(key_performance) NE 0 THEN print, 'time pltv', systime(1)-tempsun 190 if keyword_set(key_performance) NE 0 THEN print, 'time pltv', systime(1)-tempsun 192 191 ; 193 192 return -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 15 12 ; If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom. 16 13 ; If the field is 3d, we extract the section on we average possibly before to do the plot. 17 ; 2) a structure respecting all criterions specified by litchamp.pro.14 ; 2) a structure respecting all criterions specified by <pro>litchamp</pro>. 18 15 ; See IDL> xhelp,'litchamp'. The array contained in the structure must be 2 or 3d (See case 1) 19 16 ; … … 89 86 ; 90 87 ; @keyword LABEL {default=0}{type=integer} 91 ; It choose the label's type corresponding to cases in label.pro.88 ; It choose the label's type corresponding to cases in <pro>label</pro> 92 89 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 93 90 ; For these one traced by a trait, use CONTLABEL. … … 159 156 ; 160 157 ;- 161 ;------------------------------------------------------------ 162 ;------------------------------------------------------------ 163 ;------------------------------------------------------------ 164 pro pltz, tab, giventype, givenmin, givenmax, BOXZOOM = boxzoom, CONTOUR = contour $ 158 ; 159 PRO pltz, tab, giventype, givenmin, givenmax, BOXZOOM = boxzoom, CONTOUR = contour $ 165 160 , ENDPOINTS = endpoints, INTERVALLE = intervalle, INV = inv, ZRATIO = zratio $ 166 161 , CONTINTERVALLE = contintervalle, LABEL = label, CONTLABEL = contlabel $ … … 172 167 , WDEPTH = wdepth, REALSECTION = realsection $ 173 168 , _EXTRA = ex 174 ;---------------------------------------------------------175 ; include common176 169 ; 177 170 compile_opt idl2, strictarrsubs … … 483 476 return 484 477 end 485 486 487 -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/sbar_plot.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; Same thing that bar_plot but compatible with the whole environment (common.pro included) 8 5 ; … … 16 13 ; 17 14 ; @keyword COLORS {type=integer} 18 ; I gives color of all colorbars. (contrarily to colors 15 ; I gives color of all colorbars. (contrarily to colors 19 16 ; which is a vector giving the color of each colorbar). 20 17 ; 21 18 ; @keyword NOREINITPLT 22 ; We active it if we do not want environment variables !p, !x, !y, !z 19 ; We active it if we do not want environment variables !p, !x, !y, !z 23 20 ; to be reinitializated by the procedure reinitplt 24 21 ; 25 22 ; @keyword _EXTRA 26 ; used to pass yourkeyword23 ; Used to pass keyword 27 24 ; 28 25 ; @uses 29 26 ; common.pro 30 27 ; 31 ; @restrictions 32 ; If NOREINITPLT is not activated, all environment 28 ; @restrictions 29 ; If NOREINITPLT is not activated, all environment 33 30 ; variables !p, !x, !y, !z are reinitializted by the procedure reinitplt 34 31 ; … … 46 43 ; 47 44 ;- 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 52 PRO sbar_plot, Values, COLORS = colors, NOREINITPLT = noreinitplt, _extra = ex 45 ; 46 PRO sbar_plot, Values, COLORS = colors, NOREINITPLT = noreinitplt, _extra = ex 53 47 ; 54 48 compile_opt idl2, strictarrsubs 55 49 ; 56 50 @common 57 ; 1) I reinitialize the graphic environment (variables !x, !y et !p): 58 if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 59 ; 2) I place the drawing on the screen like on the postscript 51 ; 1) I reinitialize the graphic environment (variables !x, !y et !p): 52 if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 53 ; 2) I place the drawing on the screen like on the postscript 60 54 IF chkstru(ex, 'overplot')EQ 0 THEN placedessin, 'autre', _extra = ex 61 ; 3) Drawing 55 ; 3) Drawing 62 56 if n_elements(COLORS) NE 0 then BEGIN 63 57 if n_elements(COLORS) EQ n_elements(Values) then col = colors $ … … 67 61 bar_plot, Values, background = !p.background, colors = col $ 68 62 , xstyle = 1, ystyle = 1, _extra = ex 69 ; 4) End of drawing 70 terminedessin, _extra=ex 63 ; 4) End of drawing 64 terminedessin, _extra=ex 71 65 72 66 return -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/scontour.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 ; @uses … … 33 30 ; 34 31 ;- 35 ;------------------------------------------------------------ 36 ;------------------------------------------------------------ 37 ;------------------------------------------------------------ 32 ; 38 33 PRO scontour, x, y, z, NOREINITPLT = noreinitplt, _EXTRA = ex 39 34 ; -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/splot.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 ; @uses … … 37 34 ; 38 35 ;- 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 36 ; 42 37 PRO splot, x, y, NOREINITPLT = noreinitplt, _EXTRA = ex 43 38 ; -
trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 7 4 ; Enhanced version of tvscl 8 5 ; 9 ; @categories quick exploration of 2D arrays 6 ; @categories 7 ; quick exploration of 2D arrays 10 8 ; 11 9 ; @param Z2D {in}{required} … … 64 62 ; 65 63 ; @keyword _EXTRA 66 ; used to pass keywords to TV, PLOT, COLORBAR64 ; Used to pass keywords to <pro>TV</pro>, <pro>PLOT</pro>, <pro>COLORBAR</pro> 67 65 ; 68 66 ; @restrictions … … 87 85 ; 88 86 ;- 89 ;------------------------------------------------------------ 90 ;------------------------------------------------------------ 91 ;------------------------------------------------------------ 87 ; 92 88 PRO tvplus, z2d, cellsize, BOTTOM = bottom, C_MASK = c_mask, C_NAN = c_nan, WINDOW = window $ 93 89 , MIN = min, MAX = max, MASK = mask, OFFSET = offset, NOUSEINFOS = NOUSEINFOS $ 94 90 , NCOLORS = ncolors, NOINTERP = nointerp, _EXTRA = ex 95 ;96 91 ; 97 92 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/addaxe.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 13 10 ; @param ENDPOINTS {in}{required} 14 11 ; Coordinate of extremities of the section 15 ; 12 ; 16 13 ; @param TYPE {in}{required}{type=string} 17 14 ; A string of two characters specifying the type of plot we do 18 15 ; 19 16 ; @param POSFENETRE {in}{required}{type=vector} 20 ; The vector !p.position corresponding to the frame position of 17 ; The vector !p.position corresponding to the frame position of 21 18 ; the drawing part of the plot. 22 19 ; … … 31 28 ; 32 29 ;- 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 30 ; 36 31 PRO addaxe, endpoints, type, posfenetre, _EXTRA = ex 37 32 ; … … 42 37 IF strpos(type, 'x') NE -1 THEN BEGIN 43 38 IF endpoints[1] EQ endpoints[3] THEN return 44 IF key_onearth THEN BEGIN 39 IF key_onearth THEN BEGIN 45 40 formeaxe0 = 'lonaxe' 46 41 formeaxe1 = 'lataxe' 47 42 titreaxe = 'latitude' 48 ENDIF ELSE BEGIN 43 ENDIF ELSE BEGIN 49 44 formeaxe0 = '' 50 45 formeaxe1 = '' … … 55 50 ENDIF ELSE BEGIN 56 51 IF endpoints[0] EQ endpoints[2] THEN return 57 IF key_onearth THEN BEGIN 52 IF key_onearth THEN BEGIN 58 53 formeaxe0 = 'lataxe' 59 54 formeaxe1 = 'lonaxe' 60 55 titreaxe = 'longitude' 61 ENDIF ELSE BEGIN 56 ENDIF ELSE BEGIN 62 57 formeaxe0 = '' 63 58 formeaxe1 = '' -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/autoscale.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 7 ; We give a min and a max, and the procedure send back 3 ; @file_comments 4 ; We give a min and a max, and the procedure send back 8 5 ; the good contour interval and labels's value. 9 6 ; 10 ; @categories 7 ; @categories 11 8 ; Graphics 12 9 ; … … 31 28 ; 32 29 ;- 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 30 ; 36 31 PRO autoscale, min, max, ci 37 32 ; … … 53 48 ; until the number of contour is inferior to 30. 54 49 ; 55 WHILE ceil((max-min)/ci) GE 30 DO BEGIN 50 WHILE ceil((max-min)/ci) GE 30 DO BEGIN 56 51 ci = ci0*coef[n] 57 52 n = n+1 58 ENDWHILE 53 ENDWHILE 59 54 60 55 min = floor(min/ci/2)*ci*2 61 56 max = ceil(max/ci/2)*ci*2 62 63 nlevels = round((max-min)/ci) 57 58 nlevels = round((max-min)/ci) 64 59 65 60 ; 66 61 ; We force the number of contour to be even 67 62 ; 68 IF nlevels MOD 2 EQ 1 THEN BEGIN 63 IF nlevels MOD 2 EQ 1 THEN BEGIN 69 64 nlevels = nlevels+1 70 65 max = max+ci 71 END 72 73 74 END 75 76 77 78 66 END 67 END -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/axis4pltz.pro
r172 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 9 6 ; @param MASK {in}{required} 10 7 ; 3d mask 11 ; 8 ; 12 9 ; @param GLAM {in}{required} 13 ; 2d longitude 14 ; 10 ; 2d longitude 11 ; 15 12 ; @param GPHI {in}{required} 16 13 ; 2d latitude … … 19 16 ; 1d depth 20 17 ; 21 ; @keyword XXAXIS 18 ; @keyword XXAXIS 22 19 ; to get the xaxis we need to use in pltbase 23 ; 24 ; @keyword ZZAXIS 20 ; 21 ; @keyword ZZAXIS 25 22 ; to get the yaxis we need to use in pltbase 26 23 ; 27 ; @keyword SIN 28 ; Activate this keyword if we want the x axis to be traced in sinus of the 24 ; @keyword SIN 25 ; Activate this keyword if we want the x axis to be traced in sinus of the 29 26 ; latitude when we make a drawing f(y) 30 27 ; 31 28 ; @keyword ZRATIO {default=2./3} 32 ; When the drawing has a zoomed part, it is the size rapport between the zoomed part, 29 ; When the drawing has a zoomed part, it is the size rapport between the zoomed part, 33 30 ; hz (zoom height), and the whole drawing, ht (total height). 34 31 ; 35 32 ; @keyword _EXTRA 36 ; used to pass yourkeywords37 ; 38 ; Others: see pltz 33 ; Used to pass keywords 34 ; 35 ; Others: see pltz 39 36 ; 40 37 ; … … 47 44 ; 48 45 ;- 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 ;------------------------------------------------------------ 52 46 ; 53 47 PRO axis4pltz, type, mask, glam, gphi, z, XXAXIS = xxaxis, ZZAXIS = zzaxis, SIN = sin, ZRATIO = zratio, ZOOM = zoom, PROFMAX = profmax, PROFMIN = profmin, _extra = ex 54 ;55 ; include common56 48 ; 57 49 compile_opt idl2, strictarrsubs … … 61 53 @updatekwd 62 54 ENDIF 63 55 64 56 ;-------------------------------------------------------------------- 65 57 ; define the mask used for this section … … 82 74 ENDCASE 83 75 ; 84 if type eq 'yz' then BEGIN 85 IF (size(gphi))[0] EQ 1 then xxaxis = gphi ELSE BEGIN 86 IF keyword_set(key_irregular) THEN BEGIN 76 if type eq 'yz' then BEGIN 77 IF (size(gphi))[0] EQ 1 then xxaxis = gphi ELSE BEGIN 78 IF keyword_set(key_irregular) THEN BEGIN 87 79 cln = (where(gphi EQ max(gphi)))[0] 88 80 xxaxis = reform(gphi[cln MOD nx, *]) … … 92 84 ENDIF ELSE BEGIN 93 85 xxaxis = glam[*, 0] 94 ENDELSE 86 ENDELSE 95 87 zzaxis = z 96 88 ;---------------------------------------------------------- … … 113 105 ; to draw from bottom to top (avoid using cell_fill) 114 106 CASE size(zzaxis, /n_dimensions) OF 115 1:zzaxis = reverse(-zzaxis) 116 2:zzaxis = reverse(-zzaxis, 2) 107 1:zzaxis = reverse(-zzaxis) 108 2:zzaxis = reverse(-zzaxis, 2) 117 109 ENDCASE 118 110 if mask[0] NE -1 then mask = reverse(mask, 2) -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 50 47 ; 51 48 ; @keyword _EXTRA 52 ; Used to pass yourkeywords49 ; Used to pass keywords 53 50 ; 54 51 ; @restrictions … … 65 62 ; seb: mettre les keyword et les param 66 63 ;- 67 ;------------------------------------------------------------ 68 ;------------------------------------------------------------ 69 ;------------------------------------------------------------ 64 ; 70 65 PRO barrecouleur, colnumb, clbinf, clbsup, clbdiv $ 71 66 , NOCOLORBAR = nocolorbar, CB_TITLE = cb_title $ … … 73 68 , MIN = min, MAX = max, divisions = divisions $ 74 69 , CB_SUBTITLE = cb_subtitle, POST = post, _extra = ex 75 ;------------------------------------------------------------76 70 ; 77 71 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checkfield.pro
r163 r231 1 1 ;+ 2 ; @file_comments3 ; 4 ; 2 ; 3 ; @file_comments 4 ; 5 5 ; @categories 6 ; 7 ; 6 ; 8 7 ; @param TYPE {in}{required}{type=string} 9 8 ; A string of two characters specifying the type of plot we do … … 21 20 ; 22 21 ; @returns 23 ; 24 ; 22 ; 25 23 ; @restrictions 26 ; 27 ; 24 ; 28 25 ; @examples 29 26 ; 30 ;31 27 ; @history 32 ;33 28 ; 34 29 ; @version 35 30 ; $Id$ 36 31 ;- 32 ; 37 33 FUNCTION err_1d, type, n1, name, n2 38 34 ; … … 45 41 ; 46 42 ;+ 47 ; @file_comments48 ; 49 ; 43 ; 44 ; @file_comments 45 ; 50 46 ; @categories 51 ; 52 ; 47 ; 53 48 ; @param TYPE {in}{required}{type=string} 54 49 ; A string of two characters specifying the type of plot we do 55 50 ; 56 ; @param SZ {in}{optional}{default=defined by grille.pro}57 ; 58 ; @param NX {in}{optional}{default=defined by grille.pro}59 ; 60 ; @param NY {in}{optional}{default=defined by grille.pro}61 ; 51 ; @param SZ {in}{optional}{default=defined by <pro>grille<pro>} 52 ; 53 ; @param NX {in}{optional}{default=defined by <pro>grille</pro>} 54 ; 55 ; @param NY {in}{optional}{default=defined by <pro>grille</pro>} 56 ; 62 57 ; @param NZ 63 ; 64 ; 58 ; 65 59 ; @returns 66 ; 67 ; 60 ; 68 61 ; @restrictions 69 ; 70 ; 62 ; 71 63 ; @examples 72 64 ; 73 ;74 65 ; @history 75 ;76 66 ; 77 67 ; @version 78 68 ; $Id$ 79 69 ;- 70 ; 80 71 FUNCTION err_2d, type, sz, nx, ny, nz 81 72 ; … … 95 86 ; 96 87 ;+ 97 ; @file_comments98 ; 99 ; 88 ; 89 ; @file_comments 90 ; 100 91 ; @categories 101 ; 102 ; 92 ; 103 93 ; @param TYPE {in}{required}{type=string} 104 94 ; A string of two characters specifying the type of plot we do 105 95 ; 106 ; @param SZ {in}{optional}{default=defined by grille.pro}107 ; 108 ; @param NX {in}{optional}{default=defined by grille.pro}109 ; 110 ; @param NY {in}{optional}{default=defined by grille.pro}111 ; 96 ; @param SZ {in}{optional}{default=defined by <pro>grille</pro>} 97 ; 98 ; @param NX {in}{optional}{default=defined by <pro>grille</pro>} 99 ; 100 ; @param NY {in}{optional}{default=defined by <pro>grille</pro>} 101 ; 112 102 ; @param NZ 113 ; 114 ; 103 ; 115 104 ; @returns 116 ; 117 ; 105 ; 118 106 ; @restrictions 119 ; 120 ; 107 ; 121 108 ; @examples 122 109 ; 123 ;124 110 ; @history 125 ;126 111 ; 127 112 ; @version 128 113 ; $Id$ 114 ; 129 115 ;- 116 ; 130 117 FUNCTION err_3d, type, sz, nx, ny, nz 131 118 ; … … 143 130 + ', ' + strtrim(jpt, 1) + ']'], /simple) 144 131 END 145 ;------------------------------------------------------------ 146 ;------------------------------------------------------------ 147 ;------------------------------------------------------------ 132 ; 148 133 ;+ 149 134 ; 150 135 ; @file_comments 151 ; In input of plt, pltz, pltt and plt1d, it check that the field give 152 ; a size compatible with the domain and, if needed, average to give us 136 ; In input of plt, pltz, pltt and plt1d, it check that the field give 137 ; a size compatible with the domain and, if needed, average to give us 153 138 ; a 2d array if we make a plot of the type: 'xy', 'xz', 'xt', 'yz', 'yt' 154 139 ; , 'zt' or a 1d array if we make a plot of the type: 'x', 'y', 'z', 't'. … … 156 141 ; @categories 157 142 ; Graphics 158 ; 143 ; 159 144 ; @param FIELD {in}{required}{type=field} 160 ; It respect litchamp.pro's criterions. See IDL>xhelp,'litchamp'145 ; It respect <pro>litchamp</pro>'s criterions. See IDL>xhelp,'litchamp' 161 146 ; 162 147 ; @param PROCEDURE {in}{required} 163 148 ; 164 ;165 149 ; @keyword TYPE 166 150 ; 167 ;168 151 ; @keyword NOQUESTION 169 152 ; 170 ;171 153 ; @keyword BOXZOOM {type=vector} 172 ; Vector indicating the geographic zone on which we want to cut the map. 154 ; Vector indicating the geographic zone on which we want to cut the map. 173 155 ; If BOXZOOM has : 174 156 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] … … 181 163 ; 182 164 ; @keyword WDEPTH 183 ; to specify that the field is at W depth instead of T 165 ; to specify that the field is at W depth instead of T 184 166 ; depth (automatically activated if vargrid eq 'W') 185 ; 167 ; 186 168 ; @keyword VECTEUR{type=vetcor} 187 169 ; It is a structure composed by 2 elements containing the 2 fields U … … 193 175 ; 194 176 ; @keyword _EXTRA 195 ; used to pass your keywords 196 ; 197 ; @keyword DIREC 198 ; 199 ; 200 ; @uses 177 ; Used to pass keywords 178 ; 179 ; @keyword DIREC 180 ; 181 ; @uses 201 182 ; common.pro 202 183 ; … … 208 189 ; $Id$ 209 190 ; 210 ; @todo seb: mettre les param 191 ; @todo seb: mettre les param 211 192 ; 212 193 ;- 213 ;------------------------------------------------------------214 ;------------------------------------------------------------215 ;--------------------------------------------------------------216 194 ; 217 195 FUNCTION checkfield, field, procedure, TYPE = type, BOXZOOM = boxzoom, DIREC = direc, NOQUESTION = noquestion, VECTEUR = vecteur, WDEPTH = wdepth, _EXTRA = ex 218 ;--------------------------------------------------------------219 196 ; 220 197 compile_opt idl2, strictarrsubs 221 198 ; 222 ; include commons223 199 @cm_4mesh 224 200 @cm_4cal … … 237 213 if arr EQ -1 then $ 238 214 return, report('Error: input array = -1. Maybe the reading did ont perform well...', /simple) $ 239 ELSE return, report('Error: input array is a scalar', /simple) 215 ELSE return, report('Error: input array is a scalar', /simple) 240 216 ENDIF 241 217 nan = total(finite(arr, /nan)) < 1 … … 264 240 ENDIF 265 241 ; 266 ; The procedure domdef determine elements which are inside the boxzoom. 267 ; 242 ; The procedure domdef determine elements which are inside the boxzoom. 243 ; 268 244 if strpos(type, 'z') NE -1 THEN BEGIN 269 if NOT keyword_set(localbox) then BEGIN 245 if NOT keyword_set(localbox) then BEGIN 270 246 localbox = [minprof, profdefault] 271 247 if keyword_set(wdepth) then grillechoice = 'W' $ … … 275 251 nelbox = n_elements(localbox) 276 252 ;we keep yranges (z axis) before changing the boxzoom. 277 !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 253 !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 278 254 if vargrid EQ 'W' OR keyword_set(wdepth) then BEGIN 279 255 firstzw = 0 > (firstzw-1) … … 329 305 , 'Impossible to make a "'+type+'" plot with a 1D array'], /simple) 330 306 ENDCASE 331 END 307 END 332 308 ;-------------------------------------------------------------- 333 309 2:BEGIN … … 372 348 'zt':IF sz[1] NE nz OR sz[2] NE jpt THEN return, err_2d(type, sz, nx, ny, nz) ; zt array 373 349 ENDCASE 374 END 350 END 375 351 ;-------------------------------------------------------------- 376 352 3:BEGIN … … 426 402 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ nz:direc = 'x' ; xyz array 427 403 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 't' ; (x)yzt 428 ELSE:return, err_3d(type, sz, nx, ny, nz) 404 ELSE:return, err_3d(type, sz, nx, ny, nz) 429 405 endcase 430 406 END … … 433 409 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpt:direc = 'y' ; xyt array 434 410 sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'z' ; x(y)zt array 435 ELSE:return, err_3d(type, sz, nx, ny, nz) 411 ELSE:return, err_3d(type, sz, nx, ny, nz) 436 412 endcase 437 413 END … … 440 416 sz[1] EQ nx AND sz[2] EQ ny AND sz[3] EQ jpt:direc = 'x' ; xyt array 441 417 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'z' ; (x)yzt array 442 ELSE:return, err_3d(type, sz, nx, ny, nz) 418 ELSE:return, err_3d(type, sz, nx, ny, nz) 443 419 endcase 444 420 END … … 447 423 sz[1] EQ nx AND ny EQ 1 AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'x' ; x(y)zt array 448 424 nx EQ 1 AND sz[1] EQ ny AND sz[2] EQ nz AND sz[3] EQ jpt:direc = 'y' ; (x)yzt array 449 ELSE:return, err_3d(type, sz, nx, ny, nz) 425 ELSE:return, err_3d(type, sz, nx, ny, nz) 450 426 ENDCASE 451 END 452 ENDCASE 453 END 454 ;-------------------------------------------------------------- 455 4:BEGIN 427 END 428 ENDCASE 429 END 430 ;-------------------------------------------------------------- 431 4:BEGIN 456 432 CASE type OF 457 433 'x':direc = 'yzt' … … 465 441 'yt':direc = 'xz' 466 442 'zt':direc = 'xy' 467 ENDCASE 443 ENDCASE 468 444 END 469 445 ENDCASE -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/checktypeminmax.pro
r199 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param PROCEDURE 9 7 ; 10 ;11 8 ; @keyword TYPE 12 ;13 9 ; 14 10 ; @keyword MIN 15 11 ; 16 ;17 12 ; @keyword MAX 18 ;19 13 ; 20 14 ; @keyword XY 21 15 ; 22 ;23 16 ; @keyword XZ 24 ;25 17 ; 26 18 ; @keyword YZ 27 19 ; 28 ;29 20 ; @keyword XT 30 ;31 21 ; 32 22 ; @keyword YT 33 23 ; 34 ;35 24 ; @keyword ZT 36 ;37 25 ; 38 26 ; @keyword TT 39 27 ; 40 ;41 28 ; @keyword XX 42 ;43 29 ; 44 30 ; @keyword YY 45 31 ; 46 ;47 32 ; @keyword ZZ 48 ;49 33 ; 50 34 ; @keyword XINDEX 51 35 ; 52 ;53 36 ; @keyword YINDEX 54 ;55 37 ; 56 38 ; @keyword ENDPOINTS 57 39 ; 58 ;59 40 ; @keyword _EXTRA 60 ; Used to pass yourkeywords41 ; Used to pass keywords 61 42 ; 62 43 ; @returns 63 ;64 44 ; 65 45 ; @uses … … 68 48 ; @restrictions 69 49 ; 70 ;71 50 ; @examples 72 ;73 51 ; 74 52 ; @history … … 81 59 ;- 82 60 ; 83 ;84 61 PRO checktypeminmax, procedure, TYPE = type, MIN = min, MAX = max, XY = xy $ 85 62 , XZ = xz, YZ = yz, XT = XT, YT = YT, ZT = zt $ … … 87 64 , XINDEX = xindex, YINDEX = yindex $ 88 65 , ENDPOINTS = endpoints, _extra = ex 66 ; 89 67 compile_opt idl2, strictarrsubs 90 68 ; … … 97 75 vraimin = type 98 76 case size(min, /type) of 99 0:BEGIN 77 0:BEGIN 100 78 min = vraimin 101 79 type = 0 102 80 END 103 7:BEGIN 81 7:BEGIN 104 82 type = min 105 83 min = vraimin … … 112 90 type = 0 113 91 END 114 7:BEGIN 92 7:BEGIN 115 93 type = max 116 94 max = min … … 152 130 'plt':type = 'xy' 153 131 'pltz':BEGIN 154 if keyword_set(endpoints) then BEGIN 132 if keyword_set(endpoints) then BEGIN 155 133 lon1 = min([endpoints[0], endpoints[2]], max = lon2) 156 134 lat1 = min([endpoints[1], endpoints[3]], max = lat2) … … 159 137 END 160 138 'pltt':BEGIN 161 if keyword_set(endpoints) then BEGIN 139 if keyword_set(endpoints) then BEGIN 162 140 lon1 = min([endpoints[0], endpoints[2]], max = lon2) 163 141 lat1 = min([endpoints[1], endpoints[3]], max = lat2) … … 167 145 END 168 146 'plt1d':BEGIN 169 if keyword_set(endpoints) then BEGIN 147 if keyword_set(endpoints) then BEGIN 170 148 lon1 = min([endpoints[0], endpoints[2]], max = lon2) 171 149 lat1 = min([endpoints[1], endpoints[3]], max = lat2) … … 181 159 END 182 160 endcase 183 ENDIF 161 ENDIF 184 162 WHILE type NE 'xy' AND type NE 'xz' AND type NE 'yz' $ 185 163 AND type NE 'xt' AND type NE 'yt' AND type NE 'zt' $ … … 189 167 , /chkwidget) 190 168 type = strlowcase(type) 191 ENDWHILE 169 ENDWHILE 192 170 ; 193 171 ; 194 172 195 173 return 196 174 end -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 27 24 ; 28 25 ; @keyword _EXTRA 29 ; used to pass yourkeywords26 ; Used to pass keywords 30 27 ; 31 28 ; @keyword USETRI … … 54 51 ; 55 52 ;- 56 ;------------------------------------------------------------ 57 ;------------------------------------------------------------ 58 ;------------------------------------------------------------ 53 ; 59 54 PRO determineminmax, tab, mask, vraimin, vraimax, glam, gphi, MAXIN = maxin, MININ = minin, INTERVALLE = intervalle, usetri = usetri, ZEROMIDDLE = zeromiddle, _extra = ex 60 55 ; … … 62 57 ; 63 58 @common 64 ;----------------------------------------------------------------------------- 65 ;----------------------------------------------------------------------------- 59 ; 66 60 ; Type of the vertical grid: 67 61 if vargrid EQ 'W' then nz = nzw ELSE nz = nzt -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/givewindowsize.pro
r163 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @returns 9 7 ; 10 ;11 8 ; @uses 12 ;13 9 ; 14 10 ; @restrictions 15 11 ; 16 ;17 12 ; @examples 18 13 ; 19 ;20 14 ; @history 21 ;22 15 ; 23 16 ; @version … … 26 19 ; @todo seb 27 20 ;- 21 ; 28 22 FUNCTION givewindowsize 29 30 ;------------------------------------------------------------31 ; include commons32 23 ; 33 24 compile_opt idl2, strictarrsubs … … 45 36 IF NOT keyword_set(key_forgetold) THEN BEGIN 46 37 @updateold 47 ENDIF 48 ENDIF 38 ENDIF 39 ENDIF 49 40 coef = windowsize_scale * coef 50 41 ; -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/meridienparallele.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 10 7 ; Graphics 11 8 ; 12 ; @param COUPE 9 ; @param COUPE 13 10 ; The type of drawing we treat 14 11 ; … … 24 21 ; 25 22 ;- 26 ;------------------------------------------------------------ 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 23 ; 29 24 PRO meridienparallele, coupe 30 25 ; … … 34 29 ;------------------------------------------------------------ 35 30 case coupe of 36 'xy':BEGIN 31 'xy':BEGIN 37 32 if lon1 lt 180 and lon2 gt 180 then $ 38 33 plot, [180,180],[lat1,lat2],/noerase,color=0 -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placecolor.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 14 11 ; 15 12 ; @param POS 16 ; Vector composed by 4 elements giving coordinates of the left bottom 13 ; Vector composed by 4 elements giving coordinates of the left bottom 17 14 ; corner and of the right up one -in cm- in which we want to do the color bar 18 15 ; 19 ; @keyword _ extra20 ; used to pass yourkeywords16 ; @keyword _EXTRA 17 ; Used to pass keywords 21 18 ; 22 19 ; @uses … … 34 31 ; 35 32 ;- 36 ;------------------------------------------------------------ 37 ;------------------------------------------------------------ 38 ;------------------------------------------------------------ 33 ; 39 34 pro placecolor, pos, _extra = ex 40 ;------------------------------------------------------------41 ; include commons42 35 ; 43 36 compile_opt idl2, strictarrsubs … … 47 40 @updatenew 48 41 ENDIF 49 ;---------------------50 42 ; 51 43 xsave = !x … … 57 49 mipgsz = min(page_size, max = mapgsz) 58 50 if key_portrait eq 1 then begin 59 pos[0]=pos[0]/mipgsz 60 pos[1]=pos[1]/mapgsz 61 pos[2]=pos[2]/mipgsz 62 pos[3]=pos[3]/mapgsz 51 pos[0]=pos[0]/mipgsz 52 pos[1]=pos[1]/mapgsz 53 pos[2]=pos[2]/mipgsz 54 pos[3]=pos[3]/mapgsz 63 55 endif else begin 64 pos[0]=pos[0]/mapgsz 65 pos[1]=pos[1]/mipgsz 66 pos[2]=pos[2]/mapgsz 67 pos[3]=pos[3]/mipgsz 56 pos[0]=pos[0]/mapgsz 57 pos[1]=pos[1]/mipgsz 58 pos[2]=pos[2]/mapgsz 59 pos[3]=pos[3]/mipgsz 68 60 ENDELSE 69 61 ; … … 75 67 ; 76 68 colnumb = colorbarparam.colnumb 77 clbinf = colorbarparam.clbinf 69 clbinf = colorbarparam.clbinf 78 70 clbsup = colorbarparam.clbsup 79 71 clbdiv = colorbarparam.clbdiv … … 82 74 file = myuniquetmpdir + '4colorbar.dat' 83 75 IF file_test(file) THEN BEGIN 84 restore, file 85 if size(ex, /type) EQ 8 then BEGIN 76 restore, file 77 if size(ex, /type) EQ 8 then BEGIN 86 78 if (where(tag_names(ex) EQ 'MIN'))[0] NE -1 then clbinf = ex.MIN 87 79 if (where(tag_names(ex) EQ 'MAX'))[0] NE -1 then clbsup = ex.MAX … … 99 91 !y = ysave 100 92 !p = psave 101 ; ------------------------------------------------------------93 ; 102 94 return 103 95 end -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placedessin.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 97 94 ; 98 95 ; @keyword _EXTRA 99 ; Used to pass your keywords.96 ; Used to pass keywords 100 97 ; 101 98 ; @keyword COLOR_C … … 124 121 ; 125 122 ;- 126 ;------------------------------------------------------------ 127 ;------------------------------------------------------------ 128 ;------------------------------------------------------------ 123 ; 129 124 PRO placedessin, typedessin, posfenetre, posbar, BARMARGES = barmarges $ 130 125 , NOCOLORBAR = nocolorbar, NOFILL = nofill, COLOR_c = color_c $ … … 135 130 , ENDPOINTS = endpoints, TYPE = type, BASICMARGES = basicmarges $ 136 131 , NOERASE = noerase, LCT = lct, DIREC = direc, CB_TITLE = cb_title, _extra = ex 137 ;---------------------------------------------------------138 ; include common139 132 ; 140 133 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/projsegment.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; project linearly a segment, a vector whose boundaries are [a,b] on 4 ; project linearly a segment, a vector whose boundaries are [a,b] on 8 5 ; a vector whose boundaries are [c,d] 9 6 ; … … 14 11 ; A vector whose the first element must be the smallest one and the last must be the biggest one. 15 12 ; 16 ; @param BORNES 13 ; @param BORNES 17 14 ; New boundaries of the vector. 18 15 ; 19 16 ; @keyword MP 20 ; Activate this keyword to the function send back this a vector of 2 21 ; elements which are the m and p of the linear projection y=mx+p used 17 ; Activate this keyword to the function send back this a vector of 2 18 ; elements which are the m and p of the linear projection y=mx+p used 22 19 ; to pass from the [a,b] segment to the [c,d] segment. 23 20 ; 24 ; @returns 21 ; @returns 25 22 ; A vector whose new boundaries are specified by BORNES. 26 23 ; 27 24 ; @examples 28 ; 29 ; IDL> a=indgen(9) 30 ; IDL> print, a 25 ; 26 ; IDL> a=indgen(9) 27 ; IDL> print, a 31 28 ; 0 1 2 3 4 5 6 7 8 32 ; IDL> print, projsegment(a,[0,80]) 29 ; IDL> print, projsegment(a,[0,80]) 33 30 ; 0 10 20 30 40 50 60 70 80 34 ; IDL> print, projsegment(a,[0,-80]) 31 ; IDL> print, projsegment(a,[0,-80]) 35 32 ; 0 -10 -20 -30 -40 -50 -60 -70 -80 36 ; IDL> print, projsegment(a,[-80,0]) 33 ; IDL> print, projsegment(a,[-80,0]) 37 34 ; -80 -70 -60 -50 -40 -30 -20 -10 0 38 35 ; … … 45 42 ; 46 43 ;- 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 44 ; 50 45 FUNCTION projsegment, vecteur, bornes, MP = mp 51 ;--------------------------------------------------------------52 46 ; 53 47 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/restoreatt.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 4 ; Allows to reattribute global variables associated with a field 8 ; when we give a structure created by saveatt.proby example.5 ; when we give a structure created by <pro>saveatt</pro> by example. 9 6 ; 10 7 ; @categories … … 30 27 ; 31 28 ;- 32 ;------------------------------------------------------------ 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 29 ; 35 30 PRO restoreatt, struct 36 31 ; -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/rotation.pro
r163 r231 3 3 ; @file_comments 4 4 ; Rotate two vectors by a specified amount. 5 ; 5 ; 6 6 ; @param X {in}{required} 7 7 ; original data point pairs … … 9 9 ; @param Y {in}{required} 10 10 ; original data point pairs 11 ; 11 ; 12 12 ; @param DEG {in}{required} 13 13 ; degrees to rotate. 14 ; 14 ; 15 15 ; @param NX {out} 16 16 ; rotated point pairs. 17 ; 17 ; 18 18 ; @param NY {out} 19 19 ; rotated point pairs. 20 ; 20 21 21 ; @history 22 22 ; Jeff Bennett, U of Colorado -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/saveatt.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 10 7 ; Utilities 11 8 ; 12 ; @returns 9 ; @returns 13 10 ; A structure of the form: 14 11 ; {n:varname,g:vargrid,d:vardate,e:varexp,u:varunit,m:valmask,l:niveau} … … 25 22 ; 26 23 ;- 27 ;------------------------------------------------------------ 28 ;------------------------------------------------------------ 29 ;------------------------------------------------------------ 24 ; 30 25 FUNCTION saveatt 31 26 ; -
trunk/SRC/ToBeReviewed/PLOTS/DIVERS/terminedessin.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 10 7 ; Utilities, Graphics 11 8 ; 12 ; @keyword POST 9 ; @keyword POST 13 10 ; Make a postscript. Only works if we made one drawing on the page. 14 11 ; If we make several drawing, use \@ps. 15 12 ; 16 ; @keyword SMALL {type=vector} 17 ; Vector composed of 3 or 4 elements, applied to make a drawing on a 13 ; @keyword SMALL {type=vector} 14 ; Vector composed of 3 or 4 elements, applied to make a drawing on a 18 15 ; small portion of a page or screen. It delimit the zone where the drawing will be done. 19 16 ; If there is 4 elements: 20 ; then is constituted of coordinates (expressed in cm located from the up and 21 ; left corner of the page or the window (in portrait like in landscape)) of the bottom 17 ; then is constituted of coordinates (expressed in cm located from the up and 18 ; left corner of the page or the window (in portrait like in landscape)) of the bottom 22 19 ; and left corner and of the up and right corner of the drawing zone. 23 20 ; If there is 3 elements: 24 ; in this case, we divide the page or the screen in small[0] columns and in small[1] lines 25 ; the drawing made in the box numbered small[2]. The numerotation starting up and left by 21 ; in this case, we divide the page or the screen in small[0] columns and in small[1] lines 22 ; the drawing made in the box numbered small[2]. The numerotation starting up and left by 26 23 ; the number 1 and then, following the writing direction. 27 ; By default, we make the largest drawing we can do, conserving the aspect rapport 24 ; By default, we make the largest drawing we can do, conserving the aspect rapport 28 25 ; (except when REMPLI is activated). 29 26 ; 30 ; @keyword _EXTRA 31 ; Used to pass yourkeywords27 ; @keyword _EXTRA 28 ; Used to pass keywords 32 29 ; 33 30 ; @uses … … 42 39 ; 43 40 ;- 44 ;------------------------------------------------------------ 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 41 ; 47 42 PRO terminedessin, POST = post, SMALL = small, _extra = ex 48 ;---------------------------------------------------------49 43 ; 50 44 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/PLOTS/LABEL/label_gmt.pro
r157 r231 1 1 ;+ 2 ; @file_comments 2 ; 3 ; @file_comments 3 4 ; Apply GMT palette into IDL color/intervals system 4 ; 5 ; 5 6 ; @categories 6 ; 7 ; 7 ; 8 8 ; @param MIN {in}{required} 9 9 ; A reel number specifying above what value we want to trace a contour … … 11 11 ; @param MAX {in}{required} 12 12 ; A reel number specifying below what value we want to trace a contour 13 ;14 ; @param INTERVALLE15 13 ; 16 ; 17 ; @param NCOUL 14 ; @param INTERVALLE 18 15 ; 19 ; 16 ; @param NCOUL 17 ; 20 18 ; @param NCONTOUR {out} 21 19 ; Number of contour to be drawn. … … 26 24 ; @param COUL 27 25 ; 28 ;29 26 ; @restrictions 30 ; 31 ; 27 ; 32 28 ; @examples 33 29 ; 34 ;35 30 ; @history 36 ;37 31 ; 38 32 ; @version 39 33 ; $Id$ 40 34 ;- 35 ; 41 36 PRO label_gmt, min, max, intervalle, ncoul, ncontour, level_z2d, coul 42 37 ; … … 46 41 @com_eg 47 42 48 IF pal_type NE '2dom' THEN BEGIN 43 IF pal_type NE '2dom' THEN BEGIN 49 44 50 45 ; color defined in lec_pal_gmt.pro … … 56 51 intervalle = -1 57 52 58 ENDIF ELSE BEGIN 53 ENDIF ELSE BEGIN 59 54 60 55 ; grey_shade palette (case 1 in label) 61 56 IF finite(min) EQ 0 THEN read, ' Grey shade needs a min,max :', min, max 62 57 ncontour = fix((max-min)/intervalle) 63 level_z2d = min + intervalle*findgen(Ncontour) 58 level_z2d = min + intervalle*findgen(Ncontour) 64 59 max=level_z2d[Ncontour-1]+intervalle 65 60 … … 69 64 ; color index 70 65 71 IF idx_pal EQ 0 THEN BEGIN 66 IF idx_pal EQ 0 THEN BEGIN 72 67 73 68 ; build palette … … 76 71 red[50:98] = long((100.-float(grey_shade))/100.*255.) 77 72 78 IF field.origin EQ 'diff' THEN BEGIN 79 73 IF field.origin EQ 'diff' THEN BEGIN 74 80 75 ; difference plot : lighter below first negative interval 81 76 red[51:98] = long((100.-float(grey_shade_2))/100.*255.) … … 83 78 red[50] = 255 84 79 85 ENDIF 80 ENDIF 86 81 87 82 ; first color=black … … 95 90 tvlct, red, green, blue 96 91 97 ENDIF 98 92 ENDIF 93 99 94 mid_index = max(where(level_z2d LE fldatt.mid)) 100 95 coul = findgen(Ncontour)+49-mid_index +2 101 96 102 ENDELSE 103 104 105 END 97 ENDELSE 98 END -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/ajoutvect.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 11 8 ; 12 9 ; @param VECTEUR {in}{required}{type=vector} 13 ; It is a structure with 2 elements containing we 2 matrices U and V of 14 ; values of the zonal and meridian component of the field of vectors to 10 ; It is a structure with 2 elements containing we 2 matrices U and V of 11 ; values of the zonal and meridian component of the field of vectors to 15 12 ; be traced. 16 13 ; For ex: … … 22 19 ; It is a scalar n or an array with 2 elements [n1,n2]. 23 20 ; In the first case, we will trace a vector on n following x and y. 24 ; In the second case, we will trace a vector on n1 following x and a 21 ; In the second case, we will trace a vector on n1 following x and a 25 22 ; vector n2 following n2 26 ; Comments: To trace all vectors following y and one vector on two 23 ; Comments: To trace all vectors following y and one vector on two 27 24 ; following x, put unvectsur=[2,1] 28 25 ; 29 26 ; @keyword VECTMIN {in}{required} 30 ; Minimum norme of vectors to be traced 27 ; Minimum norme of vectors to be traced 31 28 ; 32 29 ; @keyword VECTMAX {in}{required} 33 ; Maximum norme of vectors to be traced 30 ; Maximum norme of vectors to be traced 34 31 ; 35 32 ; @keyword _EXTRA 36 ; Used to pass yourkeywords37 ; 33 ; Used to pass keywords 34 ; 38 35 ; @uses 39 36 ; common.pro … … 46 43 ; 47 44 ; @version 48 ; $Id$ 49 ; 45 ; $Id$ 46 ; 50 47 ;- 51 ;------------------------------------------------------------ 52 ;------------------------------------------------------------ 53 ;------------------------------------------------------------ 54 pro ajoutvect,vecteur, vectlegende, UNVECTSUR=unvectsur,VECTMIN=vectmin, VECTMAX=vectmax, _EXTRA = ex 48 ; 49 PRO ajoutvect,vecteur, vectlegende, UNVECTSUR=unvectsur,VECTMIN=vectmin, VECTMAX=vectmax, _EXTRA = ex 55 50 ; 56 51 compile_opt idl2, strictarrsubs … … 90 85 indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 91 86 indicey = inter(indiceyu, indiceyv) 92 nx = n_elements(indicex) 87 nx = n_elements(indicex) 93 88 ny = n_elements(indicey) 94 89 indice2d = lindgen(jpi, jpj) … … 100 95 (size(u))[0] NE 2 OR (size(v))[0] NE 2: return 101 96 (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 102 (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 97 (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 103 98 if nxu NE nx then $ 104 if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 99 if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 105 100 IF nxv NE nx THEN $ 106 101 if indicex[0] EQ firstxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 107 102 IF nyu NE ny THEN $ 108 if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny] 103 if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny] 109 104 IF nyv NE ny THEN $ 110 105 if indicey[0] EQ firstyv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 111 106 END 112 107 (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 113 (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 108 (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 114 109 u = u[indice2d] 115 110 v = v[indice2d] 116 111 END 117 ELSE:BEGIN 112 ELSE:BEGIN 118 113 ras = report('problemes d''adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs') 119 114 return … … 138 133 ;---------------------------------------------------------------------------- 139 134 ; attribution of the mask and of longitude and latitude arrays. 140 ; We recuperate the complete grid to establish a big mask extensive 141 ; in the four directions to cover points for which a land point has 135 ; We recuperate the complete grid to establish a big mask extensive 136 ; in the four directions to cover points for which a land point has 142 137 ; been considerated (do a small drawing) 143 138 ;---------------------------------------------------------------------------- … … 154 149 endif 155 150 ;----------------------------------------------------------- 156 ; We mask u and v et v the long of coasts (the place where we 151 ; We mask u and v et v the long of coasts (the place where we 157 152 ; can not calculate the average) 158 ;----------------------------------------------------------- 153 ;----------------------------------------------------------- 159 154 ; extention of the mask 160 155 u = u*msku*shift(msku,1,0) 161 156 v = v*mskv*shift(mskv,0,1) 162 ENDIF ELSE BEGIN 157 ENDIF ELSE BEGIN 163 158 u = u*tmask[firstxt:lastxt,firstyt:lastyt,firstzt] 164 159 v = v*tmask[firstxt:lastxt,firstyt:lastyt,firstzt] … … 173 168 nan = where(finite(v, /nan) EQ 1) 174 169 if nan[0] NE -1 then v[nan] = 1e5 175 if keyword_set(vectmin) then BEGIN 170 if keyword_set(vectmin) then BEGIN 176 171 toosmall=where(tabnorme lt vectmin) 177 172 if toosmall[0] NE -1 then begin … … 208 203 indx = where((lindgen(nx) MOD unvectsur[0]) eq 0) 209 204 indy = where((lindgen(ny) MOD unvectsur[0]) eq 0) 210 ENDIF ELSE BEGIN 205 ENDIF ELSE BEGIN 211 206 indx = where((lindgen(nx) MOD unvectsur[0]) eq 0) 212 207 indy = where((lindgen(ny) MOD unvectsur[1]) eq 0) … … 222 217 endif 223 218 ;----------------------------------------------------------- 224 ; 219 ; 225 220 ;----------------------------------------------------------- 226 221 if keyword_set(inverse) then begin … … 238 233 if terre[0] ne -1 then mini = min(tabnorme[where(t2 eq 1)], max = maxi, /nan) $ 239 234 ELSE mini = min(tabnorme, max = maxi, /nan) 240 235 241 236 if litchamp(vecteur.(0), /u) NE '' then $ 242 237 vectlegende = {minmax:[mini, maxi], unite:litchamp(vecteur.(0), /u)} $ … … 245 240 246 241 sortie: 247 if keyword_set(key_performance) NE 0 THEN print, 'temps ajoutvect', systime(1)-tempsun 242 if keyword_set(key_performance) NE 0 THEN print, 'temps ajoutvect', systime(1)-tempsun 248 243 return 249 244 end 250 251 -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; … … 48 49 ; 49 50 ;+ 51 ; 50 52 ; @file_comments 51 53 ; 52 ;53 54 ; @categories 54 55 ; 55 ;56 56 ; @param U 57 ;58 57 ; 59 58 ; @param V … … 70 69 ; $Id$ 71 70 ;- 71 ; 72 72 PRO normalise, u, v, w 73 73 ; … … 153 153 ; 154 154 ; @keyword _EXTRA 155 ; Used to pass yourkeywords155 ; Used to pass keywords 156 156 ; 157 157 ; @uses -
trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/velovect.pro
r163 r231 1 ; 2 ;+ 1 ;+ 3 2 ; 4 3 ; @file_comments 5 4 ; Produce a two-dimensional velocity field plot. 6 5 ; 7 ; A directed arrow is drawn at each point showing the direction and 6 ; A directed arrow is drawn at each point showing the direction and 8 7 ; magnitude of the field. 9 ; 8 ; 10 9 ; @categories 11 10 ; Plotting, two-dimensional. 12 11 ; 13 ;14 12 ; @param U {in}{required} 15 ; The X component of the two-dimensional field. 13 ; The X component of the two-dimensional field. 16 14 ; U must be a two-dimensional array. 17 15 ; 18 16 ; @param V {in}{required} 19 17 ; The Y component of the two dimensional field. Y must have 20 ; the same dimensions as X. The vector at point [i,j] has a 18 ; the same dimensions as X. The vector at point [i,j] has a 21 19 ; magnitude of: 22 20 ; … … 28 26 ; 29 27 ; @param X {in}{optional}{type=vector} 30 ; Optional abscissa values. X must be a vector with a length 28 ; Optional abscissa values. X must be a vector with a length 31 29 ; equal to the first dimension of U and V. 32 30 ; … … 39 37 ; 40 38 ; @keyword DOTS 41 ; Set this keyword to 1 to place a dot at each missing point. 39 ; Set this keyword to 1 to place a dot at each missing point. 42 40 ; Set this keyword to 0 or omit it to draw nothing for missing 43 41 ; points. Has effect only if MISSING is specified. … … 55 53 ; current graphics screen is not erased, no axes are drawn, and 56 54 ; the previously established scaling remains in effect. 57 ; 55 ; 58 56 ; @keyword CLIP 59 ; 57 ; 60 58 ; @keyword NOCLIP 61 59 ; 62 60 ; @keyword _EXTRA 63 ; Used to pass your keywords.61 ; Used to pass keywords 64 62 ; 65 ; @restrictions 63 ; @restrictions 66 64 ; Plotting on the selected device is performed. System 67 65 ; variables concerning plotting are changed. 68 66 ; Note: All other keywords are passed directly to the PLOT procedure 69 ; and may be used to set option such as TITLE, POSITION, 67 ; and may be used to set option such as TITLE, POSITION, 70 68 ; NOERASE, etc. 71 69 ; … … 83 81 ; June, 1995, MWR. Removed _EXTRA inheritance for PLOTS and changed 84 82 ; OPLOT to PLOTS. 85 ; September, 1996, GGS. Changed denominator of x_step and y_step vars. 83 ; September, 1996, GGS. Changed denominator of x_step and y_step vars. 86 84 ; February, 1998, DLD. Add support for CLIP and NO_CLIP keywords. 87 85 ; June, 1998, DLD. Add support for OVERPLOT keyword. … … 103 101 s = size(u) 104 102 t = size(v) 105 if s[0] ne 2 then begin 103 if s[0] ne 2 then begin 106 104 baduv: message, 'U and V parameters must be 2D and same size.' 107 105 endif … … 122 120 nbad = 0 ;# of missing points 123 121 if n_elements(missing) gt 0 then begin 124 good = where(mag lt missing) 122 good = where(mag lt missing) 125 123 if keyword_set(dots) then bad = where(mag ge missing, nbad) 126 124 endif else begin -
trunk/SRC/ToBeReviewed/PLOTS/axe.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 37 34 ; 38 35 ; @keyword _EXTRA 39 ; used to pass yourkeywords36 ; Used to pass keywords 40 37 ; 41 38 ; @uses … … 55 52 ; 56 53 ;- 57 ;------------------------------------------------------------ 58 ;------------------------------------------------------------ 59 ;------------------------------------------------------------ 54 ; 60 55 PRO axe, coupe,tempsmin,tempsmax, REVERSE_X = reverse_x, REVERSE_Y = reverse_y, SIN = sin, SEPDATE = sepdate, DIGITSYEAR = digitsyear, _EXTRA = ex 61 56 ; -
trunk/SRC/ToBeReviewed/PLOTS/legende.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 12 9 ; @param MI {in}{required} 13 10 ; The min of the drawing 14 ; 11 ; 15 12 ; @param MA {in}{required} 16 13 ; The max of the plot … … 19 16 ; Character containing two letters giving the type of the cut (for example: 'xz'). 20 17 ; 21 ; @keyword CONTOUR 22 ; If we want to trace contours of a different field than the one 23 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 18 ; @keyword CONTOUR 19 ; If we want to trace contours of a different field than the one 20 ; whose we have the colored drawing (by example E-P in color and QSR in contours). 24 21 ; It must be a field respecting same characteristics than the argument number one of plt. 25 22 ; … … 28 25 ; 29 26 ; @keyword _EXTRA 30 ; used to pass yourkeywords31 ; 27 ; Used to pass keywords 28 ; 32 29 ; @uses 33 30 ; common.pro … … 46 43 ; 47 44 ;- 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 pro legende, mi, ma, coupe, CONTOUR = contour, ENDPOINTS = endpoints, DIREC = direc $ 45 ; 46 PRO legende, mi, ma, coupe, CONTOUR = contour, ENDPOINTS = endpoints, DIREC = direc $ 52 47 , VECTLEGENDE = vectlegende $ 53 48 , INTERVALLE = intervalle, TYPE_YZ = type_yz, VARNAME2 = varname2 $ … … 90 85 IF key_onearth THEN lontitle = 'Longitude' ELSE lontitle = 'i index' 91 86 IF key_onearth THEN lattitle = 'Latitude' ELSE lattitle = 'j index' 92 87 93 88 vertz = depthf2 94 89 legniv = ' m' 95 90 IF keyword_set(TYPE_YZ) THEN BEGIN 96 IF type_yz EQ 'hPa' THEN vertz = 'hPa' 97 IF type_yz EQ 'hPa' THEN legniv = ' hPa' 98 ENDIF 91 IF type_yz EQ 'hPa' THEN vertz = 'hPa' 92 IF type_yz EQ 'hPa' THEN legniv = ' hPa' 93 ENDIF 99 94 ; 100 95 ; Start legende … … 110 105 !p.subtitle = !p.subtitle+', Int= '+strtrim(string(format = fmt_mm, intervalle), 2) 111 106 endif 112 if size(contour, /type) EQ 8 then BEGIN ; it is a structure 107 if size(contour, /type) EQ 8 then BEGIN ; it is a structure 113 108 unite = '('+contour.(1)+')' 114 109 !p.subtitle = !p.subtitle+'!C '+contourf+unite $ … … 126 121 ;------------------------------------------------------------ 127 122 ; Shapping of subdomain 's dimensions 128 ;------------------------------------------------------------ 123 ;------------------------------------------------------------ 129 124 la1 = strtrim(string(format = fmt_bt, lat1), 2) 130 125 la2 = strtrim(string(format = fmt_bt, lat2), 2) … … 135 130 ;------------------------------------------------------------ 136 131 ; Management of the date 137 ;------------------------------------------------------------ 132 ;------------------------------------------------------------ 138 133 if n_elements(vardate) EQ 0 then vardate = '' 139 134 if NOT keyword_set(direc) then direc = '' … … 143 138 ;------------------------------------------------------------ 144 139 ; case on the caes where the caption is applied 145 ;------------------------------------------------------------ 140 ;------------------------------------------------------------ 146 141 case coupe of 147 'xy':begin 142 'xy':begin 148 143 if strupcase(vargrid) EQ 'W' then firstz = firstzw $ 149 144 ELSE firstz = firstzt … … 163 158 !p.title = zonalf+varexp+datef+svardate+fieldf+varname 164 159 !x.title = lontitle 165 if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 160 if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 166 161 IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1) 167 162 ENDIF … … 177 172 !y.title = vertz 178 173 !x.title = lattitle 179 if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 174 if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 180 175 IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1) 181 176 ENDIF … … 189 184 IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !y.title = timef 190 185 !x.title = lontitle 191 if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 186 if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 192 187 IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1) 193 188 ENDIF … … 195 190 196 191 'yt':begin 197 ; IF keyword_set(npts) THEN n = strtrim(npts, 1) 192 ; IF keyword_set(npts) THEN n = strtrim(npts, 1) 198 193 if keyword_set(endpoints) AND lon1 NE lon2 then $ 199 194 !p.title = diaghovyt+varexp+fieldf+varname ELSE $ … … 201 196 IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef 202 197 !y.title = lattitle 203 if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 198 if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 204 199 IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1) 205 200 ENDIF … … 213 208 end 214 209 't':begin 215 ; IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE BEGIN 210 ; IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE BEGIN 216 211 ; if keyword_set(integration3d) then n=strtrim(nx*ny*nz, 1) ELSE n=strtrim(nx*ny, 1) 217 ; ENDELSE 212 ; ENDELSE 218 213 !p.title = hovt+varexp+fieldf+varname 219 214 !y.title = varname 220 215 IF (time[(size(time))[0]-1] - time[0]) GE 10 THEN !x.title = timef 221 216 end 222 'x':begin 217 'x':begin 223 218 ; IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(ny*nz, 1) 224 219 if keyword_set(endpoints) AND lat1 NE lat2 then $ … … 226 221 !p.title = varexp+datef+svardate+fieldf+varname 227 222 !x.title = lontitle 228 if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 223 if keyword_set(endpoints) AND lat1 EQ lat2 then BEGIN 229 224 IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lataxe(0, 0, lat1), 1) ELSE !x.title = !x.title+' at j index '+strtrim(lat1, 1) 230 225 ENDIF 231 226 !y.title = varname 232 227 end 233 'y':begin 228 'y':begin 234 229 ; IF keyword_set(npts) THEN n = strtrim(npts, 1) ELSE n=strtrim(nx*nz, 1) 235 230 if keyword_set(endpoints) AND lon1 NE lon2 then $ … … 237 232 !p.title = varexp+datef+svardate+fieldf+varname 238 233 !x.title = lattitle 239 if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 234 if keyword_set(endpoints) AND lon1 EQ lon2 then BEGIN 240 235 IF key_onearth THEN !x.title = !x.title+' at '+strtrim(lonaxe(0, 0, lon1), 1) ELSE !x.title = !x.title+' at i index '+strtrim(lon1, 1) 241 236 ENDIF … … 253 248 !x.title = varname2 254 249 !y.title = varname 255 END 250 END 256 251 else: 257 252 ENDCASE … … 264 259 ELSE !p.subtitle = latintf+'['+la1+', '+la2+']'+onf+'('+strtrim(ny, 1)+' points) '+!p.subtitle 265 260 ENDIF 266 if strpos(direc, 'z') NE -1 AND (nz NE 1 OR coupe NE 'xy') then BEGIN 261 if strpos(direc, 'z') NE -1 AND (nz NE 1 OR coupe NE 'xy') then BEGIN 267 262 if strpos(!p.subtitle, '[') EQ -1 then $ 268 263 !p.subtitle = depintf+'['+pr1+', '+pr2+']'+onf+'('+strtrim(nz, 1)+' points) !C'+!p.subtitle $ … … 271 266 ENDIF 272 267 if keyword_set(endpoints) AND coupe NE 'yt' AND lat1 NE lat2 then !p.title = !p.title+'!C!C' 273 274 if keyword_set(key_performance) THEN print, 'temps legende', systime(1)-tempsun 268 269 if keyword_set(key_performance) THEN print, 'temps legende', systime(1)-tempsun 275 270 return 276 271 end -
trunk/SRC/ToBeReviewed/PLOTS/plotsym.pro
r223 r231 29 29 ; 30 30 ; @keyword _EXTRA 31 ; extra keywords for usersym. These are thick, color and fill 31 ; Used to pass keywords to <pro>usersym</pro>. 32 ; These are thick, color and fill. 32 33 ; 33 34 ; @history … … 44 45 ; 45 46 ;- 46 47 functionplotsym, circle=circle, triangle=triangle, diamond=diamond, $47 ; 48 FUNCTION plotsym, circle=circle, triangle=triangle, diamond=diamond, $ 48 49 angle=angle, box=box, line=line, scale=scale, $ 49 50 _extra=extra -
trunk/SRC/ToBeReviewed/PLOTS/reinitplt.pro
r213 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; This procedure will reinitialize all or a selection 4 ; This procedure will reinitialize all or a selection 8 5 ; of the system plot variables 9 6 ; … … 11 8 ; Utilities 12 9 ; 13 ;14 10 ; @keyword X 15 11 ; clear the appropriate variable … … 20 16 ; @keyword Z 21 17 ; clear the appropriate variable 22 ; 18 ; 23 19 ; @keyword P 24 20 ; clear the appropriate variable … … 33 29 ; @uses 34 30 ; common.pro 35 ; 31 ; 36 32 ; @restrictions 37 33 ; The system plot variables are changed. … … 47 43 ; 48 44 ;- 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 51 ;------------------------------------------------------------ 52 pro reinitplt, all=all,x=x,y=y,z=z,p=p, invert=invert 53 ;------------------------------------------------------------ 45 ; 46 PRO reinitplt, all=all,x=x,y=y,z=z,p=p, invert=invert 54 47 ; 55 48 compile_opt idl2, strictarrsubs … … 82 75 !x.charsize=0 83 76 !x.GRIDSTYLE=0 84 !X.MARGIN=[10,3] 77 !X.MARGIN=[10,3] 85 78 !X.MINOR=0 86 79 !X.OMARGIN=[0,0] … … 100 93 !y.charsize=0 101 94 !y.GRIDSTYLE=0 102 !Y.MARGIN=[10,3] 95 !Y.MARGIN=[10,3] 103 96 !Y.MINOR=0 104 97 !Y.OMARGIN=[0,0] … … 118 111 !z.charsize=0 119 112 !z.GRIDSTYLE=0 120 !Z.MARGIN=[10,3] 113 !Z.MARGIN=[10,3] 121 114 !Z.MINOR=0 122 115 !Z.OMARGIN=[0,0] -
trunk/SRC/ToBeReviewed/PLOTS/style.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 ; @file_comments 3 ; @file_comments 7 4 ; Choose the way to trace isolines. 8 5 ; … … 26 23 ; 4 Dash Dot Dot Dot 27 24 ; 5 Long Dashes 28 ; 25 ; 29 26 ; @param THICK {out} 30 27 ; Vector defining the thick of the isoline. … … 37 34 ; 38 35 ;- 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 42 pro style,labstyle,level_z2d,linestyle,thick 36 ; 37 PRO style,labstyle,level_z2d,linestyle,thick 43 38 ; 44 39 compile_opt idl2, strictarrsubs … … 57 52 a=replicate(0,fix(n_elements(level_z2d)/2)) 58 53 b=replicate(1,fix(n_elements(level_z2d)/2)) 59 c=replicate(2,fix(n_elements(level_z2d)/2)) 54 c=replicate(2,fix(n_elements(level_z2d)/2)) 60 55 if impair then begin 61 56 thick=[b,2,b] … … 74 69 rien=where(level_z2d lt seuil,n) 75 70 a=replicate(0,n_elements(level_z2d)-n) 76 c=replicate(2,n) 71 c=replicate(2,n) 77 72 if seuil eq level_z2d[n] then begin 78 73 thick=[replicate(1,n),2,replicate(1,n_elements(level_z2d)-1-n)] -
trunk/SRC/ToBeReviewed/PLOTS/symbols.pro
r142 r231 3 3 ; @file_comments 4 4 ; Create custom plotting symbols 5 ; 5 ; 6 6 ; @param NSYM {in}{required} 7 ; 7 ; 8 8 ; 1 = open circle 9 9 ; 2 = filled circle … … 24 24 ; 31 = filled diamond 25 25 ; 32 = filled triangle 26 ; 26 ; 27 27 ; @param SCALE {in}{required} 28 28 ; size of symbols. 29 ; 29 ; 30 30 ; @keyword COLOR 31 31 ; color of symbols 32 32 ; 33 33 ; @restrictions 34 ; The desired symbol is stored in the user buffer and 34 ; The desired symbol is stored in the user buffer and 35 35 ; will be plotted if !P.PSYM = 8. 36 36 ; … … 42 42 ; 43 43 ;- 44 pro symbols,nsym,scale,color=col 44 ; 45 PRO symbols,nsym,scale,color=col 45 46 ; 46 47 compile_opt idl2, strictarrsubs … … 66 67 ;nsyms greater than 10 should be filled arrows 67 68 if nsym gt 10 then begin 68 xarr[3] = 6. 69 xarr[3] = 6. 69 70 xarr[4] = 10. 70 71 yarr[3] = -2. -
trunk/SRC/ToBeReviewed/POSTSCRIPT/calibre.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; From a rapport of aspect and values (in line of character) of different margins, … … 58 56 ; 59 57 ; @keyword _EXTRA 60 ; Used to pass yourkeywords58 ; Used to pass keywords 61 59 ; 62 60 ; @param POSFENETRE {type=vector} … … 79 77 ; $Id$ 80 78 ;- 81 ;------------------------------------------------------------ 82 ;------------------------------------------------------------ 83 ;------------------------------------------------------------ 84 pro calibre, rapportyx, marge, margebar, smalldraw, posfenetre, posbar $ 79 ; 80 PRO calibre, rapportyx, marge, margebar, smalldraw, posfenetre, posbar $ 85 81 , REMPLI = rempli, YXASPECT = yxaspect, PORTRAIT = portrait $ 86 82 , LANDSCAPE = lanscape, _extra = ex 87 ;---------------------------------------------------------88 83 ; 89 84 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/POSTSCRIPT/chcolps.pro
r163 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 6 ; 7 ;8 7 ; @param TABLE 9 8 ; 10 ;11 9 ; @restrictions 12 10 ; 13 ;14 11 ; @examples 15 ;16 12 ; 17 13 ; @history … … 20 16 ; @version 21 17 ; $Id$ 18 ; 22 19 ;- 20 ; 23 21 PRO format_colortable_hexa, table 24 22 ; … … 42 40 43 41 END 44 45 42 ; 46 43 ;+ 44 ; 47 45 ; @file_comments 48 46 ; Build a bloc of colortable … … 50 48 ; @categories 51 49 ; 52 ;53 50 ; @param TABLEOUT 54 51 ; 55 ;56 52 ; @restrictions 57 53 ; 58 ;59 54 ; @examples 60 55 ; 61 ;62 56 ; @history 63 57 ; 64 ;65 58 ; @version 66 59 ; $Id$ 60 ; 67 61 ;- 62 ; 68 63 PRO build_table, tableout 69 ;70 ;71 64 ; 72 65 compile_opt idl2, strictarrsubs … … 87 80 88 81 END 89 90 91 82 ; 92 83 ;+ 84 ; 93 85 ; @file_comments 94 86 ; Modify colors of a postscript file 95 87 ; 96 88 ; @categories 97 ;98 89 ; 99 90 ; @param N1 {in}{required} … … 110 101 ; @keyword PALIT1 111 102 ; 112 ;113 103 ; @keyword PALIT2 114 104 ; 115 ;116 105 ; @restrictions 117 106 ; 118 ;119 107 ; @examples 120 ;121 108 ; 122 109 ; @history … … 125 112 ; @version 126 113 ; $Id$ 114 ; 127 115 ;- 116 ; 128 117 PRO chcolps, n1, n2, file, PALIT1 = palit1, PALIT2 = palit2 129 ;; 130 ;; 131 ;; 118 ; 119 compile_opt idl2, strictarrsubs 132 120 ; 133 121 ; recuperate palettes 134 ;135 ;136 compile_opt idl2, strictarrsubs137 122 ; 138 123 lct, n1 -
trunk/SRC/ToBeReviewed/STRING/string2struct.pro
r223 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; This is a really, really cool way to turn keywords into a structure. … … 7 8 ; 8 9 ; @keyword _EXTRA 9 ; used to pass yourkeywords10 ; Used to pass keywords 10 11 ; 11 12 ; @returns … … 15 16 ; @examples 16 17 ; 17 ;18 18 ; @history 19 19 ; … … 21 21 ; $Id$ 22 22 ;- 23 function too_cool,_extra=extra 23 ; 24 FUNCTION too_cool,_extra=extra 24 25 ; 25 26 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/STRING/strkeywd.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 56 53 ; 57 54 ;- 58 ;------------------------------------------------------------ 59 ;------------------------------------------------------------ 60 ;------------------------------------------------------------ 55 ; 61 56 FUNCTION strkeywd, struct 62 57 ; -
trunk/SRC/ToBeReviewed/STRUCTURE/struct2string.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 24 21 ; 25 22 ; @restrictions 26 ; Use tostr.pro, cf this function header!23 ; Use <pro>tostr</pro>, cf this function header! 27 24 ; 28 25 ; @examples … … 43 40 ; 44 41 ;- 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 42 ; 48 43 FUNCTION struct2string, struct, CUT_IN_STRING = cut_in_string, MAX_STRUCT_LENGTH = max_struct_length, DIRECT2STRING = direct2string 49 44 ; -
trunk/SRC/ToBeReviewed/TRIANGULATION/ciseauxtri.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; Delete arrays which do not have to be drawn thanks to 2 tests: … … 18 16 ; 19 17 ; @keyword _EXTRA 20 ; Used to pass your keywords.18 ; Used to pass keywords 21 19 ; 22 20 ; @uses … … 31 29 ; 32 30 ;- 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 31 ; 36 32 FUNCTION ciseauxtri, triang, glam, gphi, _EXTRA = ex 37 33 ;--------------------------------------------------------- -
trunk/SRC/ToBeReviewed/TRIANGULATION/completecointerre.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ;8 4 ; 9 5 ; @categories 10 6 ; Graphics 11 7 ; 12 ; @param LONS 13 ; 8 ; @param LONS 14 9 ; 15 10 ; @param LATS 16 11 ; 17 ;18 12 ; @param SEUIL 19 13 ; 20 ;21 14 ; @keyword _EXTRA 22 ; Used to pass your keywords15 ; Used to pass keywords 23 16 ; 24 17 ; @keyword CONT_COLOR {default=(!d.n_colors - 1) < 255 => white} … … 36 29 ; 37 30 ;- 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 31 ; 41 32 PRO draw_corner_triangle, lons, lats, seuil, CONT_COLOR = cont_color, _extra = ex 42 33 ; … … 47 38 IF min(lons, max = maxlon) GE lon1 AND maxlon LE lon2 $ 48 39 AND min(lats, max = maxlat) GE lat1 AND maxlat LE lat2 then BEGIN 49 ; the triangle must not be too big 50 z = convert_coord(lons, lats, /data, /to_normal) 40 ; the triangle must not be too big 41 z = convert_coord(lons, lats, /data, /to_normal) 51 42 alldist = [(z[0, 2]-z[0, 0])^2 + (z[1, 2]-z[1, 0])^2 $ 52 43 , (z[0, 0]-z[0, 1])^2 + (z[1, 0]-z[1, 1])^2 $ … … 55 46 , color = cont_color, _extra = ex 56 47 return 57 ENDIF 48 ENDIF 58 49 end 59 50 ;------------------------------------------------------------ … … 69 60 ; 70 61 ; @keyword _EXTRA 71 ; Used to pass your keywords62 ; Used to pass keywords 72 63 ; 73 64 ; @keyword CONT_COLOR … … 76 67 ; 77 68 ; @keyword COINMONTE {type=array} 78 ; To obtain the array of "ascending land corner" 79 ; to be treated with completecointerre.pro in the variable array69 ; To obtain the array of "ascending land corner" 70 ; to be treated with <pro>completecointerre</pro> in the variable array 80 71 ; instead of make it pass by the global variable twin_corners_up. 81 72 ; … … 131 122 IF total(key_stride) EQ 3 AND finite(glamv[0]*gphiv[0]) NE 0 THEN BEGIN 132 123 long1 = glamv[indicezoom] & lati1 = gphiv[indicezoom] 133 ENDIF ELSE BEGIN 124 ENDIF ELSE BEGIN 134 125 long1 = glamt[indicezoom] & lati1 = gphif[indicezoom] 135 126 ENDELSE … … 140 131 ENDELSE 141 132 long3 = glamf[indicezoom] & lati3 = gphif[indicezoom] 142 ENDIF ELSE BEGIN 133 ENDIF ELSE BEGIN 143 134 IF total(key_stride) EQ 3 AND finite(glamv[0]*gphiv[0]) NE 0 THEN BEGIN 144 135 long1 = glamv & lati1 = gphiv 145 ENDIF ELSE BEGIN 136 ENDIF ELSE BEGIN 146 137 long1 = glamt & lati1 = gphif 147 138 ENDELSE 148 139 IF total(key_stride) EQ 3 AND finite(glamu[0]*gphiu[0]) NE 0 THEN BEGIN 149 140 long2 = glamu & lati2 = gphiu 150 ENDIF ELSE BEGIN 141 ENDIF ELSE BEGIN 151 142 long2 = glamf & lati2 = gphit 152 143 ENDELSE 153 144 long3 = glamf & lati3 = gphif 154 ENDELSE 145 ENDELSE 155 146 ; 156 147 nx = (size(long1, /dimensions))[0] … … 169 160 ; 2 land points in diagonal ascending with 2 ocean points on the descendant diagonal. 170 161 ; 171 ; 4 162 ; 4 172 163 ; t(i+nx)=1 u(i+nx) t(i+nx+1)=0 173 164 ; | \ … … 196 187 lats = [lati3[i], lati1[i+1], lati2[i+nx]] 197 188 draw_corner_triangle, lons, lats, seuil, CONT_COLOR = cont_color, _extra = ex 198 ENDIF 199 ENDFOR 189 ENDIF 190 ENDFOR 200 191 IF testvar(var = key_performance) EQ 2 THEN $ 201 192 print, 'temps completecointerre: trace de cointerremonte', systime(1)-tempdeux … … 204 195 ; Case land corner in descent: 205 196 ; 2 land points in diagonal descending with 2 ocean points on the ascendant diagonal. 206 ; 197 ; 207 198 ; 4 208 199 ; t(i+nx)=1 u(i+nx) t(i+nx+1)=0 209 ; / | 210 ; / | 200 ; / | 201 ; / | 211 202 ; / 3 | 5 212 203 ; v(i)---------f(i)------------v(i+1) … … 238 229 239 230 ;------------------------------------------------------------ 240 IF keyword_set(key_performance) THEN print, 'temps completecointerre', systime(1)-tempsun 231 IF keyword_set(key_performance) THEN print, 'temps completecointerre', systime(1)-tempsun 241 232 ;------------------------------------------------------------ 242 233 return -
trunk/SRC/ToBeReviewed/TRIANGULATION/definetri.pro
r230 r231 2 2 ; 3 3 ; @file_comments 4 ; Define a triangulation array like TRIANGULATE.4 ; Define a triangulation array like <pro>TRIANGULATE</pro>. 5 5 ; But in a VERY SIMPLE CASE: 6 6 ; the points are regulary-gridded on nx*ny array. 7 7 ; Find a Delaunay triangulation for this set of points is easy: 8 ; Points define (nx-1)*(ny-1) rectangles which we can cut in 2 triangles. 8 ; Points define (nx-1)*(ny-1) rectangles which we can cut in 2 triangles. 9 9 ; cf. figure above 10 10 ; … … 12 12 ; fixe 13 13 ; ny-1*---*---*. . . . . .*---*---* 14 ; | +| +| | +| +| 14 ; | +| +| | +| +| 15 15 ; | + | + | | + | + | 16 16 ; |+ |+ | |+ |+ | 17 ; ny-2*---*---*. . . . . .*---*---* 17 ; ny-2*---*---*. . . . . .*---*---* 18 18 ; . . . . 19 19 ; . . . . … … 23 23 ; | + | + | | + | + | 24 24 ; |+ |+ | |+ |+ | 25 ; 0*---*---*. . . . . .*---*---* 25 ; 0*---*---*. . . . . .*---*---* 26 26 ; 0 1 2 nx-3 nx-2 nx-1 27 27 ; </fixe> … … 35 35 ; | + | | + | 36 36 ; |+ | | +| 37 ; *---* *---* 37 ; *---* *---* 38 38 ; </fixe> 39 39 ; 40 40 ; @categories 41 41 ; Utilities 42 ; 42 ; 43 43 ; @param NX {in}{required} 44 44 ; The x dimension array … … 48 48 ; 49 49 ; @param DOWNWARD {in}{optional} 50 ; When DOWNWARD is undefined all rectangles are cut in using the upward 51 ; diagonal. 52 ; DOWNWARD is a vector which contains the rectangles numbers which are cut in 50 ; When DOWNWARD is undefined all rectangles are cut in using the upward 51 ; diagonal. 52 ; DOWNWARD is a vector which contains the rectangles numbers which are cut in 53 53 ; using the downward diagonal. 54 ; The rectangle number is defined by the index (in a nx*ny vector) of the 54 ; The rectangle number is defined by the index (in a nx*ny vector) of the 55 55 ; lower-left corner of the rectangle. 56 56 ; … … 88 88 nx = long(nx) 89 89 ny = long(ny) 90 if n_elements(downward) NE 0 THEN BEGIN 90 if n_elements(downward) NE 0 THEN BEGIN 91 91 if n_elements(downward) GT (nx-1)*(ny-1) then begin 92 92 print, 'downward a trop d''elements par rapport a nx et ny!' … … 95 95 downward = long(downward) 96 96 ENDIF 97 ; we define triangles 97 ; we define triangles 98 98 triangles = lonarr(3, 2*(nx-1)*(ny-1)) 99 99 ;---------------------------------------------------------------------------------- … … 110 110 if n_elements(downward) NE 0 then upward[downward] = 0 111 111 upward = where(upward EQ 1) 112 n1 = n_elements(upward) 112 n1 = n_elements(upward) 113 113 ; 114 114 ; 4 corners indexes of a rectangle number i are 115 115 ; 116 116 ; i+nx i+nx+1 117 ; *---* 118 ; | +| 119 ; | + | 120 ; |+ | 121 ; *---* 117 ; *---* 118 ; | +| 119 ; | + | 120 ; |+ | 121 ; *---* 122 122 ; i i+1 123 123 ; … … 136 136 ;---------------------------------------------------------------------------------- 137 137 if n_elements(downward) NE 0 then BEGIN 138 n2 = n_elements(downward) 138 n2 = n_elements(downward) 139 139 trinumber = 2*(downward-downward/nx) 140 140 ; we define the right triangles -
trunk/SRC/ToBeReviewed/TRIANGULATION/definetri_e.pro
r186 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 ;7 6 ; 8 7 ; @param INDEX … … 15 14 ; The y dimension array 16 15 ; 17 ;18 16 ; @returns 19 17 ; 18 ; @restrictions 20 19 ; 21 ; @restrictions22 ;23 ;24 20 ; @examples 25 ; 26 ; 21 ; 27 22 ; @history 28 ;29 23 ; 30 24 ; @version 31 25 ; $Id$ 32 26 ;- 33 function numtri, index, nx, ny 27 ; 28 FUNCTION numtri, index, nx, ny 34 29 ; 35 30 compile_opt idl2, strictarrsubs … … 42 37 return, numtri 43 38 end 44 45 39 ; 46 40 ;+ 47 41 ; 48 42 ; @file_comments 49 ; Define a triangulation array like TRIANGULATEbut for a43 ; Define a triangulation array like <pro>TRIANGULATE</pro> but for a 50 44 ; E-grid type 51 45 ; 52 46 ; @categories 53 47 ; Make contours with E-grid type 54 ; 48 ; 55 49 ; @param NX {in}{required} 56 50 ; The x dimension array … … 60 54 ; 61 55 ; @param SINGULAR {in}{optional} 62 ; When singular is undefined all rectangles are cut in using the vertical 63 ; diagonal. 64 ; Singular is a vector which contains the rectangles numbers which are cut in 56 ; When singular is undefined all rectangles are cut in using the vertical 57 ; diagonal. 58 ; Singular is a vector which contains the rectangles numbers which are cut in 65 59 ; using the horizontal diagonal. 66 ; The rectangle number is defined by the index (in a nx*ny vector) of the 60 ; The rectangle number is defined by the index (in a nx*ny vector) of the 67 61 ; lower-left corner of the rectangle. 68 62 ; 69 63 ; @keyword SHIFTED 70 64 ; 71 ;72 65 ; @returns 73 66 ; Triangles is a 2d array and is dimensions are 3 and (nx-1)*(ny-1). 74 67 ; Triangles is defined like in the TRIANGULATE procedure. 75 ; 68 ; 76 69 ; @history 77 70 ; Sebastien Masson (smlod\@ipsl.jussieu.fr) … … 81 74 ; $Id$ 82 75 ; 83 ; @todo 76 ; @todo 84 77 ; seb: documenter SHIFTED 85 78 ;- -
trunk/SRC/ToBeReviewed/TRIANGULATION/dessinetri.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 9 6 ; @categories 10 7 ; Utilities 11 ; 8 ; 12 9 ; @param TRI {in}{optional} 13 ; Array which define the triangulation (provided by triangule.pro or triangulate) 14 ; 10 ; Array which define the triangulation (provided by <pro>triangule</pro> or 11 ; <pro>triangulate</pro>) 12 ; 15 13 ; @param X {in}{optional} 16 ; The x position of points to which the trangulation refer to 14 ; The x position of points to which the trangulation refer to 17 15 ; (see the x array provided in triangulate) 18 16 ; 19 17 ; @param Y {in}{optional} 20 ; The y position of points to which the trangulation refer to 18 ; The y position of points to which the trangulation refer to 21 19 ; (see the y array provided in triangulate) 22 20 ; … … 44 42 ; 45 43 ;- 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 49 44 ; 50 45 PRO dessinetri, tri, x, y, WAIT = wait, ONEBYONE = onebyone, FILL = fill, CHANGECOLOR = changecolor, _extra = ex 51 46 ; … … 58 53 CASE size(x, /n_dimensions)+size(y, /n_dimensions) OF 59 54 2:BEGIN 60 nx = n_elements(x) 61 ny = n_elements(y) 55 nx = n_elements(x) 56 ny = n_elements(y) 62 57 glam = x#replicate(1., ny) 63 58 gphi = replicate(1., nx)#y 64 END 59 END 65 60 4:BEGIN 66 61 glam = x … … 72 67 END 73 68 ENDCASE 74 ENDIF ELSE BEGIN 69 ENDIF ELSE BEGIN 75 70 grille,mask,glam,gphi, tri = tri 76 71 undefine, mask 77 72 tri = ciseauxtri(tri, glam, gphi) 78 ENDELSE 73 ENDELSE 79 74 ; 80 75 IF keyword_set(changecolor) THEN BEGIN 81 76 oldname = !d.name 82 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN 77 if !d.name EQ 'PS' OR !d.name EQ 'Z' then BEGIN 83 78 thisos = strupcase(strmid(!version.os_family, 0, 3)) 84 79 CASE thisOS of … … 92 87 color = 1+indgen(changecolor)*(ncolors/(changecolor-1)) 93 88 ENDIF ELSE color = 0 94 color = color#replicate(1, n_elements(tri)/3/n_elements(color)+1) 89 color = color#replicate(1, n_elements(tri)/3/n_elements(color)+1) 95 90 ; 96 91 tempdeux = systime(1) ; For key_performance =2 … … 106 101 print, 'temps dessinetri: trace des triangles', systime(1)-tempdeux 107 102 ; 108 if keyword_set(key_performance) THEN print, 'temps dessinetri', systime(1)-tempsun 103 if keyword_set(key_performance) THEN print, 'temps dessinetri', systime(1)-tempsun 109 104 110 105 return -
trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_c.pro
r163 r231 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param MASK 9 8 ; 10 ;11 9 ; @param XF 12 ;13 10 ; 14 11 ; @param YF 15 ;16 12 ; 17 13 ; @param NX 18 ;19 14 ; 20 15 ; @param NY 21 ;22 16 ; 23 17 ; @keyword COAST_COLOR {default=0} … … 29 23 ; 30 24 ; @keyword XSEUIL {default=5} 31 ; To eliminate segments of coasts which are to big (which link points which can 32 ; be close on the sphere but distant on the drawing). We delete all segments 33 ; whose the size surpass the size of the window following X/XSEUIL. 34 ; But it can be to big if we do a big zoom or a little one for some 25 ; To eliminate segments of coasts which are to big (which link points which can 26 ; be close on the sphere but distant on the drawing). We delete all segments 27 ; whose the size surpass the size of the window following X/XSEUIL. 28 ; But it can be to big if we do a big zoom or a little one for some 35 29 ; projections... We specify it the keyword thanks to this keyword! 36 30 ; 37 31 ; @keyword YSEUIL 38 32 ; See XSEUIL 39 ; 33 ; 40 34 ; @keyword _EXTRA 41 ; Used to pass ourkeywords42 ; 35 ; Used to pass keywords 36 ; 43 37 ; @returns 44 ; 45 ; 38 ; 46 39 ; @uses 47 ; 48 ; 40 ; 49 41 ; @restrictions 50 ; 51 ; 42 ; 52 43 ; @examples 53 ; 54 ; 44 ; 55 45 ; @history 56 ; 57 ; 58 ; @version 59 ; 60 ; @todo 46 ; 47 ; @version 48 ; 49 ; @todo 61 50 ; Seb: remplir le header 62 51 ; 63 52 ;- 64 ; ---------------------------------------------------------53 ; 65 54 PRO drawcoast_c, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, _extra = ex 66 55 ; … … 96 85 print, 'temps tracecote: determiner liste des points concernes par un trait vertical', systime(1)-tempdeux 97 86 tempdeux = systime(1) ; For key_performance =2 98 for pt = 0L, n_elements(lx)-1 do BEGIN 87 for pt = 0L, n_elements(lx)-1 do BEGIN 99 88 i = lx[pt] & j = ly[pt] 100 89 plots, [xf[i, j-1], xf[i, j]], [yf[i, j-1], yf[i, j]] $ … … 108 97 ; For the drawing of horizontal segments , it is the same thing but we have to be careful if it is periodic. 109 98 ; 110 ; If it is periodic, we duplicate the first column and we put it at the end. 99 ; If it is periodic, we duplicate the first column and we put it at the end. 111 100 ; (This is made not for the shift which is periodic by default but for the plots) 112 101 tempdeux = systime(1) ; For key_performance =2 … … 130 119 print, 'temps tracecote: determiner liste des points concernes par un trait horizontal', systime(1)-tempdeux 131 120 tempdeux = systime(1) ; For key_performance =2 132 for pt = 0L, n_elements(lx)-1 do BEGIN 121 for pt = 0L, n_elements(lx)-1 do BEGIN 133 122 i = lx[pt] & j = ly[pt] 134 123 plots, [xf[i-1, j], xf[i, j]], [yf[i-1, j], yf[i, j]] $ -
trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_e.pro
r226 r231 2 2 ; @file_comments 3 3 ; 4 ;5 4 ; @categories 6 ;7 5 ; 8 6 ; @param MASK 9 7 ; 10 ;11 8 ; @param XF 12 ;13 9 ; 14 10 ; @param YF 15 11 ; 16 ;17 12 ; @param NX 18 13 ; 19 ;20 14 ; @param NY 21 ;22 15 ; 23 16 ; @keyword COAST_COLOR {default=0} … … 39 32 ; 40 33 ; @keyword _EXTRA 41 ; Used to pass ourkeywords34 ; Used to pass keywords 42 35 ; 43 36 ; @returns 44 37 ; 45 ;46 38 ; @uses 47 ;48 39 ; 49 40 ; @restrictions 50 41 ; 51 ;52 42 ; @examples 53 43 ; 54 ;55 44 ; @history 56 ;57 45 ; 58 46 ; @version … … 62 50 ; 63 51 ;- 64 52 ; 65 53 PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, onemore = onemore, _extra = ex 66 ;---------------------------------------------------------67 54 ; 68 55 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/TRIANGULATION/drawsectionbottom.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 8 5 ; 9 6 ; @categories 10 ; 7 ; 11 8 ; @param MASKIN {in}{required} 12 9 ; 13 ; @param XXAXISIN {in}{required} 10 ; @param XXAXISIN {in}{required} 14 11 ; 15 12 ; @param DEPTHSIN {in}{required} … … 31 28 ; @restrictions 32 29 ; Simple way to fill continents for a section (using the 33 ; fact that continents are wider at the bottom than at the top). 30 ; fact that continents are wider at the bottom than at the top). 34 31 ; 35 32 ; @history … … 43 40 ; Seb: definir params 44 41 ;- 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 42 ; 48 43 PRO drawsectionbottom, maskin, xxaxisin, depthsin $ 49 44 , COAST_COLOR = coast_color, COAST_THICK = coast_thick $ 50 45 , CONT_COLOR = cont_color, CONT_NOFILL = cont_nofill $ 51 46 , OVERPLOT = overplot, _extra = ex 52 ;---------------------------------------------------------53 47 ; 54 48 compile_opt idl2, strictarrsubs … … 58 52 @updatekwd 59 53 ENDIF 60 ;--------------------------------------------------------- 54 ;--------------------------------------------------------- 61 55 if keyword_set(overplot) then return 62 56 ; … … 92 86 usepartial = total(usepartial NE usepartial[0]) GE 1 93 87 depths = depthsin[0:nx-1,*] 94 ; we add one level according to the ocean level we had to the mask. 88 ; we add one level according to the ocean level we had to the mask. 95 89 deltaz = abs(!y.range[1]-!y.range[0])/10. 96 90 zmax = max(depthsin)+deltaz … … 142 136 FOR i = 0, countout -1 DO BEGIN 143 137 CASE 1 OF 144 out[i] EQ 0:BEGIN 138 out[i] EQ 0:BEGIN 145 139 ; if we start with a out point 146 140 xxx = !values.f_nan 147 zzz = !values.f_nan 148 END 149 i EQ 0:BEGIN 141 zzz = !values.f_nan 142 END 143 i EQ 0:BEGIN 150 144 ; i eq 0 but out[i] ne 0 151 145 xxx = [xx[0:out[i]], !values.f_nan] … … 155 149 ; two consecutive out values at the same depth: we just keep 156 150 ; !values.f_nan values until the next change of depth 157 IF (out[i-1] EQ out[i]-1) AND (zz[out[i-1]] EQ zz[out[i]]) THEN BEGIN 151 IF (out[i-1] EQ out[i]-1) AND (zz[out[i-1]] EQ zz[out[i]]) THEN BEGIN 158 152 xxx = [xxx, !values.f_nan] 159 zzz = [zzz, !values.f_nan] 160 ENDIF ELSE BEGIN 153 zzz = [zzz, !values.f_nan] 154 ENDIF ELSE BEGIN 161 155 ; we keep everything inbetween the out values (including themselves 162 156 ; for the vertical lines) but we had !values.f_nan to remove the horizontal lines 163 157 xxx = [xxx, xx[out[i-1]:out[i]], !values.f_nan] 164 zzz = [zzz, zz[out[i-1]:out[i]], !values.f_nan] 158 zzz = [zzz, zz[out[i-1]:out[i]], !values.f_nan] 165 159 ENDELSE 166 160 END … … 168 162 IF i EQ countout-1 AND out[i] NE n_elements(xx)-1 THEN BEGIN 169 163 xxx = [xxx, xx[out[i]:*]] 170 zzz = [zzz, zz[out[i]:*]] 164 zzz = [zzz, zz[out[i]:*]] 171 165 ENDIF 172 166 ENDFOR -
trunk/SRC/ToBeReviewed/TRIANGULATION/fillcornermask.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 11 8 ; 12 9 ; @keyword _EXTRA 13 ; Used to pass your keywords10 ; Used to pass keywords 14 11 ; 15 12 ; @keyword CONT_COLOR {default=(!d.n_colors - 1) < 255 => white} … … 27 24 ; 28 25 ;- 29 ;------------------------------------------------------------ 30 ;------------------------------------------------------------ 31 ;------------------------------------------------------------ 32 PRO fillcornermask, xin, yin, COINMONTE = coinmonte, COINDESCEND = coindescend $ 26 ; 27 PRO fillcornermask, xin, yin, COINMONTE = coinmonte, COINDESCEND = coindescend $ 33 28 , CONT_COLOR = cont_color, INDICEZOOM = indicezoom $ 34 29 , _extra = ex … … 42 37 tempsun = systime(1) ; For key_performance 43 38 ; 44 IF NOT keyword_set(cont_color) THEN cont_color = (!d.n_colors-1) < 255 39 IF NOT keyword_set(cont_color) THEN cont_color = (!d.n_colors-1) < 255 45 40 ;------------------------------------------------------------ 46 41 ; definition of coordinates of points numbered 1,2,3,4,5,6 (see figures below) … … 54 49 y2 = .5*(y1+shift(y1, -1)) 55 50 nx = n_elements(x1) 56 ny = n_elements(y1) 51 ny = n_elements(y1) 57 52 ; 58 53 ; … … 61 56 ; 2 land points in diagonal ascending with 2 ocean points on the descendant diagonal. 62 57 ; 63 ; 3 58 ; 3 64 59 ; t(i+nx)=1 u(i+nx) t(i+nx+1)=0 65 60 ; | \ … … 94 89 ; 4 95 90 ; t(i+nx)=1 u(i+nx) t(i+nx+1)=0 96 ; / | 97 ; / | 91 ; / | 92 ; / | 98 93 ; / 3 | 5 99 94 ; v(i)---------f(i)------------v(i+1) … … 120 115 121 116 ;------------------------------------------------------------ 122 IF keyword_set(key_performance) THEN print, 'temps fillcornermask', systime(1)-tempsun 117 IF keyword_set(key_performance) THEN print, 'temps fillcornermask', systime(1)-tempsun 123 118 ;------------------------------------------------------------ 124 119 return -
trunk/SRC/ToBeReviewed/TRIANGULATION/section.pro
r186 r231 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param FIELD 9 8 ; 10 ;11 9 ; @param RES 12 10 ; 13 ;14 11 ; @param GLAMAXE 15 12 ; 16 ;17 13 ; @param GPHIAXE 18 14 ; 19 ; 20 ; @keyword ENDPOINTS 21 ; 22 ; 15 ; @keyword ENDPOINTS 16 ; 23 17 ; @keyword BOXZOOM 24 18 ; 25 ; 26 ; @keyword TYPE 27 ; 19 ; @keyword TYPE 28 20 ; 29 21 ; @keyword WDEPTH 30 22 ; 31 ;32 23 ; @keyword DIREC 33 24 ; 34 ;35 25 ; @keyword SHOWBUILD 36 26 ; 37 ;38 27 ; @keyword ONLYBOX 39 28 ; 40 ; 41 ; @keyword _EXTRA 42 ; Used to pass your keywords 43 ; 29 ; @keyword _EXTRA 30 ; Used to pass keywords 31 ; 44 32 ; @returns 45 ; 46 ; 33 ; 47 34 ; @uses 48 35 ; common.pro 49 ; 36 ; 50 37 ; @restrictions 51 ; 52 ; 38 ; 53 39 ; @examples 54 ; 55 ; 40 ; 56 41 ; @history 57 42 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 58 ; 59 ; @version 43 ; 44 ; @version 60 45 ; $Id$ 61 ; 46 ; 62 47 ;- 63 48 ; 64 49 PRO section, field, res, glamaxe, gphiaxe, ENDPOINTS = endpoints $ 65 50 , BOXZOOM = boxzoom, TYPE = type, WDEPTH = wdepth $ 66 51 , DIREC = direc, SHOWBUILD = showbuild, ONLYBOX = onlybox $ 67 52 , _extra = ex 68 ;69 ;---------------------------------------------------------70 ; include common71 53 ; 72 54 compile_opt idl2, strictarrsubs … … 108 90 domdef, localbox, GRIDTYPE = grillechoice, /findalways, _extra = ex 109 91 grille, -1, -1, -1, -1, nx, ny 110 ; if less than 10 points where found, we apply domdef over the whole domain 92 ; if less than 10 points where found, we apply domdef over the whole domain 111 93 ; -> problem... why 10 points as a test value??? 112 94 ; how can we find a good test value? … … 119 101 if strpos(type, 'z') NE -1 THEN BEGIN 120 102 ; We keep yranges (axis z) before changing the boxzoom. 121 !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 103 !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 122 104 if vargrid EQ 'W' OR keyword_set(wdepth) then BEGIN 123 105 firstzw = 0 > (firstzw-1) … … 131 113 IF NOT keyword_set(key_forgetold) THEN BEGIN 132 114 @updateold 133 ENDIF 134 ENDIF 135 !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 115 ENDIF 116 ENDIF 117 !y.range = [localbox[nelbox-1], localbox[nelbox-2]] 136 118 ; We recuperate the grid on the boxzoom. 137 119 ; … … 145 127 firsty = 0 > (firsty - 1) 146 128 lasty = (lasty + 1) < (jpj -1) 147 129 148 130 domdef, firstx, lastx, firsty, lasty, firstz, lastz $ 149 131 , /index, gridtype = vargrid … … 155 137 156 138 ;--------------------- 157 ; We define the triangulation which will allows us to determinate the section. 139 ; We define the triangulation which will allows us to determinate the section. 158 140 ; We recalculate it because it must be defined on the Earth and on oceans. 159 ; Following the direction of the section -rather longitude or rather latitude- 141 ; Following the direction of the section -rather longitude or rather latitude- 160 142 ; we define the way to triangulate. 161 if strpos(type, 'x') NE -1 then BEGIN 143 if strpos(type, 'x') NE -1 then BEGIN 162 144 downward = (lindgen(nx, ny))[0:nx-2, 0:ny-2] 163 tri = definetri(nx, ny, (downward)[*]) 145 tri = definetri(nx, ny, (downward)[*]) 164 146 ENDIF ELSE tri = definetri(nx, ny) 165 147 ; If we have an irregular grid that is periodic, then it is possible that 166 148 ; some of the triangle have a very large size (neighborg points on the 167 149 ; sphere but far away when doing the projection) and should not be 168 ; taken into account.. 150 ; taken into account.. 169 151 IF keyword_set(key_irregular) AND keyword_set(key_periodic) THEN BEGIN 170 152 glamtri = glam[tri] … … 217 199 points1 = tri[point1, index] 218 200 points2 = tri[point2, temporary(index)] 219 ; points : complex containing couples of points in a side and the other 201 ; points : complex containing couples of points in a side and the other 220 202 ; side of the line. We have to delete duplicates. 221 203 points = dcomplex(points1, points2) … … 235 217 gphiaxe = imaginary(inter) 236 218 ; We arrange them in the growing order between boundaries of the section. 237 if strpos(type, 'x') NE -1 then BEGIN 219 if strpos(type, 'x') NE -1 then BEGIN 238 220 sort = sort(glamaxe) 239 221 glamaxe = glamaxe[sort] … … 288 270 ;---------------------------------------------------------------------------- 289 271 taille[0] EQ 3 AND jpt EQ 1:BEGIN 290 npoints = n_elements(points) 272 npoints = n_elements(points) 291 273 index = double(points)#replicate(1, nz)+replicate(nx*ny, npoints)#lindgen(nz) 292 274 value1 = array[index] … … 316 298 ;---------------------------------------------------------------------------- 317 299 taille[0] EQ 3 AND jpt NE 1:BEGIN 318 npoints = n_elements(points) 300 npoints = n_elements(points) 319 301 index = double(points)#replicate(1, jpt)+replicate(nx*ny, npoints)#lindgen(jpt) 320 302 value1 = array[index] … … 332 314 ;---------------------------------------------------------------------------- 333 315 taille[0] EQ 4:BEGIN 334 npoints = n_elements(points) 316 npoints = n_elements(points) 335 317 index = double(points)#replicate(1, nz*jpt)+replicate(nx*ny, npoints)#lindgen(nz*jpt) 336 318 index = reform(index, npoints, nz, jpt, /over) … … 367 349 if terre[0] NE -1 then res[terre] = valmask 368 350 369 if n_elements(showbuild) then BEGIN 351 if n_elements(showbuild) then BEGIN 370 352 winsave = !window 371 353 psave = !p … … 389 371 390 372 ; ?? bug ?? IF terre[0] NE -1 THEN plots, float(terre[inter]), imaginary(terre[inter]), color = 0, psym = 1 391 373 392 374 ; dummy = '' 393 375 ; read, dummy, prompt = 'press return to continue' … … 396 378 !x = xsave 397 379 !y = ysave 398 ENDIF 380 ENDIF 399 381 400 382 restoreboxparam, 'boxparam4section.dat' -
trunk/SRC/ToBeReviewed/TRIANGULATION/tracecote.pro
r209 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 16 13 ; 17 14 ; @keyword _EXTRA 18 ; used to pass yourkeywords15 ; Used to pass keywords 19 16 ; 20 17 ; @uses … … 29 26 ; 30 27 ;- 31 ;------------------------------------------------------------ 32 ;------------------------------------------------------------ 33 ;------------------------------------------------------------ 28 ; 34 29 PRO tracecote, SURFACE_COASTLINE = surface_coastline, _EXTRA = ex 35 ;--------------------------------------------------------------36 ; include commons37 30 ; 38 31 compile_opt idl2, strictarrsubs … … 47 40 if n_elements(key_gridtype) EQ 0 then key_gridtype = 'c' 48 41 ; 49 ; We enlarge a bit the frame defined by firsts..., lasts... in order to 42 ; We enlarge a bit the frame defined by firsts..., lasts... in order to 50 43 ; recuperate edges of the coast which are in the edging of the domain. 51 ; 44 ; 52 45 tempdeux = systime(1) ; For key_performance =2 53 46 firstx = 0 > (min([firstxt, firstxf])-1) … … 68 61 ; 69 62 if key_gridtype EQ 'e' then onemore = xf[0, 0] gT xf[0, 1] 70 ; We pass in normalized coordinates to be able to become independant from the projection's 63 ; We pass in normalized coordinates to be able to become independant from the projection's 71 64 ; type choosen and from the support on which we do the drawing (screen or postscript) 72 z = convert_coord(xf[*],yf[*],/data,/to_normal) 65 z = convert_coord(xf[*],yf[*],/data,/to_normal) 73 66 xf = reform(z[0, *], nx, ny) 74 67 yf = reform(z[1, *], nx, ny) 75 68 tempvar = SIZE(TEMPORARY(z)) 76 69 ; 77 ; Beware, following the projection, some points x or y can become NaN (see point 70 ; Beware, following the projection, some points x or y can become NaN (see point 78 71 ; behind the earth in an orthographic projection). 79 72 ; 80 ; We put points to be eliminated at a very big value so that they will not pass the 73 ; We put points to be eliminated at a very big value so that they will not pass the 81 74 ; test with distanceseuil (see further). 82 75 ; … … 84 77 OR !map.projection EQ 14 OR !map.projection EQ 15 OR !map.projection EQ 18 then begin 85 78 ind = where(finite(xf*yf) EQ 0) 86 IF ind[0] NE -1 THEN BEGIN 79 IF ind[0] NE -1 THEN BEGIN 87 80 xf[ind] = 1e5 88 81 yf[ind] = 1e5 -
trunk/SRC/ToBeReviewed/TRIANGULATION/tracemask.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 30 27 ; 31 28 ; @keyword _EXTRA 32 ; used to pass yourkeywords29 ; Used to pass keywords 33 30 ; 34 31 ; @uses … … 42 39 ; 43 40 ;- 44 ;------------------------------------------------------------ 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 41 ; 47 42 PRO tracemask, maskentree, xin, yin, COAST_COLOR = coast_color, COAST_THICK = coast_thick, OVERPLOT = overplot, _extra = ex 48 ;49 43 ; 50 44 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/TRIANGULATION/triangule.pro
r209 r231 7 7 ; 8 8 ; @param MASKENTREE {in}{optional}{type=2d array} 9 ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, 9 ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, 10 10 ; ...TRIANGULATION=triangule(mask) 11 11 ; If this argument is not specified, the function use tmask … … 15 15 ; 16 16 ; @keyword COINMONTE {type=array} 17 ; To obtain the array of "ascending land corner" to be treated with 18 ; completecointerre.pro in the variable array instead of make it pass by the global 17 ; To obtain the array of "ascending land corner" to be treated with 18 ; completecointerre.pro in the variable array instead of make it pass by the global 19 19 ; variable twin_corners_up. 20 20 ; … … 23 23 ; 24 24 ; @keyword _EXTRA 25 ; Used to pass yourkeywords25 ; Used to pass keywords 26 26 ; 27 27 ; @returns 28 28 ; 29 ;30 29 ; @uses 31 ;32 30 ; 33 31 ; @restrictions 34 32 ; 35 ;36 33 ; @examples 37 34 ; 38 ;39 35 ; @history 40 ;41 36 ; 42 37 ; @version … … 47 42 ; 48 43 ;- 49 ; ------------------------------------44 ; 50 45 FUNCTION triangule, maskentree, BASIC = basic, COINMONTE = coinmonte, COINDESCEND = coindescend, _extra = ex 51 46 ; … … 58 53 nx = jpi 59 54 ny = jpj 60 ENDIF ELSE BEGIN 55 ENDIF ELSE BEGIN 61 56 nx = szmsk[1] 62 57 ny = szmsk[2] -
trunk/SRC/ToBeReviewed/TRIANGULATION/triangule_c.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 76 73 ; c'est la traduction de ce qu'il y avait écrit. Correction si besoin. 77 74 ;- 78 ;------------------------------------------------------------ 79 ;------------------------------------------------------------ 80 ;------------------------------------------------------------ 75 ; 81 76 FUNCTION triangule_c, maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend, BASIC = basic, KEEP_CONT = keep_cont 82 77 ; -
trunk/SRC/ToBeReviewed/TRIANGULATION/triangule_e.pro
r163 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; Build the triangulation for a E-grid type … … 8 6 ; @categories 9 7 ; Graphics 10 ; 8 ; 11 9 ; @param MASKENTREE {in}{optional}{type=2d array} 12 ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, 10 ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, 13 11 ; ...TRIANGULATION=triangule(mask) 14 12 ; If this argument is not specified, the function use tmask 15 ; 13 ; 16 14 ; @keyword BASIC 17 15 ; Specify that the mask is on a basic grid (use the triangulation for vertical cuts and hovmoellers) 18 ; 19 ; @keyword COINMONTE {type=array} 20 ; To obtain the array of "ascending land corner" to be treated with 21 ; completecointerre.pro in the variable array instead of make it pass by the global22 ; variable twin_corners_up.16 ; 17 ; @keyword COINMONTE {type=array} 18 ; To obtain the array of "ascending land corner" to be treated with 19 ; <pro>completecointerre</pro> in the variable array instead of make it pass 20 ; by the global variable twin_corners_up. 23 21 ; 24 22 ; @keyword COINDESCEND {type=array} … … 26 24 ; 27 25 ; @keyword SHIFTED 28 ; 26 ; 29 27 ; @uses 30 28 ; common.pro 31 ; 29 ; 32 30 ; @history 33 31 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 34 32 ; june 2001 35 ; 36 ; @version 33 ; 34 ; @version 37 35 ; $Id$ 38 ; 36 ; 39 37 ; @todo 40 ; seb L.152->153 je ne pense pas que ce soit ce que tu voulais dire mais 38 ; seb L.152->153 je ne pense pas que ce soit ce que tu voulais dire mais 41 39 ; c'est la traduction de ce qu'il y avait écrit. Correction si besoin. 42 40 ;- 43 ;------------------------------------------------------------ 44 ;------------------------------------------------------------ 45 ;------------------------------------------------------------ 41 ; 46 42 FUNCTION triangule_e, maskentree, COINMONTE = coinmonte, COINDESCEND = coindescend $ 47 43 , SHIFTED = shifted, BASIC = basic 48 ;---------------------------------------------------------49 44 ; 50 45 compile_opt idl2, strictarrsubs … … 66 61 ;------------------------------------------------------------ 67 62 if keyword_set(key_periodic)*(nx EQ jpi) $ 68 AND NOT keyword_set(basic) then BEGIN 63 AND NOT keyword_set(basic) then BEGIN 69 64 msk = [msk, msk[0, *]] 70 65 nx = nx+1 … … 151 146 ; ; 152 147 ;------------------------------------------------------------ 153 ; When key_periodic equal 1, triang is a list of indexes's array which 148 ; When key_periodic equal 1, triang is a list of indexes's array which 154 149 ; have a surplus column. 155 ; We have to put it back to the initial matrix by putting indexes of 150 ; We have to put it back to the initial matrix by putting indexes of 156 151 ; the last column equal to these of the last column... 157 152 ;------------------------------------------------------------ 158 153 tempdeux = systime(1) ; For key_performance =2 159 154 if keyword_set(key_periodic)*(nx-1 EQ jpi) $ 160 AND NOT keyword_set(basic) then BEGIN 155 AND NOT keyword_set(basic) then BEGIN 161 156 indicey = triang/nx 162 157 indicex = triang-indicey*nx … … 198 193 199 194 200 IF keyword_set(key_performance) THEN print, 'temps triangule', systime(1)-tempsun 195 IF keyword_set(key_performance) THEN print, 'temps triangule', systime(1)-tempsun 201 196 202 197 return, triang 203 198 204 END 199 END -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcmd.pro
r172 r231 1 1 ;+ 2 ; 3 ; @param BASE {in}{required} 2 ; 3 ; @param BASE {in}{required} 4 4 ; The id of the widget where apply the drawing. 5 5 ; 6 6 ; @param SNAMEEXP {in}{required} 7 7 ; 8 ;9 8 ; @param PROCEDURE {in}{required} 10 ;11 9 ; 12 10 ; @param TYPE {in}{required} 13 11 ; 14 ;15 12 ; @keyword BOXZOOM 16 ; Vector indicating the geographic zone on which we want to cut the map. 17 ; If BOXZOOM has : 13 ; Vector indicating the geographic zone on which we want to cut the map. 14 ; If BOXZOOM has : 18 15 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 19 16 ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 20 17 ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 21 18 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 22 ; 6 elements: The extraction is made on Boxzoom 19 ; 6 elements: The extraction is made on Boxzoom 23 20 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 24 21 ; 25 22 ; @keyword COMPLETE 26 23 ; 27 ;28 24 ; @keyword NAMEFIELD 29 ;30 25 ; 31 26 ; @uses 32 27 ; common.pro 33 ; 28 ; 34 29 ; @history 35 30 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 36 ; 37 ; @version 31 ; 32 ; @version 38 33 ; $Id$ 39 34 ; … … 77 72 ; get the options 78 73 ; 79 options = extractatt(top_uvalue, 'options') 74 options = extractatt(top_uvalue, 'options') 80 75 flags = extractatt(top_uvalue, 'optionsflag') 81 76 flags = flags[*, numdessinin] -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param BASE {in}{required} 9 8 ; The id of the widget where apply the drawing. … … 11 10 ; @param NEWFIELDNAME 12 11 ; 13 ;14 12 ; @keyword BOXZOOM 15 ; Vector indicating the geographic zone on which we want to cut the map. 16 ; If BOXZOOM has : 13 ; Vector indicating the geographic zone on which we want to cut the map. 14 ; If BOXZOOM has : 17 15 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 18 16 ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 19 17 ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 20 18 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 21 ; 6 elements: The extraction is made on Boxzoom 19 ; 6 elements: The extraction is made on Boxzoom 22 20 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 23 ; 21 ; 24 22 ; @returns 25 ; 26 ; 23 ; 27 24 ; @uses 28 ; 29 ; 25 ; 30 26 ; @restrictions 31 ; 32 ; 27 ; 33 28 ; @examples 34 ; 35 ; 29 ; 36 30 ; @history 37 ; 38 ; 39 ; @version 31 ; 32 ; @version 40 33 ; $Id$ 41 34 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefile.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param BASE {in}{required} 9 8 ; The id of the widget where apply the drawing. … … 11 10 ; @param NEWFILENAME 12 11 ; 13 ;14 12 ; @keyword BOXZOOM 15 ; Vector indicating the geographic zone on which we want to cut the map. 16 ; If BOXZOOM has : 13 ; Vector indicating the geographic zone on which we want to cut the map. 14 ; If BOXZOOM has : 17 15 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 18 16 ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 19 17 ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 20 18 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 21 ; 6 elements: The extraction is made on Boxzoom 19 ; 6 elements: The extraction is made on Boxzoom 22 20 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 23 ; 21 ; 24 22 ; @keyword DATE1 25 ; 23 ; 26 24 ; @keyword DATE2 27 25 ; 28 26 ; @keyword FIELDNAME 29 ; 30 ; 27 ; 31 28 ; @returns 32 ; 33 ; 29 ; 34 30 ; @uses 35 ; 36 ; 31 ; 37 32 ; @restrictions 38 ; 39 ; 33 ; 40 34 ; @examples 41 ; 42 ; 35 ; 43 36 ; @history 44 ; 45 ; 46 ; @version 37 ; 38 ; @version 47 39 ; $Id$ 48 40 ; … … 85 77 ; Did we change the calendar? 86 78 if array_equal(oldcalendar, newcalendar) NE 1 then begin 87 @cm_4cal 79 @cm_4cal 88 80 ; for key_caltype 89 81 key_caltype = (*(extractatt(top_uvalue, 'fileparameters'))[newfile]).caltype 90 82 ; fake or real calendar??? 91 83 fakecal = (*(extractatt(top_uvalue, 'fileparameters'))[newfile]).fakecal 92 ; Which dates were selected? 84 ; Which dates were selected? 93 85 date1id = widget_info(base, find_by_uname = 'calendar1') 94 86 if NOT keyword_set(date1) then widget_control, date1id, get_value = date1 … … 107 99 rien = cw_calendar(basecal, newcalendar, jdate2, uname = 'calendar2' $ 108 100 , FAKECAL = fakecal, uvalue = {name:'calendar2'}, /frame) 109 ENDIF ELSE BEGIN 101 ENDIF ELSE BEGIN 110 102 if keyword_set(date1) then begin 111 103 date1id = widget_info(base, find_by_uname = 'calendar1') … … 130 122 ; file name 131 123 ; 132 IF oldfile NE newfile THEN BEGIN 124 IF oldfile NE newfile THEN BEGIN 133 125 flstid = widget_info(base, find_by_uname = 'filelist') 134 126 widget_control, flstid, set_combobox_select = newfile 135 ENDIF 127 ENDIF 136 128 ; 137 129 ; Variables name -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.pro
r163 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param BASE {in}{required} 9 8 ; The id of the widget where apply the drawing. 10 9 ; 11 10 ; @param SMALL 12 ; Vector composed of 3 or 4 elements, applied to make a drawing on a small 13 ; portion of a page or screen. It delimit the zone where the drawing will 14 ; be done. If there is 4 elements: then is constituted of coordinates (expressed 15 ; in cm located from the up and left corner of the page or the window (in portrait 16 ; like in landscape)) of the bottom and left corner and of the up and right corner 17 ; of the drawing zone. If there is 3 elements: in this case, we divide the page or 18 ; the screen in small[0] columns and in small[1] lines the drawing made in the box 19 ; numbered small[2]. The numerotation starting up and left by the number 1 and then, 20 ; following the writing direction. By default, we make the largest drawing we can do, 11 ; Vector composed of 3 or 4 elements, applied to make a drawing on a small 12 ; portion of a page or screen. It delimit the zone where the drawing will 13 ; be done. If there is 4 elements: then is constituted of coordinates (expressed 14 ; in cm located from the up and left corner of the page or the window (in portrait 15 ; like in landscape)) of the bottom and left corner and of the up and right corner 16 ; of the drawing zone. If there is 3 elements: in this case, we divide the page or 17 ; the screen in small[0] columns and in small[1] lines the drawing made in the box 18 ; numbered small[2]. The numerotation starting up and left by the number 1 and then, 19 ; following the writing direction. By default, we make the largest drawing we can do, 21 20 ; conserving the aspect rapport (except when REMPLI is activated). 22 ; 21 ; 23 22 ; @returns 24 ; 25 ; 23 ; 26 24 ; @uses 27 ; 28 ; 25 ; 29 26 ; @restrictions 30 ; 31 ; 27 ; 32 28 ; @examples 33 ; 34 ; 29 ; 35 30 ; @history 36 ; 37 ; 38 ; @version 31 ; 32 ; @version 39 33 ; $Id$ 40 34 ; … … 55 49 *top_uvalue[1, findline(top_uvalue, 'globaloldcommand')] = globalcommand 56 50 ; portrait or landscape ??? 57 options = extractatt(top_uvalue, 'options') 51 options = extractatt(top_uvalue, 'options') 58 52 optionsflag = extractatt(top_uvalue, 'optionsflag') 59 53 portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.pro
r192 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param WIDCMD 9 ;10 8 ; 11 9 ; @param TOREAD 12 10 ; 13 ;14 11 ; @param NUMBEROFREAD 15 ;16 12 ; 17 13 ; @param PREFIX 18 14 ; 19 ;20 15 ; @param NAMEEXP 21 ;22 16 ; 23 17 ; @param ENDING 24 18 ; 25 ;26 19 ; @returns 27 ; 28 ; 20 ; 29 21 ; @uses 30 ; 31 ; 22 ; 32 23 ; @restrictions 33 ; 34 ; 24 ; 35 25 ; @examples 36 ; 37 ; 26 ; 38 27 ; @history 39 ; 40 ; 41 ; @version 28 ; 29 ; @version 42 30 ; $Id$ 43 ; 31 ; 44 32 ; @todo 45 33 ; seb 46 34 ; 47 35 ;- 36 ; 48 37 PRO cutcmd, widcmd, toread, numberofread, prefix, nameexp, ending 49 ;50 38 ; 51 39 compile_opt idl2, strictarrsubs 52 40 ; 53 dummy = where(byte(widcmd) EQ (byte('"'))[0], nbdblquote) 41 dummy = where(byte(widcmd) EQ (byte('"'))[0], nbdblquote) 54 42 CASE 1 OF 55 43 nbdblquote MOD 2: stop ; odd numbers are impossibles... … … 72 60 IF n_elements(separator) NE n_elements(other) THEN stop 73 61 widcmd = '' 74 FOR i = 0, n_elements(other)-1 DO BEGIN 62 FOR i = 0, n_elements(other)-1 DO BEGIN 75 63 IF isnumber(other[i]) LT 1 THEN other[i] = '"' + other[i] + '"' 76 64 widcmd = widcmd + separator[i] + other[i] 77 65 ENDFOR 78 66 ; print, widcmd 79 END 67 END 80 68 ENDCASE 81 69 … … 83 71 IF strpos(widcmd, '"') EQ 0 THEN start = 0 ELSE start = 1 84 72 nameexp = cutted[start:*:2] 85 numberofread = n_elements(nameexp) 73 numberofread = n_elements(nameexp) 86 74 IF toread GE numberofread then begin 87 75 dummy = report('toread cannot be larger than numberofread') -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/definedefaultextra.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param NOMVARIABLE 9 8 ; 10 ;11 9 ; @returns 12 ; 13 ; 10 ; 14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 18 ; 26 19 ; @version 27 ; $Id$ 28 ; 20 ; $Id$ 21 ; 29 22 ; @todo 30 23 ; seb 31 24 ; 32 25 ;- 26 ; 33 27 FUNCTION definedefaultextra, nomvariable 34 28 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/doubleclickaction.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 10 ;11 9 ; @returns 12 ; 13 ; 10 ; 14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 18 ; 26 19 ; @version 27 ; $Id$ 28 ; 20 ; $Id$ 21 ; 29 22 ; @todo 30 23 ; seb 31 24 ; 32 25 ;- 26 ; 33 27 PRO doubleclickaction, event 34 28 ;------------------------------------------------------------ … … 64 58 ; 65 59 END 66 2:BEGIN 60 2:BEGIN 67 61 ; if top_uvalue.smallout[2] NE numdessin then begin 68 62 tracecadre, smallout, /erase … … 78 72 inserthistory, event.top, ';', '; beginning of '+strtrim(numdessin, 2) $ 79 73 , '; end of '+strtrim(numdessin, 2) 80 ; Putting at 0 of attributes of the value concerning the drawing :74 ; Putting at 0 of attributes of the value concerning the drawing 81 75 82 76 numdessin = numdessin-1 -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/extractatt.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param TOP_UVALUE 9 ;10 8 ; 11 9 ; @param NAME 12 10 ; 13 ;14 11 ; @returns 15 ; 16 ; 12 ; 17 13 ; @uses 18 ; 19 ; 14 ; 20 15 ; @restrictions 21 ; 22 ; 16 ; 23 17 ; @examples 24 ; 25 ; 18 ; 26 19 ; @history 27 ; 28 ; 29 ; @version 20 ; 21 ; @version 30 22 ; $Id$ 31 ; 23 ; 32 24 ; @todo 33 25 ; seb 34 26 ; 35 27 ;- 28 ; 36 29 FUNCTION extractatt, top_uvalue, name 37 30 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/findline.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param TOP_UVALUE 9 ;10 8 ; 11 9 ; @param NAME 12 10 ; 13 ;14 11 ; @returns 15 ; 16 ; 12 ; 17 13 ; @uses 18 ; 19 ; 14 ; 20 15 ; @restrictions 21 ; 22 ; 16 ; 23 17 ; @examples 24 ; 25 ; 18 ; 26 19 ; @history 27 ; 28 ; 29 ; @version 20 ; 21 ; @version 30 22 ; $Id$ 31 ; 23 ; 32 24 ; @todo 33 25 ; seb 34 26 ; 35 27 ;- 28 ; 36 29 FUNCTION findline, top_uvalue, name 37 30 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 10 ;11 9 ; @returns 12 ; 13 ; 10 ; 14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 18 ; 26 19 ; @version 27 ; $Id$ 28 ; 20 ; $Id$ 21 ; 29 22 ; @todo 30 23 ; seb 31 24 ; 32 25 ;- 26 ; 33 27 FUNCTION identifyclick, event 34 28 ; … … 78 72 thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 1 AND press EQ 0:uval.click = 2 79 73 ; t/2/0 normal click 80 thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 2 AND press EQ 0:BEGIN 74 thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 2 AND press EQ 0:BEGIN 81 75 type = 'single' 82 76 press = uval.press -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/inserthistory.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param BASE 9 ;10 8 ; 11 9 ; @param TEXT 12 10 ; 13 ;14 11 ; @param LINE1 15 ;16 12 ; 17 13 ; @param LINE2 18 14 ; 19 ;20 15 ; @returns 21 ; 22 ; 16 ; 23 17 ; @uses 24 ; 25 ; 18 ; 26 19 ; @restrictions 27 ; 28 ; 20 ; 29 21 ; @examples 30 ; 31 ; 22 ; 32 23 ; @history 33 ; 34 ; 24 ; 35 25 ; @version 36 ; $Id$ 37 ; 26 ; $Id$ 27 ; 38 28 ; @todo 39 29 ; seb 40 30 ; 41 31 ;- 42 ; -------------------------------------------------------------32 ; 43 33 PRO inserthistory, base, text, line1, line2 44 34 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.pro
r163 r231 1 1 ;+ 2 ; @file_comments 3 ; It is the procedure launching the drawing. 4 ; If we do not give the command to it, it call 2 ; 3 ; @file_comments 4 ; It is the procedure launching the drawing. 5 ; If we do not give the command to it, it call 5 6 ; construitcommande to know what to trace. 6 7 ; 7 8 ; @categories 8 9 ; 9 ;10 10 ; @param BASE {in}{required} 11 11 ; The id of the widget where apply the drawing. 12 ; 12 ; 13 13 ; @keyword COMMANDE {type=string} 14 14 ; A string of the style: read_data('sst'...),... 15 15 ; 16 16 ; @keyword _EXTRA 17 ; Used to pass your keywords18 ; 17 ; Used to pass keywords 18 ; 19 19 ; @uses 20 ; common.pro 21 ; 20 ; common.pro 21 ; 22 22 ; @history 23 23 ; Sebastien Masson (smasson\@lodyc.jussieu.fr) 24 ; 25 ; @version 24 ; 25 ; @version 26 26 ; $Id$ 27 ; 27 ; 28 28 ;- 29 ; 29 30 PRO letsdraw, base, COMMANDE = commande, _extra = ex 30 31 ; … … 73 74 ; 74 75 ; 75 options = extractatt(top_uvalue, 'options') 76 options = extractatt(top_uvalue, 'options') 76 77 optionsflag = extractatt(top_uvalue, 'optionsflag') 77 78 portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0] 78 79 79 80 ; 80 81 createpro, ['@common' $ -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro
r213 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param MESHFILEIN 9 8 ; 10 ;11 9 ; @keyword _EXTRA 12 ; Used to pass yourkeywords13 ; 10 ; Used to pass keywords 11 ; 14 12 ; @returns 15 ; 16 ; 13 ; 17 14 ; @uses 18 ; 19 ; 15 ; 20 16 ; @restrictions 21 ; 22 ; 17 ; 23 18 ; @examples 24 ; 25 ; 19 ; 26 20 ; @history 27 ; 28 ; 29 ; @version 21 ; 22 ; @version 30 23 ; $Id$ 31 24 ; … … 34 27 ; 35 28 ;- 29 ; 36 30 PRO loadgrid, meshfiletxtin, _extra = ex 37 ; 31 ; 38 32 meshfilein = strsed(meshfiletxtin,'@@@', '''') 39 33 ; … … 47 41 ; try to find a .pro file with this name... 48 42 filepro = (find(meshfile[0], /firstfound, /onlypro))[0] 49 ; if this is an idl batch file or a procedure 43 ; if this is an idl batch file or a procedure 50 44 if filepro NE 'NOT FOUND' THEN BEGIN 51 45 CASE protype(filepro) OF … … 63 57 ENDELSE 64 58 ; add the arguments and keywords if necessary 65 IF n_elements(meshfile) GT 1 AND strmid(listing, 0, 1) NE '@' THEN $ 59 IF n_elements(meshfile) GT 1 AND strmid(listing, 0, 1) NE '@' THEN $ 66 60 listing = listing + strmid(meshfilein, strpos(meshfilein, ',')) 67 61 … … 72 66 73 67 return 74 END 68 END -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/longclickaction.pro
r154 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 10 ;11 9 ; @returns 12 ; 13 ; 10 ; 14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 18 ; 26 19 ; @version 27 ; $Id$ 28 ; 20 ; $Id$ 21 ; 29 22 ; @todo 30 23 ; seb 31 24 ; 32 25 ;- 26 ; 33 27 PRO longclickaction, event 34 28 ; … … 66 60 y = [coor[1, 0], coor[1, 1]] 67 61 domainid = widget_info(event.top, find_by_uname = 'domain') 68 IF type EQ 'pltv' THEN BEGIN 62 IF type EQ 'pltv' THEN BEGIN 69 63 currentfile = extractatt(top_uvalue, 'currentfile') 70 64 listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid … … 79 73 ; Do we have to pass the boxzoom in indexes ??? 80 74 currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 81 options = extractatt(top_uvalue, 'options') 75 options = extractatt(top_uvalue, 'options') 82 76 flags = extractatt(top_uvalue, 'optionsflag') 83 77 flags = flags[*, currentplot] … … 107 101 letsdraw, event.top 108 102 END 109 2:BEGIN 110 IF type EQ 'plt' THEN BEGIN 103 2:BEGIN 104 IF type EQ 'plt' THEN BEGIN 111 105 (*top_uvalue[1, findline(top_uvalue, 'types')])[smallout[2]-1] = 'pltz' 112 106 forcetype = 'pltz' 113 ENDIF 107 ENDIF 114 108 updatewidget, event.top, /noboxzoom 115 109 letsdraw, event.top, forcetype = forcetype 116 110 END 117 111 4:BEGIN 118 IF type EQ 'plt' THEN BEGIN 112 IF type EQ 'plt' THEN BEGIN 119 113 (*top_uvalue[1, findline(top_uvalue, 'types')])[smallout[2]-1] = 'pltt' 120 114 forcetype = 'pltt' 121 ENDIF 115 ENDIF 122 116 updatewidget, event.top, /noboxzoom, /nodates 123 117 letsdraw, event.top, forcetype = forcetype -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/read_vermair.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param NAME 9 ;10 8 ; 11 9 ; @param DEBUT 12 10 ; 13 ;14 11 ; @param FIN 15 12 ; 16 ;17 13 ; @param NOMEXP 18 ;19 14 ; 20 15 ; @keyword PARENT … … 22 17 ; 23 18 ; @keyword BOXZOOM 24 ; Vector indicating the geographic zone on which we want to cut the map. 25 ; If BOXZOOM has : 19 ; Vector indicating the geographic zone on which we want to cut the map. 20 ; If BOXZOOM has : 26 21 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 27 22 ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 28 23 ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 29 24 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 30 ; 6 elements: The extraction is made on Boxzoom 25 ; 6 elements: The extraction is made on Boxzoom 31 26 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 32 27 ; 33 28 ; @keyword _EXTRA 34 ; Used to pass your keywords35 ; 29 ; Used to pass keywords 30 ; 36 31 ; @returns 37 ; 38 ; 32 ; 39 33 ; @uses 40 ; 41 ; 34 ; 42 35 ; @restrictions 43 ; 44 ; 36 ; 45 37 ; @examples 46 ; 47 ; 38 ; 48 39 ; @history 49 ; 50 ; 51 ; @version 40 ; 41 ; @version 52 42 ; $Id$ 53 43 ; 54 44 ; @todo 55 45 ; seb 56 ; 46 ; 57 47 ;- 48 ; 58 49 FUNCTION read_vermair, name, debut, fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 59 50 ; … … 61 52 ; 62 53 @common 63 ;------------------------------------------------------------64 54 if name EQ 'un' then name = 'vozocrtx' 65 55 if name EQ 'vn' then name = 'vomecrty' -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 ;7 6 ; 8 7 ; @param NAMEFILE … … 12 11 ; 13 12 ; @keyword _EXTRA 14 ; Used to pass your keywords to isafile and ncdf_getaxis13 ; Used to pass keywords to <pro>isafile</pro> and <pro>ncdf_getaxis</pro> 15 14 ; 16 15 ; @returns … … 63 62 ; is not found. 64 63 ; 65 ; ------------------------------------------------------------64 ; 66 65 FUNCTION scanfile, namefile, GRID = GRID, _extra = ex 67 66 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.pro
r213 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 10 ;11 9 ; @returns 12 ; 13 ; 10 ; 14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 26 ; @version 18 ; 19 ; @version 27 20 ; $Id$ 28 ; 21 ; 29 22 ; @todo 30 23 ; seb: documenter EVENT 31 24 ;- 32 ; *********************************************************************25 ; 33 26 PRO selectfile_event, event 34 ;35 27 ; 36 28 compile_opt idl2, strictarrsubs … … 48 40 case eventuvalue.name of 49 41 ; cancel button 50 'Global Cancel':BEGIN 42 'Global Cancel':BEGIN 51 43 widget_control, event.handler, get_uvalue = messenger 52 44 *messenger = -1 … … 58 50 filename = isafile(filename = filename[0], /onlync, iodirectory = iodir $ 59 51 , title = 'data file name', /tryfind, /fully_qualify_path) 60 if size(filename, /type) NE 7 then BEGIN 52 if size(filename, /type) NE 7 then BEGIN 61 53 widget_control, event.id, set_value = '' 62 54 return … … 72 64 ; switch automatic/by and mesh definition buttons 73 65 'gridload':BEGIN 74 IF event.select EQ 1 THEN BEGIN 66 IF event.select EQ 1 THEN BEGIN 75 67 widget_control, widget_info(event.handler, find_by_uname = 'argtxt'), set_value = '' 76 68 widget_control, widget_info(event.handler, find_by_uname = 'kwdtxt'), set_value = '' … … 86 78 widget_control, widget_info(event.handler, find_by_uname = 'arg base'), sensitive = 1 87 79 widget_control, widget_info(event.handler, find_by_uname = 'kwdlab'), set_value = 'keywords of IDL procedure:' 88 END 80 END 89 81 ENDCASE 90 ENDIF 82 ENDIF 91 83 END 92 84 ; name of the procedure or batch file … … 97 89 widget_control, event.id, set_value = '' 98 90 return 99 endif 91 endif 100 92 CASE protype(filename) OF 101 93 ; this is a procedure 102 'proc':BEGIN 94 'proc':BEGIN 103 95 widget_control, widget_info(event.handler, find_by_uname = 'arg base'), sensitive = 1 104 96 widget_control, widget_info(event.handler, find_by_uname = 'kwd base'), sensitive = 1 … … 106 98 END 107 99 ; this is a function, this case is not accepted 108 'func':BEGIN 100 'func':BEGIN 109 101 widget_control, event.id, set_value = '' 110 102 return 111 103 END 112 104 ; this is an IDL batch file 113 'batch':BEGIN 105 'batch':BEGIN 114 106 widget_control, widget_info(event.handler, find_by_uname = 'arg base'), sensitive = 0 115 107 widget_control, widget_info(event.handler, find_by_uname = 'kwd base'), sensitive = 0 … … 136 128 datafilename = isafile(filename = datafilename, /tryfind, /onlync $ 137 129 , title = 'data file name', /fully_qualify_path) 138 if size(datafilename, /type) NE 7 then BEGIN 130 if size(datafilename, /type) NE 7 then BEGIN 139 131 widget_control, widget_info(event.handler, find_by_uname = 'datafilename') $ 140 132 , set_value = '' 141 133 return 142 ENDIF 134 ENDIF 143 135 widget_control, widget_info(event.handler, find_by_uname = 'gridload') $ 144 136 , get_value = gridload … … 162 154 widget_control, meshload_id, set_value = '' 163 155 return 164 endif 165 END 156 endif 157 END 166 158 'via initnetcdf':meshload = datafilename 167 159 ENDCASE … … 176 168 return 177 169 end 178 ; *********************************************************************170 ; 179 171 ;+ 172 ; 180 173 ; @file_comments 181 174 ; 182 ;183 175 ; @categories 184 176 ; 185 ;186 177 ; @param DATAFILENAME 187 178 ; … … 192 183 ; @param ARGSPRO 193 184 ; 194 ;195 185 ; @keyword _EXTRA 196 ; Used to pass yourkeywords197 ; 186 ; Used to pass keywords 187 ; 198 188 ; @returns 199 ; 200 ; 189 ; 201 190 ; @uses 202 ; 203 ; 191 ; 204 192 ; @restrictions 205 ; 206 ; 193 ; 207 194 ; @examples 208 ; 209 ; 195 ; 210 196 ; @history 211 ; 212 ; 213 ; @version 197 ; 198 ; @version 214 199 ; $Id$ 215 ; 200 ; 216 201 ; @todo 217 202 ; seb: documenter les params 218 ; 203 ; 219 204 ;- 220 205 FUNCTION selectfile, datafilename, idlfile, argspro, _extra = ex … … 224 209 ; 225 210 @common 226 ;------------------------------------------------------------ 227 ;------------------------------------------------------------ 228 ; 229 ; We create a pointer in the uvalue to recuperate answers at setted 230 ; questions atthe time of the use of this widget. So when the widget 231 ; is deleted in the procedure ...event.pro, the variable on which the 232 ; pointer pointed (contained in the uvalue of the widget) is not 211 ; 212 ; We create a pointer in the uvalue to recuperate answers at setted 213 ; questions atthe time of the use of this widget. So when the widget 214 ; is deleted in the procedure ...event.pro, the variable on which the 215 ; pointer pointed (contained in the uvalue of the widget) is not 233 216 ; deleted and we can recuperate the result! 234 217 ; … … 269 252 270 253 ;------------------------------------------------------------ 271 IF n_elements(datafilename) NE 0 THEN BEGIN 254 IF n_elements(datafilename) NE 0 THEN BEGIN 272 255 widget_control, database, set_value = datafilename 273 256 selectfile_event, {ID:database, TOP:base, HANDLER:base} 274 ENDIF 275 IF n_elements(idlfile) NE 0 THEN BEGIN 257 ENDIF 258 IF n_elements(idlfile) NE 0 THEN BEGIN 276 259 widget_control, basemeshload, set_value = idlfile 277 260 selectfile_event, {ID:basemeshload, TOP:base, HANDLER:base} 278 261 widget_control, basemeshload, get_value = idlfile2 279 262 IF idlfile2[0] NE '' THEN widget_control, gdldid, set_value = 1 280 ENDIF 263 ENDIF 281 264 IF n_elements(argspro) NE 0 THEN widget_control, argbase, set_value = argspro 282 265 ;------------------------------------------------------------ 283 IF n_elements(datafilename) EQ 0 THEN BEGIN 266 IF n_elements(datafilename) EQ 0 THEN BEGIN 284 267 widget_control, base, /realize 285 268 xmanager, 'selectfile', base, event_handler = 'selectfile_event', no_block = 0 … … 302 285 if size(res3, /type) NE 8 then return, -1 303 286 304 return, {fileparameters:res3, readparameters:ccreadparameters, meshparameters:ccmeshparameters} 287 return, {fileparameters:res3, readparameters:ccreadparameters, meshparameters:ccmeshparameters} 305 288 end -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/singleclickaction.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 10 ;11 9 ; @returns 12 ; 13 ; 10 ; 14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 18 ; 26 19 ; @version 27 ; $Id$ 28 ; 20 ; $Id$ 21 ; 29 22 ; @todo 30 23 ; seb 31 24 ; 32 25 ;- 26 ; 33 27 PRO singleclickaction, event 34 28 ; … … 107 101 x4 = -1 ; free memory 108 102 y4 = -1 ; free memory 109 110 IF cell[0] EQ -1 OR n_elements(cell) GT 1 THEN RETURN 103 104 IF cell[0] EQ -1 OR n_elements(cell) GT 1 THEN RETURN 111 105 ; 112 106 yy = cell[0]/(nx-1+key_periodic*(nx EQ jpi)) -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/tracecadre.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ; 4 ; determination of the column and of the line corresponding in input to small 5 ; ++ 4 6 ; 5 7 ; @categories 6 8 ; 7 ;8 9 ; @param SMALL 9 10 ; 10 ;11 11 ; @keyword OUT 12 ;13 12 ; 14 13 ; @keyword ERASE 15 14 ; 15 ; @keyword FILL 16 16 ; 17 ; @keyword FILL18 ;19 ;20 17 ; @returns 21 ; 22 ; 18 ; 23 19 ; @uses 24 ; 25 ; 20 ; 26 21 ; @restrictions 27 ; 28 ; 22 ; 29 23 ; @examples 30 ; 31 ; 24 ; 32 25 ; @history 33 ; 34 ; 26 ; 35 27 ; @version 36 ; $Id$ 37 ; 28 ; $Id$ 29 ; 38 30 ; @todo 39 31 ; seb 40 32 ; 41 33 ;- 34 ; 42 35 PRO tracecadre, small, out = out, erase = erase, fill = fill 43 ;------------------------------------------------------------44 ; determination of the column and of the line corresponding in input to small45 36 ; 46 37 compile_opt idl2, strictarrsubs -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param BASE {in}{required} 9 8 ; The id of the widget where apply the drawing. 10 ; 9 ; 11 10 ; @keyword NOBOXZOOM 12 ;13 11 ; 14 12 ; @keyword NODATES 15 13 ; 14 ; @keyword NOTYPE 16 15 ; 17 ; @keyword NOTYPE18 ;19 ;20 16 ; @returns 21 ; 22 ; 17 ; 23 18 ; @uses 24 ; 25 ; 19 ; 26 20 ; @restrictions 27 ; 28 ; 21 ; 29 22 ; @examples 30 ; 31 ; 23 ; 32 24 ; @history 33 ; 34 ; 25 ; 35 26 ; @version 36 ; $Id$ 37 ; 27 ; $Id$ 28 ; 38 29 ; @todo 39 30 ; seb 40 31 ; 41 32 ;- 33 ; 42 34 PRO updatewidget, base, NOBOXZOOM = noboxzoom, NODATES = nodates, NOTYPE = notype 43 ;----------------------------------------------------------------------44 35 ; 45 36 compile_opt idl2, strictarrsubs … … 56 47 if keyword_set(nodates) then begin 57 48 date1 = 0 58 date2 = 0 59 ENDIF ELSE BEGIN 49 date2 = 0 50 ENDIF ELSE BEGIN 60 51 dates = (extractatt(top_uvalue, 'dates'))[*, numdessinin] 61 52 date1 = dates[0] & date2 = dates[1] … … 84 75 widget_control, date2id, set_value = date2 85 76 endif 86 if keyword_set(boxzoom) then BEGIN 77 if keyword_set(boxzoom) then BEGIN 87 78 domainid = widget_info(base, find_by_uname = 'domain') 88 79 widget_control, domainid, set_value = boxzoom … … 107 98 ;-------------- 108 99 ; graphtype 109 ;-------------- 100 ;-------------- 110 101 if NOT keyword_set(notype) then BEGIN 111 102 graphtype = (extractatt(top_uvalue, 'types'))[numdessinin] -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories … … 24 24 ; 25 25 ;- 26 pro xcreateanim_event, event 26 ; 27 PRO xcreateanim_event, event 27 28 ; 28 29 compile_opt idl2, strictarrsubs … … 165 166 return 166 167 end 167 ; ----------------------------------------------------------------168 ; 168 169 ;+ 169 170 ; @file_comments 170 171 ; 171 ;172 172 ; @categories 173 173 ; 174 ;175 174 ; @param PARENT 176 175 ; 177 ;178 176 ; @returns 179 ;180 177 ; 181 178 ; @uses … … 194 191 ; 195 192 ;- 193 ; 196 194 PRO xcreateanim, parent 197 195 ; -
trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 ;7 6 ; 8 7 ; @param EVENT … … 24 23 ; seb 25 24 ;- 26 ; ------------------------------------------------25 ; 27 26 PRO xxxmenubar_event, event 28 27 ; … … 30 29 ; 31 30 @common 32 33 31 34 32 case event.value of -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.pro
r163 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; Compound widget 7 ; 7 ; 8 8 ; @param ID 9 ;10 9 ; 11 10 ; @param VALUE … … 13 12 ; 14 13 ; @returns 15 ; 16 ; 14 ; 17 15 ; @uses 18 ; 19 ; 16 ; 20 17 ; @restrictions 21 ; 22 ; 18 ; 23 19 ; @examples 24 ; 25 ; 20 ; 26 21 ; @history 27 ; 28 ; 29 ; @version 22 ; 23 ; @version 30 24 ; $Id$ 31 25 ;- 32 pro cw_bgroup_setv, id, value 26 ; 27 PRO cw_bgroup_setv, id, value 33 28 compile_opt hidden, idl2, strictarrsubs 34 29 … … 65 60 ; @categories 66 61 ; 67 ;68 62 ; @param ID 69 63 ; … … 73 67 ; 74 68 ; @returns 75 ; 76 ; 69 ; 77 70 ; @uses 78 ; 79 ; 71 ; 80 72 ; @restrictions 81 ; 82 ; 73 ; 83 74 ; @examples 84 ; 85 ; 75 ; 86 76 ; @history 87 ; 88 ; 89 ; @version 77 ; 78 ; @version 90 79 ; $Id$ 91 80 ;- … … 103 92 1: ret = state.ret_arr[state.excl_pos] 104 93 ; 2: ret = state.nonexcl_curpos 105 2: BEGIN 94 2: BEGIN 106 95 index = where(state.nonexcl_curpos NE 0) 107 96 if index[0] EQ -1 then begin … … 110 99 END 111 100 endcase 112 101 113 102 WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY 114 103 … … 116 105 117 106 end 118 119 120 107 ; 121 108 ;+ 109 ; 122 110 ; @file_comments 123 111 ; Compound widget … … 125 113 ; @categories 126 114 ; 127 ;128 115 ; @param EV 129 116 ; 130 ;131 117 ; @returns 132 ; 133 ; 118 ; 134 119 ; @uses 135 ; 136 ; 120 ; 137 121 ; @restrictions 138 ; 139 ; 122 ; 140 123 ; @examples 141 ; 142 ; 124 ; 143 125 ; @history 144 ; 145 ; 146 ; @version 126 ; 127 ; @version 147 128 ; $Id$ 148 129 ;- … … 203 184 ; @param PARENT {in}{required} 204 185 ; The ID of the parent widget. 205 ; 186 ; 206 187 ; @param NAMES {type=string array} 207 188 ; A string array, containing one string per button, … … 211 192 ; An array of user values to be associated with 212 193 ; each button and returned in the event structure. 213 ; 194 ; 214 195 ; @keyword COLUMN 215 196 ; Buttons will be arranged in the number of columns 216 197 ; specified by this keyword. 217 ; 198 ; 218 199 ; @keyword EVENT_FUNCT 219 200 ; The name of an optional user-supplied event function … … 221 202 ; value structure whenever a button is pressed, and 222 203 ; follows the conventions for user-written event functions. 223 ; 204 ; 224 205 ; @keyword EXCLUSIVE 225 206 ; Buttons will be placed in an exclusive base, with 226 207 ; only one button allowed to be selected at a time. 227 ; 208 ; 228 209 ; @keyword FONT 229 210 ; The name of the font to be used for the button 230 211 ; titles. If this keyword is not specified, the default 231 212 ; font is used. 232 ; 213 ; 233 214 ; @keyword FRAME 234 215 ; Specifies the width of the frame to be drawn around the base. 235 ; 216 ; 236 217 ; @keyword IDS 237 218 ; A named variable into which the button IDs will be 238 219 ; stored, as a longword vector. 239 ; 220 ; 240 221 ; @keyword LABEL_LEFT 241 222 ; Creates a text label to the left of the buttons. 242 ; 223 ; 243 224 ; @keyword LABEL_TOP 244 225 ; Creates a text label above the buttons. 245 ; 226 ; 246 227 ; @keyword MAP 247 228 ; If set, the base will be mapped when the widget 248 229 ; is realized (the default). 249 ; 230 ; 250 231 ; @keyword NONEXCLUSIVE 251 232 ; Buttons will be placed in an non-exclusive base. 252 233 ; The buttons will be independent. 253 ; 234 ; 254 235 ; @keyword NO_RELEASE 255 236 ; If set, button release events will not be returned. 256 ; 237 ; 257 238 ; @keyword RETURN_ID 258 239 ; If set, the VALUE field of returned events will be 259 240 ; the widget ID of the button. 260 ; 241 ; 261 242 ; @keyword RETURN_INDEX 262 243 ; If set, the VALUE field of returned events will be 263 244 ; the zero-based index of the button within the base. 264 245 ; THIS IS THE DEFAULT. 265 ; 246 ; 266 247 ; @keyword RETURN_NAME 267 248 ; If set, the VALUE field of returned events will be 268 249 ; the name of the button within the base. 269 ; 250 ; 270 251 ; @keyword ROW 271 252 ; Buttons will be arranged in the number of rows 272 253 ; specified by this keyword. 273 ; 254 ; 274 255 ; @keyword SCROLL 275 256 ; If set, the base will include scroll bars to allow 276 257 ; viewing a large base through a smaller viewport. 277 ; 258 ; 278 259 ; @keyword SET_VALUE 279 260 ; The initial value of the buttons. This is equivalent … … 286 267 ; of a row or column major base. This keyword is 287 268 ; ignored if EXCLUSIVE or NONEXCLUSIVE are specified. 288 ; 269 ; 289 270 ; @keyword UVALUE 290 271 ; The user value to be associated with the widget. 291 ; 272 ; 292 273 ; @keyword UNAME 293 274 ; The user name to be associated with the widget. 294 ; 275 ; 295 276 ; @keyword XOFFSET 296 277 ; The X offset of the widget relative to its parent. 297 ; 278 ; 298 279 ; @keyword XPAD 299 280 ; The horizontal space, in pixels, between children 300 281 ; of a row or column major base. Ignored if EXCLUSIVE 301 282 ; or NONEXCLUSIVE are specified. 302 ; 283 ; 303 284 ; @keyword XSIZE 304 285 ; The width of the base. 305 286 ; @keyword X_SCROLL_SIZE 306 287 ; The width of the viewport if SCROLL is specified. 307 ; 288 ; 308 289 ; @keyword YOFFSET 309 290 ; The Y offset of the widget relative to its parent. 310 ; 291 ; 311 292 ; @keyword YPAD 312 293 ; The vertical space, in pixels, between children of 313 294 ; a row or column major base. Ignored if EXCLUSIVE 314 295 ; or NONEXCLUSIVE are specified. 315 ; 296 ; 316 297 ; @keyword YSIZE 317 298 ; The height of the base. 318 ; 299 ; 319 300 ; @keyword Y_SCROLL_SIZE 320 301 ; The height of the viewport if SCROLL is specified. -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.pro
r226 r231 38 38 ; 39 39 ;+ 40 ; 40 41 ; @file_comments 41 42 ; … … 44 45 ; 45 46 ; @param ID 46 ;47 47 ; 48 48 ; @param VALUE … … 454 454 ; 455 455 ; @keyword _EXTRA 456 ; Used to pass yourkeywords456 ; Used to pass keywords 457 457 ; 458 458 ; @returns -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.pro
r226 r231 45 45 ; return 46 46 ; end 47 ;----------------------------------------------------------------------48 47 ;+ 48 ; 49 49 ; @file_comments 50 50 ; … … 54 54 ; 55 55 ; @param ID 56 ;57 56 ; 58 57 ; @param VALUE … … 72 71 ; $Id$ 73 72 ;- 73 ; 74 74 PRO cw_combobox_pm_set_value, id, value 75 75 ; … … 92 92 return 93 93 end 94 ; ----------------------------------------------------------------------94 ; 95 95 ;+ 96 ; 96 97 ; @file_comments 97 ;98 98 ; 99 99 ; @categories … … 115 115 ; $Id$ 116 116 ;- 117 ; 117 118 FUNCTION cw_combobox_pm_get_value, id 118 119 ; … … 128 129 , dynamic_resize:widget_info(ComboboxId, /dynamic_resize)} 129 130 end 130 ;---------------------------------------------------------------------- 131 ;---------------------------------------------------------------------- 131 ; 132 132 ;+ 133 ; 133 134 ; @file_comments 134 ;135 135 ; 136 136 ; @categories … … 152 152 ; $Id$ 153 153 ;- 154 ; 154 155 FUNCTION cw_combobox_pm_event, event 155 156 ; … … 185 186 , INDEX:index, STR:cmbbtxt, OUT:out} 186 187 end 187 ;------------------------------------------------------------ 188 ;------------------------------------------------------------ 189 ;------------------------------------------------------------ 188 ; 190 189 ;+ 191 190 ; … … 215 214 ; @keyword VALUE 216 215 ; 217 ;218 216 ; @keyword _EXTRA 219 ; Used to pass yourkeywords217 ; Used to pass keywords 220 218 ; 221 219 ; @returns … … 296 294 ; 297 295 ;- 298 ;------------------------------------------------------------ 299 ;------------------------------------------------------------ 300 ;------------------------------------------------------------ 296 ; 301 297 FUNCTION cw_combobox_pm, parent, VALUE = value, UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 302 298 ; … … 316 312 , FUNC_GET_VALUE='cw_combobox_pm_get_value' $ 317 313 , PRO_SET_VALUE='cw_combobox_pm_set_value' $ 318 , UVALUE = uvalue, UNAME = uname, _extra = ex) 314 , UVALUE = uvalue, UNAME = uname, _extra = ex) 319 315 ; 320 316 vallen = widget_info(base, string_size = 'm') -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.pro
r226 r231 38 38 ; 39 39 ; 40 ;*********************************************************************41 40 ;+ 41 ; 42 42 ; @file_comments 43 ;44 43 ; 45 44 ; @categories … … 65 64 ; $Id$ 66 65 ;- 67 pro cw_domain_set_value, id, value 66 ; 67 PRO cw_domain_set_value, id, value 68 68 ; 69 69 compile_opt idl2, strictarrsubs … … 283 283 return 284 284 end 285 ; *********************************************************************285 ; 286 286 ;+ 287 ; 287 288 ; @file_comments 288 ;289 289 ; 290 290 ; @categories … … 292 292 ; 293 293 ; @param ID 294 ;295 294 ; 296 295 ; @returns … … 307 306 ; $Id$ 308 307 ;- 308 ; 309 309 FUNCTION cw_domain_get_value, id 310 310 ; … … 320 320 return, box 321 321 end 322 ;*********************************************************************323 322 ;+ 323 ; 324 324 ; @file_comments 325 ;326 325 ; 327 326 ; @categories … … 329 328 ; 330 329 ; @param EVENT 331 ;332 330 ; 333 331 ; @returns … … 344 342 ; $Id$ 345 343 ;- 344 ; 346 345 FUNCTION cw_domain_event, event 347 346 ; … … 488 487 , BOX:cw_domain_get_value(event.handler)} 489 488 end 490 ; *********************************************************************489 ; 491 490 ;+ 491 ; 492 492 ; @file_comments 493 ;494 493 ; 495 494 ; @categories … … 507 506 ; @keyword STRICT 508 507 ; 509 ;510 508 ; @keyword UNZOOM 511 ;512 509 ; 513 510 ; @keyword BOXZOOM … … 522 519 ; 523 520 ; @keyword _EXTRA 524 ; Used to pass yourkeywords521 ; Used to pass keywords 525 522 ; 526 523 ; @returns … … 541 538 ; 542 539 ;- 540 ; 543 541 FUNCTION cw_domain, parent, BOXZOOM = boxzoom, STRICT = strict, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, _extra = ex 544 542 ; -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.pro
r226 r231 44 44 ; return 45 45 ; end 46 ;----------------------------------------------------------------------47 48 ;49 46 ; 50 47 ;+ 48 ; 51 49 ; @file_comments 52 ;53 50 ; 54 51 ; @categories … … 73 70 ; $Id$ 74 71 ;- 72 ; 75 73 PRO cw_droplist_pm_set_value, id, value 76 74 ; … … 91 89 return 92 90 end 93 ; ----------------------------------------------------------------------91 ; 94 92 ;+ 93 ; 95 94 ; @file_comments 96 95 ; Compound widget … … 114 113 ; $Id$ 115 114 ;- 115 ; 116 116 FUNCTION cw_droplist_pm_get_value, id 117 117 ; … … 123 123 , dynamic_resize:widget_info(DroplistId, /dynamic_resize)} 124 124 end 125 ; ----------------------------------------------------------------------125 ; 126 126 ;+ 127 ; 127 128 ; @file_comments 128 129 ; Compound widget … … 146 147 ; $Id$ 147 148 ;- 149 ; 148 150 FUNCTION cw_droplist_pm_event, event 149 151 ; … … 172 174 endcase 173 175 end 174 ;---------------------------------------------------------------------- 175 ;------------------------------------------------------------ 176 ;------------------------------------------------------------ 177 ;------------------------------------------------------------ 176 ; 178 177 ;+ 179 178 ; … … 202 201 ; 203 202 ; @keyword _EXTRA 204 ; Used to pass yourkeywords203 ; Used to pass keywords 205 204 ; 206 205 ; @returns … … 281 280 ; 282 281 ;- 283 ;------------------------------------------------------------ 284 ;------------------------------------------------------------ 285 ;------------------------------------------------------------ 282 ; 286 283 FUNCTION cw_droplist_pm, parent,UVALUE = uvalue, UNAME = uname, ROW = row, COLUMN = column, _extra = ex 287 284 ; -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_pagelayout.pro
r157 r231 1 ;*********************************************************************2 1 ;+ 2 ; 3 3 ; @file_comments 4 ;5 4 ; 6 5 ; @categories 7 6 ; Compound widget 8 ; 7 ; 9 8 ; @param EVENT 10 9 ; 10 ; @returns 11 11 ; 12 ; @returns13 ;14 ;15 12 ; @uses 16 ; 17 ; 13 ; 18 14 ; @restrictions 19 ; 20 ; 15 ; 21 16 ; @examples 22 ; 23 ; 17 ; 24 18 ; @history 25 ; 26 ; 27 ; @version 19 ; 20 ; @version 28 21 ; $Id$ 29 22 ;- 30 ; *********************************************************************23 ; 31 24 FUNCTION cw_pagelayout_event, event 32 25 ; … … 43 36 if uval.name EQ 'undo' then begin 44 37 return,{ID:event.handler, TOP:event.top, HANDLER:0L} 45 ENDIF ELSE BEGIN 38 ENDIF ELSE BEGIN 46 39 ; 47 40 @common … … 63 56 case uval.name of 64 57 'clear': 65 'column':BEGIN 58 'column':BEGIN 66 59 smallin = [event.index+1, smallin[1], 1] 67 60 smallout = [event.index+1, smallout[1], 1] … … 73 66 endcase 74 67 nbredessin = smallin[0]*smallin[1] 75 ; 68 ; 76 69 ; We put all back to 0 for postscripts 77 70 createhistory, event.top, smallin 78 ; 79 options = extractatt(top_uvalue, 'options') 71 ; 72 options = extractatt(top_uvalue, 'options') 80 73 flags = extractatt(top_uvalue, 'optionsflag') 81 74 flag = flags[*, numdessinin] 82 ; 75 ; 83 76 ; update and reset all values of the top_uvalue... 84 77 ; … … 100 93 ptr_free, extractatt(top_uvalue, 'exextra') 101 94 *top_uvalue[1, findline(top_uvalue, 'exextra')] = ptrarr(nbredessin, /allocate_heap) 102 ; *top_uvalue[1, findline(top_uvalue, '')] = 95 ; *top_uvalue[1, findline(top_uvalue, '')] = 103 96 ; 104 ENDELSE 97 ENDELSE 105 98 106 99 return,{ID:event.handler, TOP:event.top, HANDLER:0L} 107 100 end 108 ; *********************************************************************101 ; 109 102 ;+ 103 ; 110 104 ; @file_comments 111 ;112 105 ; 113 106 ; @categories 114 107 ; Compound widget 115 ; 108 ; 116 109 ; @param PARENT {in}{required} 117 110 ; The widget ID of the parent widget. 118 111 ; 119 ; @param SMALL 120 ; 112 ; @param SMALL 121 113 ; 122 114 ; @keyword COLUMN 123 115 ; Buttons will be arranged in the number of columns 124 116 ; specified by this keyword. 125 ; 117 ; 126 118 ; @keyword ROW 127 119 ; Buttons will be arranged in the number of rows 128 120 ; specified by this keyword. 129 ; 121 ; 130 122 ; @keyword UVALUE 131 123 ; The user value to be associated with the widget. 132 ; 124 ; 133 125 ; @keyword UNAME 134 126 ; The user name to be associated with the widget. 135 127 ; 136 128 ; @keyword _EXTRA 137 ; Used to pass yourkeywords129 ; Used to pass keywords 138 130 ; 139 131 ; @keyword UNZOOM 140 ; 141 ; 132 ; 142 133 ; @returns 143 ; 144 ; 134 ; 145 135 ; @uses 146 ; 147 ; 136 ; 148 137 ; @restrictions 149 ; 150 ; 138 ; 151 139 ; @examples 152 ; 153 ; 140 ; 154 141 ; @history 155 ; 156 ; 142 ; 157 143 ; @version 158 ; $Id$ 159 ; 160 ; @todo 144 ; $Id$ 145 ; 146 ; @todo 161 147 ; seb: documenter 162 ; 148 ; 163 149 ;- 150 ; 164 151 FUNCTION cw_pagelayout, parent, small, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, COLUMN = column, ROW = row, _extra = ex 165 ;------------------------------------------------166 152 ; 167 153 compile_opt idl2, strictarrsubs 168 154 ; 169 row = keyword_set(row)*(1-keyword_set(column)) 155 row = keyword_set(row)*(1-keyword_set(column)) 170 156 if NOT keyword_set(uvalue) then uvalue = '' 171 157 if NOT keyword_set(uname) then uname = '' … … 174 160 , FUNC_GET_VALUE = 'cw_pagelayout_get_value' $ 175 161 , PRO_SET_VALUE = 'cw_pagelayout_set_value' $ 176 , UVALUE = uvalue, UNAME = uname, space = 0, _extra = ex) 162 , UVALUE = uvalue, UNAME = uname, space = 0, _extra = ex) 177 163 ;------------------------------------------------ 178 164 IF n_elements(small) eq 0 then small = [1, 1, 1] … … 183 169 widget_control, id, set_combobox_select = small[0]-1 184 170 ; 185 IF keyword_set(row) THEN BEGIN 171 IF keyword_set(row) THEN BEGIN 186 172 xoff = 60 187 173 yoff = 0 188 ENDIF ELSE BEGIN 174 ENDIF ELSE BEGIN 189 175 xoff = 0 190 176 yoff = 20 191 ENDELSE 177 ENDELSE 192 178 dummy = widget_label(base, value = 'row', xoffset = xoff, yoffset = yoff+3) 193 179 id = widget_combobox(base, value = strtrim(indgen(9)+1, 1), uvalue = {name:'row'} $ … … 198 184 return, base 199 185 end 200 ;********************************************************************* -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; … … 24 25 ; $Id$ 25 26 ;- 26 pro cw_slide_slice_set_value, id, value 27 ; 28 PRO cw_slide_slice_set_value, id, value 27 29 ; 28 30 compile_opt idl2, strictarrsubs … … 60 62 return 61 63 end 62 ; ----------------------------------------------------------------------64 ; 63 65 ;+ 66 ; 64 67 ; @file_comments 65 ;66 68 ; 67 69 ; @categories … … 83 85 ; $Id$ 84 86 ;- 87 ; 85 88 FUNCTION cw_slide_slice_event, event 86 89 ; … … 155 158 return, {CW_SLIDE_SLICE, ID:event.handler, TOP:event.top, HANDLER:0L} 156 159 end 157 ; --------------------------------------------------------------------------------160 ; 158 161 ;+ 162 ; 159 163 ; @file_comments 160 164 ; … … 194 198 ; 195 199 ; @keyword _EXTRA 196 ; Used to pass yourkeywords200 ; Used to pass keywords 197 201 ; 198 202 ; @returns … … 213 217 ; 214 218 ;- 219 ; 215 220 FUNCTION cw_slide_slice, parent, boxzoom = boxzoom, UVALUE = uvalue, UNAME = uname, FRAME = frame, ROW = row, COLUMN = column, _extra = ex 216 221 ; … … 271 276 ; maxi = ceil(maxi) 272 277 ; ENDELSE 273 278 274 279 ;------------------------------------------------ 275 280 return, base -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.pro
r226 r231 45 45 ; return 46 46 ; end 47 ;---------------------------------------------------------------------- 48 ;+ 49 ; @file_comments 50 ; 47 ;+ 48 ; 49 ; @file_comments 51 50 ; 52 51 ; @categories … … 69 68 ; $Id$ 70 69 ;- 70 ; 71 71 FUNCTION decvalue, value 72 72 ; … … 76 76 return, strtrim(string(floor(a) + 0.1*indgen(10), format = '(f15.1)'), 2) 77 77 end 78 ; ----------------------------------------------------------------------79 ;+ 80 ; @file_comments81 ; 78 ; 79 ;+ 80 ; 81 ; @file_comments 82 82 ; 83 83 ; @categories … … 100 100 ; $Id$ 101 101 ;- 102 ; 102 103 FUNCTION decind, value 103 104 ; … … 107 108 return, round(10*(a - floor(a))) ; !! computation accuracy 108 109 end 109 ; ----------------------------------------------------------------------110 ;+ 111 ; @file_comments112 ; 110 ; 111 ;+ 112 ; 113 ; @file_comments 113 114 ; 114 115 ; @categories … … 133 134 ; $Id$ 134 135 ;- 136 ; 135 137 PRO cw_slider_pm_set_value, id, value 136 138 ; … … 184 186 return 185 187 end 186 ;---------------------------------------------------------------------- 187 ;+ 188 ; 189 ;+ 190 ; 188 191 ; @file_comments 189 192 ; … … 207 210 ; $Id$ 208 211 ;- 212 ; 209 213 FUNCTION cw_slider_pm_get_value, id 210 214 ; … … 217 221 return, {value:value, slider_min_max:minmax} 218 222 end 219 ; ----------------------------------------------------------------------220 ;+ 221 ; @file_comments222 ; 223 ; 224 ;+ 225 ; 226 ; @file_comments 223 227 ; 224 228 ; @categories … … 240 244 ; $Id$ 241 245 ;- 246 ; 242 247 FUNCTION cw_slider_pm_event, event 243 248 ; … … 274 279 , VALUE:value, OUT:OUT} 275 280 end 276 ;---------------------------------------------------------------------- 277 ;------------------------------------------------------------ 278 ;------------------------------------------------------------ 279 ;------------------------------------------------------------ 281 ; 280 282 ;+ 281 283 ; … … 301 303 ; @keyword MINIMUM 302 304 ; 303 ;304 305 ; @keyword STRMINLEN 305 306 ; 306 ;307 307 ; @keyword _EXTRA 308 ; Used to pass yourkeywords308 ; Used to pass keywords 309 309 ; 310 310 ; @returns … … 381 381 ; 382 382 ;- 383 ;------------------------------------------------------------ 384 ;------------------------------------------------------------ 385 ;------------------------------------------------------------ 383 ; 386 384 FUNCTION cw_slider_pm, parent, MAXIMUM = maximum, MINIMUM = minimum $ 387 385 , STRMINLEN = strminlen, VALUE = value, UVALUE = uvalue $ -
trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.pro
r226 r231 1 ;***************************************************** 2 ;+ 3 ; @file_comments 4 ; 1 ;+ 2 ; 3 ; @file_comments 5 4 ; 6 5 ; @categories … … 25 24 ; $Id$ 26 25 ;- 26 ; 27 27 PRO cw_specifie_set_value, id, value 28 28 ; … … 50 50 return 51 51 end 52 ; *****************************************************53 ;+ 54 ; @file_comments55 ; 52 ; 53 ;+ 54 ; 55 ; @file_comments 56 56 ; 57 57 ; @categories … … 72 72 ; @version 73 73 ; $Id$ 74 ;- 74 ; 75 ;- 76 ; 75 77 FUNCTION cw_specifie_get_value, id 76 78 ; … … 97 99 return, exextra 98 100 end 99 ;***************************************************** 100 ;+ 101 ; @file_comments 102 ; 101 ; 102 ;+ 103 ; @file_comments 103 104 ; 104 105 ; @categories … … 119 120 ; @version 120 121 ; $Id$ 121 ;- 122 ; 123 ;- 124 ; 122 125 FUNCTION cw_specifie_event, event 126 ; 127 compile_opt idl2, strictarrsubs 128 ; 123 129 ;------------------------------------------------------------ 124 130 ; on recupere les ID des differents widgets 125 131 ;------------------------------------------------------------ 126 132 ;------------------------------------------------------------ 127 ;128 compile_opt idl2, strictarrsubs129 ;130 133 widget_control, event.id, get_uvalue = uval 131 134 widget_control, event.top, get_uvalue = top_uvalue … … 157 160 return, {ID:event.handler, TOP:event.top, HANDLER:0L, OK:uval EQ 'ok'} 158 161 end 159 ;***************************************************** 160 ;***************************************************** 161 ;+ 162 ; @file_comments 163 ; 162 ; 163 ;+ 164 ; 165 ; @file_comments 164 166 ; 165 167 ; @categories … … 188 190 ; 189 191 ; @keyword _EXTRA 190 ; Used to pass yourkeywords192 ; Used to pass keywords 191 193 ; 192 194 ; @returns … … 207 209 ; 208 210 ;- 211 ; 209 212 FUNCTION cw_specifie, parent, ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname, FRAME = frame, FORXXX = forxxx, _extra = ex 210 213 ; checking exclusive keywords -
trunk/SRC/ToBeReviewed/WIDGET/findtopid.pro
r157 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Find, from an Id of widget, the Id of the widget which is 4 ; Find, from an Id of widget, the Id of the widget which is 8 5 ; "the top-level base" (i.e., it has no parent) 9 6 ; 10 7 ; categories 11 8 ; widget 12 ; 9 ; 13 10 ; @param WIDGET_ID 14 11 ; This argument should be the widget ID of the … … 26 23 ; 27 24 ;- 28 ;------------------------------------------------------------ 29 ;------------------------------------------------------------ 30 ;------------------------------------------------------------ 25 ; 31 26 FUNCTION findtopid, WIDGET_ID 32 27 ; -
trunk/SRC/ToBeReviewed/WIDGET/slec.pro
r150 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param NAME 9 ;10 8 ; 11 9 ; @param DEBUT 12 10 ; 13 ;14 11 ; @param FIN 15 ;16 12 ; 17 13 ; @param NOMEXP 18 14 ; 19 ;20 15 ; @keyword PARENT {in}{required} 21 16 ; The widget ID of the parent widget. 22 17 ; 23 18 ; @keyword BOXZOOM 24 ; Vector indicating the geographic zone on which we want to cut the map. 25 ; If BOXZOOM has : 19 ; Vector indicating the geographic zone on which we want to cut the map. 20 ; If BOXZOOM has : 26 21 ; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 27 22 ; 2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 28 23 ; 4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 29 24 ; 5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 30 ; 6 elements: The extraction is made on Boxzoom 25 ; 6 elements: The extraction is made on Boxzoom 31 26 ; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 32 27 ; 33 28 ; @keyword _EXTRA 34 ; Used to pass your keywords 35 ; 36 ; 29 ; Used to pass keywords 30 ; 37 31 ; @returns 38 ; 39 ; 32 ; 40 33 ; @uses 41 ; 42 ; 34 ; 43 35 ; @restrictions 44 ; 45 ; 36 ; 46 37 ; @examples 47 ; 48 ; 38 ; 49 39 ; @history 50 ; 51 ; 52 ; @version 40 ; 41 ; @version 53 42 ; $Id$ 54 43 ; … … 57 46 ; 58 47 ;- 48 ; 59 49 FUNCTION slec,name,debut,fin, nomexp, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex 60 50 ;--------------------------------------------------------- 61 ; include common62 51 ; 63 52 compile_opt idl2, strictarrsubs … … 68 57 @updatekwd 69 58 ENDIF 70 ;------------------------------------------------------------ 59 ;------------------------------------------------------------ 71 60 case n_params() of 72 61 1:tab = nlec(name, PARENT = parent, BOXZOOM=boxzoom, _EXTRA = ex) -
trunk/SRC/ToBeReviewed/WIDGET/xnotice.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 38 35 ; 39 36 ;- 40 ;------------------------------------------------------------ 41 ;------------------------------------------------------------ 42 ;------------------------------------------------------------ 37 ; 43 38 FUNCTION xnotice, text, CHKWIDGET = chkwidget 44 39 ; -
trunk/SRC/ToBeReviewed/WIDGET/xquestion.pro
r163 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @param EVENT 9 8 ; 9 ; @returns 10 10 ; 11 ; @returns12 ;13 ;14 11 ; @uses 15 ; 16 ; 12 ; 17 13 ; @restrictions 18 ; 19 ; 14 ; 20 15 ; @examples 21 ; 22 ; 16 ; 23 17 ; @history 24 ; 25 ; 26 ; @version 18 ; 19 ; @version 27 20 ; $Id$ 28 21 ;- 29 ; -------------------------------------------------------------------------30 proxquestion_event, event22 ; 23 PRO xquestion_event, event 31 24 ; 32 25 compile_opt idl2, strictarrsubs … … 42 35 return 43 36 end 44 ;------------------------------------------------------------------------- 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 37 ; 48 38 ;+ 49 39 ; … … 67 57 ; A string proposing a answer 68 58 ; 69 ;70 59 ; @keyword CHKWIDGET 71 60 ; Active this keyword if you want that xquestion 72 61 ; check if managed widget are present. If not, xquestion do not 73 ; open a widget but print the question in the IDL window. 62 ; open a widget but print the question in the IDL window. 74 63 ; 75 64 ; @keyword _EXTRA 76 ; Used to pass yourkeywords77 ; 65 ; Used to pass keywords 66 ; 78 67 ; @returns 79 68 ; answer: a string … … 95 84 ; 96 85 ;- 97 ;------------------------------------------------------------ 98 ;------------------------------------------------------------ 99 ;------------------------------------------------------------ 86 ; 100 87 FUNCTION xquestion, question, proposedanswer, CHKWIDGET = chkwidget, _extra = ex ; 101 88 ; 102 89 compile_opt idl2, strictarrsubs 103 90 ; 104 ; is separate line a scalar? we must cut it into pieces? 91 ; is separate line a scalar? we must cut it into pieces? 105 92 if n_elements(question) EQ 1 then question = str_sep(question, '!C', /trim) 106 93 ; is a widget necessary? 107 94 if keyword_set(chkwidget) then BEGIN 108 95 if (widget_info(/managed))[0] EQ 0 then BEGIN 109 if n_elements(proposedanswer) EQ 0 then BEGIN 96 if n_elements(proposedanswer) EQ 0 then BEGIN 110 97 proposedanswer = '' 111 98 answer = '' 112 99 complete = '' 113 ENDIF ELSE BEGIN 100 ENDIF ELSE BEGIN 114 101 answer = proposedanswer 115 102 complete = '(default answer is '+proposedanswer+') ' 116 103 ENDELSE 117 104 if n_elements(question) GT 1 THEN $ 118 for i = 0, n_elements(question)-2 do print,question[i] 105 for i = 0, n_elements(question)-2 do print,question[i] 119 106 read, question[n_elements(question)-1]+' '+complete , answer 120 107 if keyword_set(answer) EQ 0 then answer = proposedanswer -
trunk/SRC/ToBeReviewed/WIDGET/xx.pro
r157 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 ;4 4 ; 5 5 ; @categories 6 6 ; 7 ;8 7 ; @keyword JOUR 9 ; 10 ; 8 ; 11 9 ; @keyword MESHFILENAME 12 ; 13 ; 10 ; 14 11 ; @keyword LISTVAR 15 ; 16 ; 12 ; 17 13 ; @keyword LISTGRID 18 ; 19 ; 20 ; @keyword FUNCLEC_NAME 21 ; 22 ; 14 ; 15 ; @keyword FUNCLEC_NAME 16 ; 23 17 ; @keyword CALENDAR 24 ; 25 ; 18 ; 26 19 ; @keyword _EXTRA 27 ; Used to pass your keywords 28 ; 29 ; 20 ; Used to pass keywords 21 ; 30 22 ; @uses 31 ; 32 ; 23 ; 33 24 ; @restrictions 34 ; 35 ; 25 ; 36 26 ; @examples 37 ; 38 ; 27 ; 39 28 ; @history 40 ; 41 ; 42 ; @version 29 ; 30 ; @version 43 31 ; $Id$ 44 32 ; … … 64 52 if NOT keyword_set(listvar) then listvar = ['tn','sn','un','vn', 'taux', 'tauy','hdep20','hdep28','hdep15','hturb','hpycn','htoth','emp','qn','qs', 'smltot11', 'smltot12', 'smltot13', 'smltot14', 'smltot15', 'smltot16', 'tmltot11', 'tmltot12', 'tmltot13', 'tmltot14', 'tmltot15', 'tmltot16'] 65 53 ; list of grids to which variables refer to. 66 if NOT keyword_set(listgrid) then BEGIN 54 if NOT keyword_set(listgrid) then BEGIN 67 55 listgrid = replicate('T', n_elements(listvar)) 68 56 listgrid[[2, 4]] = 'U' 69 57 listgrid[[3, 5]] = 'V' 70 58 ENDIF 71 ; calendar to be used (in IDL julian days 72 ; ++++ if NOT keyword_set(calendar) then BEGIN 59 ; calendar to be used (in IDL julian days 60 ; ++++ if NOT keyword_set(calendar) then BEGIN 73 61 ; ++++ if keyword_set(jour) then calendar = calendriertotem(/julian_day) ELSE calendar = calendriertotem(/julian_day, /mensuel) 74 62 ; ++++ ENDIF -
trunk/SRC/ToBeReviewed/WIDGET/xxx.pro
r226 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; see <a href="../../../xmldoc/mini_notice.html">Mini Guide for Basic Commands in the XXX Program</a> … … 6 7 ; 7 8 ; @param EVENT 8 ;9 9 ; 10 10 ; @returns … … 21 21 ; $Id$ 22 22 ;- 23 ; 23 24 PRO xxx_event, event 24 ;------------------------------------------------------------25 25 ; 26 26 compile_opt idl2, strictarrsubs … … 103 103 return 104 104 end 105 ;------------------------------------------------------------ 106 ;------------------------------------------------------------ 107 ;------------------------------------------------------------ 108 ;------------------------------------------------------------ 109 ;------------------------------------------------------------ 110 ;------------------------------------------------------------ 105 ; 111 106 ;+ 112 107 ; … … 119 114 ; @param DATAFILENAME 120 115 ; 121 ;122 116 ; @param IDLFILE 123 117 ; 124 ;125 118 ; @param ARGSPRO 126 ;127 119 ; 128 120 ; @keyword SEPARATE … … 136 128 ; 137 129 ; @keyword _EXTRA 138 ; Used to pass yourkeywords130 ; Used to pass keywords 139 131 ; 140 132 ; @keyword CALLERWIDID 141 ;142 133 ; 143 134 ; @keyword REDRAW … … 163 154 ; 164 155 ;- 165 ;------------------------------------------------------------ 166 ;------------------------------------------------------------ 167 ;------------------------------------------------------------ 168 ;------------------------------------------------------------ 169 ;------------------------------------------------------------ 170 ;------------------------------------------------------------ 156 ; 171 157 PRO xxx, datafilename, idlfile, argspro, CALLERWIDID = CallerWidId $ 172 158 , REDRAW = redraw, SEPARATE = separate, UVALUE = uvalue $ 173 159 , RESTORE = restore, _EXTRA = ex 174 ;------------------------------------------------------------175 160 ; 176 161 compile_opt idl2, strictarrsubs -
trunk/SRC/Utilities/createfunc.pro
r229 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; write an IDL function, compile it and execute it. … … 21 19 ; 22 20 ; @keyword _EXTRA 23 ; used to pass yourkeywords to the created function.21 ; Used to pass keywords to the created function. 24 22 ; 25 23 ; @restrictions … … 40 38 ; 41 39 ;- 42 ;------------------------------------------------------------ 43 ;------------------------------------------------------------ 44 ;------------------------------------------------------------ 40 ; 45 41 FUNCTION createfunc, command, FILENAMEIN = filenamein $ 46 42 , KWDLIST = kwdlist, _EXTRA = ex -
trunk/SRC/Utilities/createpro.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 24 21 ; 25 22 ; @keyword _EXTRA 26 ; used to pass yourkeywords to the created procedure.23 ; Used to pass keywords to the created procedure. 27 24 ; 28 25 ; @restrictions … … 46 43 ; $Id$ 47 44 ;- 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 50 ;------------------------------------------------------------ 45 ; 51 46 PRO createpro, command, FILENAMEIN = filenamein $ 52 47 , KWDLIST = kwdlist, KWDUSED = kwdused, _EXTRA = ex … … 88 83 ; compile it 89 84 resolve_routine, shortfilename 90 help,ex,/structure91 print,' ex = ',ex85 ;help,ex,/structure 86 ;print,' ex = ',ex 92 87 ; execute it 93 88 call_procedure, shortfilename, _extra = ex -
trunk/SRC/Utilities/def_myuniquetmpdir.pro
r224 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; if needed, define and create myuniquetmpdir … … 21 22 ; 22 23 ;- 24 ; 23 25 PRO def_myuniquetmpdir 24 26 ; -
trunk/SRC/Utilities/demomode_compatibility.pro
r224 r231 1 1 ;+ 2 ; 2 3 ; @categories 3 4 ; Utilities … … 9 10 ; $Id$ 10 11 ;- 12 ; 11 13 PRO demomode_compatibility 12 14 ; -
trunk/SRC/Utilities/find.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; @file_comments … … 65 62 ; 66 63 ; @keyword _EXTRA 67 ; used to pass yourkeywords64 ; Used to pass keywords 68 65 ; 69 66 ; @returns … … 109 106 ; $Id$ 110 107 ;- 111 ;------------------------------------------------------------ 112 ;------------------------------------------------------------ 113 ;------------------------------------------------------------ 108 ; 114 109 FUNCTION find, filein, IODIRECTORY = iodirectory, RECURSIVE = recursive $ 115 110 , REPERTOIRE = repertoire, NOPRO = nopro, ONLYPRO = onlypro $ -
trunk/SRC/Utilities/fitintobox.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 42 39 ; 43 40 ;- 44 ;------------------------------------------------------------ 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 41 ; 47 42 FUNCTION err_mess, sz, jpi, nx, jpj, ny, jpk, nz, jpt 48 43 ; … … 75 70 ; @param field {in}{required}{type=array or struct} 76 71 ; an array or a structure that can be read by the function 77 ; litchamp.pro78 ; 79 ; @param nx {in}{optional}{default=define by grille.pro}80 ; 81 ; @param ny {in}{optional}{default=define by grille.pro}82 ; 83 ; @param nz {in}{optional}{default=define by grille.pro}84 ; 85 ; @param firstx {in}{optional}{default=define by grille.pro}86 ; 87 ; @param firsty {in}{optional}{default=define by grille.pro}88 ; 89 ; @param firstz {in}{optional}{default=define by grille.pro}90 ; 91 ; @param lastx {in}{optional}{default=define by grille.pro}92 ; 93 ; @param lasty {in}{optional}{default=define by grille.pro}94 ; 95 ; @param lastz {in}{optional}{default=define by grille.pro}72 ; <pro>litchamp</pro> 73 ; 74 ; @param nx {in}{optional}{default=define by <pro>grille</pro>} 75 ; 76 ; @param ny {in}{optional}{default=define by <pro>grille</pro>} 77 ; 78 ; @param nz {in}{optional}{default=define by <pro>grille</pro>} 79 ; 80 ; @param firstx {in}{optional}{default=define by <pro>grille</pro>} 81 ; 82 ; @param firsty {in}{optional}{default=define by <pro>grille</pro>} 83 ; 84 ; @param firstz {in}{optional}{default=define by <pro>grille</pro>} 85 ; 86 ; @param lastx {in}{optional}{default=define by <pro>grille</pro>} 87 ; 88 ; @param lasty {in}{optional}{default=define by <pro>grille</pro>} 89 ; 90 ; @param lastz {in}{optional}{default=define by <pro>grille</pro>} 96 91 ; 97 92 ; @keyword WDEPTH … … 102 97 ; or -1 if there is an error... 103 98 ; 104 ; @uses cm_4mesh 105 ; @uses cm_4cal 99 ; @uses 100 ; cm_4mesh 101 ; cm_4cal 106 102 ; 107 103 ; @examples … … 123 119 ; $Id$ 124 120 ;- 125 ; ------------------------------------------------------------121 ; 126 122 FUNCTION fitintobox, field, nx, ny, nz, firstx, firsty $ 127 123 , firstz, lastx, lasty, lastz, WDEPTH = wdepth 128 ;------------------------------------------------------------129 ; include commons130 124 ; 131 125 compile_opt idl2, strictarrsubs -
trunk/SRC/Utilities/isadirectory.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; check if a directory exists and make sure that it ends … … 22 20 ; 23 21 ; @keyword _EXTRA 24 ; used to pass yourkeywords22 ; Used to pass keywords 25 23 ; 26 24 ; all dialog_pickfile keywords (like filter) can be used. … … 45 43 ; $Id$ 46 44 ;- 47 ;------------------------------------------------------------ 48 ;------------------------------------------------------------ 49 ;------------------------------------------------------------ 45 ; 50 46 FUNCTION isadirectory, directoryin, TITLE = title, IODIRECTORY = iodirectory, _extra = ex 51 47 ; -
trunk/SRC/Utilities/isafile.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 ; same as find.proexcept that as long as the file is 'NOT FOUND',4 ; same as <pro>find</pro> except that as long as the file is 'NOT FOUND', 7 5 ; isafile calls dialog_pickfile, to ask the user to select a file. 8 6 ; 9 ; @categories io 7 ; @categories 8 ; io 10 9 ; 11 10 ; @param FILEIN {in}{optional} … … 37 36 ; 38 37 ; @keyword _EXTRA 39 ; used to pass yourkeywords38 ; Used to pass keywords 40 39 ; 41 40 ; all find, file_search and dialog_pickfile keywords (like title) can be used … … 66 65 ; $Id$ 67 66 ;- 68 ;------------------------------------------------------------ 69 ;------------------------------------------------------------ 70 ;------------------------------------------------------------ 67 ; 71 68 FUNCTION isafile, filein, FILENAME = filename, IODIRECTORY = iodirectory $ 72 69 , NEW = new, RECURSIVE = RECURSIVE, ONLYPRO = onlypro $ 73 70 , ONLYNC = onlync, _extra = ex 74 ;------------------------------------------------------------75 71 ; 76 72 compile_opt idl2, strictarrsubs -
trunk/SRC/Utilities/linearequation.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 43 40 ; 44 41 ;- 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 42 ; 48 43 FUNCTION linearequation, point1, point2 49 44 ; -
trunk/SRC/Utilities/lineintersection.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 57 54 ; 58 55 ;- 59 ;------------------------------------------------------------ 60 ;------------------------------------------------------------ 61 ;------------------------------------------------------------ 56 ; 62 57 FUNCTION lineintersection, abc1, abc2, FLOAT = float 63 58 ; -
trunk/SRC/Utilities/mergeonline_help.pro
r224 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; Have one unique online help for IDL and SAXO … … 15 16 ; $Id$ 16 17 ;- 18 ; 17 19 PRO mergeonline_help 18 20 ; -
trunk/SRC/Utilities/protype.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 2 ; 5 3 ; @file_comments 6 4 ; test is a ".pro" file corresponds to an IDL procedure, function or batch file. … … 36 34 ; $Id$ 37 35 ;- 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 36 ; 41 37 FUNCTION protype, file 42 38 ; -
trunk/SRC/Utilities/pwd.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 17 14 ; 18 15 ;- 19 ;------------------------------------------------------------ 20 ;------------------------------------------------------------ 21 ;------------------------------------------------------------ 16 ; 22 17 PRO pwd 23 18 ; -
trunk/SRC/Utilities/report.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; 6 3 ; @file_comments 7 ; Like dialog_message.proif there is already some widget8 ; active or like message.proif there is not any widget active.4 ; Like <pro>dialog_message</pro> if there is already some widget 5 ; active or like <pro>message</pro> if there is not any widget active. 9 6 ; To ask a question whose answer is not yes/no,use xquestion. 10 7 ; … … 20 17 ; 21 18 ; @keyword _EXTRA 22 ; used to pass keywords from dialog_message.pro and message.pro19 ; Used to pass keywords to <pro>dialog_message</pro> and <pro>message</pro> 23 20 ; 24 21 ; @keyword PARENT 25 ; same as DIALOG_PARENT de dialog_message.pro22 ; same as DIALOG_PARENT of <pro>dialog_message</pro> 26 23 ; 27 24 ; @keyword QUESTION {default="Warning"} … … 64 61 ; 65 62 ;- 66 ;------------------------------------------------------------ 67 ;------------------------------------------------------------ 68 ;------------------------------------------------------------ 63 ; 69 64 FUNCTION report, text, DEFAULT_NO = default_no, PARENT = parent, QUESTION = question, SIMPLE = simple, _extra = ex 70 65 ; -
trunk/SRC/Utilities/routine_name.pro
r226 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 43 40 ; 44 41 ;- 45 ;------------------------------------------------------------ 46 ;------------------------------------------------------------ 47 ;------------------------------------------------------------ 42 ; 48 43 FUNCTION routine_name, pilingnum 49 44 ; -
trunk/SRC/Utilities/testvar.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 30 27 ; 31 28 ;- 32 ;------------------------------------------------------------ 33 ;------------------------------------------------------------ 34 ;------------------------------------------------------------ 29 ; 35 30 FUNCTION testvar, var = var 36 31 ; -
trunk/SRC/Utilities/text_box.pro
r226 r231 36 36 ; 37 37 ; @keyword _EXTRA 38 ; used to pass your keyword38 ; Used to pass keywords 39 39 ; 40 40 ; @keyword BOX … … 50 50 ; 51 51 ;- 52 ; 52 53 PRO text_box,text,pos=pos,fg_color=fg_color,bg_color=bg_color,$ 53 54 center=center,right=right,box=box,vert_space=vert_space, _EXTRA = ex -
trunk/SRC/Utilities/undefine.pro
r224 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 36 33 ; 37 34 ;- 38 ;------------------------------------------------------------ 39 ;------------------------------------------------------------ 40 ;------------------------------------------------------------ 41 PRO undefine, varname 35 ; 36 PRO undefine, varname 42 37 ; 43 38 compile_opt idl2, strictarrsubs … … 45 40 tempvar = SIZE(TEMPORARY(varname)) 46 41 END 47 -
trunk/SRC/Utilities/xfile.pro
r230 r231 1 ;------------------------------------------------------------2 ;------------------------------------------------------------3 ;------------------------------------------------------------4 1 ;+ 5 2 ; … … 18 15 ; 19 16 ; @keyword _EXTRA 20 ; used to pass yourkeywords17 ; Used to pass keywords 21 18 ; 22 19 ; @examples … … 32 29 ; 33 30 ;- 34 ;------------------------------------------------------------ 35 ;------------------------------------------------------------ 36 ;------------------------------------------------------------ 31 ; 37 32 PRO xfile, filename, _extra = ex 38 33 ; -
trunk/SRC/Utilities/xhelp.pro
r230 r231 15 15 ; 16 16 ; @keyword _EXTRA 17 ; used to pass yourkeywords17 ; Used to pass keywords 18 18 ; 19 19 ; @restrictions … … 38 38 ; 39 39 ;- 40 ; 40 41 PRO xhelp, filename, _extra=ex 41 42 ; -
trunk/SRC/buildinit.pro
r229 r231 1 1 ;+ 2 ; 2 3 ; @file_comments 3 4 ; 4 ;5 5 ; @categories 6 ;7 6 ; 8 7 ; @param PARENT {in}{required} 9 8 ; The ID of the parent widget. 10 9 ; 11 ; @keyword COLUMN 10 ; @keyword COLUMN 12 11 ; Buttons will be arranged in the number of columns specified by this keyword. 13 12 ; … … 16 15 ; 17 16 ; @keyword EVENT_FUNC 18 ; The name of an optional user-supplied event function for buttons. 19 ; This function is called with the return value structure whenever a 17 ; The name of an optional user-supplied event function for buttons. 18 ; This function is called with the return value structure whenever a 20 19 ; button is pressed, and follows the conventions for user-written event functions. 21 20 ; 22 21 ; @keyword FLOATING 23 22 ; 24 ;25 23 ; @keyword INTEGER 26 24 ; 27 ;28 25 ; @keyword LONG 29 26 ; 30 ;31 27 ; @keyword STRING 32 28 ; 33 ;34 29 ; @keyword FONT 35 ; The name of the font to be used for the button titles. If this keyword 30 ; The name of the font to be used for the button titles. If this keyword 36 31 ; is not specified, the default font is used. 37 32 ; … … 47 42 ; @keyword VALUE 48 43 ; 49 ;50 44 ; @keyword RETURN_EVENTS 51 45 ; 52 ;53 46 ; @keyword ALL_EVENTS 54 47 ; 55 ;56 48 ; @keyword FIELDFONT 57 49 ; 58 ;59 50 ; @keyword NOEDIT 60 51 ; 61 ;62 52 ; @keyword TEXT_FRAME 63 53 ; 64 ;65 54 ; @keyword XSIZE 66 ; The width of the base .55 ; The width of the base 67 56 ; 68 57 ; @keyword YSIZE … … 79 68 ; 80 69 ; @examples 81 ;82 70 ; 83 71 ; @history … … 87 75 ;- 88 76 ; 89 ;----------------------------------------------------------90 ;----------------------------------------------------------91 ;92 77 ; slightly modified version of cw_field... 78 ; 93 79 FUNCTION cw_field2, Parent, COLUMN=Column, ROW=Row, $ 94 80 EVENT_FUNC = efun, $ … … 98 84 FIELDFONT=FieldFont, NOEDIT=NoEdit, TEXT_FRAME=Text_Frame, $ 99 85 XSIZE=XSize, YSIZE=YSize, UNAME=uname 100 ; FLOOR=vmin, CEILING=vmax 86 ; FLOOR=vmin, CEILING=vmax 101 87 ; 102 88 compile_opt idl2, strictarrsubs … … 165 151 END 166 152 ; 167 ;----------------------------------------------------------168 ;----------------------------------------------------------169 153 ; 170 154 ;+ … … 174 158 ; @categories 175 159 ; 176 ; 160 ; 177 161 ; @param EVENT 178 162 ; 179 163 ; 180 164 ; @returns 181 ; 182 ; 165 ; 183 166 ; @uses 184 ; 185 ; 167 ; 186 168 ; @restrictions 187 ; 188 ; 169 ; 189 170 ; @examples 190 ; 191 ; 171 ; 192 172 ; @history 193 ; 194 ; 195 ; @version 173 ; 174 ; @version 196 175 ; $Id$ 197 176 ;- … … 226 205 END 227 206 ; 228 ;----------------------------------------------------------229 ;----------------------------------------------------------230 207 ; 231 208 ;+ 209 ; 232 210 ; @file_comments 233 211 ; 234 ;235 212 ; @categories 236 213 ; 237 ;238 214 ; @param EVENT 239 215 ; 240 ;241 216 ; @returns 242 ; 243 ; 217 ; 244 218 ; @uses 245 ; 246 ; 219 ; 247 220 ; @restrictions 248 ; 249 ; 221 ; 250 222 ; @examples 251 ; 252 ; 223 ; 253 224 ; @history 254 ; 255 ; 256 ; @version 225 ; 226 ; @version 257 227 ; $Id$ 258 228 ;- … … 283 253 ; @file_comments 284 254 ; 285 ;286 255 ; @categories 287 256 ; 288 ;289 257 ; @param EVENT 290 258 ; 291 ;292 259 ; @returns 293 ; 294 ; 260 ; 295 261 ; @uses 296 ; 297 ; 262 ; 298 263 ; @restrictions 299 ; 300 ; 264 ; 301 265 ; @examples 302 ; 303 ; 266 ; 304 267 ; @history 305 ; 306 ; 307 ; @version 268 ; 269 ; @version 308 270 ; $Id$ 309 271 ;- … … 320 282 END 321 283 ; 322 ;----------------------------------------------------------323 ;----------------------------------------------------------324 ;325 284 ;+ 285 ; 326 286 ; @file_comments 327 287 ; 328 ;329 288 ; @categories 330 289 ; 331 ;332 290 ; @keyword _EXTRA 333 ; Used to pass yourkeywords291 ; Used to pass keywords 334 292 ; 335 293 ; @returns 336 ; 337 ; 294 ; 338 295 ; @uses 339 ; 340 ; 296 ; 341 297 ; @restrictions 342 ; 343 ; 298 ; 344 299 ; @examples 345 ; 346 ; 300 ; 347 301 ; @history 348 ; 349 ; 350 ; @version 302 ; 303 ; @version 351 304 ; $Id$ 352 305 ;- 306 ; 353 307 FUNCTION xask, _extra = ex 354 308 ; 355 309 compile_opt idl2, strictarrsubs 356 310 ; 357 base = widget_base() 358 field = cw_field2(base, /frame, /return_events, /column, _extra = ex) 311 base = widget_base() 312 field = cw_field2(base, /frame, /return_events, /column, _extra = ex) 359 313 ptranswer = ptr_new(/allocate_heap) 360 314 ; we realize the widget and wait for an answer … … 368 322 END 369 323 ; 370 ;----------------------------------------------------------371 ;----------------------------------------------------------372 ;373 324 ;+ 325 ; 374 326 ; @file_comments 375 327 ; 376 ;377 328 ; @categories 378 ;379 329 ; 380 330 ; @keyword TITLE … … 382 332 ; 383 333 ; @keyword NOMARK 384 ;385 334 ; 386 335 ; @keyword NOWRITE 387 336 ; 388 ;389 337 ; @returns 390 ; 391 ; 338 ; 392 339 ; @uses 393 ; 394 ; 340 ; 395 341 ; @restrictions 396 ; 397 ; 342 ; 398 343 ; @examples 399 ; 400 ; 344 ; 401 345 ; @history 402 ; 403 ; 404 ; @version 346 ; 347 ; @version 405 348 ; $Id$ 406 349 ;- 350 ; 407 351 FUNCTION getdir, title = title, nomark = nomark, nowrite = nowrite 408 352 ; 409 353 compile_opt idl2, strictarrsubs 410 354 ; 411 355 412 356 REPEAT BEGIN 413 357 dir = dialog_pickfile(/directory, /must_exist, title = title) … … 422 366 END 423 367 ; 424 ;----------------------------------------------------------425 ;----------------------------------------------------------426 368 ; 427 369 ;+ 370 ; 428 371 ; @file_comments 429 372 ; 430 ;431 373 ; @categories 432 374 ; 433 ;434 375 ; @returns 435 ; 436 ; 376 ; 437 377 ; @uses 438 ; 439 ; 378 ; 440 379 ; @restrictions 441 ; 442 ; 380 ; 443 381 ; @examples 444 ; 445 ; 382 ; 446 383 ; @history 447 ; 448 ; 449 ; @version 384 ; 385 ; @version 450 386 ; $Id$ 451 387 ;- 388 ; 452 389 PRO buildinit 453 390 ; 454 ;455 391 compile_opt idl2, strictarrsubs 456 392 ; 457 IF fix(strmid(!version.release, 0, 1)) LT 6 THEN BEGIN 393 IF fix(strmid(!version.release, 0, 1)) LT 6 THEN BEGIN 458 394 print, ' *** ***** ***' 459 395 print, ' *** ERROR ***' … … 496 432 , 'with the old version ?'], /question, /default_no) 497 433 yes = strlowcase(yes) 498 434 499 435 init = [init $ 500 436 , ';' $ 501 437 , '; compatibility with the old version' $ 502 438 , ';' $ 503 , 'keep_compatibility, ' + strtrim(fix(yes EQ 'yes'), 2)] 439 , 'keep_compatibility, ' + strtrim(fix(yes EQ 'yes'), 2)] 504 440 ; 505 441 ; define all the commons … … 535 471 ptnumb = xask(title = 'Number of accessible printers', value = 0, /long) 536 472 ; 537 ; define all the printer parameters 473 ; define all the printer parameters 538 474 ; 539 475 init = [init $ … … 543 479 ; 544 480 IF ptnumb NE 0 THEN BEGIN 545 base = widget_base(/column, /frame) 481 base = widget_base(/column, /frame) 546 482 cwids = lonarr(3, ptnumb) 547 483 FOR i = 0, ptnumb-1 DO BEGIN 548 484 subbase = widget_base(base, /row) 549 485 cwids[0, i] = cw_field(subbase, /string $ 550 , Title = 'printer_human_names['+strtrim(i, 2)+'] = ') 486 , Title = 'printer_human_names['+strtrim(i, 2)+'] = ') 551 487 cwids[1, i] = cw_field(subbase, /string $ 552 , Title = 'printer_machine_names['+strtrim(i, 2)+'] = ') 488 , Title = 'printer_machine_names['+strtrim(i, 2)+'] = ') 553 489 cwids[2, i] = cw_field(subbase, /string, value = '\lpr -P' $ 554 , Title = 'print_command['+strtrim(i, 2)+'] = ') 490 , Title = 'print_command['+strtrim(i, 2)+'] = ') 555 491 ENDFOR 556 492 trash = widget_button(base, value = 'ok', uvalue = cwids) … … 580 516 , 'printer_machine_names = ''''' $ 581 517 , 'print_command = '''''] 582 ENDELSE 518 ENDELSE 583 519 ; 584 520 ; Colors … … 622 558 ; postscript position 623 559 ; 624 yes = dialog_message(['the default postscript position', 'is landscape?'], /question) 560 yes = dialog_message(['the default postscript position', 'is landscape?'], /question) 625 561 init = [init $ 626 562 , ';' $ … … 661 597 , '11x17 11 17 27.94 43.18' $ 662 598 , 'ledger 17 11 43.18 27.94'] 663 base = widget_base(/column) 599 base = widget_base(/column) 664 600 trash = widget_label(base, value = '--- Select the paper size ---') 665 601 trash = widget_label(base, value = '') … … 689 625 wsize_scale = xask(title = title, value = 1, /floating) 690 626 init = [init, 'windowsize_scale = ' + strtrim(wsize_scale, 2)] 691 627 692 628 ; 693 629 ; postscript archiving...
Note: See TracChangeset
for help on using the changeset viewer.