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 | 2D shadow movie |
---|
11 | </DIV> |
---|
12 | <DIV CLASS="valimg"> |
---|
13 | Creating a movie of a 2D field with shading |
---|
14 | <video width="500px" height="375px" controls> |
---|
15 | <source src="figs/movie_2D_shadow.mp4" type="video/mp4"> |
---|
16 | Video not supported !! |
---|
17 | </video> |
---|
18 | </DIV> |
---|
19 | <DIV CLASS="valhelp"> |
---|
20 | movie_2D_shad(ncfiles, values, varn)<BR> |
---|
21 | ncfile= file to use |
---|
22 | values=[vnamefs]:[dimvals]:[dimxvn]:[dimyvn]:[dimxyfmt]:[colorbarvals]:[sminv],[smaxv]:[figt]: |
---|
23 | [kindfig]:[reverse]:[mapv]:[moviedim]:[fps]:[kmov] |
---|
24 | [vnamefs]: Name in the figure of the variable to be shaded |
---|
25 | [dimvals]: ',' list of [dimname]|[value] telling at which dimension of the <BR> |
---|
26 | variable a given value is required:<BR> |
---|
27 | * [integer]: which value of the dimension<BR> |
---|
28 | * -1: all along the dimension<BR> |
---|
29 | * -9: last value of the dimension<BR> |
---|
30 | * [beg]@[end]@[inc] slice from [beg] to [end] every [inc]<BR> |
---|
31 | * NOTE, no dim name all the dimension size<BR> |
---|
32 | [dimx/yvn]: name of the variables with the values of the final dimensions (x,y)<BR> |
---|
33 | [dimxyfmt]=[dxs],[dxf],[Ndx],[ordx],[dys],[dyf],[Ndy],[ordx]: format of the values at each axis (or 'auto')<BR> |
---|
34 | [dxs]: style of x-axis ('auto' for 'pretty')<BR> |
---|
35 | 'Nfix', values computed at even 'Ndx'<BR> |
---|
36 | 'Vfix', values computed at even 'Ndx' increments<BR> |
---|
37 | 'pretty', values computed following aprox. 'Ndx' at 'pretty' intervals (2.,2.5,4,5,10)<BR> |
---|
38 | [dxf]: format of the labels at the x-axis ('auto' for '%5g')<BR> |
---|
39 | [Ndx]: Number of ticks at the x-axis ('auto' for 5)<BR> |
---|
40 | [ordx]: angle of orientation of ticks at the x-axis ('auto' for horizontal)<BR> |
---|
41 | [dys]: style of y-axis ('auto' for 'pretty')<BR> |
---|
42 | [dyf]: format of the labels at the y-axis ('auto' for '%5g')<BR> |
---|
43 | [Ndy]: Number of ticks at the y-axis ('auto' for 5)<BR> |
---|
44 | [ordy]: angle of orientation of ticks at the y-axis ('auto' for horizontal)<BR> |
---|
45 | [colorbarvals]=[colbarn],[fmtcolorbar],[orientation]<BR> |
---|
46 | [colorbarn]: name of the color bar<BR> |
---|
47 | [fmtcolorbar]: format of the numbers in the color bar 'C'-like ('auto' for %6g)<BR> |
---|
48 | [orientation]: orientation of the colorbar ('vertical' (default, by 'auto'), 'horizontal')<BR> |
---|
49 | [smin/axv]: minimum and maximum value for the shading or:<BR> |
---|
50 | 'Srange': for full range<BR> |
---|
51 | 'Saroundmean@val': for mean-xtrm,mean+xtrm where xtrm = np.min(mean-min@val,max@val-mean)<BR> |
---|
52 | 'Saroundminmax@val': for min*val,max*val<BR> |
---|
53 | 'Saroundpercentile@val': for median-xtrm,median+xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
54 | percentile_(100-val)-median)<BR> |
---|
55 | 'Smean@val': for -xtrm,xtrm where xtrm = np.min(mean-min*@val,max*@val-mean)<BR> |
---|
56 | 'Smedian@val': for -xtrm,xtrm where xtrm = np.min(median-min@val,max@val-median)<BR> |
---|
57 | 'Spercentile@val': for -xtrm,xtrm where xtrm = np.min(median-percentile_(val),<BR> |
---|
58 | percentile_(100-val)-median)<BR> |
---|
59 | [kindfig]: kind of figure output file: png, pdf, ...<BR> |
---|
60 | [reverse]: Transformation of the values<BR> |
---|
61 | * 'transpose': reverse the axes (x-->y, y-->x)<BR> |
---|
62 | * 'flip'@[x/y]: flip the axis x or y<BR> |
---|
63 | [mapv]: map characteristics: [proj],[res]<BR> |
---|
64 | see full documentation: <HREF CLASS="lc" HREF="http://matplotlib.org/basemap" TARGET="_blank">http://matplotlib.org/basemap</A><BR> |
---|
65 | [proj]: projection<BR> |
---|
66 | * 'cyl', cilindric<BR> |
---|
67 | * 'lcc', lambert conformal<BR> |
---|
68 | [res]: resolution:<BR> |
---|
69 | * 'c', crude<BR> |
---|
70 | * 'l', low<BR> |
---|
71 | * 'i', intermediate<BR> |
---|
72 | * 'h', high<BR> |
---|
73 | * 'f', full<BR> |
---|
74 | [movievals] = [moviedim],[movivar] way to get values for the movie <BR> |
---|
75 | [moviedime]: name of the dimension to get the movie (following outcome from [dimvals]) <BR> |
---|
76 | [movievar]: name of the variable to get the values <BR> |
---|
77 | [framelabels]: values for the production of the labels of each frame <BR> |
---|
78 | * 'varVal',[HeadTit],[TailTit],[fmt]: Following direct values from variable as: <BR> |
---|
79 | [HeadTit] + ' ' + [varValue] + ' ' + [TailTit] <BR> |
---|
80 | [HeadTit]: Head of title ('!', for spaces) <BR> |
---|
81 | [TailTit]: title of title ('!', for spaces) <BR> |
---|
82 | [fmt]: format of the values of the variable in the title (C-like and LaTeX-like combined) <BR> |
---|
83 | * 'listtit',[Ftitles]: Providing manually title for each frame <BR> |
---|
84 | [Ftitle]: '@' separated list of titles ('!', for titles) <BR> |
---|
85 | * 'CFdate',[datefmt]: Just title with the date (assuming CF-time compilant variable) <BR> |
---|
86 | [tfmt]: format of the date (C-like and LaTeX-like combined) <BR> |
---|
87 | * 'WRFdate',[datefmt]: Just title with the date (assuming WRF time variable) <BR> |
---|
88 | [tfmt]: format of the date (C-like and LaTeX-like combined) <BR> |
---|
89 | [fps]: frames per second of the output movie <BR> |
---|
90 | [kmov]: kind of movie (mp4, ....) <BR> |
---|
91 | </DIV> |
---|
92 | <DIV CLASS="valins"> |
---|
93 | python ${pyHOME}/drawing.py -o movie_2D_shad -f '../PY/wrfout_d01_1995-01-01_00:00:00' -S 'tas:west_east|-1,<BR> |
---|
94 | south_north|-1,Time|-1:XLONG:XLAT:auto:rainbow,auto,auto:Srange,Srange:png:None:cyl,l:Time,Times:WRFdate,<BR> |
---|
95 | $%d^{%H}$:15:mp4' -v T2 |
---|
96 | </DIV> |
---|
97 | </BODY> |
---|
98 | </HTML> |
---|
99 | |
---|