Changeset 1471 in lmdz_wrf


Ignore:
Timestamp:
Mar 23, 2017, 4:05:10 PM (8 years ago)
Author:
lfita
Message:

Improving `draw_points_lonlat'
Adding `draw_points_lonlat'

Location:
trunk/tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/documentation/plotting/gallery.html

    r1469 r1471  
    2525      <A HREF="Nlines_time.html"><IMG SRC="figs/lines_time.png" ALT="Nlines time" STYLE="float:left;width:200px;height:200px" TARGET="value"></IMG></A>
    2626      <A HREF="plot_points.html"><IMG SRC="figs/stations_loc.png" ALT="plot points" STYLE="float:left;width:200px;height:200px" TARGET="value"></IMG></A>
     27      <A HREF="plot_points_lonlat.html"><IMG SRC="figs/points_lonlat_5k.png" ALT="plot lon,lat points" STYLE="float:left;width:200px;height:200px" TARGET="value"></IMG></A>
     28      <A HREF="plot_points_lonlat.html"><IMG SRC="figs/points_lonlat_hurs-tas.png" ALT="plot lon,lat points" STYLE="float:left;width:200px;height:200px" TARGET="value"></IMG></A>
    2729      <A HREF="pointsZval.html"><IMG SRC="figs/pointsZval.png" ALT="plot points by Z value" STYLE="float:left;width:200px;height:200px" TARGET="value"></IMG></A>
    2830      <A HREF="river_desc.html"><IMG SRC="figs/or_rivers.png" ALT="plot rivers from ORCHIDEE's description" STYLE="float:left;width:200px;height:200px" TARGET="value"></IMG></A>     
  • trunk/tools/documentation/plotting/plotting.html

    r1469 r1471  
    1515      <A CLASS="lc" HREF="2Dshad_line_time.html" TARGET="value">2D shadow line time</A><BR>
    1616      <A CLASS="lc" HREF="barbs.html" TARGET="value">barbs</A><BR>
    17       <A CLASS="lc" HREF="basin.html" TARGET="value">basin</A><BR>
     17      <A CLASS="lc" HREF="basins.html" TARGET="value">ORCHIDEE's basins</A><BR>
    1818      <A CLASS="lc" HREF="Neighbourgh_evol.html" TARGET="value">Neighbourghood evolution</A><BR>
    1919      <A CLASS="lc" HREF="Nlines.html" TARGET="value">Nlines</A><BR>
    2020      <A CLASS="lc" HREF="Nlines_time.html" TARGET="value">Nlines time</A><BR>
    2121      <A CLASS="lc" HREF="plot_points.html" TARGET="value">points</A><BR>
     22      <A CLASS="lc" HREF="points_lonlat.html" TARGET="value">lon,lat points</A><BR>
    2223      <A CLASS="lc" HREF="pointsZval.html" TARGET="value">points Zval</A><BR>
    23       <A CLASS="lc" HREF="river_desc.html" TARGET="value">river description</A><BR>
    24       <A CLASS="lc" HREF="subbasin.html" TARGET="value">sub-basin</A><BR>
     24      <A CLASS="lc" HREF="river_desc.html" TARGET="value">ORCHIDEE's river description</A><BR>
     25      <A CLASS="lc" HREF="subbasin.html" TARGET="value">ORCHIDEE's sub-basin</A><BR>
    2526      <A CLASS="lc" HREF="Taylor.html" TARGET="value">Taylor diagram</A><BR>
    2627      <A CLASS="lc" HREF="TimeSeries.html" TARGET="value">TimeSeries</A><BR>
  • trunk/tools/documentation/plotting/subbasin.html

    r1469 r1471  
    1111    </DIV>
    1212    <DIV CLASS="valimg">
    13       Plotting subbasin from a given point of its discharge from 'routing.nc' ORCDHIEE file <BR>
    14       &nbsp;&nbsp;Each river is composed of different subbasins. Grouped up-flow. This function use a different color <BR>
    15       &nbsp;&nbsp;for the first level of suubbasins, and a different degree of color for the sub-subbasins of the first level <BR>
    16       &nbsp;&nbsp;It takes output from `subbasin' function from 'nc_var.py'
     13      Plotting subbasin from a given point of its discharge from 'routing.nc' ORCDHIEE file. Each river is composed of different subbasins. Grouped up-flow. This function use a different color for the first level of suubbasins, and a different degree of color for the sub-subbasins of the first level. It takes output from `subbasin' function from 'nc_var.py'
    1714      <IMG WIDTH="100%" SRC="figs/tas_rainbow_auto.png"></IMG>
    1815    </DIV>
     
    4946    </DIV>
    5047    <DIV CLASS="valins">
    51       python ${pyHOME}/drawing.py -o draw_subbasin -f Caceres_subbasin.nc -S 'Caceres:None:cyl,l:2:True:Parana!subbasins!from!C&agrave;ceres:png:0:Caceres_subbasin:True:True'
     48      python ${pyHOME}/drawing.py -o draw_subbasin -f Caceres_subbasin.nc -S 'Caceres:None:cyl,l:2:True:Parana!subbasins!from!C&aacute;ceres:png:0:Caceres_subbasin:True:True'
    5249    </DIV>
    5350  </BODY>
  • trunk/tools/drawing.py

    r1470 r1471  
    32353235    """ Function to plot a series of lon/lat points
    32363236      filen= name of the file
    3237       values= [lonvarname]:[latvarname]:[gkind]:[gtit]:[ptcolor]:[pttype]:[ptsize]:[labels]:[legvals]:[figureK]
     3237      values= [lonvarname]:[latvarname]:[gkind]:[gtit]:[ptcolor]:[pttype]:[ptsize]:[labels]:[legvals]:[figureK]:
     3238          [figclose]
    32383239        [lonvarname]: name of the variable longitude
    32393240        [latvarname]: name of the variable latitude
    3240         [gkind]: kind of graphical output
     3241        [gkind]: kind of graphical output (pdf, png, ps)
    32413242        [gtit]: graphic title '!' for spaces
    32423243        [ptcolor]: color of the points ('auto', for "red")
     
    32533254          'legend': only points in the map with the legend with the names
    32543255          'labelled',[txtsize],[txtcol]: points with the names and size, color of text
     3256        [figclose]: whether figures should be closed or not
    32553257    """
    32563258    fname = 'draw_points_lonlat'
     
    32623264
    32633265    expectargs = '[lonvarname]:[latvarname]:[gkind]:[gtit]:[ptcolor]:[pttype]:' +    \
    3264       '[ptsize]:[labels]:[locleg]:[figureK]'
     3266      '[ptsize]:[labels]:[locleg]:[figureK]:[figclose]'
    32653267 
    32663268    drw.check_arguments(fname,values,expectargs,':')
     
    32763278    legvals = values.split(':')[8]
    32773279    figureK = values.split(':')[9]
    3278 
    3279     fname = 'points_lonlat'
     3280    figclose = gen.Str_Bool(values.split(':')[10])
    32803281
    32813282    onc = NetCDFFile(filen, 'r')
     
    33333334        labels = labelsv.split(',')
    33343335
    3335     locleg, sizeleg = legend_values(legvals,'|')
     3336    locleg, sizeleg = drw.legend_values(legvals,'|')
    33363337
    33373338    drw.plot_list_points(lonvals, latvals, lonname, latname, gtit, figureK, pointcolor, pointtype,    \
    3338       pointsize, labels, locleg, sizeleg, kindfigure, fname)
     3339      pointsize, labels, locleg, sizeleg, kindfigure, fname, figclose)
    33393340
    33403341    onc.close()
  • trunk/tools/drawing_tools.py

    r1470 r1471  
    32213221
    32223222def plot_list_points(xval, yval, varxn, varyn, vtit, figk, color, ptk, pts, labels,  \
    3223   lloc, lsiz, kfig, figname):
     3223  lloc, lsiz, kfig, figname, fclose):
    32243224    """ plotting points
    32253225      [x/yval]: x,y values to plot
     
    32373237      kfig= kind of figure (jpg, pdf, png)
    32383238      figname= name of the figure
    3239 
     3239      fclose= whether the figure should be close or not
    32403240    """
    32413241    fname = 'plot_points'
     
    32753275    plt.title(graphtit)
    32763276   
    3277     output_kind(kfig, figname, True)
     3277    output_kind(kfig, figname, fclose)
    32783278
    32793279    return
Note: See TracChangeset for help on using the changeset viewer.