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 | Ensembles time |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Function to plot an ensembles of data following an axis-time |
---|
14 | <TABLE> |
---|
15 | <TR><TD><IMG WIDTH="100%" SRC="figs/Forcing_pr_spacemean.png"></IMG></TD></TR> |
---|
16 | <TR><TD><IMG WIDTH="100%" SRC="figs/T2_spaceensembleIndiv.png"></IMG></TD></TR> |
---|
17 | </TABLE> |
---|
18 | </DIV> |
---|
19 | <DIV CLASS="valhelp"> |
---|
20 | draw_ensembles_time(ncfile, values)<BR> |
---|
21 | ncfile = '#' list of files [filen];[slice];[tvarn];[varn];[kinddata]<BR> |
---|
22 | [filen]: name of the file<BR> |
---|
23 | [dimslice]: '|' list of [dimn],[dimrange]<BR> |
---|
24 | [dimn]: name of the dimension<BR> |
---|
25 | [dimrange]: range for the slice<BR> |
---|
26 | * [integer]: which value of the dimension<BR> |
---|
27 | * -1: all along the dimension<BR> |
---|
28 | * -9: last value of the dimension<BR> |
---|
29 | * [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR> |
---|
30 | * NOTE, no dim name all the dimension size<BR> |
---|
31 | [tvarn]: name of the variable time ('WRFtime', for times from WRF)<BR> |
---|
32 | [varn]: name of the variable to use for the values<BR> |
---|
33 | [kinddata]: which kind of use should be done:<BR> |
---|
34 | 'data': to be plot as data<BR> |
---|
35 | 'ensemble': to be used as a member of the ensemble<BR> |
---|
36 | values = [dimxyfmt];[valaxis];[axislab];[axisunits];[rangevals];[datavals];[timevals];[valskind];<BR> |
---|
37 | [labels];[figenskind];[graphtit];[legvalues];[kindfig];[fign];[outfile];[close]<BR> |
---|
38 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordy]: format of the values at each <BR> |
---|
39 | axis (or single 'auto' for 'auto','auto')<BR> |
---|
40 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
41 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
42 | 'Stringlist', a given list of strings<BR> |
---|
43 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
44 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
45 | [dxf]: format of the labels at the x-axis<BR> |
---|
46 | [Ndx]: Number of ticks at the x-axis (for 'Stringlist', '@' list of labels)<BR> |
---|
47 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
48 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
49 | [dyf]: format of the labels at the y-axis<BR> |
---|
50 | [Ndy]: Number of ticks at the y-axis<BR> |
---|
51 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
52 | [valaxis]: which axes should be used for the data<BR> |
---|
53 | [axislab]: Label for the values-axis ('!' for spaces)<BR> |
---|
54 | [axisunits]: units of the values-label<BR> |
---|
55 | [rangevals]: Range of the axis with the values (single 'None' for 'auto','auto')<BR> |
---|
56 | [vmin],[vmax]: minimum and maximum values<BR> |
---|
57 | 'auto': the computed minimumm or maximum of the values<BR> |
---|
58 | [datavals]: [color]:[linetype]:[linewidht]:[markertype]:[markersize] values for the data-lines<BR> |
---|
59 | [color]: '@' list of colors of the lines (single value for the same, or 'auto')<BR> |
---|
60 | [linetype]: '@' list of type of the lines (single value for the same, or 'auto')<BR> |
---|
61 | [linewidht]: '@' list of width of the lines (single value for the same, or 'auto')<BR> |
---|
62 | [markertype]: '@' list of type of the markers (single value for the same, or 'auto')<BR> |
---|
63 | [markersize]: '@' list of size of the markers (single value for the same, or 'auto')<BR> |
---|
64 | [timevals]: [timen]|[units]|[kind]|[tfmt] time labels characteristics<BR> |
---|
65 | [timen]; name of the time variable<BR> |
---|
66 | [units]; units string according to CF conventions ([tunits] since <BR> |
---|
67 | [YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces)<BR> |
---|
68 | [kind]; kind of output<BR> |
---|
69 | 'Nval': according to a given number of values as 'Nval',[Nval]<BR> |
---|
70 | 'exct': according to an exact time unit as 'exct',[tunit]; <BR> |
---|
71 | tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR> |
---|
72 | 'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR> |
---|
73 | 'l': milisecond<BR> |
---|
74 | [tfmt]; desired format<BR> |
---|
75 | [valskind]: way to compute the values to be plotted<BR> |
---|
76 | 'FromFile': from the files with the 'data' flag<BR> |
---|
77 | 'FromEns',[usedims],[stats]: from all the files with the 'ensemble' flag with statistics [stats],<BR> |
---|
78 | throughout dimensions [usedims]<BR> |
---|
79 | [usedims]= '@' list of dimensions to take to compute the statistics<BR> |
---|
80 | [stats]= statistics to use<BR> |
---|
81 | 'direct': without statistics<BR> |
---|
82 | 'mean': mean value of all files with ensemble flag<BR> |
---|
83 | 'median': median value of all files with ensemble flag<BR> |
---|
84 | 'weightedmean,[stats],[weights]': weighted mean value all files with ensemble flag<BR> |
---|
85 | [stats] = statistics to use from each member: 'direct', 'mean', 'median'<BR> |
---|
86 | [weights] = '@' list of weights [0,1]<BR> |
---|
87 | 'FromIndivEns',[usedims],[stats]: from each files with the 'ensemble' flag with statistics [stats], <BR> |
---|
88 | throughout dimensions [usedims]<BR> |
---|
89 | [usedims]= '@' list of dimensions to take to compute the statistics<BR> |
---|
90 | [stats]= statistics to use: <BR> |
---|
91 | 'mean': mean value of each file with ensemble flag<BR> |
---|
92 | 'median': median value of each file with ensemble flag<BR> |
---|
93 | [labels]: ',' list of labels for the legend ('None' for no-labels, '!' for spaces)<BR> |
---|
94 | [figenskind]=[kindname],[valueskind] kind of ensemble plot<BR> |
---|
95 | 'cloud',[color],[limits]: ensembles values as a cloud <BR> |
---|
96 | [color]: name of the color to use ('auto' for '#DDDDDD')<BR> |
---|
97 | [limits]: which stadistics to use for the plot ('auto' for extremes)<BR> |
---|
98 | '5quantile': 5quantile,95quantile of the values <BR> |
---|
99 | 'direct': below and up values are tacking directly from the provided data<BR> |
---|
100 | 'extremes': min,max of the values<BR> |
---|
101 | 'stddev': standard deviation fo the values (only available if there is one line)<BR> |
---|
102 | 'spaghetti',[color],[width],[type]: a line for each member<BR> |
---|
103 | [color]: name of the color to use for all lines ('auto' for '#DDDDDD')<BR> |
---|
104 | [width]: width of the line to use for all lines ('auto' for 0.5)<BR> |
---|
105 | [type]: type of the line to use for all lines ('auto' for '-')<BR> |
---|
106 | [graphtit]: title of the figure '!' for spaces<BR> |
---|
107 | [legvalues]=[locleg]|[fontsize]: <BR> |
---|
108 | [locleg]: location of the legend (0, autmoatic)<BR> |
---|
109 | 1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',<BR> |
---|
110 | 5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',<BR> |
---|
111 | 9: 'upper center', 10: 'center'<BR> |
---|
112 | [fontsize]: font size for the legend (auto for 12)<BR> |
---|
113 | [kindfig]: kind of output figure (png, pdf, ps)<BR> |
---|
114 | [fign]: name of the figure (without extension)<BR> |
---|
115 | [outfile]: wehter or not a file with the result of the computation of the ensemble should be <BR> |
---|
116 | written or not (labelled 'ensemble_ofile.nc')<BR> |
---|
117 | [close]: whether figure should be close or not<BR> |
---|
118 | </DIV> |
---|
119 | <DIV CLASS="valins"> |
---|
120 | $ python ${pyHOME}/drawing.py -o draw_ensembles_time -f 'Forcing_rain_SESA.nc;time_counter,-1|stats,0;time_centered;rain_stats;ensemble#Forcing_rain_SESA.nc;time_counter,-1|stats,1;time_centered;rain_stats;ensemble#Forcing_rain_SESA.nc;time_counter,-1|stats,2;time_centered;rain_stats;data' -S 'auto;y;tas;mm/d;auto,auto;#0000FF:-:2.:,:2.;year|seconds!since!1958-01-01!00:00:00|exct,5,y|%Y;FromFile;$pr_{space-mean}^{SESA}$;cloud,#AAAADD,auto;$pr_{space-mean}$!evolution!at!SESA;0|10;png;Forcing_pr_spacemean;no;yes'<BR> |
---|
121 | $ python drawing.py -o ${pyHOME}/draw_ensembles_time -f 'wrfout_d01_1995-01-01_00:00:00;Time,-1|south_north,0@44@1;WRFtime;T2;ensemble#wrfout_d01_1995-01-01_00:00:00;Time,-1|south_north,45@99@1;WRFtime;T2;ensemble' -S 'auto;y;tas;K;auto,auto;#FF0000@#0000FF:-:2.:,:2.;day|seconds!since!1949-12-01!00:00:00|exct,2,d|%D;FromIndivEns,south_north@west_east,mean;$T2_{space-mean}^{Shalf}$,$T2_{space-mean}^{Nhalf}$;cloud,#DD6464,auto;$T2_{space-mean}$ evolution;0|10;png;T2_spaceensembleIndiv;yes;yes' |
---|
122 | </DIV> |
---|
123 | </BODY> |
---|
124 | </HTML> |
---|
125 | |
---|