Changeset 947 in lmdz_wrf for trunk/tools
- Timestamp:
- Jun 24, 2016, 12:46:07 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r938 r947 1785 1785 [valuesaxis]: which axis will be used for the values ('x', or 'y') 1786 1786 [dimtit]: title for the common dimension ('|' for spaces) 1787 [leglabels]: ',' separated list of names for the legend ('None', no legend )1787 [leglabels]: ',' separated list of names for the legend ('None', no legend '!' for spaces) 1788 1788 [vartit]: name of the variable in the graph 1789 1789 [title]: title of the plot ('|' for spaces) … … 1837 1837 valuesaxis = values.split(';')[1] 1838 1838 dimtit = values.split(';')[2].replace('|',' ') 1839 leglabels = values.split(';')[3].replace('_','\_') 1839 leglabels = values.split(';')[3].replace('_','\_').replace('!',' ') 1840 1840 vartit = values.split(';')[4] 1841 1841 title = values.split(';')[5].replace('|',' ') … … 1887 1887 # Multiple point types? 1888 1888 if points0.find(',') != -1: 1889 points = points0.split(',') 1889 if len(points0) == 1: 1890 points = [] 1891 for ip in range(Nfiles): 1892 points.append(points0) 1893 else: 1894 points = points0.split(',') 1890 1895 elif points0 == 'None': 1891 1896 points = None … … 1980 1985 "' has any variable '", varname, "' !!" 1981 1986 quit(-1) 1982 1987 if vdobj.units.find('month') != 1: 1988 print warnmsg 1989 print ' ' + fname + ": tranforming time units from 'months' to 'days'!!" 1990 timevals0, tunits0 = gen.CFmonthU_daysU(vdobj[:], vdobj.units) 1991 else: 1992 timevals0 = vdobj[:] 1993 tunits0 = str(vdobj.units) 1983 1994 1984 1995 # Getting period 1985 1996 if ifn > 0: 1986 1997 # Referring all times to the same reference time! 1987 reftvals = drw.coincident_CFtimes( vdobj[:], timeunit, vdobj.units)1998 reftvals = drw.coincident_CFtimes(timevals0, timeunit, tunits0) 1988 1999 else: 1989 reftvals = vdobj[:]2000 reftvals = timevals0 1990 2001 1991 2002 dimt = len(vdobj[:]) … … 2040 2051 if mindvals < mintval: mintval = mindvals 2041 2052 if maxdvals > maxtval: maxtval = maxdvals 2042 # print ' ' + fname + ": file '" + filen + "' period:", ibeg, '->', iend, \ 2043 # reftvals[ibeg], '->', reftvals[np.min([iend,dimt-1])], timeunit 2053 print ' ' + fname + ": file '" + filen + "' period:", mindvals, '->', maxdvals 2044 2054 2045 2055 if ifn == 0: -
trunk/tools/drawing_tools.py
r945 r947 2638 2638 tuB = tunitB.split(' ')[0] 2639 2639 2640 if tuB == 'months':2641 tvalB, tunitB = gen.CFmonthU_daysU(tvalB, tunitB)2642 tuB = tunitB.split(' ')[0]2640 # if tuB == 'months': 2641 # tvalB, tunitB = gen.CFmonthU_daysU(tvalB, tunitB) 2642 # tuB = tunitB.split(' ')[0] 2643 2643 2644 2644 if tuA != tuB: … … 2747 2747 elif tuA == 'hours': 2748 2748 tB = tB + diffv/(3600.*10.e6) 2749 elif tuA == 'days s':2749 elif tuA == 'days': 2750 2750 tB = tB + diffv/(24.*3600.*10.e6) 2751 2751 else: … … 5822 5822 else: 5823 5823 for il in range(Ntraj): 5824 Nvals = len(vardv[il]) 5825 dvals = vardv[il] 5826 vvals = varvv[il] 5824 5827 plt.plot(vardv[il], varvv[il], linekinds[il], marker=pointkinds[il], \ 5825 5828 label=linesn[il], color=colvalues[il], linewidth=lwidths[il], \
Note: See TracChangeset
for help on using the changeset viewer.