Changeset 2514 in lmdz_wrf
- Timestamp:
- May 7, 2019, 5:55:44 AM (7 years ago)
- File:
-
- 1 edited
-
trunk/tools/geometry_tools.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/geometry_tools.py
r2513 r2514 833 833 834 834 doublearrowdic = {} 835 835 ddy = width*np.tan(angle*np.pi/180.)/2. 836 836 # Arms 837 dx = length/(N4-1)838 for ix in range(N4 -1):837 dx = (length-ddy)/(N4-1) 838 for ix in range(N4): 839 839 doubleArrow[ix,:] = [dx*ix,-width/2.] 840 doublearrowdic['leftarm'] = [doubleArrow[0:N4 -1,:], '-', '#000000', 2.]841 doubleArrow[N4 -1,:] = [gen.fillValueF,gen.fillValueF]842 for ix in range(N4 -1):843 doubleArrow[N4+ ix,:] = [dx*ix,width/2.]844 doublearrowdic['rightarm'] = [doubleArrow[N4 :2*N4-1,:], '-', '#000000', 2.]845 doubleArrow[2*N4 -1,:] = [gen.fillValueF,gen.fillValueF]840 doublearrowdic['leftarm'] = [doubleArrow[0:N4,:], '-', '#000000', 2.] 841 doubleArrow[N4,:] = [gen.fillValueF,gen.fillValueF] 842 for ix in range(N4): 843 doubleArrow[N4+1+ix,:] = [dx*ix,width/2.] 844 doublearrowdic['rightarm'] = [doubleArrow[N4+1:2*N4+1,:], '-', '#000000', 2.] 845 doubleArrow[2*N4+1,:] = [gen.fillValueF,gen.fillValueF] 846 846 847 847 # Head 848 848 N42 = int((N-2 - 2*N4)/2) 849 dx = width*(1.+alength)/(N42-1) 849 dx = width*(1.+alength)*np.cos(angle*np.pi/180.)/(N42-1) 850 dy = width*(1.+alength)*np.sin(angle*np.pi/180.)/(N42-1) 850 851 for ix in range(N42): 851 doubleArrow[2*N4+ ix,:] = [length-dx*ix,-dx*ix]852 doubleArrow[2*N4+2+ix,:] = [length-dy*ix,-dx*ix] 852 853 doublearrowdic['lefthead'] = [doubleArrow[2*N4:2*N4+N42,:], '-', '#000000', 2.] 853 doubleArrow[2*N4+N42,:] = [gen.fillValueF,gen.fillValueF] 854 855 N43 = N-2 - 2*N4 - N42 + 1 856 dx = width*(1.+alength)/(N43-1) 854 doubleArrow[2*N4+2+N42,:] = [gen.fillValueF,gen.fillValueF] 855 856 N43 = N-3 - 2*N4 - N42 + 1 857 dx = width*(1.+alength)*np.cos(angle*np.pi/180.)/(N43-1) 858 dy = width*(1.+alength)*np.sin(angle*np.pi/180.)/(N43-1) 857 859 for ix in range(N43): 858 doubleArrow[2*N4+N42+ 1+ix,:] = [length-dx*ix,dx*ix]859 doublearrowdic['rightthead'] = [doubleArrow[2*N4+N42 :51,:], '-', '#000000', 2.]860 doubleArrow[2*N4+N42+2+ix,:] = [length-dy*ix,dx*ix] 861 doublearrowdic['rightthead'] = [doubleArrow[2*N4+N42+2:51,:], '-', '#000000', 2.] 860 862 861 863 doubleArrow = ma.masked_equal(doubleArrow, gen.fillValueF)
Note: See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/LMDZ_WRF/chrome/site/your_project_logo.png)