1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/> |
---|
4 | <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/> |
---|
5 | </HEAD> |
---|
6 | |
---|
7 | </HEAD> |
---|
8 | <BODY> |
---|
9 | <DIV CLASS="valheader"> |
---|
10 | time-lag figure |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Plot a time-lag figure with multiple sources (x, previous values; y, future values) |
---|
14 | <TABLE> |
---|
15 | <TD><TR><IMG WIDTH="100%" SRC="figs/mon1_timelag_pr-evap_SACZ.png"></IMG></TR></TD> |
---|
16 | <TD><TR><IMG WIDTH="100%" SRC="figs/mon6_timelag_pr-evap_SACZ_shadline.png"></IMG></TR></TD> |
---|
17 | <TD><TR><IMG WIDTH="100%" SRC="figs/mon1_timelag_pr-evap_SACZ_repeatPeriod.png"></IMG></TR></TD> |
---|
18 | </TABLE> |
---|
19 | </DIV> |
---|
20 | <DIV CLASS="valhelp"> |
---|
21 | draw_time_lag(ncfile, values)<BR> |
---|
22 | ncfile = ':' list of couples ('%' formed) [prefilen];[predslice];[pretvarn];[prevarn]%[futfilen];<BR> |
---|
23 | [futdslice];[futtvarn];[futvarn]<BR> |
---|
24 | 'pre': values to act as previous values<BR> |
---|
25 | 'fut': values to act as future values<BR> |
---|
26 | <BR> |
---|
27 | [filen]: name of the file<BR> |
---|
28 | [dimslice]: '|' list of [dimn],[dimrange]<BR> |
---|
29 | [dimn]: name of the dimension<BR> |
---|
30 | [dimrange]: range for the slice<BR> |
---|
31 | * [integer]: which value of the dimension<BR> |
---|
32 | * -1: all along the dimension<BR> |
---|
33 | * -9: last value of the dimension<BR> |
---|
34 | * [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR> |
---|
35 | * NOTE, no dim name all the dimension size<BR> |
---|
36 | [tvarn]: name of the variable time<BR> |
---|
37 | [yvarn]: name of the variable to use for the values<BR> |
---|
38 | values = [dimxyfmt];[axeskind];[preaxislab];[preunits];[futaxislab];[futunits];[prerangevals];<BR> |
---|
39 | [futrangevals];[timevals];[labels];[figlagkind];[graphtit];[legvalues];[kindfig];[fign];[close]<BR> |
---|
40 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordy]: format of the values at each <BR> |
---|
41 | axis (or single 'auto' for 'auto','auto')<BR> |
---|
42 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
43 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
44 | 'Stringlist', a given list of strings<BR> |
---|
45 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
46 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
47 | [dxf]: format of the labels at the x-axis<BR> |
---|
48 | [Ndx]: Number of ticks at the x-axis (for 'Stringlist', '@' list of labels)<BR> |
---|
49 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
50 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
51 | [dyf]: format of the labels at the y-axis<BR> |
---|
52 | [Ndy]: Number of ticks at the y-axis<BR> |
---|
53 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
54 | [axeskind]: type of axes to be plotted<BR> |
---|
55 | 'centered': crossed at 0,0 at the center of the figure<BR> |
---|
56 | 'box': around the figure<BR> |
---|
57 | [preaxislab]: Label for the future-axis ('!' for spaces)<BR> |
---|
58 | [preunits]: units of the future-label<BR> |
---|
59 | [futaxislab]: Label for the future-axis ('!' for spaces)<BR> |
---|
60 | [futunits]: units of the future-label<BR> |
---|
61 | [prerangevals]: Range of the previous axis with the values (single 'None' for 'auto','auto')<BR> |
---|
62 | [vmin],[vmax]: minimum and maximum values<BR> |
---|
63 | 'auto': the computed minimumm or maximum of the values <BR> |
---|
64 | [futrangevals]: Range of the future axis with the values (single 'None' for 'auto','auto')<BR> |
---|
65 | [vmin],[vmax]: minimum and maximum values<BR> |
---|
66 | 'auto': the computed minimumm or maximum of the values <BR> |
---|
67 | [timevals]: [timen]|[units]|[kind]|[tfmt] time labels characteristics<BR> |
---|
68 | [timen]; name of the time variable<BR> |
---|
69 | [units]; units string according to CF conventions ([tunits] since <BR> |
---|
70 | [YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces)<BR> |
---|
71 | [kind]; kind of output<BR> |
---|
72 | 'Nval': according to a given number of values as 'Nval',[Nval]<BR> |
---|
73 | 'exct': according to an exact time unit as 'exct',[tunit]; <BR> |
---|
74 | tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR> |
---|
75 | 'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR> |
---|
76 | 'l': milisecond<BR> |
---|
77 | [tfmt]; desired format<BR> |
---|
78 | [labels]: ',' list of labels for the legend ('None' for no-labels, '!' for spaces)<BR> |
---|
79 | [figlagkind]=[kindname],[valueskind] kind of time-lag plot<BR> |
---|
80 | 'repeatPeriod',[Nlag],[period],[colorbar],[cbarfmt],[cbaror],[ltype],[lwidth],[mtype],[msize<BR>]: |
---|
81 | time-lag for a given repeating sub-period, Line-conected points following a colorbar and time-values<BR> |
---|
82 | [Nlag]: number of time steps as lag<BR> |
---|
83 | [period]: period to be repeated allover the time-data<BR> |
---|
84 | [colorbar]: name of the color bar to use ('auto' for rainbow)<BR> |
---|
85 | [cbarfmt]: format of the numbers in the colorbar<BR> |
---|
86 | [cbaror]: orientation of the colorbar ('auto' for vertical)<BR> |
---|
87 | [ltype]: type of the lines (single value for the same, or 'auto')<BR> |
---|
88 | [lsize]: width of the lines (single value for the same, or 'auto')<BR> |
---|
89 | [mtype]: type of the markers (single value for the same, or 'auto')<BR> |
---|
90 | [msize]: size of the markers (single value for the same, or 'auto')<BR> |
---|
91 | 'shadTline',[Nlag],[colorbar],[cbarfmt],[cbaror],[ltype],[lwidth],[mtype],[msize]: Line-conected <BR> |
---|
92 | points following a colorbar and time-values<BR> |
---|
93 | [Nlag]: number of time steps as lag<BR> |
---|
94 | [colorbar]: name of the color bar to use ('auto' for rainbow)<BR> |
---|
95 | [cbarfmt]: format of the numbers in the colorbar<BR> |
---|
96 | [cbaror]: orientation of the colorbar ('auto' for vertical)<BR> |
---|
97 | [ltype]: type of the lines (single value for the same, or 'auto')<BR> |
---|
98 | [lsize]: width of the lines (single value for the same, or 'auto')<BR> |
---|
99 | [mtype]: type of the markers (single value for the same, or 'auto')<BR> |
---|
100 | [msize]: size of the markers (single value for the same, or 'auto')<BR> |
---|
101 | 'simplepts',[Nlag],[col],[type],[size]: Simple points assuming that values have all the same times<BR> |
---|
102 | [Nlag]: number of time steps as lag<BR> |
---|
103 | [col]: '@' list of colors of the points (single value for the same, or 'auto')<BR> |
---|
104 | [type]:types of the points (single value for the same, or 'auto')<BR> |
---|
105 | [size]: sizes of the points kind of lag-time figure (single value for the same, or 'auto')<BR> |
---|
106 | labels= list of labels for legend (None for no legend, and 'None' for no specific label)<BR> |
---|
107 | [graphtit]: title of the figure '!' for spaces<BR> |
---|
108 | [legvalues]=[locleg]|[fontsize]: <BR> |
---|
109 | [locleg]: location of the legend (0, autmoatic)<BR> |
---|
110 | 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',<BR> |
---|
111 | 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',<BR> |
---|
112 | 9: 'upper center', 10: 'center'<BR> |
---|
113 | [fontsize]: font size for the legend (auto for 12)<BR> |
---|
114 | [kindfig]: kind of output figure (png, pdf, ps)<BR> |
---|
115 | [fign]: name of the figure (without extension)<BR> |
---|
116 | [close]: whether figure should be close or not<BR> |
---|
117 | </DIV> |
---|
118 | <DIV CLASS="valins"> |
---|
119 | $ python ${pyHOME}/drawing.py -o draw_time_lag -f 'Forcing_rainstats_OKstomate_SESA_norm_meanstd_stat2.nc;time_centered,-1;time_counter;rainnorm%DiPolo_evapstats_SESA_norm_meanstd_OKstomate.nc;time_counter,-1|stats,2;time_counter;evapnorm:Forcing_rainstats_OKstomate_SACZ_norm_meanstd_stat2.nc;time_centered,-1;time_counter;rainnorm%DiPolo_evapstats_SACZ_norm_meanstd_OKstomate.nc;time_counter,-1|stats,2;time_counter;evapnorm' -S 'auto;centered;pr;1;evap;1;-5,5;-2,2;year|seconds!since!1958-01-01!00:00:00|exct,5,y|%Y;SESA,SACZ;simplepts,1,#AA0000@#0000AA,x,2.;1-month!time-lag!at!SACZ!between!pr!&!evap!normalized!by!mean/stddev;0|12;png;mon1_timelag_pr-evap_SACZ;yes' |
---|
120 | $ python ${pyHOME}/drawing.py -o draw_time_lag -f 'Forcing_rainstats_OKstomate_SESA_norm_meanstd_stat2.nc;time_centered,-1;time_counter;rainnorm%DiPolo_evapstats_SESA_norm_meanstd_OKstomate.nc;time_counter,-1|stats,2;time_counter;evapnorm:Forcing_rainstats_OKstomate_SACZ_norm_meanstd_stat2.nc;time_centered,-1;time_counter;rainnorm%DiPolo_evapstats_SACZ_norm_meanstd_OKstomate.nc;time_counter,-1|stats,2;time_counter;evapnorm' -S 'auto;centered;pr;1;evap;1;-5,5;-2,2;year|seconds!since!1958-01-01!00:00:00|exct,5,y|%Y;SESA,SACZ;shadTline,1,spectral,%s,horizontal,-@-.,2.,x,2.;6-month!time-lag!at!SACZ!between!pr!&!evap!normalized!by!mean/stddev;0|12;png;mon6_timelag_pr-evap_SACZ_shadline;yes' |
---|
121 | $ python ${pyHOME}/drawing.py -o draw_time_lag -f 'Forcing_rainstats_OKstomate_SESA_norm_meanstd_stat2.nc;time_counter,0@63@1;time_counter;rainnorm%DiPolo_evapstats_SESA_norm_meanstd_OKstomate.nc;time_counter,0@63@1|stats,2;time_counter;evapnorm:Forcing_rainstats_OKstomate_SACZ_norm_meanstd_stat2.nc;time_counter,0@63@1;time_counter;rainnorm%DiPolo_evapstats_SACZ_norm_meanstd_OKstomate.nc;time_counter,0@63@1|stats,2;time_counter;evapnorm' -S 'auto;centered;pr;1;evap;1;-2.2,5;-2,2;year|seconds!since!1958-01-01!00:00:00|exct,1,y|%Y;SESA,SACZ;repeatPeriod,1,12,spectral,%s,horizontal,-@-.,2.,x,2.;1-month!time-lag!at!SACZ!between!pr!&!evap!normalized!by!mean/stddev;0|12;png;mon1_timelag_pr-evap_SACZ_repeatPeriod;yes' |
---|
122 | </DIV> |
---|
123 | </BODY> |
---|
124 | </HTML> |
---|
125 | |
---|