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