gphys 1.2.2.1 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (405) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +8 -17
  3. data/.rspec +2 -0
  4. data/.travis.yml +3 -0
  5. data/ChangeLog +5762 -753
  6. data/LICENSE.txt +30 -18
  7. data/Rakefile +1 -0
  8. data/bin/console +14 -0
  9. data/bin/gpcat +43 -2
  10. data/bin/gpcut +16 -0
  11. data/bin/gpvect +167 -15
  12. data/bin/gpview +254 -51
  13. data/bin/setup +7 -0
  14. data/dim_op.c +1220 -0
  15. data/doc/attribute.html +19 -0
  16. data/doc/attributenetcdf.html +15 -0
  17. data/doc/axis.html +387 -0
  18. data/doc/coordmapping.html +111 -0
  19. data/doc/coordtransform.html +36 -0
  20. data/doc/dclext.html +821 -0
  21. data/doc/derivative/gphys-derivative.html +100 -0
  22. data/doc/derivative/index.html +21 -0
  23. data/doc/derivative/index.rd +14 -0
  24. data/doc/derivative/math-doc/document.pdf +0 -0
  25. data/doc/derivative/math-doc/document.tex +158 -0
  26. data/doc/derivative/math-doc/document/document.css +30 -0
  27. data/doc/derivative/math-doc/document/document.html +57 -0
  28. data/doc/derivative/math-doc/document/images.aux +1 -0
  29. data/doc/derivative/math-doc/document/images.log +385 -0
  30. data/doc/derivative/math-doc/document/images.pl +186 -0
  31. data/doc/derivative/math-doc/document/images.tex +364 -0
  32. data/doc/derivative/math-doc/document/img1.png +0 -0
  33. data/doc/derivative/math-doc/document/img10.png +0 -0
  34. data/doc/derivative/math-doc/document/img11.png +0 -0
  35. data/doc/derivative/math-doc/document/img12.png +0 -0
  36. data/doc/derivative/math-doc/document/img13.png +0 -0
  37. data/doc/derivative/math-doc/document/img14.png +0 -0
  38. data/doc/derivative/math-doc/document/img15.png +0 -0
  39. data/doc/derivative/math-doc/document/img16.png +0 -0
  40. data/doc/derivative/math-doc/document/img17.png +0 -0
  41. data/doc/derivative/math-doc/document/img18.png +0 -0
  42. data/doc/derivative/math-doc/document/img19.png +0 -0
  43. data/doc/derivative/math-doc/document/img2.png +0 -0
  44. data/doc/derivative/math-doc/document/img20.png +0 -0
  45. data/doc/derivative/math-doc/document/img21.png +0 -0
  46. data/doc/derivative/math-doc/document/img22.png +0 -0
  47. data/doc/derivative/math-doc/document/img23.png +0 -0
  48. data/doc/derivative/math-doc/document/img24.png +0 -0
  49. data/doc/derivative/math-doc/document/img25.png +0 -0
  50. data/doc/derivative/math-doc/document/img26.png +0 -0
  51. data/doc/derivative/math-doc/document/img27.png +0 -0
  52. data/doc/derivative/math-doc/document/img28.png +0 -0
  53. data/doc/derivative/math-doc/document/img29.png +0 -0
  54. data/doc/derivative/math-doc/document/img3.png +0 -0
  55. data/doc/derivative/math-doc/document/img30.png +0 -0
  56. data/doc/derivative/math-doc/document/img4.png +0 -0
  57. data/doc/derivative/math-doc/document/img5.png +0 -0
  58. data/doc/derivative/math-doc/document/img6.png +0 -0
  59. data/doc/derivative/math-doc/document/img7.png +0 -0
  60. data/doc/derivative/math-doc/document/img8.png +0 -0
  61. data/doc/derivative/math-doc/document/img9.png +0 -0
  62. data/doc/derivative/math-doc/document/index.html +57 -0
  63. data/doc/derivative/math-doc/document/labels.pl +13 -0
  64. data/doc/derivative/math-doc/document/next.png +0 -0
  65. data/doc/derivative/math-doc/document/next_g.png +0 -0
  66. data/doc/derivative/math-doc/document/node1.html +238 -0
  67. data/doc/derivative/math-doc/document/node2.html +75 -0
  68. data/doc/derivative/math-doc/document/prev.png +0 -0
  69. data/doc/derivative/math-doc/document/prev_g.png +0 -0
  70. data/doc/derivative/math-doc/document/up.png +0 -0
  71. data/doc/derivative/math-doc/document/up_g.png +0 -0
  72. data/doc/derivative/numru-derivative.html +158 -0
  73. data/doc/ep_flux/ep_flux.html +469 -0
  74. data/doc/ep_flux/ggraph_on_merdional_section.html +71 -0
  75. data/doc/ep_flux/index.html +31 -0
  76. data/doc/ep_flux/index.rd +24 -0
  77. data/doc/ep_flux/math-doc/document.pdf +0 -0
  78. data/doc/ep_flux/math-doc/document.tex +2018 -0
  79. data/doc/ep_flux/math-doc/document/WARNINGS +1 -0
  80. data/doc/ep_flux/math-doc/document/contents.png +0 -0
  81. data/doc/ep_flux/math-doc/document/crossref.png +0 -0
  82. data/doc/ep_flux/math-doc/document/document.css +30 -0
  83. data/doc/ep_flux/math-doc/document/document.html +101 -0
  84. data/doc/ep_flux/math-doc/document/images.aux +1 -0
  85. data/doc/ep_flux/math-doc/document/images.log +1375 -0
  86. data/doc/ep_flux/math-doc/document/images.pl +1328 -0
  87. data/doc/ep_flux/math-doc/document/images.tex +1471 -0
  88. data/doc/ep_flux/math-doc/document/img1.png +0 -0
  89. data/doc/ep_flux/math-doc/document/img10.png +0 -0
  90. data/doc/ep_flux/math-doc/document/img100.png +0 -0
  91. data/doc/ep_flux/math-doc/document/img101.png +0 -0
  92. data/doc/ep_flux/math-doc/document/img102.png +0 -0
  93. data/doc/ep_flux/math-doc/document/img103.png +0 -0
  94. data/doc/ep_flux/math-doc/document/img104.png +0 -0
  95. data/doc/ep_flux/math-doc/document/img105.png +0 -0
  96. data/doc/ep_flux/math-doc/document/img106.png +0 -0
  97. data/doc/ep_flux/math-doc/document/img107.png +0 -0
  98. data/doc/ep_flux/math-doc/document/img108.png +0 -0
  99. data/doc/ep_flux/math-doc/document/img109.png +0 -0
  100. data/doc/ep_flux/math-doc/document/img11.png +0 -0
  101. data/doc/ep_flux/math-doc/document/img110.png +0 -0
  102. data/doc/ep_flux/math-doc/document/img111.png +0 -0
  103. data/doc/ep_flux/math-doc/document/img112.png +0 -0
  104. data/doc/ep_flux/math-doc/document/img113.png +0 -0
  105. data/doc/ep_flux/math-doc/document/img114.png +0 -0
  106. data/doc/ep_flux/math-doc/document/img115.png +0 -0
  107. data/doc/ep_flux/math-doc/document/img116.png +0 -0
  108. data/doc/ep_flux/math-doc/document/img117.png +0 -0
  109. data/doc/ep_flux/math-doc/document/img118.png +0 -0
  110. data/doc/ep_flux/math-doc/document/img119.png +0 -0
  111. data/doc/ep_flux/math-doc/document/img12.png +0 -0
  112. data/doc/ep_flux/math-doc/document/img120.png +0 -0
  113. data/doc/ep_flux/math-doc/document/img121.png +0 -0
  114. data/doc/ep_flux/math-doc/document/img122.png +0 -0
  115. data/doc/ep_flux/math-doc/document/img123.png +0 -0
  116. data/doc/ep_flux/math-doc/document/img124.png +0 -0
  117. data/doc/ep_flux/math-doc/document/img125.png +0 -0
  118. data/doc/ep_flux/math-doc/document/img126.png +0 -0
  119. data/doc/ep_flux/math-doc/document/img127.png +0 -0
  120. data/doc/ep_flux/math-doc/document/img128.png +0 -0
  121. data/doc/ep_flux/math-doc/document/img129.png +0 -0
  122. data/doc/ep_flux/math-doc/document/img13.png +0 -0
  123. data/doc/ep_flux/math-doc/document/img130.png +0 -0
  124. data/doc/ep_flux/math-doc/document/img131.png +0 -0
  125. data/doc/ep_flux/math-doc/document/img132.png +0 -0
  126. data/doc/ep_flux/math-doc/document/img133.png +0 -0
  127. data/doc/ep_flux/math-doc/document/img134.png +0 -0
  128. data/doc/ep_flux/math-doc/document/img135.png +0 -0
  129. data/doc/ep_flux/math-doc/document/img136.png +0 -0
  130. data/doc/ep_flux/math-doc/document/img137.png +0 -0
  131. data/doc/ep_flux/math-doc/document/img138.png +0 -0
  132. data/doc/ep_flux/math-doc/document/img139.png +0 -0
  133. data/doc/ep_flux/math-doc/document/img14.png +0 -0
  134. data/doc/ep_flux/math-doc/document/img140.png +0 -0
  135. data/doc/ep_flux/math-doc/document/img141.png +0 -0
  136. data/doc/ep_flux/math-doc/document/img142.png +0 -0
  137. data/doc/ep_flux/math-doc/document/img143.png +0 -0
  138. data/doc/ep_flux/math-doc/document/img144.png +0 -0
  139. data/doc/ep_flux/math-doc/document/img145.png +0 -0
  140. data/doc/ep_flux/math-doc/document/img146.png +0 -0
  141. data/doc/ep_flux/math-doc/document/img147.png +0 -0
  142. data/doc/ep_flux/math-doc/document/img148.png +0 -0
  143. data/doc/ep_flux/math-doc/document/img149.png +0 -0
  144. data/doc/ep_flux/math-doc/document/img15.png +0 -0
  145. data/doc/ep_flux/math-doc/document/img150.png +0 -0
  146. data/doc/ep_flux/math-doc/document/img151.png +0 -0
  147. data/doc/ep_flux/math-doc/document/img152.png +0 -0
  148. data/doc/ep_flux/math-doc/document/img153.png +0 -0
  149. data/doc/ep_flux/math-doc/document/img154.png +0 -0
  150. data/doc/ep_flux/math-doc/document/img155.png +0 -0
  151. data/doc/ep_flux/math-doc/document/img156.png +0 -0
  152. data/doc/ep_flux/math-doc/document/img157.png +0 -0
  153. data/doc/ep_flux/math-doc/document/img158.png +0 -0
  154. data/doc/ep_flux/math-doc/document/img159.png +0 -0
  155. data/doc/ep_flux/math-doc/document/img16.png +0 -0
  156. data/doc/ep_flux/math-doc/document/img160.png +0 -0
  157. data/doc/ep_flux/math-doc/document/img161.png +0 -0
  158. data/doc/ep_flux/math-doc/document/img162.png +0 -0
  159. data/doc/ep_flux/math-doc/document/img163.png +0 -0
  160. data/doc/ep_flux/math-doc/document/img164.png +0 -0
  161. data/doc/ep_flux/math-doc/document/img165.png +0 -0
  162. data/doc/ep_flux/math-doc/document/img166.png +0 -0
  163. data/doc/ep_flux/math-doc/document/img167.png +0 -0
  164. data/doc/ep_flux/math-doc/document/img168.png +0 -0
  165. data/doc/ep_flux/math-doc/document/img169.png +0 -0
  166. data/doc/ep_flux/math-doc/document/img17.png +0 -0
  167. data/doc/ep_flux/math-doc/document/img170.png +0 -0
  168. data/doc/ep_flux/math-doc/document/img171.png +0 -0
  169. data/doc/ep_flux/math-doc/document/img172.png +0 -0
  170. data/doc/ep_flux/math-doc/document/img173.png +0 -0
  171. data/doc/ep_flux/math-doc/document/img174.png +0 -0
  172. data/doc/ep_flux/math-doc/document/img175.png +0 -0
  173. data/doc/ep_flux/math-doc/document/img176.png +0 -0
  174. data/doc/ep_flux/math-doc/document/img177.png +0 -0
  175. data/doc/ep_flux/math-doc/document/img178.png +0 -0
  176. data/doc/ep_flux/math-doc/document/img179.png +0 -0
  177. data/doc/ep_flux/math-doc/document/img18.png +0 -0
  178. data/doc/ep_flux/math-doc/document/img180.png +0 -0
  179. data/doc/ep_flux/math-doc/document/img181.png +0 -0
  180. data/doc/ep_flux/math-doc/document/img182.png +0 -0
  181. data/doc/ep_flux/math-doc/document/img183.png +0 -0
  182. data/doc/ep_flux/math-doc/document/img184.png +0 -0
  183. data/doc/ep_flux/math-doc/document/img185.png +0 -0
  184. data/doc/ep_flux/math-doc/document/img186.png +0 -0
  185. data/doc/ep_flux/math-doc/document/img187.png +0 -0
  186. data/doc/ep_flux/math-doc/document/img188.png +0 -0
  187. data/doc/ep_flux/math-doc/document/img189.png +0 -0
  188. data/doc/ep_flux/math-doc/document/img19.png +0 -0
  189. data/doc/ep_flux/math-doc/document/img190.png +0 -0
  190. data/doc/ep_flux/math-doc/document/img191.png +0 -0
  191. data/doc/ep_flux/math-doc/document/img192.png +0 -0
  192. data/doc/ep_flux/math-doc/document/img193.png +0 -0
  193. data/doc/ep_flux/math-doc/document/img194.png +0 -0
  194. data/doc/ep_flux/math-doc/document/img195.png +0 -0
  195. data/doc/ep_flux/math-doc/document/img196.png +0 -0
  196. data/doc/ep_flux/math-doc/document/img197.png +0 -0
  197. data/doc/ep_flux/math-doc/document/img198.png +0 -0
  198. data/doc/ep_flux/math-doc/document/img199.png +0 -0
  199. data/doc/ep_flux/math-doc/document/img2.png +0 -0
  200. data/doc/ep_flux/math-doc/document/img20.png +0 -0
  201. data/doc/ep_flux/math-doc/document/img200.png +0 -0
  202. data/doc/ep_flux/math-doc/document/img21.png +0 -0
  203. data/doc/ep_flux/math-doc/document/img22.png +0 -0
  204. data/doc/ep_flux/math-doc/document/img23.png +0 -0
  205. data/doc/ep_flux/math-doc/document/img24.png +0 -0
  206. data/doc/ep_flux/math-doc/document/img25.png +0 -0
  207. data/doc/ep_flux/math-doc/document/img26.png +0 -0
  208. data/doc/ep_flux/math-doc/document/img27.png +0 -0
  209. data/doc/ep_flux/math-doc/document/img28.png +0 -0
  210. data/doc/ep_flux/math-doc/document/img29.png +0 -0
  211. data/doc/ep_flux/math-doc/document/img3.png +0 -0
  212. data/doc/ep_flux/math-doc/document/img30.png +0 -0
  213. data/doc/ep_flux/math-doc/document/img31.png +0 -0
  214. data/doc/ep_flux/math-doc/document/img32.png +0 -0
  215. data/doc/ep_flux/math-doc/document/img33.png +0 -0
  216. data/doc/ep_flux/math-doc/document/img34.png +0 -0
  217. data/doc/ep_flux/math-doc/document/img35.png +0 -0
  218. data/doc/ep_flux/math-doc/document/img36.png +0 -0
  219. data/doc/ep_flux/math-doc/document/img37.png +0 -0
  220. data/doc/ep_flux/math-doc/document/img38.png +0 -0
  221. data/doc/ep_flux/math-doc/document/img39.png +0 -0
  222. data/doc/ep_flux/math-doc/document/img4.png +0 -0
  223. data/doc/ep_flux/math-doc/document/img40.png +0 -0
  224. data/doc/ep_flux/math-doc/document/img41.png +0 -0
  225. data/doc/ep_flux/math-doc/document/img42.png +0 -0
  226. data/doc/ep_flux/math-doc/document/img43.png +0 -0
  227. data/doc/ep_flux/math-doc/document/img44.png +0 -0
  228. data/doc/ep_flux/math-doc/document/img45.png +0 -0
  229. data/doc/ep_flux/math-doc/document/img46.png +0 -0
  230. data/doc/ep_flux/math-doc/document/img47.png +0 -0
  231. data/doc/ep_flux/math-doc/document/img48.png +0 -0
  232. data/doc/ep_flux/math-doc/document/img49.png +0 -0
  233. data/doc/ep_flux/math-doc/document/img5.png +0 -0
  234. data/doc/ep_flux/math-doc/document/img50.png +0 -0
  235. data/doc/ep_flux/math-doc/document/img51.png +0 -0
  236. data/doc/ep_flux/math-doc/document/img52.png +0 -0
  237. data/doc/ep_flux/math-doc/document/img53.png +0 -0
  238. data/doc/ep_flux/math-doc/document/img54.png +0 -0
  239. data/doc/ep_flux/math-doc/document/img55.png +0 -0
  240. data/doc/ep_flux/math-doc/document/img56.png +0 -0
  241. data/doc/ep_flux/math-doc/document/img57.png +0 -0
  242. data/doc/ep_flux/math-doc/document/img58.png +0 -0
  243. data/doc/ep_flux/math-doc/document/img59.png +0 -0
  244. data/doc/ep_flux/math-doc/document/img6.png +0 -0
  245. data/doc/ep_flux/math-doc/document/img60.png +0 -0
  246. data/doc/ep_flux/math-doc/document/img61.png +0 -0
  247. data/doc/ep_flux/math-doc/document/img62.png +0 -0
  248. data/doc/ep_flux/math-doc/document/img63.png +0 -0
  249. data/doc/ep_flux/math-doc/document/img64.png +0 -0
  250. data/doc/ep_flux/math-doc/document/img65.png +0 -0
  251. data/doc/ep_flux/math-doc/document/img66.png +0 -0
  252. data/doc/ep_flux/math-doc/document/img67.png +0 -0
  253. data/doc/ep_flux/math-doc/document/img68.png +0 -0
  254. data/doc/ep_flux/math-doc/document/img69.png +0 -0
  255. data/doc/ep_flux/math-doc/document/img7.png +0 -0
  256. data/doc/ep_flux/math-doc/document/img70.png +0 -0
  257. data/doc/ep_flux/math-doc/document/img71.png +0 -0
  258. data/doc/ep_flux/math-doc/document/img72.png +0 -0
  259. data/doc/ep_flux/math-doc/document/img73.png +0 -0
  260. data/doc/ep_flux/math-doc/document/img74.png +0 -0
  261. data/doc/ep_flux/math-doc/document/img75.png +0 -0
  262. data/doc/ep_flux/math-doc/document/img76.png +0 -0
  263. data/doc/ep_flux/math-doc/document/img77.png +0 -0
  264. data/doc/ep_flux/math-doc/document/img78.png +0 -0
  265. data/doc/ep_flux/math-doc/document/img79.png +0 -0
  266. data/doc/ep_flux/math-doc/document/img8.png +0 -0
  267. data/doc/ep_flux/math-doc/document/img80.png +0 -0
  268. data/doc/ep_flux/math-doc/document/img81.png +0 -0
  269. data/doc/ep_flux/math-doc/document/img82.png +0 -0
  270. data/doc/ep_flux/math-doc/document/img83.png +0 -0
  271. data/doc/ep_flux/math-doc/document/img84.png +0 -0
  272. data/doc/ep_flux/math-doc/document/img85.png +0 -0
  273. data/doc/ep_flux/math-doc/document/img86.png +0 -0
  274. data/doc/ep_flux/math-doc/document/img87.png +0 -0
  275. data/doc/ep_flux/math-doc/document/img88.png +0 -0
  276. data/doc/ep_flux/math-doc/document/img89.png +0 -0
  277. data/doc/ep_flux/math-doc/document/img9.png +0 -0
  278. data/doc/ep_flux/math-doc/document/img90.png +0 -0
  279. data/doc/ep_flux/math-doc/document/img91.png +0 -0
  280. data/doc/ep_flux/math-doc/document/img92.png +0 -0
  281. data/doc/ep_flux/math-doc/document/img93.png +0 -0
  282. data/doc/ep_flux/math-doc/document/img94.png +0 -0
  283. data/doc/ep_flux/math-doc/document/img95.png +0 -0
  284. data/doc/ep_flux/math-doc/document/img96.png +0 -0
  285. data/doc/ep_flux/math-doc/document/img97.png +0 -0
  286. data/doc/ep_flux/math-doc/document/img98.png +0 -0
  287. data/doc/ep_flux/math-doc/document/img99.png +0 -0
  288. data/doc/ep_flux/math-doc/document/index.html +101 -0
  289. data/doc/ep_flux/math-doc/document/internals.pl +258 -0
  290. data/doc/ep_flux/math-doc/document/labels.pl +265 -0
  291. data/doc/ep_flux/math-doc/document/next.png +0 -0
  292. data/doc/ep_flux/math-doc/document/next_g.png +0 -0
  293. data/doc/ep_flux/math-doc/document/node1.html +104 -0
  294. data/doc/ep_flux/math-doc/document/node10.html +164 -0
  295. data/doc/ep_flux/math-doc/document/node11.html +86 -0
  296. data/doc/ep_flux/math-doc/document/node12.html +166 -0
  297. data/doc/ep_flux/math-doc/document/node13.html +897 -0
  298. data/doc/ep_flux/math-doc/document/node14.html +1065 -0
  299. data/doc/ep_flux/math-doc/document/node15.html +72 -0
  300. data/doc/ep_flux/math-doc/document/node16.html +81 -0
  301. data/doc/ep_flux/math-doc/document/node2.html +82 -0
  302. data/doc/ep_flux/math-doc/document/node3.html +91 -0
  303. data/doc/ep_flux/math-doc/document/node4.html +149 -0
  304. data/doc/ep_flux/math-doc/document/node5.html +330 -0
  305. data/doc/ep_flux/math-doc/document/node6.html +99 -0
  306. data/doc/ep_flux/math-doc/document/node7.html +98 -0
  307. data/doc/ep_flux/math-doc/document/node8.html +83 -0
  308. data/doc/ep_flux/math-doc/document/node9.html +140 -0
  309. data/doc/ep_flux/math-doc/document/prev.png +0 -0
  310. data/doc/ep_flux/math-doc/document/prev_g.png +0 -0
  311. data/doc/ep_flux/math-doc/document/up.png +0 -0
  312. data/doc/ep_flux/math-doc/document/up_g.png +0 -0
  313. data/doc/gdir.html +412 -0
  314. data/doc/gdir_client.html +16 -0
  315. data/doc/gdir_connect_ftp-like.html +61 -0
  316. data/doc/gdir_server.html +45 -0
  317. data/doc/ggraph.html +1119 -0
  318. data/doc/gpcat.html +45 -0
  319. data/doc/gpcut.html +47 -0
  320. data/doc/gphys.html +624 -0
  321. data/doc/gphys_fft.html +324 -0
  322. data/doc/gphys_grads_io.html +69 -0
  323. data/doc/gphys_grib_io.html +82 -0
  324. data/doc/gphys_io.html +183 -0
  325. data/doc/gphys_io_common.html +18 -0
  326. data/doc/gphys_netcdf_io.html +283 -0
  327. data/doc/gplist.html +24 -0
  328. data/doc/gpmath.html +52 -0
  329. data/doc/gpmaxmin.html +32 -0
  330. data/doc/gpprint.html +35 -0
  331. data/doc/gpview.html +349 -0
  332. data/doc/grads2nc_with_gphys.html +21 -0
  333. data/doc/grads_gridded.html +307 -0
  334. data/doc/grib.html +149 -0
  335. data/doc/grid.html +224 -0
  336. data/doc/index.html +145 -0
  337. data/doc/index.rd +138 -0
  338. data/doc/netcdf_convention.html +136 -0
  339. data/doc/unumeric.html +176 -0
  340. data/doc/update +69 -0
  341. data/doc/update_rdoc +8 -0
  342. data/doc/varray.html +299 -0
  343. data/doc/varraycomposite.html +67 -0
  344. data/ext_init.c +1 -0
  345. data/extconf.rb +16 -6
  346. data/gphys.gemspec +33 -26
  347. data/interpo.c +1 -1
  348. data/lib/numru/dclext.rb +718 -546
  349. data/lib/numru/derivative.rb +2 -0
  350. data/lib/numru/ganalysis.rb +38 -0
  351. data/lib/numru/ganalysis/beta_plane.rb +103 -0
  352. data/lib/numru/ganalysis/eof.rb +3 -2
  353. data/lib/numru/ganalysis/fitting.rb +559 -0
  354. data/lib/numru/ganalysis/histogram.rb +36 -19
  355. data/lib/numru/ganalysis/log_p.rb +130 -0
  356. data/lib/numru/ganalysis/met.rb +396 -2
  357. data/lib/numru/ganalysis/met_z.rb +300 -0
  358. data/lib/numru/ganalysis/planet.rb +17 -7
  359. data/lib/numru/ganalysis/qg.rb +685 -0
  360. data/lib/numru/ganalysis/sigma_coord.rb +90 -0
  361. data/lib/numru/gdir.rb +2 -1
  362. data/lib/numru/ggraph.rb +204 -60
  363. data/lib/numru/ggraph_on_merdional_section.rb +1 -1
  364. data/lib/numru/gphys.rb +6 -0
  365. data/lib/numru/gphys/assoccoords.rb +18 -3
  366. data/lib/numru/gphys/axis.rb +209 -8
  367. data/lib/numru/gphys/derivative.rb +11 -0
  368. data/lib/numru/gphys/gphys.rb +539 -48
  369. data/lib/numru/gphys/gphys_dim_op.rb +331 -0
  370. data/lib/numru/gphys/gphys_fft.rb +48 -2
  371. data/lib/numru/gphys/gphys_io.rb +241 -13
  372. data/lib/numru/gphys/gphys_netcdf_io.rb +77 -39
  373. data/lib/numru/gphys/gphys_nusdas_io.rb +3 -0
  374. data/lib/numru/gphys/grib.rb +133 -54
  375. data/lib/numru/gphys/grib_params.rb +26 -3
  376. data/lib/numru/gphys/grid.rb +75 -34
  377. data/lib/numru/gphys/interpolate.rb +24 -10
  378. data/lib/numru/gphys/mdstorage.rb +160 -0
  379. data/lib/numru/gphys/netcdf_convention.rb +4 -2
  380. data/lib/numru/gphys/subsetmapping.rb +0 -1
  381. data/lib/numru/gphys/unumeric.rb +50 -5
  382. data/lib/numru/gphys/varray.rb +15 -30
  383. data/lib/numru/gphys/varraycomposite.rb +107 -24
  384. data/lib/numru/gphys/varraynetcdf.rb +9 -3
  385. data/lib/numru/gphys/version.rb +5 -0
  386. data/sample/druby_cli1.rb +2 -0
  387. data/sample/druby_cli2.rb +0 -6
  388. data/sample/druby_serv2.rb +0 -13
  389. data/spec/gphys_spec.rb +11 -0
  390. data/spec/spec_helper.rb +2 -0
  391. data/test/test_assoccoords.rb +102 -0
  392. data/test/test_axis.rb +61 -0
  393. data/test/test_fitting.rb +116 -0
  394. data/test/test_gphys.rb +20 -0
  395. data/test/test_met_z.rb +96 -0
  396. data/test/test_sigma_coord.rb +50 -0
  397. data/{test → test_old}/eof_slp.rb +0 -0
  398. data/{test → test_old}/mltbit.dat +0 -0
  399. data/{test → test_old}/test_ep_flux.rb +0 -0
  400. data/{test → test_old}/test_multibitIO.rb +0 -0
  401. metadata +530 -191
  402. data/README.md +0 -29
  403. data/lib/gphys.rb +0 -2
  404. data/lib/numru/dclext_datetime_ax.rb +0 -220
  405. data/lib/version.rb +0 -3
data/bin/gpview CHANGED
@@ -66,6 +66,16 @@ if you want to know more description, please read
66
66
  :--map_axis [uxc,uyc,rot]:
67
67
  (for 10<=itr<=33) set mapping parameters which are fed in DCL.umpcnt.
68
68
 
69
+ :--map_radius <radius>:
70
+ (for itr>=20) set clipping radius (degree) around the tangential point.
71
+ Deafault=90.
72
+
73
+ :--xcoord [xcoord]
74
+ name of x-coordinate (use for associate coordinates)
75
+
76
+ :--ycoord [ycoord]
77
+ name of y-coordinate (use for associate coordinates)
78
+
69
79
  :--title:
70
80
  set title of figure
71
81
 
@@ -96,9 +106,16 @@ if you want to know more description, please read
96
106
  :--mean <dim>:
97
107
  mean along axis <dim>.
98
108
 
109
+ :--stddev <dim>:
110
+ standard deviation along axis <dim>.
111
+
99
112
  :--eddy <dim>:
100
113
  deviation from mean along axis <dim>.
101
114
 
115
+ :--diff:
116
+ calculate the difference of two variables.
117
+ you must provide two gturls whose size and dimension are same.
118
+
102
119
  :--m, --map <map_type>:
103
120
  plot map. itr number must be set. this option is neglect if itr
104
121
  number is 1-4. abailable map type is coast_world, border_world,
@@ -118,6 +135,11 @@ if you want to know more description, please read
118
135
  in dclext_datetime_ax.rb)
119
136
  "ymd" (=> like "h" but for y-m-d type using DCL.uc[xy]acl)
120
137
 
138
+ :-xx:yyyy=value:
139
+ specify Dennou Club Library internal variable.
140
+ 'xx' is a package name prefix of DCL (eg. sg=>sgpack).
141
+ 'yy' is a variable name of DCL.
142
+ 'value' is a value of the DCL variable.
121
143
 
122
144
  == LINE/MARK OPTIONS
123
145
 
@@ -138,8 +160,11 @@ if you want to know more description, please read
138
160
  set min/max value for line plot. min or max must be set.
139
161
 
140
162
  :--overplot
141
- set number of lines on each figure
163
+ set number of lines on each figure.
142
164
 
165
+ :--overplot_color, --Opc
166
+ multiple lines are distinguished with color rather than line type.
167
+
143
168
  == CONTOUR/TONE OPTIONS
144
169
 
145
170
  :--shade:
@@ -183,8 +208,13 @@ if you want to know more description, please read
183
208
  :--patterns:
184
209
  set each patterns for tone plot.
185
210
 
186
- :--tonf:
187
- use tonf instead of tone.
211
+ :--tone [a|e|f|b|c]:
212
+ set tone subroutine:
213
+ a (=> tone routine is selected automatically depending on the datasize)
214
+ e (=> DCL.uetone is used)
215
+ f (=> DCL.uetonf is used)
216
+ b (=> DCL.uetonb is used)
217
+ c (=> DCL.uetonc is used)
188
218
 
189
219
  :--nocolorbar:
190
220
  do not draw color bar
@@ -192,6 +222,9 @@ if you want to know more description, please read
192
222
  :--nozero:
193
223
  do not draw zero contour
194
224
 
225
+ :--udsfmt [strings]:
226
+ change contour label format. see UDCNTR/DCL manual for the format.
227
+
195
228
  == EXAMPLES
196
229
 
197
230
  For a single GPhys variable,
@@ -211,6 +244,9 @@ For a single GPhys variable,
211
244
  % gpview --operation log10 data.nc@temp,lon=0
212
245
  % gpview --time_ax false data.nc@temp,lon=0,lat=0
213
246
 
247
+ Example to set DCL internal variable,
248
+ % gpview -ud:lmsg=false --itr 5 --exch data.nc@temp,lon=0
249
+
214
250
  For multiple GPhys variables,
215
251
  % gpview data1.nc@temp data2.nc@temp
216
252
  % gpview data1.nc@temp,lon=130:150 data2.nc@temp,lon=150:170
@@ -256,6 +292,19 @@ For multiple GPhys variables,
256
292
  2011/11/04 S Takehiro (option --time_ax implemented)
257
293
  2011/11/20 S Takehiro (option --eddy implemented)
258
294
  2012/02/19 S Takehiro (description for gturl format updated)
295
+ 2013/01/29 T Tanigawa && S Takehiro (calculation of aspect ratio
296
+ of viewport improved)
297
+ 2013/01/29 S Nishizawa && S Takehiro (sequential operation implemented)
298
+ 2014/02/21 Y Naito && S Takehiro (implement DCL internal variable setting,
299
+ add option --udsfmt)
300
+ 2014/02/21 S Noda && S Takehiro (add option --stddev)
301
+ 2014/02/23 S Takehiro (option --tonf is changed to --tone)
302
+ 2014/03/05 S Takehiro (add option --map_radius)
303
+ 2014/03/10 Y Kawai && S Takehiro (setting labels for contours)
304
+ 2014/04/06 S Takehiro (option --map_radius bug fix)
305
+ 2014/06/27 S Nishizawa && S Takehiro (add options --xcoord, --ycoord)
306
+ 2014/11/28 H Kashimura && S Takehiro (add option --diff, --tone bug fix)
307
+ 2014/11/28 Y O Takahashi && S Takehiro (add option --overplot_color, --Opc)
259
308
 
260
309
  =end
261
310
  #################################################
@@ -315,7 +364,7 @@ def each_along_dims(gphys, loopdim)
315
364
  end
316
365
 
317
366
 
318
- def draw_setup(gp)
367
+ def draw_setup
319
368
 
320
369
  # set missing value
321
370
  DCLExt.gl_set_params('lmiss'=>true)
@@ -347,34 +396,20 @@ def draw_setup(gp)
347
396
  'min' => ( min_srange || min_range ),
348
397
  'max' => ( max_srange || max_range )
349
398
  )
399
+
350
400
  if ( $OPT_clevels || $OPT_levels )
401
+ $OPT_label=($OPT_clevels || $OPT_levels).split(',')
351
402
  $OPT_clevels=($OPT_clevels || $OPT_levels).split(',').map!{|v| v.to_f }
352
403
  end
353
404
 
354
405
  if ( $OPT_slevels || $OPT_levels )
355
406
  $OPT_slevels=($OPT_slevels||$OPT_levels).split(',').map!{|v| v.to_f }
356
- p $OPT_slevels
357
407
  end
358
408
 
359
409
  if ( $OPT_patterns )
360
410
  $OPT_patterns=$OPT_patterns.split(',').map!{|v| v.to_f }
361
411
  end
362
412
 
363
- # judge draw kind
364
- gp_rank = gp.rank
365
- gp_rank = gp_rank - 1 if ( $OPT_animate || $OPT_anim )
366
- if ($OPT_mark)
367
- draw_flag = "mark"
368
- elsif ($OPT_line || gp_rank == 1)
369
- draw_flag = "line"
370
- elsif (!$OPT_line && gp_rank >= 2) && !$OPT_noshade && $OPT_nocont
371
- draw_flag = "nocont"
372
- elsif (!$OPT_line && gp_rank >= 2) && $OPT_noshade && !$OPT_nocont
373
- draw_flag = "noshade"
374
- elsif (!$OPT_line && gp_rank >= 2) && !$OPT_noshade && !$OPT_nocont
375
- draw_flag = "full"
376
- end
377
-
378
413
  # similar projection
379
414
  if ($OPT_similar)
380
415
  if /([\d\-.]*),([\d\-.]*),([\d\-.]*)/ =~ $OPT_similar
@@ -399,6 +434,13 @@ def draw_setup(gp)
399
434
  GGraph.set_fig('map_axis'=>map_axis)
400
435
  end
401
436
 
437
+ # clipping parameter
438
+ if ( $OPT_map_radius )
439
+ map_radius=$OPT_map_radius.to_f
440
+ else
441
+ map_radius=90.0
442
+ end
443
+ GGraph.set_fig('map_radius'=>map_radius)
402
444
 
403
445
  # map
404
446
  if ( $OPT_m || $OPT_map)
@@ -413,8 +455,6 @@ def draw_setup(gp)
413
455
  GGraph.set_axes('time_ax'=>$OPT_time_ax)
414
456
  end
415
457
 
416
- return draw_flag
417
-
418
458
  end
419
459
 
420
460
  def draw(gp, draw_flag)
@@ -433,6 +473,17 @@ def draw(gp, draw_flag)
433
473
  "min" => __split_range($OPT_range)[0],
434
474
  "max" => __split_range($OPT_range)[1]
435
475
  )
476
+ elsif ( $OPT_overplot_color || $OPT_Opc )
477
+ GGraph.line(gp,
478
+ false,
479
+ "title"=>$OPT_title,
480
+ "index"=>($OPT_index.to_i+$Overplot*10),
481
+ "type" =>($OPT_type ||1),
482
+ "exchange"=>$OPT_exch,
483
+ "annotate"=>$annotate,
484
+ "min" => __split_range($OPT_range)[0],
485
+ "max" => __split_range($OPT_range)[1]
486
+ )
436
487
  else
437
488
  GGraph.line(gp,
438
489
  false,
@@ -489,13 +540,21 @@ def draw(gp, draw_flag)
489
540
  "transpose"=>$OPT_exch,
490
541
  "levels"=>$OPT_slevels,
491
542
  "patterns"=>$OPT_patterns,
492
- "tonf"=>$OPT_tonf
543
+ "auto"=>$auto,
544
+ "tonf"=>$tonf,
545
+ "tonb"=>$tonb,
546
+ "tonc"=>$tonc,
547
+ "xcoord"=>$OPT_xcoord,
548
+ "ycoord"=>$OPT_ycoord
493
549
  )
494
550
  GGraph.contour(gp,
495
551
  false,
496
552
  "transpose"=>$OPT_exch,
497
553
  "levels"=>$OPT_clevels,
498
- "nozero"=>$OPT_nozero
554
+ "nozero"=>$OPT_nozero,
555
+ "label"=>$OPT_label,
556
+ "xcoord"=>$OPT_xcoord,
557
+ "ycoord"=>$OPT_ycoord
499
558
  )
500
559
  when "nocont"
501
560
  GGraph.tone(gp,
@@ -505,7 +564,12 @@ def draw(gp, draw_flag)
505
564
  "transpose"=>$OPT_exch,
506
565
  "levels"=>$OPT_slevels,
507
566
  "patterns"=>$OPT_patterns,
508
- "tonf"=>$OPT_tonf
567
+ "auto"=>$auto,
568
+ "tonf"=>$tonf,
569
+ "tonb"=>$tonb,
570
+ "tonc"=>$tonc,
571
+ "xcoord"=>$OPT_xcoord,
572
+ "ycoord"=>$OPT_ycoord
509
573
  )
510
574
  when "noshade"
511
575
  mj = DCL.udpget('indxmj')
@@ -513,11 +577,13 @@ def draw(gp, draw_flag)
513
577
  GGraph.contour(gp,
514
578
  true,
515
579
  "title" =>$OPT_title,
516
- "label" =>true,
517
580
  "annotate"=>$annotate,
518
581
  "transpose"=>$OPT_exch,
519
582
  "levels"=>$OPT_clevels,
520
- "nozero"=>$OPT_nozero
583
+ "nozero"=>$OPT_nozero,
584
+ "label"=>$OPT_label,
585
+ "xcoord"=>$OPT_xcoord,
586
+ "ycoord"=>$OPT_ycoord
521
587
  )
522
588
  end
523
589
 
@@ -529,8 +595,6 @@ def draw(gp, draw_flag)
529
595
  )
530
596
  end
531
597
 
532
-
533
-
534
598
  end
535
599
 
536
600
 
@@ -548,7 +612,7 @@ def set_vpsize( default_vp, aspect=2.0 )
548
612
  # center grid of viewport
549
613
  cen_of_vp = [ x0 + hlength/2.0, y0 + vlength/2.0 ]
550
614
 
551
- if aspect <= 2.0
615
+ if aspect <= hlength / vlength
552
616
  hlength = vlength * aspect
553
617
  x0 = cen_of_vp[0] - hlength/2.0
554
618
  x1 = cen_of_vp[0] + hlength/2.0
@@ -584,10 +648,60 @@ def __split_range(range)
584
648
  return min, max
585
649
  end
586
650
 
651
+ def check_dclopts
652
+
653
+ indices = []
654
+ ARGV.each_index{|i|
655
+ if /^-(.)(.):(.*)=(.*)/ =~ ARGV[i]
656
+ indices << i
657
+ end
658
+ }
659
+
660
+ dclopts = []
661
+ indices.reverse_each{|i|
662
+ dclopts << ARGV[i]
663
+ ARGV.slice!(i)
664
+ }
665
+
666
+ dclopts.each{|opt|
667
+ pkg = opt[1..2]
668
+ name = opt[4..-1].split('=')[0]
669
+ value = opt[4..-1].split('=')[1]
670
+ dcl_set_params(pkg,name,value)
671
+ }
672
+
673
+ end
674
+
675
+ def dcl_set_params(pkg,name,value)
676
+
677
+ set = 'stx'
678
+ case name
679
+ when /^c/i
680
+ eval( "DCL.#{pkg}c#{set}(name,value.to_s)" )
681
+ when /^l/i
682
+ if /(.*)(T|t)(.*)/ =~ value
683
+ eval( "DCL.#{pkg}l#{set}(name,true)" )
684
+ else
685
+ if /(.*)(F|f)(.*)/ =~ value
686
+ eval( "DCL.#{pkg}l#{set}(name,false)" )
687
+ else
688
+ raise "value of logical parameter must include 't' or 'f'"
689
+ end
690
+ end
691
+ when /^[i-n]/i
692
+ eval( "DCL.#{pkg}i#{set}(name,value.to_i)" )
693
+ else
694
+ eval( "DCL.#{pkg}r#{set}(name,value.to_f)" )
695
+ end
696
+
697
+ end
587
698
 
588
699
  #####################################################
589
700
  ###++++++ Main Routine ++++++###
590
701
 
702
+ ## options for DCL
703
+ check_dclopts
704
+
591
705
  ## parse options
592
706
  parser = GetoptLong.new
593
707
  parser.set_options(
@@ -598,6 +712,9 @@ parser.set_options(
598
712
  ['--itr', GetoptLong::REQUIRED_ARGUMENT],
599
713
  ['--similar', GetoptLong::REQUIRED_ARGUMENT],
600
714
  ['--map_axis', GetoptLong::REQUIRED_ARGUMENT],
715
+ ['--map_radius', GetoptLong::REQUIRED_ARGUMENT],
716
+ ['--xcoord', GetoptLong::REQUIRED_ARGUMENT],
717
+ ['--ycoord', GetoptLong::REQUIRED_ARGUMENT],
601
718
  ['--title', GetoptLong::REQUIRED_ARGUMENT],
602
719
  ['--aspect', GetoptLong::REQUIRED_ARGUMENT],
603
720
  ['--anim', GetoptLong::REQUIRED_ARGUMENT],
@@ -613,7 +730,10 @@ parser.set_options(
613
730
  ['--reverse', GetoptLong::NO_ARGUMENT],
614
731
  ['--Gr', GetoptLong::NO_ARGUMENT],
615
732
  ['--mean', GetoptLong::REQUIRED_ARGUMENT],
733
+ ['--stddev', GetoptLong::REQUIRED_ARGUMENT
734
+ ],
616
735
  ['--eddy', GetoptLong::REQUIRED_ARGUMENT],
736
+ ['--diff', GetoptLong::NO_ARGUMENT],
617
737
  ['--map', GetoptLong::REQUIRED_ARGUMENT],
618
738
  ['--m', GetoptLong::NO_ARGUMENT],
619
739
  ['--operation', GetoptLong::REQUIRED_ARGUMENT],
@@ -624,6 +744,8 @@ parser.set_options(
624
744
  ['--index', GetoptLong::REQUIRED_ARGUMENT],
625
745
  ['--type', GetoptLong::REQUIRED_ARGUMENT],
626
746
  ['--overplot', GetoptLong::REQUIRED_ARGUMENT],
747
+ ['--overplot_color', GetoptLong::NO_ARGUMENT],
748
+ ['--Opc', GetoptLong::NO_ARGUMENT],
627
749
  ### tone or cont option ###
628
750
  ['--nocont', GetoptLong::NO_ARGUMENT],
629
751
  ['--noshade', GetoptLong::NO_ARGUMENT],
@@ -638,7 +760,8 @@ parser.set_options(
638
760
  ['--clevels', GetoptLong::REQUIRED_ARGUMENT],
639
761
  ['--slevels', GetoptLong::REQUIRED_ARGUMENT],
640
762
  ['--patterns', GetoptLong::REQUIRED_ARGUMENT],
641
- ['--tonf', GetoptLong::NO_ARGUMENT],
763
+ ['--tone', GetoptLong::REQUIRED_ARGUMENT],
764
+ ['--udsfmt', GetoptLong::REQUIRED_ARGUMENT],
642
765
  ['--nocolorbar', GetoptLong::NO_ARGUMENT],
643
766
  ['--nozero', GetoptLong::NO_ARGUMENT],
644
767
  ['--help', GetoptLong::NO_ARGUMENT]
@@ -669,6 +792,7 @@ if ($OPT_noannotate)
669
792
  else
670
793
  $annotate = true
671
794
  end
795
+
672
796
  $Overplot_max = ( $OPT_overplot.to_i || 1 )
673
797
  $Overplot = 1
674
798
 
@@ -678,12 +802,35 @@ else
678
802
  $colorbar = true
679
803
  end
680
804
 
805
+ if ($OPT_tone)
806
+ case $OPT_tone
807
+ when "a"
808
+ $auto, $tonf, $tonb, $tonc = true,false,false,false
809
+ when "e"
810
+ $auto, $tonf, $tonb, $tonc = false,false,false,false
811
+ when "f"
812
+ $auto, $tonf, $tonb, $tonc = false,true,false,false
813
+ when "b"
814
+ $auto, $tonf, $tonb, $tonc = false,false,true,false
815
+ when "c"
816
+ $auto, $tonf, $tonb, $tonc = false,false,false,true
817
+ else
818
+ raise "The value of option --tone should be 'a','e','f','b' or 'c'."
819
+ end
820
+ else
821
+ $auto, $tonf, $tonb, $tonc = true,false,false,false
822
+ end
823
+
681
824
  ## decide VIEWPORT
682
825
  $VIEWPORT = set_vpsize( VIEWPORT, ($OPT_aspect||2.0) )
683
826
 
684
827
  ## tune the size of axis parameters.
685
828
  DCL.uzfact(0.7)
686
829
 
830
+ ## set the format of contour labels.
831
+ udsfmt = ($OPT_udsfmt||DCL.udqfmt())
832
+ DCL.udsfmt(udsfmt)
833
+
687
834
  ## draw figure
688
835
  loopdim = ( $OPT_animate || $OPT_anim )
689
836
  loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
@@ -691,7 +838,7 @@ loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
691
838
  ### set colormap
692
839
  DCL.sgscmn($OPT_clrmap||1)
693
840
  ## open work station
694
- DCL.gropn($OPT_wsn||1)
841
+ DCL.gropn($OPT_wsn||4)
695
842
 
696
843
  ## open netcdf variables
697
844
 
@@ -703,38 +850,94 @@ while ARGV[0] do
703
850
  print " Reading #{gturl}\n"
704
851
  ARGV.shift
705
852
 
706
- ## mean along any axis
853
+ ## for case of calculating difference of two gphys object
854
+ if ($OPT_diff)
855
+ raise "--diff option must be used with even numbers (2, 4, 6,...) of gturls" if ARGV[0] == nil
856
+ prev_gturl = gturl
857
+ gturl = ARGV[0]
858
+ gturl = gturl+'@'+$OPT_var if $OPT_var
859
+ print " Reading #{gturl}\n"
860
+ gp = gp - GPhys::IO.open_gturl(gturl)
861
+ print " Taking difference: #{prev_gturl} - #{gturl}\n"
862
+ gturl = prev_gturl+" - "+gturl
863
+ ARGV.shift
864
+ end
865
+
866
+ ## mean along any axis
707
867
  if ($OPT_mean)
708
- dims = ($OPT_mean).split(/\s*,\s*/)
709
- dims.each{|dim|
710
- dim = dim.to_i if dim.to_i.to_s == dim
711
- gp = gp.mean(dim)
712
- }
868
+ dims_mean = ($OPT_mean).split(/\s*,\s*/)
869
+ dims_mean = dims_mean.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
713
870
  end
714
871
 
715
- ## deviation from mean along any axis
716
- if ($OPT_eddy)
717
- dims = ($OPT_eddy).split(/\s*,\s*/)
718
- dims.each{|dim|
719
- dim = dim.to_i if dim.to_i.to_s == dim
720
- gp = gp.eddy(dim)
721
- }
872
+ ## standard deviation along any axis
873
+ if ($OPT_stddev)
874
+ dims_stddev = ($OPT_stddev).split(/\s*,\s*/)
875
+ dims_stddev = dims_stddev.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
722
876
  end
723
877
 
724
- ## operation of a mathematical function
725
- if ($OPT_operation)
726
- eval "gp = gp.#{$OPT_operation}"
878
+ ## deviation from mean along any axis
879
+ if ($OPT_eddy)
880
+ dims_eddy = ($OPT_eddy).split(/\s*,\s*/)
881
+ dims_eddy = dims_eddy.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
727
882
  end
728
883
 
729
884
  GGraph.margin_info($0, gturl) if $annotate # draw margin infomation
730
- kind_of_fig = draw_setup(gp) # determine figure kind
885
+ draw_setup # determine figure kind
886
+
887
+
888
+ kind_of_fig = nil
889
+ proc = Proc.new do |g|
890
+ ## mean along any axis
891
+ if ($OPT_mean)
892
+ dims_mean.each{|dim|
893
+ g = g.mean(dim)
894
+ }
895
+ end
896
+
897
+ ## standard deviation along any axis
898
+ if ($OPT_stddev)
899
+ dims_stddev.each{|dim|
900
+ g = g.stddev(dim)
901
+ }
902
+ end
903
+
904
+ ## deviation from mean along any axis
905
+ if ($OPT_eddy)
906
+ dims_eddy.each{|dim|
907
+ g = g.eddy(dim)
908
+ }
909
+ end
910
+
911
+ ## operation of a mathematical function
912
+ if ($OPT_operation)
913
+ eval "g = g.#{$OPT_operation}"
914
+ end
915
+
916
+ # judge draw kind
917
+ unless kind_of_fig
918
+ gp_rank = g.rank
919
+ if ($OPT_mark)
920
+ kind_of_fig = "mark"
921
+ elsif ($OPT_line || gp_rank == 1)
922
+ kind_of_fig = "line"
923
+ elsif (!$OPT_line && gp_rank >= 2) && !$OPT_noshade && $OPT_nocont
924
+ kind_of_fig = "nocont"
925
+ elsif (!$OPT_line && gp_rank >= 2) && $OPT_noshade && !$OPT_nocont
926
+ kind_of_fig = "noshade"
927
+ elsif (!$OPT_line && gp_rank >= 2) && !$OPT_noshade && !$OPT_nocont
928
+ kind_of_fig = "full"
929
+ end
930
+ end
931
+
932
+ draw(g, kind_of_fig)
933
+ end
731
934
 
732
935
  if loopdim # animation
733
936
  each_along_dims(gp, loopdim){|gp_subset|
734
- draw(gp_subset, kind_of_fig)
937
+ proc.call(gp_subset)
735
938
  }
736
939
  else
737
- draw( gp, kind_of_fig ) # single figure
940
+ proc.call(gp)
738
941
  end
739
942
 
740
943
  end