Changeset 827 in lmdz_wrf
- Timestamp:
- Jun 16, 2016, 12:10:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing_tools.py
r826 r827 6979 6979 ddx = np.abs(lons[dy/2+1,dx/2] - lons[dy/2,dx/2]) 6980 6980 ddy = np.abs(lats[dy/2,dx/2+1] - lats[dy/2,dx/2]) 6981 fontcharac = {'family': 'serif', 'weight': 'normal', 'size': 3} 6982 6983 print ' ' + fname + ' Lluis; rsf:', rsf, type(rsf) 6981 fontcharac = {'family': 'serif', 'weight': 'normal', 'size': 10} 6982 6984 6983 subhr = gen.chainSnumHierarchy(rsf) 6985 6984 … … 7003 7002 collev[gen.num_chainSnum(isub+1)] = rcolors[isub] 7004 7003 7005 print ' Lluis collev:', collev7006 7007 7004 # All the colors should finish white... 7008 7005 endcol = [1., 1., 1.] … … 7018 7015 levs = gen.num_split(isub) 7019 7016 Nlevs = len(levs) 7020 begcol = collev[levs[0]] 7017 if Nlevs == 1: 7018 begcol = [0., 0., 0.] 7019 else: 7020 begcol = collev[levs[1]] 7021 7021 for ilev in range(2,Nlevs): 7022 7022 # We do not want a last white value... … … 7028 7028 begcol = colors[1:4,gen.chainSnum_num(levs[ilev])-1] 7029 7029 7030 # colorsub[isub] = gen.coldec_hex(begcolors)7031 7030 colorsub[isub] = tuple(begcol) 7032 7031 Llfs = rLlf[isub] 7033 7032 outfs = rof[isub] 7034 print ' Lluis; ' + fname + ': isub:', isub,' outfs:', outfs7035 7033 for igrid in range(len(outfs)): 7036 7034 Llf = Llfs[igrid] … … 7063 7061 plt.rc('text', usetex=True) 7064 7062 7065 latlonss = rLlf.values() 7066 nlon = np.min(latlonss[1]) 7067 xlon = np.max(latlonss[1]) 7068 nlat = np.min(latlonss[0]) 7069 xlat = np.max(latlonss[0]) 7063 nlon = np.min(xlabpos) 7064 xlon = np.max(xlabpos) 7065 nlat = np.min(ylabpos) 7066 xlat = np.max(ylabpos) 7070 7067 7071 7068 dlon = xlon - nlon … … 7073 7070 7074 7071 # Making bigger the area to map 7075 nlon = nlon-dlon *0.17076 xlon = xlon+dlon *0.17077 nlat = nlat-dlat *0.17078 xlat = xlat+dlat *0.17072 nlon = nlon-dlon-lengthtrac2 7073 xlon = xlon+dlon+lengthtrac2 7074 nlat = nlat-dlat-lengthtrac2 7075 xlat = xlat+dlat+lengthtrac2 7079 7076 7080 7077 plt.xlim(nlon,xlon) … … 7118 7115 7119 7116 j = 0 7120 for i in range(len( rsf)):7117 for i in range(len(xtrack)/3): 7121 7118 plt.plot(xtrack[j:j+2], ytrack[j:j+2], color=colortrack[i]) 7122 7119 j = j + 3 7123 7124 print 'Lluis : xtrack shape', len(xtrack)/3, 'xlabpos:', len(xlabpos)7125 7120 7126 7121 # Sea-flow
Note: See TracChangeset
for help on using the changeset viewer.