1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; NAME:computegrid |
---|
6 | ; |
---|
7 | ; PURPOSE:calcule les parametres (necessaires aux traces) d''une |
---|
8 | ; grille reguliere avec |
---|
9 | ; - les points T, U et V sont confondus |
---|
10 | ; - un seul niveau vertical. |
---|
11 | ; |
---|
12 | ; CATEGORY:grille |
---|
13 | ; |
---|
14 | ; CALLING SEQUENCE:computegrid, departx, departy, pasx, pasy, nx, ny |
---|
15 | ; |
---|
16 | ; INPUTS:des saclaires. |
---|
17 | ; departx:la longitude minimum |
---|
18 | ; departy:la latitude minimum |
---|
19 | ; pasx:la pas suivant la longitude |
---|
20 | ; pasy:la pas suivant la latitude |
---|
21 | ; nx:le nombre de points en longitude |
---|
22 | ; ny:le nombre de points en latitude |
---|
23 | ; |
---|
24 | ; KEYWORD PARAMETERS: |
---|
25 | ; |
---|
26 | ; OUTPUTS: |
---|
27 | ; |
---|
28 | ; COMMON BLOCKS:common.pro |
---|
29 | ; |
---|
30 | ; SIDE EFFECTS:definit aussi les parametres pour les grilles U et V |
---|
31 | ; meme si on n''en a pas besoin. |
---|
32 | ; |
---|
33 | ; RESTRICTIONS:programme vite fait, avec les latitudes qui doivent |
---|
34 | ; aller du sud vers le nord. |
---|
35 | ; |
---|
36 | ; EXAMPLE: |
---|
37 | ; |
---|
38 | ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
39 | ; 2000-04-20 |
---|
40 | ;- |
---|
41 | ;------------------------------------------------------------ |
---|
42 | ;------------------------------------------------------------ |
---|
43 | ;------------------------------------------------------------ |
---|
44 | PRO computegrid, departx, departy, pasx, pasy, nx, ny |
---|
45 | @common |
---|
46 | ;------------------------------------------------------------ |
---|
47 | jpiglo = long(nx) |
---|
48 | jpjglo = long(ny) |
---|
49 | jpkglo = 1l |
---|
50 | ; |
---|
51 | jpi = jpiglo |
---|
52 | jpj = jpjglo |
---|
53 | jpk = jpkglo |
---|
54 | ; |
---|
55 | ixminmesh =0l |
---|
56 | ixmaxmesh =long(jpi-1) |
---|
57 | iyminmesh =0l |
---|
58 | iymaxmesh =long(jpj-1) |
---|
59 | izminmesh =0l |
---|
60 | izmaxmesh =long(jpk-1) |
---|
61 | ; |
---|
62 | glamt = departx+findgen(jpi)*pasx |
---|
63 | glamt = glamt#replicate(1, jpj) |
---|
64 | glamf = glamt+pasx/2. |
---|
65 | gphit = departy+findgen(jpj)*pasy |
---|
66 | gphit = replicate(1, jpi)#gphit |
---|
67 | gphif = gphit+pasy/2. |
---|
68 | glamu = glamf |
---|
69 | glamv = glamt |
---|
70 | gphiu = gphit |
---|
71 | gphiv = gphif |
---|
72 | gdept = 5. |
---|
73 | gdepw = 5. |
---|
74 | ; |
---|
75 | pasx = abs(pasx) |
---|
76 | pasy = abs(pasy) |
---|
77 | ; facteurs d'echelle: |
---|
78 | r = 6371000. |
---|
79 | rprojete = r*cos(gphit[0,*]*!pi/180.) |
---|
80 | e1t = rprojete*pasx*!pi/180. |
---|
81 | e1t = reform(replicate(1, jpi)#e1t[*], jpi, jpj) |
---|
82 | e2t = replicate(r*pasy*!pi/180., jpi, jpj) |
---|
83 | ; |
---|
84 | e1u = e1t |
---|
85 | e2u = e2t |
---|
86 | ; |
---|
87 | rprojete = r*cos(gphiv[0,*]*!pi/180.) |
---|
88 | e1v = rprojete*pasx*!pi/180. |
---|
89 | e1v = reform(replicate(1, jpi)#e1v[*], jpi, jpj) |
---|
90 | e2v = e2t |
---|
91 | ; |
---|
92 | e1f = e1v |
---|
93 | e2f = e2t |
---|
94 | ; |
---|
95 | e3t = 10. |
---|
96 | e3w = 10. |
---|
97 | ; mask par defauyt a 1 |
---|
98 | tmask = replicate(1, jpi, jpj) |
---|
99 | umaskred = replicate(1, jpj) |
---|
100 | vmaskred = replicate(1, jpi) |
---|
101 | fmaskredy = replicate(1, jpj) |
---|
102 | fmaskredx = replicate(1, jpi) |
---|
103 | |
---|
104 | ;------------------------------------------------------------ |
---|
105 | return |
---|
106 | end |
---|
107 | |
---|
108 | |
---|