source: lmdz_wrf/trunk/tools/documentation/plotting/trajectories.html @ 2734

Last change on this file since 2734 was 1451, checked in by lfita, 8 years ago

Adding TimesSeries' and trajectories'

File size: 10.3 KB
Line 
1G<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      trajectories
11    </DIV>
12    <DIV CLASS="valimg">
13      Plotting a series of temporal trajectories
14      <IMG WIDTH="100%" SRC="figs/trajectories.png"></IMG>
15    </DIV>
16    <DIV CLASS="valhelp"
17    draw_trajectories(trjfilens, values, observations)<BR>
18    &nbsp;&nbsp;Trajectories are readed from ASCII files with a pair of i,j grid points for each position of the trajectory<BR>
19    &nbsp;&nbsp;&nbsp;&nbsp;i,j couples of trajectories for all files are referred to a netcdf file with a respective projection<BR>
20    &nbsp;&nbsp;A complemtary file for observations is also added separately<BR>
21    &nbsp;&nbsp;trjfilens= [filen]@[Tint]@[map]@[Ttrj] ',' separated list of ASCII files with trajectories,<BR>
22    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time intervals and reference maps (first one will be used to plot)<BR>
23    &nbsp;&nbsp;&nbsp;&nbsp;[filen]: name of the file to use (lines with '#', not readed) with values as:<BR>
24    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[t-step] [x] [y]<BR>
25    &nbsp;&nbsp;&nbsp;&nbsp;[Tint]: interval of time-steps to get from the file as [Tbeg]@[Tend] or -1 for all the interval<BR>
26    &nbsp;&nbsp;&nbsp;&nbsp;[map]: [file]#[lonname]#[latname] common projection data<BR>
27    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[file]; netcdf file with the [lon],[lat] projection for the trajectory<BR>
28    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[lonname],[latname]; names of the longitudes and latitudes variables in [file]<BR>
29    &nbsp;&nbsp;&nbsp;&nbsp;[Ttrj]|[val1]|[val2]|[...|[valN]]: kind of associated time values to the trajectory<BR>
30    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'t-step'|[dtime]|[idate]: each line corresponds to a consecutive time-step with the same deltatime<BR>
31    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dtime]: length of time-step in seconds<BR>
32    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[idate]: date of the first time-step (in [YYYY][MM][DD][HH][MI][SS] format)<BR>
33    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'CF-step'|[units]|[refdate]: each line corresponds to a consecutive CF time-step<BR>
34    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[units]: any of standard temporal CF units: weeks, days, hours, minutes, seconds, ...<BR>
35    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[refdate]: reference date of the CF time-units<BR>
36    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'fulldate': each line provides the correspondance date (in [YYYY][MM][DD][HH][MI][SS] format)<BR>
37    &nbsp;&nbsp;values= [plotkind]|[leglabels]|[lonlatlims]|[title]|[graphk]|[mapkind]|[legvals]|[figclose]<BR>
38    &nbsp;&nbsp;&nbsp;&nbsp;[plotkind],[val1],[...,[valN]]: kind of plot to generate<BR>
39    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'spaghetti'@[trjltype]@[trjlcol]@[trjlwdth]@[trjptyp]@[trjpsiz]: line-marker for each trajectory<BR>
40    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjltype]: ',' list of type of lines for each trajectory (single value same for all, 'None' for auto)<BR>
41    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjlcol]: ',' list of color of lines for each trajectory (single value same for all, 'None' for auto)<BR>
42    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjlwdth]: ',' list of width of lines for each trajectory (single value same for all, 'None' for auto)<BR>
43    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjptyp]: ',' list of type of points for each trajectory (single value same for all, 'None' for auto)<BR>
44    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjpsiz]: ',' list of size of points for each trajectory (single value same for all, 'None' for auto)<BR>
45    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'spaghetti_date'@[trjltype]@[trjlcol]@[trjlwdth]@[trjptyp]@[trjpsiz]@[datefmt]@[datefontsize]<BR>
46    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@[datefreq]@[xoffset]@[yoffset]: line-marker <BR>
47    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for each trajectory with a given date format at each point<BR>
48    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjltype]: ',' list of type of lines for each trajectory (single value same for all, 'None' for auto)<BR>
49    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjlcol]: ',' list of color of lines for each trajectory (single value same for all, 'None' for auto)<BR>
50    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjlwdth]: ',' list of width of lines for each trajectory (single value same for all, 'None' for auto)<BR>
51    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjptyp]: ',' list of type of points for each trajectory (single value same for all, 'None' for auto)<BR>
52    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[trjpsiz]: ',' list of size of points for each trajectory (single value same for all, 'None' for auto)<BR>
53    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[datefmt]: format of the date to show (C-like mixed with LaTeX commands)<BR>
54    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[datefontsize]: font-size of the time-labels<BR>
55    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[datefreq]: frequency of time-labels<BR>
56    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[xoffset]: x-axis offset in pixels of the time-lables respect trajectory<BR>
57    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[yoffset]: y-axis offset in pixels of the time-lables respect trajectory<BR>
58    &nbsp;&nbsp;&nbsp;&nbsp;[leglabels]: ',' separated list of names for the legend<BR>
59    &nbsp;&nbsp;&nbsp;&nbsp;[lonlatlims]: ',' list of limits of the map [lonmin, latmin, lonmax, latmax] or None<BR>
60    &nbsp;&nbsp;&nbsp;&nbsp;[title]: title of the plot ('!' for spaces)<BR>
61    &nbsp;&nbsp;&nbsp;&nbsp;[graphk]: kind of output of the graphic (png, pdf, ...)<BR>
62    &nbsp;&nbsp;&nbsp;&nbsp;[mapkind]: drawing coastaline ([proj],[res]) or None<BR>
63    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[proj]: projection<BR>
64    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'cyl', cilindric<BR>
65    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'lcc', lambert conformal<BR>
66    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[res]: resolution:<BR>
67    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'c', crude<BR>
68    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'l', low<BR>
69    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'i', intermediate<BR>
70    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'h', high<BR>
71    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* 'f', full<BR>
72    &nbsp;&nbsp;&nbsp;&nbsp;[legvals]=[locleg]@[fontsize]: legend values<BR>
73    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[locleg]: location of the legend (0, autmoatic)<BR>
74    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',<BR>
75    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',<BR>
76    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9: 'upper center', 10: 'center'<BR>
77    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[fontsize]: font size for the legend (auto for 12)<BR>
78    &nbsp;&nbsp;&nbsp;&nbsp;[figclose]: whether figure should be closed or not<BR>
79    &nbsp;&nbsp;observations= [obsfile],[obsname],[Tint],[null],[obstrjvals] ('None' for no observational/reference trajectory)<BR>
80    &nbsp;&nbsp;&nbsp;&nbsp;[obsfile]: name fo the File with the observations as [t-step] [lat] [lon]<BR>
81    &nbsp;&nbsp;&nbsp;&nbsp;[obsname]: name of the observations in the graph<BR>
82    &nbsp;&nbsp;&nbsp;&nbsp;[Tint]: interval of time as [Tbeg]@[Tend] or -1 for all the interval<BR>
83    &nbsp;&nbsp;&nbsp;&nbsp;[null]: null value for the observed trajectory<BR>
84    &nbsp;&nbsp;&nbsp;&nbsp;[obstrjvals] = [Ttrj]@[obsltype]@[obslcol]@[obslwdth]@[obsptyp]@[obspsiz] values for the observational/reference<BR>
85    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trajectory in the plot<BR>
86    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Ttrj]|[val1]|[val2]|[...|[valN]]: kind of associated time values to the trajectory<BR>
87    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'t-step'|[dtime]|[idate]: each line corresponds to a consecutive time-step with the same deltatime<BR>
88    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[dtime]: length of time-step in seconds<BR>
89    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[idate]: date of the first time-step (in [YYYY][MM][DD][HH][MI][SS] format)<BR>
90    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'CF-step'|[units]|[refdate]: each line corresponds to a consecutive CF time-step<BR>
91    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[units]: any of standard temporal CF units: weeks, days, hours, minutes, seconds, ...<BR>
92    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[refdate]: reference date of the CF time-units<BR>
93    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'fulldate': each line provides the correspondance date (in [YYYY][MM][DD][HH][MI][SS] format)<BR>
94    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[obsltype]: type of line for the observations/reference trajectory (single 'auto' for '-', 'k', 2, 'x', 2)<BR>
95    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[obslcol]: color of line for the observations/reference trajectory<BR>
96    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[obslwdth]: width of line for the observations/reference trajectory<BR>
97    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[obsptyp]: type of point for the observations/reference trajectory<BR>
98    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[obspsiz]: size of point for the observations/reference trajectory<BR>
99    </DIV>
100    <DIV CLASS="valins">
101     $ python ${pyHOME}/drawing.py -o drawing.py -o draw_trajectories -f 'medic950116/control/trajectory.dat@-1@etudes/domains/WL_HyMeX_HighRes_C/geo_em.d01.nc#XLONG_M#XLAT_M@t-step|3600.|19950115000000,medic950116/wlmdza/trajectory.dat@-1@etudes/domains/WL_HyMeX_C/geo_em.d01.nc#XLONG_M#XLAT_M@t-step|3600.|19950115000000,medic950116/wlmdzb/trajectory.dat@-1@etudes/domains/WL_HyMeX_C/geo_em.d01.nc#XLONG_M#XLAT_M@t-step|3600.|19950115000000,medic950116/wlmdzb_cyc/trajectory.dat@-1@etudes/domains/WL_HyMeX_C/geo_em.d01.nc#XLONG_M#XLAT_M@t-step|3600.|19950115000000' -S 'spaghetti_date@-@None@1@o@1@$%d^{%H}$@8@6@4@4|$WRF_{CRM}$,$LMDZ_{AR4.0}$,$LMDZ_{NPv3.1}$,$LMDZ_{NPv3.1b}$|15,28,26,39|medicane trajectories|png|cyl,i|0@8|yes' -v 'medic950116/obs/trajectory.dat,satellite,-1,0.9999998779E+03,t-step|1800.|19950115000000@auto'
102    </DIV>
103  </BODY>
104</HTML>
105
Note: See TracBrowser for help on using the repository browser.