1 | <HTML> |
---|
2 | <HEAD> |
---|
3 | <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8"/> |
---|
4 | <TITLE>PyNCplot: plotting 2D shadow_time</TITLE> |
---|
5 | <LINK REL="stylesheet" TYPE="text/css" HREF="../PyNCplot.css"/> |
---|
6 | </HEAD> |
---|
7 | |
---|
8 | </HEAD> |
---|
9 | <BODY> |
---|
10 | <DIV CLASS="valheader"> |
---|
11 | 2D shadow time plot |
---|
12 | </DIV> |
---|
13 | <DIV CLASS="valimg"> |
---|
14 | Plotting a 2D field with shading where one of the acis has temporal values |
---|
15 | <IMG WIDTH="100%" SRC="figs/hurs_Blues_auto_time.png"></IMG> |
---|
16 | </DIV> |
---|
17 | <DIV CLASS="valhelp"> |
---|
18 | draw_2D_shad_time(ncfile, values, varn)<BR> |
---|
19 | ncfile= file to use<BR> |
---|
20 | values=[vnamefs]~[dimvals]~[dimxvn]~[dimyvn]~[dimvfmt]~[colorbarvals]~[sminv],[smaxv]~[figt]~<BR> |
---|
21 | [kindfig]~[reverse]~[timevals]~[close]<BR> |
---|
22 | [vnamefs]: Name in the figure of the variable to be shaded<BR> |
---|
23 | [dimvals]: ',' list of [dimname]|[value] telling at which dimension of the <BR> |
---|
24 | variable a given value is required (-1, all the length, [beg]@[end] for an interval)<BR> |
---|
25 | [dimx/yvn]: name of the variables with the values of the final dimensions (x,y) ('WRFtime' for WRF times)<BR> |
---|
26 | [dimvfmt]=[dvs],[dvf],[Ndv],[ordv]: format of the values for the non-temporal axis (or 'auto')<BR> |
---|
27 | [dvs]: style of non-temporal axis ('auto' for 'pretty')<BR> |
---|
28 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
29 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
30 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
31 | [dvf]: format of the labels at the x-axis ('auto' for '%5g')<BR> |
---|
32 | [Ndv]: Number of ticks at the x-axis ('auto' for 5)<BR> |
---|
33 | [ordv]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
34 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
35 | [colorbarn]: name of the color bar<BR> |
---|
36 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
37 | [orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR> |
---|
38 | [smin/axv]: minimum and maximum value for the shading or:<BR> |
---|
39 | 'Srange': for full range<BR> |
---|
40 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
41 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
42 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
43 | percentile_(100-val)-median)<BR> |
---|
44 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
45 | 'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
46 | 'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
47 | percentile_(100-val)-median)<BR> |
---|
48 | [figt]: title of the figure ('|' for spaces)<BR> |
---|
49 | [kindfig]: kind of figure<BR> |
---|
50 | [reverse]: Transformation of the values<BR> |
---|
51 | * 'transpose': reverse the axes (x-->y, y-->x)<BR> |
---|
52 | * 'flip'@[x/y]: flip the axis x or y<BR> |
---|
53 | [timevals]: [timen]|[units]|[kind]|[tfmt]|[label]|[timeaxis] time labels characteristics<BR> |
---|
54 | [timen]; name of the time variable ('WRFtime' for WRF times)<BR> |
---|
55 | [units]; units string according to CF conventions ([tunits] since <BR> |
---|
56 | [YYYY]-[MM]-[DD] [[HH]:[MI]:[SS]], '!' for spaces)<BR> |
---|
57 | [kind]; kind of output<BR> |
---|
58 | 'Nval': according to a given number of values as 'Nval',[Nval]<BR> |
---|
59 | 'exct': according to an exact time unit as 'exct',[tunit]; <BR> |
---|
60 | tunit= [Nunits],[tu]; [tu]= 'c': centuries, 'y': year, 'm': month,<BR> |
---|
61 | 'w': week, 'd': day, 'h': hour, 'i': minute, 's': second, <BR> |
---|
62 | 'l': milisecond<BR> |
---|
63 | [tfmt]; desired format<BR> |
---|
64 | [label]; label at the graph ('!' for spaces)<BR> |
---|
65 | [close]: should figure be closed (finished)<BR> |
---|
66 | varn= [varsn] name of the variable to plot with shading<BR> |
---|
67 | </DIV> |
---|
68 | <DIV CLASS="valins"> |
---|
69 | $ python ${pyHOME}/drawing.py -o draw_2D_shad_time -f wrfout_d01_2001-11-11_00:00:00 -S 'hurs~west_east|-1,south_north|27,Time|-1~XLONG~WRFtime~auto~Blues,auto,auto~Srange,Srange~tas|evolution|at|south_north=27~png~None~WRFtime|hours!since!1949-12-01|exct,1,h|$%d^{%H}$|date!($[DD]^{[HH]}$)~True' -v Q2 |
---|
70 | </DIV> |
---|
71 | </BODY> |
---|
72 | </HTML> |
---|
73 | |
---|