source: trunk/TRIANGULATION/completecointerre.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME: COMPLETECOINTERRE
6;
7; PURPOSE: pour colorier proprement les continents! (c''est une longue
8; histoire...)
9;
10; CATEGORY: pour plt
11;
12; CALLING SEQUENCE: completecointerre
13;
14; INPUTS: non
15;
16; KEYWORD PARAMETERS:  _EXTRA
17;
18; OUTPUTS: non
19;
20; COMMON BLOCKS: common.pro
21;
22; SIDE EFFECTS:
23;
24; RESTRICTIONS:
25;
26; EXAMPLE:
27;
28; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)
29;                      01/10/1999
30;-
31;------------------------------------------------------------
32;------------------------------------------------------------
33;------------------------------------------------------------
34PRO completecointerre, COINMONTE = coinmonte, COINDESCEND = coindescend, INDICEZOOM = indicezoom $
35                       , _extra = ex
36@common
37;------------------------------------------------------------
38   tempsun = systime(1)         ; pour key_performance
39;------------------------------------------------------------
40; definitions des vecteurs coinmont et coindesc
41;------------------------------------------------------------
42   if keyword_set(coinmonte) then coinmont = coinmonte $
43   ELSE coinmont = cointerremont
44   if keyword_set(coindescend) then coindesc = coindescend $
45   ELSE coindesc = cointerredesc
46;------------------------------------------------------------
47; definition descoordonnees des points numerotes 1,2,3,4,5,6 cf. les
48; schemas en dessous!
49;------------------------------------------------------------
50   tempdeux = systime(1)        ; pour key_performance =2
51   if coinmont[0] NE -1 OR coindesc[0] NE -1 then BEGIN
52      if keyword_set(indicezoom) then begin
53         long1 = glamv[indicezoom] & lati1 = gphiv[indicezoom]
54         long2 = glamu[indicezoom] & lati2 = gphiu[indicezoom]
55         long3 = glamf[indicezoom] & lati3 = gphif[indicezoom]
56         taille = size(indicezoom)
57         nx = taille[1]
58      ENDIF ELSE BEGIN
59         long1 = glamv & lati1 = gphiv
60         long2 = glamu & lati2 = gphiu
61         long3 = glamf & lati3 = gphif
62         nx = jpi
63      ENDELSE
64      long4 = long2  & lati4 = lati2
65      long5 = long1 & lati5 = lati1
66   endif
67   IF testvar(var = key_performance) EQ 2 THEN $
68    print, 'temps completecointerre: positions des points', systime(1)-tempdeux
69;
70;
71; cas coin terre en montee:
72;      2 points terre en diagonale montante avec 2 points mer sur
73;      la diagonale descendante.
74;
75;                     4   
76;     t(i+nx)=1    u(i+nx)       t(i+nx+1)=0
77;                     |      \
78;                     |         \
79;         1         3 |            \   5
80;       v(i)---------f(i)------------v(i+1)
81;           \         |
82;              \      |
83;                 \   |
84;      t(i)=0       2 u(i)          t(i+1)=1
85;
86;
87   if coinmont[0] NE -1 then BEGIN
88      tempdeux = systime(1)     ; pour key_performance =2
89      for id = 0, n_elements(coinmont)-1 do BEGIN
90         i = coinmont[id]
91         if long1[i] GE lon1 AND long5[i+1] LE lon2 $
92          AND lati2[i] GE lat1 AND lati4[i+nx] LE lat2 then begin
93            polyfill, [long1[i], long2[i], long3[i], long4[i+nx], long5[i+1], long3[i]] $
94             , [lati1[i], lati2[i], lati3[i], lati4[i+nx], lati5[i+1], lati3[i]] $
95             , color = c_cont, _extra = ex
96         endif
97      endfor
98      IF testvar(var = key_performance) EQ 2 THEN $
99       print, 'temps completecointerre: trace de cointerremonte', systime(1)-tempdeux
100   endif
101;------------------------------------------------------------
102; cas coin terre en descendante.:
103;      2 points terre en diagonale descendante avec 2 points mer sur
104;      la diagonale montante
105;
106;                     4
107;     t(i+nx)=1    u(i+nx)       t(i+nx+1)=0
108;                /    |       
109;             /       |         
110;          /        3 |                5
111;       v(i)---------f(i)------------v(i+1)
112;         1           |            /
113;                     |         /
114;                     |      /
115;      t(i)=0      2 u(i)          t(i+1)=1
116;
117   if keyword_set(coindescend) then coindesc = coindescend $
118   ELSE coindesc = cointerredesc
119   if coindesc[0] NE -1 then begin
120      tempdeux = systime(1)     ; pour key_performance =2
121      for id = 0, n_elements(coindesc)-1 do BEGIN
122         i = coindesc[id]
123         if long1[i] GE lon1 AND long5[i+1] LE lon2 $
124          AND lati2[i] GE lat1 AND lati4[i+nx] LE lat2 then begin
125            polyfill, [long1[i], long4[i+nx], long3[i], long2[i], long5[i+1], long3[i]] $
126             , [lati1[i], lati4[i+nx], lati3[i], lati2[i], lati5[i+1], lati3[i]] $
127             , color = c_cont, _extra = ex
128         endif
129      endfor
130      IF testvar(var = key_performance) EQ 2 THEN $
131       print, 'temps completecointerre: trace de cointerredescend', systime(1)-tempdeux
132   endif
133
134;------------------------------------------------------------
135   IF keyword_set(key_performance) THEN print, 'temps completecointerre', systime(1)-tempsun
136;------------------------------------------------------------
137   return
138end
Note: See TracBrowser for help on using the repository browser.