;+ ; @file_comments ; ; @categories ; ; @param MASK ; ; @param XF ; ; @param YF ; ; @param NX ; ; @param NY ; ; @keyword COAST_COLOR {default=0} ; The color of the coastline. ; Default is black (0). ; ; @keyword COAST_THICK {default=1} ; The thick of the trait to trace continents ; ; @keyword XSEUIL {default=5} ; To eliminate segments of coasts which are to big (which link points which can ; be close on the sphere but distant on the drawing). We delete all segments ; whose the size surpass the size of the window following X/XSEUIL. ; But it can be to big if we do a big zoom or a little one for some ; projections... We specify it the keyword thanks to this keyword! ; ; @keyword YSEUIL ; See XSEUIL ; ; @keyword _EXTRA ; Used to pass keywords ; ; @returns ; ; @uses ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; ; @todo ; Seb: remplir le header ; ;- PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, ONEMORE = onemore, _EXTRA = ex ; compile_opt idl2, strictarrsubs ; @cm_4mesh IF NOT keyword_set(key_forgetold) THEN BEGIN @updatenew @updatekwd ENDIF ;--------------------------------------------------------- tempsun = systime(1) ; pour key_performance ;--------------------------------------------------------- if keyword_set(key_periodic) AND nx EQ jpi then begin mask = [mask, mask[0, *]] xf = [xf, xf[0, *]] yf = [yf, yf[0, *]] nx = nx+1 ENDIF ; ; we plot the borders of the diamond in this sense : \ ; if NOT keyword_set(onemore) then onemore = 0 if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) distanceseuil = (!p.position[2]-!p.position[0])/xseuil ; liste: liste des points i pour lesquels on va tracer un segment index = lindgen(nx, ny) index = index[0:nx-2, 1:ny-1] indexbis = index-nx+((index/nx+onemore) MOD 2) liste = where(mask[index+1]+mask[indexbis] EQ 1 $ AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2) IF liste[0] NE -1 THEN BEGIN index = index[liste] indexbis = indexbis[liste] for pt = 0, n_elements(index)-1 do begin plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $ , color = coast_color, thick = coast_thick, /normal, _extra = ex endfor ENDIF ; ; we plot the borders of the diamond in this sense : / ; if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) distanceseuil = (!p.position[2]-!p.position[0])/xseuil ; liste: liste des points i pour lesquels on va tracer un segment index = lindgen(nx, ny-1) index = index[0:nx-2, *] indexbis = index+nx+((index/nx+onemore) MOD 2) liste = where(mask[index+1]+mask[indexbis] EQ 1 $ AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2) IF liste[0] NE -1 THEN BEGIN index = index[liste] indexbis = indexbis[liste] for pt = 0, n_elements(index)-1 do begin plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $ , color = coast_color, thick = coast_thick, /normal, _extra = ex endfor ENDIF ;--------------------------------------------------------- if keyword_set(key_performance) THEN print, 'temps drawcoast_e', systime(1)-tempsun return end