1 | PRO drawcoast_e, mask, xf, yf, nx, ny, COAST_COLOR = coast_color, COAST_THICK = coast_thick, YSEUIL = yseuil, XSEUIL = xseuil, onemore = onemore, _extra = ex |
---|
2 | ;--------------------------------------------------------- |
---|
3 | @cm_4mesh |
---|
4 | IF NOT keyword_set(key_forgetold) THEN BEGIN |
---|
5 | @updatenew |
---|
6 | @updatekwd |
---|
7 | ENDIF |
---|
8 | ;--------------------------------------------------------- |
---|
9 | tempsun = systime(1) ; pour key_performance |
---|
10 | ;--------------------------------------------------------- |
---|
11 | if keyword_set(key_periodic) AND nx EQ jpi then begin |
---|
12 | mask = [mask, mask[0, *]] |
---|
13 | xf = [xf, xf[0, *]] |
---|
14 | yf = [yf, yf[0, *]] |
---|
15 | nx = nx+1 |
---|
16 | ENDIF |
---|
17 | ; |
---|
18 | ; we plot the borders of the diamond in this sense : \ |
---|
19 | ; |
---|
20 | if NOT keyword_set(onemore) then onemore = 0 |
---|
21 | if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) |
---|
22 | distanceseuil = (!p.position[2]-!p.position[0])/xseuil |
---|
23 | ; liste: liste des points i pourlesquels on va tracer un segment |
---|
24 | index = lindgen(nx, ny) |
---|
25 | index = index[0:nx-2, 1:ny-1] |
---|
26 | indexbis = index-nx+((index/nx+onemore) MOD 2) |
---|
27 | liste = where(mask[index+1]+mask[indexbis] EQ 1 $ |
---|
28 | AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2) |
---|
29 | IF liste[0] NE -1 THEN BEGIN |
---|
30 | index = index[liste] |
---|
31 | indexbis = indexbis[liste] |
---|
32 | for pt = 0, n_elements(index)-1 do begin |
---|
33 | plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $ |
---|
34 | , color = coast_color, thick = coast_thick, /normal, _extra = ex |
---|
35 | endfor |
---|
36 | ENDIF |
---|
37 | ; |
---|
38 | ; we plot the borders of the diamond in this sense : / |
---|
39 | ; |
---|
40 | if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) |
---|
41 | distanceseuil = (!p.position[2]-!p.position[0])/xseuil |
---|
42 | ; liste: liste des points i pourlesquels on va tracer un segment |
---|
43 | index = lindgen(nx, ny-1) |
---|
44 | index = index[0:nx-2, *] |
---|
45 | indexbis = index+nx+((index/nx+onemore) MOD 2) |
---|
46 | liste = where(mask[index+1]+mask[indexbis] EQ 1 $ |
---|
47 | AND (xf[index]-xf[indexbis])^2+(yf[index]-yf[indexbis])^2 LE distanceseuil^2) |
---|
48 | IF liste[0] NE -1 THEN BEGIN |
---|
49 | index = index[liste] |
---|
50 | indexbis = indexbis[liste] |
---|
51 | for pt = 0, n_elements(index)-1 do begin |
---|
52 | plots, [xf[index[pt]], xf[indexbis[pt]]], [yf[index[pt]], yf[indexbis[pt]]] $ |
---|
53 | , color = coast_color, thick = coast_thick, /normal, _extra = ex |
---|
54 | endfor |
---|
55 | ENDIF |
---|
56 | |
---|
57 | ;--------------------------------------------------------- |
---|
58 | if keyword_set(key_performance) THEN print, 'temps drawcoast_e', systime(1)-tempsun |
---|
59 | return |
---|
60 | end |
---|