gpview - quick viewer for the values of a variable specified by a gtool4-type URL.

  1. for 1-dimensional variable, make line plot.
  2. for 2-dimensional variable, make contour/tone plot.
  3. for 3/more-dimensional variable, make contour/tone plot, select first 2D. possible to make animation.


The first command form is

% gpview [options] gturl1 gturl2 gturl3 ...

where the format of the gturl is


The second commnad form is

% gpview --var url [options] gtfile1 gtfile2 ...

where the format of the url is



if you want to know more description, please read



print this message.

--var url:

set the variable name and slicing parameters.

--wsn [1-4]:

set work staion number. each number represent output device: 1 : X window. 2 : PS file. (named 3 : Tcl/Tk file. 4 : GTK Windows (depend on dcl-5.3)

--clrmap [1-]:

set colormap to draw tone/contour.

--itr [1-4,5-7,10-15,20-23,30-33]:

set axis scale. default is 1. 1 : linear scale for x/y axis 2 : linear scale for x , log scale for y axis 3 : log scale for x , linear scale for y axis 4 : log scale for x/y axis

--similar [simfac,vxoff,vyoff]:

(for 5<=itr<=7) set similarity parameters which are fed in DCL.grssim.

--map_axis [uxc,uyc,rot]:

(for 10<=itr<=33) set mapping parameters which are fed in DCL.umpcnt.

--map_radius <radius>:

(for itr>=20) set clipping radius (degree) around the tangential point. Deafault=90.

--xcoord [xcoord]

name of x-coordinate (use for associate coordinates)

--ycoord [ycoord]

name of y-coordinate (use for associate coordinates)


set title of figure

--aspect <aspect>:

set aspect ratio of Viewport. default is 2.0.


not draw annotations.

--animate/anim <dim>:

plot animation along <dim>. <dim> must be name of dimension.

--alternate, --Ga:

enable to backing store.

--nowait, --Gw:

not wait for any actions if animate

--reverse, --Gr:

plot animation reversible if animate

--smooth, --Gaw:

equal to --anlternate && --nowait


exchange(transpose) x/y axis.

--mean <dim>:

mean along axis <dim>.

--stddev <dim>:

standard deviation along axis <dim>.

--eddy <dim>:

deviation from mean along axis <dim>.


calculate the difference of two variables. you must provide two gturls whose size and dimension are same.

--m, --map <map_type>:

plot map. itr number must be set. this option is neglect if itr number is 1-4. abailable map type is coast_world, border_world, plate_world, state_usa, coast_japan, pref_japan

--operation <math_func>:

operation of the specified math function on the data. <math_func> should be a math function with one argument such as log10, sqrt, sin, etc.

--time_ax [nil|false|h|ymd]:

specify type of calendar-type time axis:

nil   (=> auto slection)
false (=> do not use the time axis even if 
          the units of the axis is a time one with since field)
"h"   (=> like nil, but always use the hour-resolving datetime_ax method
          in dclext_datetime_ax.rb)
"ymd" (=> like "h" but for y-m-d type using DCL.uc[xy]acl)


specify Dennou Club Library internal variable. 'xx' is a package name prefix of DCL (eg. sg=>sgpack). 'yy' is a variable name of DCL. 'value' is a value of the DCL variable.



make line plot forced. (about first 1D)


make mark plot forced. (about first 1D)


set DCL line index, which set the color/thickness of the line primitive. please see DCL documents.


set line type.

--range [min:max]

set min/max value for line plot. min or max must be set.


set number of lines on each figure.

--overplot_color, --Opc

multiple lines are distinguished with color rather than line type.



make contour and tone plot.


make contour plot, without tone.


make tone plot, without contour.

--range [min:max]:

set min/max value for contour/tone plot. min or max must be set.


set min/max value for contour plot. this is more dominant than --range


set min/max value for tone plot. this is more dominant than --interval/int

--interval,--int [num]:

set interval value for contour/tone plot. set the number of lines if you set negative value.


set interval value for contour plot. this is more dominant than --interval/int


set interval value for tone plot. this is more dominant than --interval/int.


set values of contour/tone levels.


set values of contour levels.


set tone of contour levels.


set each patterns for tone plot.

--tone [a|e|f|b|c]:

set tone subroutine:

a (=> tone routine is selected automatically depending on the datasize)
e (=> DCL.uetone is used)
f (=> DCL.uetonf is used)
b (=> DCL.uetonb is used)
c (=> DCL.uetonc is used)


do not draw color bar


do not draw zero contour

--udsfmt [strings]:

change contour label format. see UDCNTR/DCL manual for the format.


For a single GPhys variable,

% gpview
% gpview,lon=130:150,lat=0:90:2
% gpview --nocont,lon=130:150,lat=0    
% gpview --noshade,lon=130:150,lat=0    
% gpview --mean lon,lon=130:150,lat=0
% gpview --exch,lon=130:150,lat=0
% gpview --animate lon,lon=130:150
% gpview --animate lon --alternate
% gpview --smooth lon,lon=130:150
% gpview --levels 0,10,20,30 --pattern 30999,40999,50999,60999,70999
% gpview --overplot=3 --anim t,lon=0
% gpview --mark,lon=0,lat=0
% gpview --operation log10,lon=0
% gpview --time_ax false,lon=0,lat=0

Example to set DCL internal variable,

% gpview -ud:lmsg=false --itr 5 --exch,lon=0

For multiple GPhys variables,

% gpview
% gpview,lon=130:150,lon=150:170
% gpview --overplot=3 --anim t,lon=0,lon=10
% gpview --var temp,lon=130:150 data?.nc 
% gpview --anim t --var temp,lon=130:150 data*.nc 


2004/12/14  D Tsukahara && T Horinouti(parse_gturl)
2005/01/08  D Tsukahara (add option --exch and able to invalid value)
2005/01/09  D Tsukahara (add option --animate, smooth, alternate, index )
2005/01/10  D Tsukahara (transpose axis with attr "positive:down" ,
                         abailable loopsense_flag. )
2005/01/10  D Tsukahara (implement GGraph::color_bar, and margin_info, 
                         which file name, date, and toolname. )
2005/01/11  D Tsukahara ( 1. write document about OPTIONS. 
                          2. add many options. more info please see document. )
2005/01/23  S Takehiro  (add option --similar, map_axis)
2005/02/09  D Tsukahara && M Nakano (add option --reverse, --Gr, --map)
2005/02/10  D Tsukahara (change option parser (getopts => getoptlong))
2005/02/24  D Tsukahara (apply --range for line plot)
2005/06/15  S Takehiro (add option --levels, --clevels, --slevels, --patterns)
2005/06/17  S Takehiro (missing_value attribute setting removed)
2005/06/22  S Takehiro (debug, clipping control added to GGraph::annotate)
2005/06/23  S Takehiro (debug, option --title implemented)
2005/07/15  S Takehiro (option --noannotate implemented)
2005/08/07  S Takehiro (option --overplot implemented)
2005/08/09  S Takehiro && T Horinouchi (add option --help and help function.
                                          URL information corrected. )
2005/08/23  S Takehiro (multiple Gphys variables plotting 
                         and option --var implemented)
2005/08/23  S Takehiro (common methods to gp* command moved to gpcommon.rb)
2005/10/30  S Takehiro (option --animate recoverd)
2005/10/31  S Takehiro (option --smooth bug fixed)
2006/03/07  M Nakano (option --int bug fixed)
2007/10/03  S Takehiro (option --nocolorbar implemented)
2008/04/03  S Takehiro (option --nozero implemented)
2008/12/14  S Takehiro (option --mark implemented)
2010/03/10  Y SASAKI (change help block into RD format)
2011/01/14  T Tanigawa && S Takehiro (option --operation implemented)
2011/11/04  S Takehiro (option --time_ax implemented)
2011/11/20  S Takehiro (option --eddy implemented)
2012/02/19  S Takehiro (description for gturl format updated)
2013/01/29  T Tanigawa && S Takehiro (calculation of aspect ratio 
                                      of viewport improved)
2013/01/29  S Nishizawa && S Takehiro (sequential operation implemented)
2014/02/21  Y Naito && S Takehiro (implement DCL internal variable setting,
                                   add option --udsfmt)
2014/02/21  S Noda && S Takehiro (add option --stddev)
2014/02/23  S Takehiro (option --tonf is changed to --tone)
2014/03/05  S Takehiro (add option --map_radius)
2014/03/10  Y Kawai && S Takehiro (setting labels for contours)
2014/04/06  S Takehiro (option --map_radius bug fix)
2014/06/27  S Nishizawa && S Takehiro (add options --xcoord, --ycoord)
2014/11/28  H Kashimura && S Takehiro (add option --diff, --tone bug fix)
2014/11/28  Y O Takahashi && S Takehiro (add option --overplot_color, --Opc)