source: trunk/src/python_script/vnx.py @ 6

Last change on this file since 6 was 6, checked in by gaclod, 12 years ago

add GC python scripts

  • Property svn:executable set to *
File size: 610 bytes
Line 
1#grilla
2
3y11= -50
4y0, y1 = -90, 90
5dy=1.0
6yvec = arange(y0,y11,dy)
7ny = size(yvec)
8Rt=6371
9beta=math.pi/180
10R=beta*Rt
11L=zeros(ny,float)#arc vector
12L[0]=2*math.pi*R
13for i in range(1, ny):
14    L[i]=2*math.pi*R*(i+1)
15
16nnx=zeros(ny,float)
17nnx=L/L[0]
18nnx=200/nnx
19nnx=nnx.round()
20div=np.array([1,2,3,4,5,6,8,9,10,12,15,16,18,20,24,25,30,36,
2140,45,48,50,60,72,75,80,90,100,120,144,150,180,200,225,240,300,360,
22400,450,600,720,900,1200,1800,3600])
23vnx=zeros(ny,float)
24
25for i in range(0, ny):
26    a=nnx[i]
27    for j in range(0, 45):
28        b=div[j]
29        if b<=a:
30           vnx[i]=b
31
32vnx[13:40]=12
33li=(L/3600)*vnx
Note: See TracBrowser for help on using the repository browser.