bin/gpview in gphys-1.1.1 vs bin/gpview in gphys-1.2.2
- old
+ new
@@ -17,11 +17,11 @@
% gpview [options] gturl1 gturl2 gturl3 ...
where the format of the gturl is
- path@varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]
+ path[@|/]varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]
The second commnad form is
% gpview --var url [options] gtfile1 gtfile2 ...
@@ -75,11 +75,10 @@
:--noannotate:
not draw annotations.
:--animate/anim <dim>:
plot animation along <dim>. <dim> must be name of dimension.
-
:--alternate, --Ga:
enable to backing store.
:--nowait, --Gw:
@@ -95,21 +94,33 @@
exchange(transpose) x/y axis.
:--mean <dim>:
mean along axis <dim>.
+:--eddy <dim>:
+ deviation from mean along axis <dim>.
+
:--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)
+
== LINE/MARK OPTIONS
:--line:
make line plot forced. (about first 1D)
@@ -170,10 +181,13 @@
set tone of contour levels.
:--patterns:
set each patterns for tone plot.
+:--tonf:
+ use tonf instead of tone.
+
:--nocolorbar:
do not draw color bar
:--nozero:
do not draw zero contour
@@ -193,10 +207,11 @@
% gpview --smooth lon data.nc@temp,lon=130:150
% gpview --levels 0,10,20,30 --pattern 30999,40999,50999,60999,70999 data.nc@temp
% gpview --overplot=3 --anim t data.nc@temp,lon=0
% gpview --mark data.nc@temp,lon=0,lat=0
% gpview --operation log10 data.nc@temp,lon=0
+ % gpview --time_ax false data.nc@temp,lon=0,lat=0
For multiple GPhys variables,
% gpview data1.nc@temp data2.nc@temp
% gpview data1.nc@temp,lon=130:150 data2.nc@temp,lon=150:170
% gpview --overplot=3 --anim t data.nc@temp,lon=0 data.nc@temp,lon=10
@@ -236,10 +251,13 @@
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)
=end
#################################################
require "getoptlong" # for option_parse
require "numru/ggraph" # ggraph library
@@ -249,11 +267,11 @@
#####################################################
## Default param.
VIEWPORT = [0.15,0.85,0.2,0.55]
-URLfmt = "path@varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]"
+URLfmt = "path[@|/]varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]"
#####################################################
def GGraph::annotate(str_ary)
lclip = DCL.sgpget('lclip')
DCL.sgpset('lclip',nil)
@@ -387,10 +405,16 @@
map_type = "coast_world" if $OPT_m
map_type = $OPT_map if $OPT_map
GGraph::set_map(map_type=>true)
end
+ # time axis
+ if ($OPT_time_ax)
+ $OPT_time_ax = false if $OPT_time_ax == "false"
+ GGraph.set_axes('time_ax'=>$OPT_time_ax)
+ end
+
return draw_flag
end
def draw(gp, draw_flag)
@@ -462,11 +486,12 @@
true,
"title"=>$OPT_title,
"annotate"=>$annotate,
"transpose"=>$OPT_exch,
"levels"=>$OPT_slevels,
- "patterns"=>$OPT_patterns
+ "patterns"=>$OPT_patterns,
+ "tonf"=>$OPT_tonf
)
GGraph.contour(gp,
false,
"transpose"=>$OPT_exch,
"levels"=>$OPT_clevels,
@@ -477,11 +502,12 @@
true,
"title"=>$OPT_title,
"annotate"=>$annotate,
"transpose"=>$OPT_exch,
"levels"=>$OPT_slevels,
- "patterns"=>$OPT_patterns
+ "patterns"=>$OPT_patterns,
+ "tonf"=>$OPT_tonf
)
when "noshade"
mj = DCL.udpget('indxmj')
mn = DCL.udpget('indxmn')
GGraph.contour(gp,
@@ -585,13 +611,15 @@
['--Gaw', GetoptLong::NO_ARGUMENT],
['--exch', GetoptLong::NO_ARGUMENT],
['--reverse', GetoptLong::NO_ARGUMENT],
['--Gr', GetoptLong::NO_ARGUMENT],
['--mean', GetoptLong::REQUIRED_ARGUMENT],
+ ['--eddy', GetoptLong::REQUIRED_ARGUMENT],
['--map', GetoptLong::REQUIRED_ARGUMENT],
['--m', GetoptLong::NO_ARGUMENT],
['--operation', GetoptLong::REQUIRED_ARGUMENT],
+ ['--time_ax', GetoptLong::REQUIRED_ARGUMENT],
### line/mark option ###
['--line', GetoptLong::NO_ARGUMENT],
['--mark', GetoptLong::NO_ARGUMENT],
['--index', GetoptLong::REQUIRED_ARGUMENT],
['--type', GetoptLong::REQUIRED_ARGUMENT],
@@ -608,10 +636,11 @@
['--sint', GetoptLong::REQUIRED_ARGUMENT],
['--levels', GetoptLong::REQUIRED_ARGUMENT],
['--clevels', GetoptLong::REQUIRED_ARGUMENT],
['--slevels', GetoptLong::REQUIRED_ARGUMENT],
['--patterns', GetoptLong::REQUIRED_ARGUMENT],
+ ['--tonf', GetoptLong::NO_ARGUMENT],
['--nocolorbar', GetoptLong::NO_ARGUMENT],
['--nozero', GetoptLong::NO_ARGUMENT],
['--help', GetoptLong::NO_ARGUMENT]
# ['--version', GetoptLong::NO_ARGUMENT] # to be defined
)
@@ -678,9 +707,18 @@
if ($OPT_mean)
dims = ($OPT_mean).split(/\s*,\s*/)
dims.each{|dim|
dim = dim.to_i if dim.to_i.to_s == dim
gp = gp.mean(dim)
+ }
+ end
+
+## deviation from mean along any axis
+ if ($OPT_eddy)
+ dims = ($OPT_eddy).split(/\s*,\s*/)
+ dims.each{|dim|
+ dim = dim.to_i if dim.to_i.to_s == dim
+ gp = gp.eddy(dim)
}
end
## operation of a mathematical function
if ($OPT_operation)