gentooboontoo-gphys 0.6.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (401) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +1255 -0
  3. data/README +32 -0
  4. data/bin/gdir_client +9 -0
  5. data/bin/gdir_server +123 -0
  6. data/bin/gpaop +134 -0
  7. data/bin/gpcat +140 -0
  8. data/bin/gpcut +94 -0
  9. data/bin/gpedit +196 -0
  10. data/bin/gplist +67 -0
  11. data/bin/gpmath +114 -0
  12. data/bin/gpmaxmin +127 -0
  13. data/bin/gpprint +57 -0
  14. data/bin/gpvect +657 -0
  15. data/bin/gpview +603 -0
  16. data/bin/grads2nc_with_gphys +56 -0
  17. data/doc/attribute.html +19 -0
  18. data/doc/attributenetcdf.html +15 -0
  19. data/doc/axis.html +368 -0
  20. data/doc/coordmapping.html +111 -0
  21. data/doc/coordtransform.html +36 -0
  22. data/doc/derivative/gphys-derivative.html +80 -0
  23. data/doc/derivative/index.html +21 -0
  24. data/doc/derivative/index.rd +14 -0
  25. data/doc/derivative/math-doc/document/document.css +30 -0
  26. data/doc/derivative/math-doc/document/document.html +57 -0
  27. data/doc/derivative/math-doc/document/images.aux +1 -0
  28. data/doc/derivative/math-doc/document/images.log +385 -0
  29. data/doc/derivative/math-doc/document/images.pl +186 -0
  30. data/doc/derivative/math-doc/document/images.tex +364 -0
  31. data/doc/derivative/math-doc/document/img1.png +0 -0
  32. data/doc/derivative/math-doc/document/img10.png +0 -0
  33. data/doc/derivative/math-doc/document/img11.png +0 -0
  34. data/doc/derivative/math-doc/document/img12.png +0 -0
  35. data/doc/derivative/math-doc/document/img13.png +0 -0
  36. data/doc/derivative/math-doc/document/img14.png +0 -0
  37. data/doc/derivative/math-doc/document/img15.png +0 -0
  38. data/doc/derivative/math-doc/document/img16.png +0 -0
  39. data/doc/derivative/math-doc/document/img17.png +0 -0
  40. data/doc/derivative/math-doc/document/img18.png +0 -0
  41. data/doc/derivative/math-doc/document/img19.png +0 -0
  42. data/doc/derivative/math-doc/document/img2.png +0 -0
  43. data/doc/derivative/math-doc/document/img20.png +0 -0
  44. data/doc/derivative/math-doc/document/img21.png +0 -0
  45. data/doc/derivative/math-doc/document/img22.png +0 -0
  46. data/doc/derivative/math-doc/document/img23.png +0 -0
  47. data/doc/derivative/math-doc/document/img24.png +0 -0
  48. data/doc/derivative/math-doc/document/img25.png +0 -0
  49. data/doc/derivative/math-doc/document/img26.png +0 -0
  50. data/doc/derivative/math-doc/document/img27.png +0 -0
  51. data/doc/derivative/math-doc/document/img28.png +0 -0
  52. data/doc/derivative/math-doc/document/img29.png +0 -0
  53. data/doc/derivative/math-doc/document/img3.png +0 -0
  54. data/doc/derivative/math-doc/document/img30.png +0 -0
  55. data/doc/derivative/math-doc/document/img4.png +0 -0
  56. data/doc/derivative/math-doc/document/img5.png +0 -0
  57. data/doc/derivative/math-doc/document/img6.png +0 -0
  58. data/doc/derivative/math-doc/document/img7.png +0 -0
  59. data/doc/derivative/math-doc/document/img8.png +0 -0
  60. data/doc/derivative/math-doc/document/img9.png +0 -0
  61. data/doc/derivative/math-doc/document/index.html +57 -0
  62. data/doc/derivative/math-doc/document/labels.pl +13 -0
  63. data/doc/derivative/math-doc/document/next.png +0 -0
  64. data/doc/derivative/math-doc/document/next_g.png +0 -0
  65. data/doc/derivative/math-doc/document/node1.html +238 -0
  66. data/doc/derivative/math-doc/document/node2.html +75 -0
  67. data/doc/derivative/math-doc/document/prev.png +0 -0
  68. data/doc/derivative/math-doc/document/prev_g.png +0 -0
  69. data/doc/derivative/math-doc/document/up.png +0 -0
  70. data/doc/derivative/math-doc/document/up_g.png +0 -0
  71. data/doc/derivative/math-doc/document.pdf +0 -0
  72. data/doc/derivative/math-doc/document.tex +158 -0
  73. data/doc/derivative/numru-derivative.html +129 -0
  74. data/doc/ep_flux/ep_flux.html +469 -0
  75. data/doc/ep_flux/ggraph_on_merdional_section.html +71 -0
  76. data/doc/ep_flux/index.html +31 -0
  77. data/doc/ep_flux/index.rd +24 -0
  78. data/doc/ep_flux/math-doc/document/WARNINGS +1 -0
  79. data/doc/ep_flux/math-doc/document/contents.png +0 -0
  80. data/doc/ep_flux/math-doc/document/crossref.png +0 -0
  81. data/doc/ep_flux/math-doc/document/document.css +30 -0
  82. data/doc/ep_flux/math-doc/document/document.html +101 -0
  83. data/doc/ep_flux/math-doc/document/images.aux +1 -0
  84. data/doc/ep_flux/math-doc/document/images.log +1375 -0
  85. data/doc/ep_flux/math-doc/document/images.pl +1328 -0
  86. data/doc/ep_flux/math-doc/document/images.tex +1471 -0
  87. data/doc/ep_flux/math-doc/document/img1.png +0 -0
  88. data/doc/ep_flux/math-doc/document/img10.png +0 -0
  89. data/doc/ep_flux/math-doc/document/img100.png +0 -0
  90. data/doc/ep_flux/math-doc/document/img101.png +0 -0
  91. data/doc/ep_flux/math-doc/document/img102.png +0 -0
  92. data/doc/ep_flux/math-doc/document/img103.png +0 -0
  93. data/doc/ep_flux/math-doc/document/img104.png +0 -0
  94. data/doc/ep_flux/math-doc/document/img105.png +0 -0
  95. data/doc/ep_flux/math-doc/document/img106.png +0 -0
  96. data/doc/ep_flux/math-doc/document/img107.png +0 -0
  97. data/doc/ep_flux/math-doc/document/img108.png +0 -0
  98. data/doc/ep_flux/math-doc/document/img109.png +0 -0
  99. data/doc/ep_flux/math-doc/document/img11.png +0 -0
  100. data/doc/ep_flux/math-doc/document/img110.png +0 -0
  101. data/doc/ep_flux/math-doc/document/img111.png +0 -0
  102. data/doc/ep_flux/math-doc/document/img112.png +0 -0
  103. data/doc/ep_flux/math-doc/document/img113.png +0 -0
  104. data/doc/ep_flux/math-doc/document/img114.png +0 -0
  105. data/doc/ep_flux/math-doc/document/img115.png +0 -0
  106. data/doc/ep_flux/math-doc/document/img116.png +0 -0
  107. data/doc/ep_flux/math-doc/document/img117.png +0 -0
  108. data/doc/ep_flux/math-doc/document/img118.png +0 -0
  109. data/doc/ep_flux/math-doc/document/img119.png +0 -0
  110. data/doc/ep_flux/math-doc/document/img12.png +0 -0
  111. data/doc/ep_flux/math-doc/document/img120.png +0 -0
  112. data/doc/ep_flux/math-doc/document/img121.png +0 -0
  113. data/doc/ep_flux/math-doc/document/img122.png +0 -0
  114. data/doc/ep_flux/math-doc/document/img123.png +0 -0
  115. data/doc/ep_flux/math-doc/document/img124.png +0 -0
  116. data/doc/ep_flux/math-doc/document/img125.png +0 -0
  117. data/doc/ep_flux/math-doc/document/img126.png +0 -0
  118. data/doc/ep_flux/math-doc/document/img127.png +0 -0
  119. data/doc/ep_flux/math-doc/document/img128.png +0 -0
  120. data/doc/ep_flux/math-doc/document/img129.png +0 -0
  121. data/doc/ep_flux/math-doc/document/img13.png +0 -0
  122. data/doc/ep_flux/math-doc/document/img130.png +0 -0
  123. data/doc/ep_flux/math-doc/document/img131.png +0 -0
  124. data/doc/ep_flux/math-doc/document/img132.png +0 -0
  125. data/doc/ep_flux/math-doc/document/img133.png +0 -0
  126. data/doc/ep_flux/math-doc/document/img134.png +0 -0
  127. data/doc/ep_flux/math-doc/document/img135.png +0 -0
  128. data/doc/ep_flux/math-doc/document/img136.png +0 -0
  129. data/doc/ep_flux/math-doc/document/img137.png +0 -0
  130. data/doc/ep_flux/math-doc/document/img138.png +0 -0
  131. data/doc/ep_flux/math-doc/document/img139.png +0 -0
  132. data/doc/ep_flux/math-doc/document/img14.png +0 -0
  133. data/doc/ep_flux/math-doc/document/img140.png +0 -0
  134. data/doc/ep_flux/math-doc/document/img141.png +0 -0
  135. data/doc/ep_flux/math-doc/document/img142.png +0 -0
  136. data/doc/ep_flux/math-doc/document/img143.png +0 -0
  137. data/doc/ep_flux/math-doc/document/img144.png +0 -0
  138. data/doc/ep_flux/math-doc/document/img145.png +0 -0
  139. data/doc/ep_flux/math-doc/document/img146.png +0 -0
  140. data/doc/ep_flux/math-doc/document/img147.png +0 -0
  141. data/doc/ep_flux/math-doc/document/img148.png +0 -0
  142. data/doc/ep_flux/math-doc/document/img149.png +0 -0
  143. data/doc/ep_flux/math-doc/document/img15.png +0 -0
  144. data/doc/ep_flux/math-doc/document/img150.png +0 -0
  145. data/doc/ep_flux/math-doc/document/img151.png +0 -0
  146. data/doc/ep_flux/math-doc/document/img152.png +0 -0
  147. data/doc/ep_flux/math-doc/document/img153.png +0 -0
  148. data/doc/ep_flux/math-doc/document/img154.png +0 -0
  149. data/doc/ep_flux/math-doc/document/img155.png +0 -0
  150. data/doc/ep_flux/math-doc/document/img156.png +0 -0
  151. data/doc/ep_flux/math-doc/document/img157.png +0 -0
  152. data/doc/ep_flux/math-doc/document/img158.png +0 -0
  153. data/doc/ep_flux/math-doc/document/img159.png +0 -0
  154. data/doc/ep_flux/math-doc/document/img16.png +0 -0
  155. data/doc/ep_flux/math-doc/document/img160.png +0 -0
  156. data/doc/ep_flux/math-doc/document/img161.png +0 -0
  157. data/doc/ep_flux/math-doc/document/img162.png +0 -0
  158. data/doc/ep_flux/math-doc/document/img163.png +0 -0
  159. data/doc/ep_flux/math-doc/document/img164.png +0 -0
  160. data/doc/ep_flux/math-doc/document/img165.png +0 -0
  161. data/doc/ep_flux/math-doc/document/img166.png +0 -0
  162. data/doc/ep_flux/math-doc/document/img167.png +0 -0
  163. data/doc/ep_flux/math-doc/document/img168.png +0 -0
  164. data/doc/ep_flux/math-doc/document/img169.png +0 -0
  165. data/doc/ep_flux/math-doc/document/img17.png +0 -0
  166. data/doc/ep_flux/math-doc/document/img170.png +0 -0
  167. data/doc/ep_flux/math-doc/document/img171.png +0 -0
  168. data/doc/ep_flux/math-doc/document/img172.png +0 -0
  169. data/doc/ep_flux/math-doc/document/img173.png +0 -0
  170. data/doc/ep_flux/math-doc/document/img174.png +0 -0
  171. data/doc/ep_flux/math-doc/document/img175.png +0 -0
  172. data/doc/ep_flux/math-doc/document/img176.png +0 -0
  173. data/doc/ep_flux/math-doc/document/img177.png +0 -0
  174. data/doc/ep_flux/math-doc/document/img178.png +0 -0
  175. data/doc/ep_flux/math-doc/document/img179.png +0 -0
  176. data/doc/ep_flux/math-doc/document/img18.png +0 -0
  177. data/doc/ep_flux/math-doc/document/img180.png +0 -0
  178. data/doc/ep_flux/math-doc/document/img181.png +0 -0
  179. data/doc/ep_flux/math-doc/document/img182.png +0 -0
  180. data/doc/ep_flux/math-doc/document/img183.png +0 -0
  181. data/doc/ep_flux/math-doc/document/img184.png +0 -0
  182. data/doc/ep_flux/math-doc/document/img185.png +0 -0
  183. data/doc/ep_flux/math-doc/document/img186.png +0 -0
  184. data/doc/ep_flux/math-doc/document/img187.png +0 -0
  185. data/doc/ep_flux/math-doc/document/img188.png +0 -0
  186. data/doc/ep_flux/math-doc/document/img189.png +0 -0
  187. data/doc/ep_flux/math-doc/document/img19.png +0 -0
  188. data/doc/ep_flux/math-doc/document/img190.png +0 -0
  189. data/doc/ep_flux/math-doc/document/img191.png +0 -0
  190. data/doc/ep_flux/math-doc/document/img192.png +0 -0
  191. data/doc/ep_flux/math-doc/document/img193.png +0 -0
  192. data/doc/ep_flux/math-doc/document/img194.png +0 -0
  193. data/doc/ep_flux/math-doc/document/img195.png +0 -0
  194. data/doc/ep_flux/math-doc/document/img196.png +0 -0
  195. data/doc/ep_flux/math-doc/document/img197.png +0 -0
  196. data/doc/ep_flux/math-doc/document/img198.png +0 -0
  197. data/doc/ep_flux/math-doc/document/img199.png +0 -0
  198. data/doc/ep_flux/math-doc/document/img2.png +0 -0
  199. data/doc/ep_flux/math-doc/document/img20.png +0 -0
  200. data/doc/ep_flux/math-doc/document/img200.png +0 -0
  201. data/doc/ep_flux/math-doc/document/img21.png +0 -0
  202. data/doc/ep_flux/math-doc/document/img22.png +0 -0
  203. data/doc/ep_flux/math-doc/document/img23.png +0 -0
  204. data/doc/ep_flux/math-doc/document/img24.png +0 -0
  205. data/doc/ep_flux/math-doc/document/img25.png +0 -0
  206. data/doc/ep_flux/math-doc/document/img26.png +0 -0
  207. data/doc/ep_flux/math-doc/document/img27.png +0 -0
  208. data/doc/ep_flux/math-doc/document/img28.png +0 -0
  209. data/doc/ep_flux/math-doc/document/img29.png +0 -0
  210. data/doc/ep_flux/math-doc/document/img3.png +0 -0
  211. data/doc/ep_flux/math-doc/document/img30.png +0 -0
  212. data/doc/ep_flux/math-doc/document/img31.png +0 -0
  213. data/doc/ep_flux/math-doc/document/img32.png +0 -0
  214. data/doc/ep_flux/math-doc/document/img33.png +0 -0
  215. data/doc/ep_flux/math-doc/document/img34.png +0 -0
  216. data/doc/ep_flux/math-doc/document/img35.png +0 -0
  217. data/doc/ep_flux/math-doc/document/img36.png +0 -0
  218. data/doc/ep_flux/math-doc/document/img37.png +0 -0
  219. data/doc/ep_flux/math-doc/document/img38.png +0 -0
  220. data/doc/ep_flux/math-doc/document/img39.png +0 -0
  221. data/doc/ep_flux/math-doc/document/img4.png +0 -0
  222. data/doc/ep_flux/math-doc/document/img40.png +0 -0
  223. data/doc/ep_flux/math-doc/document/img41.png +0 -0
  224. data/doc/ep_flux/math-doc/document/img42.png +0 -0
  225. data/doc/ep_flux/math-doc/document/img43.png +0 -0
  226. data/doc/ep_flux/math-doc/document/img44.png +0 -0
  227. data/doc/ep_flux/math-doc/document/img45.png +0 -0
  228. data/doc/ep_flux/math-doc/document/img46.png +0 -0
  229. data/doc/ep_flux/math-doc/document/img47.png +0 -0
  230. data/doc/ep_flux/math-doc/document/img48.png +0 -0
  231. data/doc/ep_flux/math-doc/document/img49.png +0 -0
  232. data/doc/ep_flux/math-doc/document/img5.png +0 -0
  233. data/doc/ep_flux/math-doc/document/img50.png +0 -0
  234. data/doc/ep_flux/math-doc/document/img51.png +0 -0
  235. data/doc/ep_flux/math-doc/document/img52.png +0 -0
  236. data/doc/ep_flux/math-doc/document/img53.png +0 -0
  237. data/doc/ep_flux/math-doc/document/img54.png +0 -0
  238. data/doc/ep_flux/math-doc/document/img55.png +0 -0
  239. data/doc/ep_flux/math-doc/document/img56.png +0 -0
  240. data/doc/ep_flux/math-doc/document/img57.png +0 -0
  241. data/doc/ep_flux/math-doc/document/img58.png +0 -0
  242. data/doc/ep_flux/math-doc/document/img59.png +0 -0
  243. data/doc/ep_flux/math-doc/document/img6.png +0 -0
  244. data/doc/ep_flux/math-doc/document/img60.png +0 -0
  245. data/doc/ep_flux/math-doc/document/img61.png +0 -0
  246. data/doc/ep_flux/math-doc/document/img62.png +0 -0
  247. data/doc/ep_flux/math-doc/document/img63.png +0 -0
  248. data/doc/ep_flux/math-doc/document/img64.png +0 -0
  249. data/doc/ep_flux/math-doc/document/img65.png +0 -0
  250. data/doc/ep_flux/math-doc/document/img66.png +0 -0
  251. data/doc/ep_flux/math-doc/document/img67.png +0 -0
  252. data/doc/ep_flux/math-doc/document/img68.png +0 -0
  253. data/doc/ep_flux/math-doc/document/img69.png +0 -0
  254. data/doc/ep_flux/math-doc/document/img7.png +0 -0
  255. data/doc/ep_flux/math-doc/document/img70.png +0 -0
  256. data/doc/ep_flux/math-doc/document/img71.png +0 -0
  257. data/doc/ep_flux/math-doc/document/img72.png +0 -0
  258. data/doc/ep_flux/math-doc/document/img73.png +0 -0
  259. data/doc/ep_flux/math-doc/document/img74.png +0 -0
  260. data/doc/ep_flux/math-doc/document/img75.png +0 -0
  261. data/doc/ep_flux/math-doc/document/img76.png +0 -0
  262. data/doc/ep_flux/math-doc/document/img77.png +0 -0
  263. data/doc/ep_flux/math-doc/document/img78.png +0 -0
  264. data/doc/ep_flux/math-doc/document/img79.png +0 -0
  265. data/doc/ep_flux/math-doc/document/img8.png +0 -0
  266. data/doc/ep_flux/math-doc/document/img80.png +0 -0
  267. data/doc/ep_flux/math-doc/document/img81.png +0 -0
  268. data/doc/ep_flux/math-doc/document/img82.png +0 -0
  269. data/doc/ep_flux/math-doc/document/img83.png +0 -0
  270. data/doc/ep_flux/math-doc/document/img84.png +0 -0
  271. data/doc/ep_flux/math-doc/document/img85.png +0 -0
  272. data/doc/ep_flux/math-doc/document/img86.png +0 -0
  273. data/doc/ep_flux/math-doc/document/img87.png +0 -0
  274. data/doc/ep_flux/math-doc/document/img88.png +0 -0
  275. data/doc/ep_flux/math-doc/document/img89.png +0 -0
  276. data/doc/ep_flux/math-doc/document/img9.png +0 -0
  277. data/doc/ep_flux/math-doc/document/img90.png +0 -0
  278. data/doc/ep_flux/math-doc/document/img91.png +0 -0
  279. data/doc/ep_flux/math-doc/document/img92.png +0 -0
  280. data/doc/ep_flux/math-doc/document/img93.png +0 -0
  281. data/doc/ep_flux/math-doc/document/img94.png +0 -0
  282. data/doc/ep_flux/math-doc/document/img95.png +0 -0
  283. data/doc/ep_flux/math-doc/document/img96.png +0 -0
  284. data/doc/ep_flux/math-doc/document/img97.png +0 -0
  285. data/doc/ep_flux/math-doc/document/img98.png +0 -0
  286. data/doc/ep_flux/math-doc/document/img99.png +0 -0
  287. data/doc/ep_flux/math-doc/document/index.html +101 -0
  288. data/doc/ep_flux/math-doc/document/internals.pl +258 -0
  289. data/doc/ep_flux/math-doc/document/labels.pl +265 -0
  290. data/doc/ep_flux/math-doc/document/next.png +0 -0
  291. data/doc/ep_flux/math-doc/document/next_g.png +0 -0
  292. data/doc/ep_flux/math-doc/document/node1.html +104 -0
  293. data/doc/ep_flux/math-doc/document/node10.html +164 -0
  294. data/doc/ep_flux/math-doc/document/node11.html +86 -0
  295. data/doc/ep_flux/math-doc/document/node12.html +166 -0
  296. data/doc/ep_flux/math-doc/document/node13.html +897 -0
  297. data/doc/ep_flux/math-doc/document/node14.html +1065 -0
  298. data/doc/ep_flux/math-doc/document/node15.html +72 -0
  299. data/doc/ep_flux/math-doc/document/node16.html +81 -0
  300. data/doc/ep_flux/math-doc/document/node2.html +82 -0
  301. data/doc/ep_flux/math-doc/document/node3.html +91 -0
  302. data/doc/ep_flux/math-doc/document/node4.html +149 -0
  303. data/doc/ep_flux/math-doc/document/node5.html +330 -0
  304. data/doc/ep_flux/math-doc/document/node6.html +99 -0
  305. data/doc/ep_flux/math-doc/document/node7.html +98 -0
  306. data/doc/ep_flux/math-doc/document/node8.html +83 -0
  307. data/doc/ep_flux/math-doc/document/node9.html +140 -0
  308. data/doc/ep_flux/math-doc/document/prev.png +0 -0
  309. data/doc/ep_flux/math-doc/document/prev_g.png +0 -0
  310. data/doc/ep_flux/math-doc/document/up.png +0 -0
  311. data/doc/ep_flux/math-doc/document/up_g.png +0 -0
  312. data/doc/ep_flux/math-doc/document.pdf +0 -0
  313. data/doc/ep_flux/math-doc/document.tex +2018 -0
  314. data/doc/gdir.html +412 -0
  315. data/doc/gdir_client.html +16 -0
  316. data/doc/gdir_connect_ftp-like.html +61 -0
  317. data/doc/gdir_server.html +33 -0
  318. data/doc/ggraph.html +1332 -0
  319. data/doc/gpcat.html +27 -0
  320. data/doc/gpcut.html +27 -0
  321. data/doc/gphys.html +501 -0
  322. data/doc/gphys_fft.html +183 -0
  323. data/doc/gphys_grads_io.html +69 -0
  324. data/doc/gphys_grib_io.html +82 -0
  325. data/doc/gphys_io.html +96 -0
  326. data/doc/gphys_io_common.html +18 -0
  327. data/doc/gphys_netcdf_io.html +283 -0
  328. data/doc/gplist.html +23 -0
  329. data/doc/gpmath.html +34 -0
  330. data/doc/gpmaxmin.html +30 -0
  331. data/doc/gpprint.html +32 -0
  332. data/doc/gpview.html +187 -0
  333. data/doc/grads2nc_with_gphys.html +23 -0
  334. data/doc/grads_gridded.html +307 -0
  335. data/doc/grib.html +101 -0
  336. data/doc/grid.html +240 -0
  337. data/doc/index.html +125 -0
  338. data/doc/index.rd +121 -0
  339. data/doc/netcdf_convention.html +136 -0
  340. data/doc/unumeric.html +127 -0
  341. data/doc/update +64 -0
  342. data/doc/varray.html +293 -0
  343. data/doc/varraycomposite.html +67 -0
  344. data/lib/numru/dclext_datetime_ax.rb +220 -0
  345. data/lib/numru/derivative.rb +298 -0
  346. data/lib/numru/gdir.rb +1038 -0
  347. data/lib/numru/gdir_connect_ftp-like.rb +149 -0
  348. data/lib/numru/ggraph.rb +4604 -0
  349. data/lib/numru/ggraph_on_merdional_section.rb +178 -0
  350. data/lib/numru/gphys/attribute.rb +130 -0
  351. data/lib/numru/gphys/attributenetcdf.rb +80 -0
  352. data/lib/numru/gphys/axis.rb +958 -0
  353. data/lib/numru/gphys/coordmapping.rb +286 -0
  354. data/lib/numru/gphys/coordtransform.rb +209 -0
  355. data/lib/numru/gphys/derivative.rb +297 -0
  356. data/lib/numru/gphys/ep_flux.rb +868 -0
  357. data/lib/numru/gphys/gpcommon.rb +52 -0
  358. data/lib/numru/gphys/gphys.rb +1121 -0
  359. data/lib/numru/gphys/gphys_fft.rb +538 -0
  360. data/lib/numru/gphys/gphys_grads_io.rb +212 -0
  361. data/lib/numru/gphys/gphys_grib_io.rb +214 -0
  362. data/lib/numru/gphys/gphys_io.rb +363 -0
  363. data/lib/numru/gphys/gphys_io_common.rb +126 -0
  364. data/lib/numru/gphys/gphys_netcdf_io.rb +767 -0
  365. data/lib/numru/gphys/gphys_nusdas_io.rb +78 -0
  366. data/lib/numru/gphys/grads_gridded.rb +1539 -0
  367. data/lib/numru/gphys/grib.rb +2005 -0
  368. data/lib/numru/gphys/grib_params.rb +1270 -0
  369. data/lib/numru/gphys/grid.rb +602 -0
  370. data/lib/numru/gphys/netcdf_convention.rb +366 -0
  371. data/lib/numru/gphys/subsetmapping.rb +332 -0
  372. data/lib/numru/gphys/unumeric.rb +452 -0
  373. data/lib/numru/gphys/varray.rb +1079 -0
  374. data/lib/numru/gphys/varraycomposite.rb +415 -0
  375. data/lib/numru/gphys/varraygrads.rb +225 -0
  376. data/lib/numru/gphys/varraygrib.rb +177 -0
  377. data/lib/numru/gphys/varraynetcdf.rb +348 -0
  378. data/lib/numru/gphys/varraynusdas.rb +59 -0
  379. data/lib/numru/gphys.rb +7 -0
  380. data/lib/numru/htdir.rb +170 -0
  381. data/lib/numru/vizshot.rb +697 -0
  382. data/sample/cira86_to_nc.rb +122 -0
  383. data/sample/druby_cli1.rb +21 -0
  384. data/sample/druby_cli2.rb +34 -0
  385. data/sample/druby_serv1.rb +30 -0
  386. data/sample/druby_serv2.rb +64 -0
  387. data/sample/ep_flux/demo_NCEP_1.rb +48 -0
  388. data/sample/ep_flux/demo_NCEP_2.rb +57 -0
  389. data/sample/ep_flux/demo_NCEP_3.rb +81 -0
  390. data/sample/ggraph_latlon_labelling_dr002690.rb +159 -0
  391. data/sample/ggraph_mapfit-axes_dr002687.rb +131 -0
  392. data/sample/map_projection.rb +121 -0
  393. data/test/test_ep_flux.rb +533 -0
  394. data/testdata/T.jan.ctl +12 -0
  395. data/testdata/T.jan.dat +0 -0
  396. data/testdata/T.jan.grib +0 -0
  397. data/testdata/T.jan.nc +0 -0
  398. data/testdata/T.jan.packed.withmiss.nc +0 -0
  399. data/testdata/UV.jan.nc +0 -0
  400. data/testdata/cira86.dat +1332 -0
  401. metadata +527 -0
data/bin/gpvect ADDED
@@ -0,0 +1,657 @@
1
+ #!/usr/bin/env ruby
2
+ ##################################################
3
+ =begin
4
+ =gpvect
5
+
6
+ Drawing 2-dim vector fiels. Contour/tone of scalar field can be plotted
7
+ simultaneously.
8
+
9
+ ==USAGE
10
+
11
+ The first command form is for only vector field plotting.
12
+
13
+ % gpvect [options] gturl_x gturl_y ....
14
+
15
+ where the format of the gturl is
16
+
17
+ path@varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]
18
+
19
+ The command loads two gphys variables in each time and draws
20
+ vector field whose x and y components are the first and the second argument,
21
+ gturl_x gturl_y.
22
+
23
+ When the slice parameters are the same throughout the all Gphys variables,
24
+ the following form can be used:
25
+
26
+ % gpvect --slice <slice> [options] file@var_x file@var_y ...
27
+
28
+ where the format of the slice is
29
+
30
+ dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]
31
+
32
+
33
+ The second command form is
34
+
35
+ % gpvect --scalar [options] gturl_c gturl_x gturl_y ....
36
+
37
+ In this case the command loads three gphys variables in each time
38
+ and draws a contour/tone of the first argument gturl_c, and vector fields
39
+ whose x and y components are the second and the thrid argument,
40
+ gturl_x gturl_y.
41
+
42
+
43
+ ==OPTIONS
44
+
45
+ ===GLOBAL OPTIONS
46
+
47
+ --help : print this message.
48
+
49
+ --slice url : set the slicing parameters.
50
+
51
+ --wsn [1-4] : set work staion number. each number represent
52
+ output device:
53
+ 1 : X window.
54
+ 2 : PS file. (named dcl.ps)
55
+ 3 : Tcl/Tk file.
56
+ 4 : GTK Windows (depend on dcl-5.3)
57
+
58
+ --itr [1-4,5-7,10-15,20-23,30-33]
59
+ : set axis scale. default is 1.
60
+ 1 : linear scale for x/y axis
61
+ 2 : linear scale for x , log scale for y axis
62
+ 3 : log scale for x , linear scale for y axis
63
+ 4 : log scale for x/y axis
64
+
65
+ --similar [simfac,vxoff,vyoff]
66
+ : (for 5<=itr<=7) set similarity parameters
67
+ which are fed in DCL.grssim.
68
+
69
+ --map_axis [uxc,uyc,rot]
70
+ : (for 10<=itr<=33) set mapping parameters
71
+ which are fed in DCL.umpcnt.
72
+
73
+ --title : set title of figure
74
+
75
+ --aspect <aspect> : set aspect ratio of Viewport. default is 2.0.
76
+
77
+ --noannotate : not draw annotations.
78
+
79
+ --animate/anim <dim> : plot animation along <dim>.
80
+ <dim> must be name of dimension.
81
+
82
+ --alternate, --Ga : enable to backing store.
83
+
84
+ --nowait, --Gw : not wait for any actions if animate
85
+
86
+ --reverse, --Gr : plot animation reversible if animate
87
+
88
+ --smooth, --Gaw : equal to --anlternate && --nowait
89
+
90
+ --exch : exchange(transpose) x/y axis.
91
+
92
+ --mean <dim> : mean along axis <dim>.
93
+
94
+ --m, --map <map_type> : plot map. itr number must be set.
95
+ this option is neglect if itr number is 1-4.
96
+ abailable map type is
97
+ coast_world, border_world, plate_world, state_usa,
98
+ coast_japan, pref_japan
99
+
100
+ --scalar : plot scaler field (contour,tone)
101
+
102
+ ===CONTOUR/TONE OPTIONS
103
+
104
+ --shade : make contour and tone plot.
105
+
106
+ --noshade : make contour plot, without tone.
107
+
108
+ --nocont : make tone plot, without contour.
109
+
110
+ --range [min:max] : set min/max value for contour/tone plot.
111
+ min or max must be set.
112
+
113
+ --crange : set min/max value for contour plot. this is more
114
+ dominant than --range
115
+
116
+ --srange : set min/max value for tone plot. this is more
117
+ dominant than --interval/int
118
+
119
+ --interval,--int [num]: set interval value for contour/tone plot.
120
+ set the number of lines if you set negative value.
121
+
122
+ --cint : set interval value for contour plot. this is more
123
+ dominant than --interval/int
124
+
125
+ --sint : set interval value for tone plot. this is more
126
+ dominant than --interval/int.
127
+
128
+ --levels : set values of contour/tone levels.
129
+
130
+ --clevels : set values of contour levels.
131
+
132
+ --slevels : set tone of contour levels.
133
+
134
+ --patterns : set each patterns for tone plot.
135
+
136
+ ===VECTOR OPTIONS
137
+
138
+ --noflow_vect : DCL::ugvect is used.
139
+
140
+ --xintv <xintv> : (Effective only if flow_vect) interval of data
141
+ sampling in x
142
+
143
+ --yintv <yintv> : (Effective only if flow_vect) interval of data
144
+ sampling in y
145
+
146
+ --factor <factor> : (Effective only if flow_vect) scaling factor to
147
+ strech/reduce the arrow lengths
148
+
149
+ --unit_vect : Show the unit vector
150
+
151
+ --max_unit_vect : (Effective only if flow_vect && unit_vect)
152
+ use the maximum arrows to scale the unit vector
153
+
154
+ ==EXAMPLES
155
+
156
+ For the first command format,
157
+
158
+ % gpvect data.nc@vx data.nc@vy
159
+ % gpvect data.nc@vx,lon=0 data.nc@vy,lon=0
160
+ % gpvect --scalar data.nc@temp datax.nc@vx datay.nc@vy
161
+ % gpvect --scalar --anim t --nocont data.nc@temp data.nc@vx data.nc@vy
162
+
163
+ For the second command format,
164
+ % gpvect --scalar --slice lat=0 data.nc@temp data.nc@vx data.nc@vy
165
+
166
+
167
+ ==HISTORY
168
+
169
+ 2007/07/02 S Takehiro (created based on gpview)
170
+ 2007/07/04 S Takehiro (polar coodinate vector component conversion
171
+ from U to N coordinates moved to ggraph.rb)
172
+ 2007/07/06 S Takehiro (default title was set when --scalar option is given)
173
+
174
+ =end
175
+ #################################################
176
+ require "getoptlong" # for option_parse
177
+ require "numru/ggraph" # ggraph library
178
+ require "numru/gphys/gpcommon"
179
+
180
+ include NumRu
181
+
182
+ #####################################################
183
+ ## Default param.
184
+
185
+ VIEWPORT = [0.15,0.85,0.2,0.55]
186
+ URLfmt = "path@varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]"
187
+
188
+ #####################################################
189
+ def GGraph::annotate(str_ary)
190
+ lclip = DCL.sgpget('lclip')
191
+ DCL.sgpset('lclip',nil)
192
+ lnum = 0
193
+ str_ary.each{ |str|lnum += 1 }
194
+ charsize = 0.7 * DCL.uzpget('rsizec1')
195
+ dvx = 0.01
196
+ dvy = charsize*1.5
197
+ raise TypeError,"Array expected" if ! str_ary.is_a?(Array)
198
+ vxmin,vxmax,vymin,vymax = DCL.sgqvpt
199
+ vx = 0.70
200
+ vy = 0.045 + (lnum-1)*dvy
201
+ str_ary.each{|str|
202
+ DCL::sgtxzv(vx,vy,str,charsize,0,-1,1)
203
+ vy -= dvy
204
+ }
205
+ DCL.sgpset('lclip',lclip)
206
+ nil
207
+ end
208
+
209
+ def each_along_dims(gp1, gp2, gp3, loopdim)
210
+
211
+ raise ArgumentError,"1st argument must be an GPhys." if !gp1.is_a?(GPhys)
212
+ raise ArgumentError,"1st argument must be an GPhys." if !gp2.is_a?(GPhys)
213
+ raise ArgumentError,"1st argument must be an GPhys." if !gp3.is_a?(GPhys)
214
+
215
+ if loopdim.is_a?(String)
216
+ dimname = loopdim
217
+ elsif
218
+ if loopdim < 0
219
+ dimname = gp1.coord(gphys.rank + loopdim).name
220
+ else
221
+ dimname = gp1.coord(loopdim).name
222
+ end
223
+ else
224
+ raise ArgumentError,"loopdims must consist of Integer and/or String"
225
+ end
226
+
227
+ loopdim_na = gp1.coord(dimname).val # get coord ary
228
+ loopdim_na = loopdim_na[-1..0] if $OPT_reverse || $OPT_Gr # reverse
229
+ loopdim_na.each { |x|
230
+ yield( gp1.cut(dimname=>x), gp2.cut(dimname=>x), gp3.cut(dimname=>x) )
231
+ }
232
+ end
233
+
234
+
235
+ def draw_setup(gp)
236
+
237
+ # set missing value
238
+ DCLExt.gl_set_params('lmiss'=>true)
239
+
240
+ # fontsize
241
+ DCL.sgpset('lcntl', false)
242
+ # DCL.uzfact(0.7)
243
+ DCL.sgpset('lfull', true) # use full area in the window
244
+ DCL.sgpset('lfprop',true) # use proportional font
245
+ DCL.uscset('cyspos', 'B' ) # move unit y axis
246
+
247
+ # viewport size
248
+ GGraph.set_fig('viewport'=>$VIEWPORT)
249
+ GGraph.set_fig( 'itr'=>($OPT_itr == nil) ? 1 : $OPT_itr.to_i )
250
+ GGraph.set_fig("xrev"=>"units:mb,units:hPa,units:millibar,positive:down",
251
+ "yrev"=>"units:mb,units:hPa,units:millibar,positive:down")
252
+
253
+ # set options
254
+ min_range, max_range = __split_range($OPT_range)
255
+ min_crange, max_crange = __split_range($OPT_crange)
256
+ min_srange, max_srange = __split_range($OPT_srange)
257
+ GGraph.set_linear_contour_options(
258
+ 'int' => ( $OPT_cint || $OPT_interval || $OPT_int ),
259
+ 'min' => ( min_crange || min_range ),
260
+ 'max' => ( max_crange || max_range )
261
+ )
262
+ GGraph.set_linear_tone_options(
263
+ 'int' => ( $OPT_sint || $OPT_interval || $OPT_int ),
264
+ 'min' => ( min_srange || min_range ),
265
+ 'max' => ( max_srange || max_range )
266
+ )
267
+ if ( $OPT_clevels || $OPT_levels )
268
+ $OPT_clevels=($OPT_clevels || $OPT_levels).split(',').map!{|v| v.to_f }
269
+ end
270
+
271
+ if ( $OPT_slevels || $OPT_levels )
272
+ $OPT_slevels=($OPT_slevels||$OPT_levels).split(',').map!{|v| v.to_f }
273
+ p $OPT_slevels
274
+ end
275
+
276
+ if ( $OPT_patterns )
277
+ $OPT_patterns=$OPT_patterns.split(',').map!{|v| v.to_f }
278
+ end
279
+
280
+ # judge draw kind
281
+ gp_rank = gp.rank
282
+ gp_rank = gp_rank - 1 if ( $OPT_animate || $OPT_anim )
283
+
284
+ raise "The rank of gphys variables must be >=2 " if (gp_rank < 2)
285
+
286
+ if ( $OPT_scalar )
287
+ if ( !$OPT_noshade && $OPT_nocont )
288
+ draw_flag = "nocont"
289
+ elsif ( $OPT_noshade && !$OPT_nocont )
290
+ draw_flag = "noshade"
291
+ elsif ( !$OPT_noshade && !$OPT_nocont )
292
+ draw_flag = "full"
293
+ end
294
+ else
295
+ draw_flag = 'noscalar'
296
+ end
297
+
298
+ # similar projection
299
+ if ($OPT_similar)
300
+ if /([\d\-.]*),([\d\-.]*),([\d\-.]*)/ =~ $OPT_similar
301
+ similar=[$1.to_f,$2.to_f,$3.to_f]
302
+ elsif /([\d\-.]*),([\d\-.]*)/ =~ $OPT_similar
303
+ similar=[$1.to_f,$2.to_f,0]
304
+ elsif /([\d\-.]*)/ =~ $OPT_similar
305
+ similar=[$1.to_f,0,0]
306
+ end
307
+ GGraph.set_fig('similar'=>similar)
308
+ end
309
+
310
+ # similar projection
311
+ if ($OPT_map_axis)
312
+ if /([\d\-.]*),([\d\-.]*),([\d\-.]*)/ =~ $OPT_map_axis
313
+ map_axis=[$1.to_f,$2.to_f,$3.to_f]
314
+ elsif /([\d\-.]*),([\d\-.]*)/ =~ $OPT_map_axis
315
+ map_axis=[$1.to_f,$2.to_f,0]
316
+ elsif /([\d\-.]*)/ =~ $OPT_similar
317
+ map_axis=[$1.to_f,0,0]
318
+ end
319
+ GGraph.set_fig('map_axis'=>map_axis)
320
+ end
321
+
322
+
323
+ # map
324
+ if ( $OPT_m || $OPT_map)
325
+ map_type = "coast_world" if $OPT_m
326
+ map_type = $OPT_map if $OPT_map
327
+ GGraph::set_map(map_type=>true)
328
+ end
329
+
330
+ # vector
331
+ if ($OPT_noflow_vect)
332
+ $flow_vect = false
333
+ else
334
+ $flow_vect = true
335
+ end
336
+
337
+ if ($OPT_unit_vect)
338
+ $unit_vect = true
339
+ else
340
+ $unit_vect = false
341
+ end
342
+
343
+ if ($OPT_max_unit_vect)
344
+ $max_unit_vect = true
345
+ else
346
+ $max_unit_vect = false
347
+ end
348
+
349
+ $xintv=($OPT_xintv||1).to_i
350
+ $yintv=($OPT_yintv||1).to_i
351
+ $factor=($OPT_factor||1).to_f
352
+
353
+ return draw_flag
354
+
355
+ end
356
+
357
+ def draw(gp, gpux, gpuy, draw_flag)
358
+
359
+ # draw contour/tone
360
+ case draw_flag
361
+ when "full"
362
+ GGraph.tone(gp,
363
+ true,
364
+ "title"=>$OPT_title,
365
+ "annotate"=>$annotate,
366
+ "transpose"=>$OPT_exch,
367
+ "levels"=>$OPT_slevels,
368
+ "patterns"=>$OPT_patterns
369
+ )
370
+ GGraph.contour(gp, false, "transpose"=>$OPT_exch,"levels"=>$OPT_clevels)
371
+ vnewframe = false
372
+
373
+ when "nocont"
374
+ GGraph.tone(gp,
375
+ true,
376
+ "title"=>$OPT_title,
377
+ "annotate"=>$annotate,
378
+ "transpose"=>$OPT_exch,
379
+ "levels"=>$OPT_slevels,
380
+ "patterns"=>$OPT_patterns
381
+ )
382
+ vnewframe = false
383
+
384
+ when "noshade"
385
+ mj = DCL.udpget('indxmj')
386
+ mn = DCL.udpget('indxmn')
387
+ GGraph.contour(gp,
388
+ true,
389
+ "title" =>$OPT_title,
390
+ "label" =>true,
391
+ "annotate"=>$annotate,
392
+ "transpose"=>$OPT_exch,
393
+ "levels"=>$OPT_clevels
394
+ )
395
+ vnewframe = false
396
+
397
+ when "noscalar"
398
+ vnewframe = true
399
+ end
400
+
401
+ # draw vector
402
+
403
+ if ($OPT_itr == '5')
404
+ GGraph.vector( gpux, gpuy, newframe=vnewframe,
405
+ "title"=>$OPT_title,
406
+ "annotate"=>$annotate,
407
+ "exchange"=>$OPT_exch,
408
+ "flow_vect"=>false,
409
+ "flow_itr5"=>true,
410
+ "xintv"=>$xintv,
411
+ "yintv"=>$yintv,
412
+ "factor"=>$factor,
413
+ "unit_vect"=>$unit_vect,
414
+ "max_unit_vect"=>$max_unit_vect
415
+ )
416
+ else
417
+ GGraph.vector(gpux, gpuy, newframe=vnewframe,
418
+ "title"=>$OPT_title,
419
+ "annotate"=>$annotate,
420
+ "exchange"=>$OPT_exch,
421
+ "flow_vect"=>$flow_vect,
422
+ "xintv"=>$xintv,
423
+ "yintv"=>$yintv,
424
+ "factor"=>$factor,
425
+ "unit_vect"=>$unit_vect,
426
+ "max_unit_vect"=>$max_unit_vect
427
+ )
428
+ end
429
+
430
+ # color bar
431
+ if ( draw_flag == "full") || ( draw_flag == "nocont")
432
+ GGraph::color_bar(
433
+ "left" => true,
434
+ "landscape" => true
435
+ )
436
+ end
437
+
438
+ end
439
+
440
+
441
+ def set_vpsize( default_vp, aspect=2.0 )
442
+
443
+ raise "#{aspect} must be a positive Numeric" if (aspect.to_f <= 0.0)
444
+ aspect = aspect.to_f
445
+
446
+ # default viewport
447
+ x0 = default_vp[0]; x1 = default_vp[1]
448
+ y0 = default_vp[2]; y1 = default_vp[3]
449
+ # viewport size
450
+ hlength = x1 - x0
451
+ vlength = y1 - y0
452
+ # center grid of viewport
453
+ cen_of_vp = [ x0 + hlength/2.0, y0 + vlength/2.0 ]
454
+
455
+ if aspect <= 2.0
456
+ hlength = vlength * aspect
457
+ x0 = cen_of_vp[0] - hlength/2.0
458
+ x1 = cen_of_vp[0] + hlength/2.0
459
+ else
460
+ vlength = hlength / aspect
461
+ y0 = cen_of_vp[1] - vlength/2.0
462
+ y1 = cen_of_vp[1] + vlength/2.0
463
+ end
464
+
465
+ return [ x0, x1, y0, y1 ]
466
+
467
+ end
468
+
469
+ def __split_range(range)
470
+
471
+ if /(.*):(.*)/ =~ range
472
+ if $1 == ""
473
+ min = nil
474
+ else
475
+ min = $1.to_f
476
+ end
477
+ if $2 == ""
478
+ max = nil
479
+ else
480
+ max = $2.to_f
481
+ end
482
+ elsif range == nil
483
+ min = max = nil
484
+ else
485
+ raise "invalid range: variable subset specification error. split range with ':'\n\n"
486
+ end
487
+
488
+ return min, max
489
+ end
490
+
491
+
492
+ #####################################################
493
+ ###++++++ Main Routine ++++++###
494
+
495
+ ## parse options
496
+ parser = GetoptLong.new
497
+ parser.set_options(
498
+ ### global option ###
499
+ ['--slice', GetoptLong::REQUIRED_ARGUMENT],
500
+ ['--wsn', GetoptLong::REQUIRED_ARGUMENT],
501
+ ['--itr', GetoptLong::REQUIRED_ARGUMENT],
502
+ ['--similar', GetoptLong::REQUIRED_ARGUMENT],
503
+ ['--map_axis', GetoptLong::REQUIRED_ARGUMENT],
504
+ ['--title', GetoptLong::REQUIRED_ARGUMENT],
505
+ ['--aspect', GetoptLong::REQUIRED_ARGUMENT],
506
+ ['--anim', GetoptLong::REQUIRED_ARGUMENT],
507
+ ['--animate', GetoptLong::REQUIRED_ARGUMENT],
508
+ ['--noannotate', GetoptLong::NO_ARGUMENT],
509
+ ['--alternate', GetoptLong::NO_ARGUMENT],
510
+ ['--Ga', GetoptLong::NO_ARGUMENT],
511
+ ['--nowait', GetoptLong::NO_ARGUMENT],
512
+ ['--Gw', GetoptLong::NO_ARGUMENT],
513
+ ['--smooth', GetoptLong::NO_ARGUMENT],
514
+ ['--Gaw', GetoptLong::NO_ARGUMENT],
515
+ ['--exch', GetoptLong::NO_ARGUMENT],
516
+ ['--reverse', GetoptLong::NO_ARGUMENT],
517
+ ['--Gr', GetoptLong::NO_ARGUMENT],
518
+ ['--mean', GetoptLong::REQUIRED_ARGUMENT],
519
+ ['--map', GetoptLong::REQUIRED_ARGUMENT],
520
+ ['--m', GetoptLong::NO_ARGUMENT],
521
+ ['--scalar', GetoptLong::NO_ARGUMENT],
522
+ ### tone or cont option ###
523
+ ['--nocont', GetoptLong::NO_ARGUMENT],
524
+ ['--noshade', GetoptLong::NO_ARGUMENT],
525
+ ['--range', GetoptLong::REQUIRED_ARGUMENT],
526
+ ['--crange', GetoptLong::REQUIRED_ARGUMENT],
527
+ ['--srange', GetoptLong::REQUIRED_ARGUMENT],
528
+ ['--interval', GetoptLong::REQUIRED_ARGUMENT],
529
+ ['--int', GetoptLong::REQUIRED_ARGUMENT],
530
+ ['--cint', GetoptLong::REQUIRED_ARGUMENT],
531
+ ['--sint', GetoptLong::REQUIRED_ARGUMENT],
532
+ ['--levels', GetoptLong::REQUIRED_ARGUMENT],
533
+ ['--clevels', GetoptLong::REQUIRED_ARGUMENT],
534
+ ['--slevels', GetoptLong::REQUIRED_ARGUMENT],
535
+ ['--patterns', GetoptLong::REQUIRED_ARGUMENT],
536
+ ### vector option ###
537
+ ['--noflow_vect', GetoptLong::NO_ARGUMENT],
538
+ ['--xintv', GetoptLong::REQUIRED_ARGUMENT],
539
+ ['--yintv', GetoptLong::REQUIRED_ARGUMENT],
540
+ ['--factor', GetoptLong::REQUIRED_ARGUMENT],
541
+ ['--unit_vect', GetoptLong::NO_ARGUMENT],
542
+ ['--max_unit_vect', GetoptLong::NO_ARGUMENT],
543
+ ['--help', GetoptLong::NO_ARGUMENT]
544
+ # ['--version', GetoptLong::NO_ARGUMENT] # to be defined
545
+ )
546
+ begin
547
+ parser.each_option do |name, arg|
548
+ eval "$OPT_#{name.sub(/^--/, '').gsub(/-/, '_')} = '#{arg}'" # strage option value to $OPT_val
549
+ end
550
+ rescue
551
+ help
552
+ raise
553
+ end
554
+
555
+ ## Print out help message
556
+ if ($OPT_help)
557
+ help
558
+ exit(1)
559
+ end
560
+
561
+ ## set some figure option
562
+ DCL::swlset('lwait', false) if ($OPT_nowait || $OPT_Gw || $OPT_smooth || $OPT_Gaw)
563
+ # set wait or nowait
564
+ DCL::swlset('lalt', true) if ($OPT_alternate || $OPT_Ga || $OPT_smooth || $OPT_Gaw)
565
+ # set backing store option
566
+ if ($OPT_noannotate)
567
+ $annotate = false
568
+ else
569
+ $annotate = true
570
+ end
571
+
572
+ ## decide VIEWPORT
573
+ $VIEWPORT = set_vpsize( VIEWPORT, ($OPT_aspect||2.0) )
574
+
575
+ ## tune the size of axis parameters.
576
+ DCL.uzfact(0.7)
577
+
578
+ ## draw figure
579
+ loopdim = ( $OPT_animate || $OPT_anim )
580
+ loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
581
+
582
+ ## open work station
583
+ DCL.gropn($OPT_wsn||1)
584
+
585
+ ## open netcdf variables
586
+
587
+ while ARGV[0] do
588
+ gturl = ARGV[0]
589
+ gturl = gturl+','+$OPT_slice if $OPT_slice
590
+ gp = GPhys::IO.open_gturl(gturl)
591
+ print " Reading #{gturl}\n"
592
+
593
+ ARGV.shift
594
+
595
+ if ( $OPT_scalar )
596
+ gturlx = ARGV[0]
597
+ gturlx = gturlx+','+$OPT_slice if $OPT_slice
598
+
599
+ gpux = GPhys::IO.open_gturl(gturlx)
600
+ print " Reading #{gturlx}\n"
601
+ ARGV.shift
602
+ else
603
+ gpux = gp
604
+ end
605
+
606
+ gturly = ARGV[0]
607
+ gturly = gturly+','+$OPT_slice if $OPT_slice
608
+
609
+ gpuy = GPhys::IO.open_gturl(gturly)
610
+ print " Reading #{gturly}\n"
611
+ ARGV.shift
612
+
613
+ sh = gp.shape
614
+ if sh != gpux.shape
615
+ raise ArgumentError, "shapes of 1st and 2nd variables do not agree with each other"
616
+ elsif sh != gpuy.shape
617
+ raise ArgumentError, "shapes of 1st and 3rd variables do not agree with each other"
618
+ end
619
+
620
+ ## mean along any axis
621
+ if ($OPT_mean)
622
+ dims = ($OPT_mean).split(/\s*,\s*/)
623
+ dims.each{|dim|
624
+ dim = dim.to_i if dim.to_i.to_s == dim
625
+ gp = gp.mean(dim)
626
+ gpux = gpux.mean(dim)
627
+ gpuy = gpuy.mean(dim)
628
+ }
629
+ end
630
+
631
+ # set title
632
+ if !$OPT_title && $OPT_scalar
633
+ gpnm = gp.data.get_att('long_name') || gp.name
634
+ gpuxnm = gpux.data.get_att('long_name') || gpux.name
635
+ gpuynm = gpuy.data.get_att('long_name') || gpuy.name
636
+ $OPT_title = gpnm+'('+gpuxnm+','+gpuynm+')'
637
+ end
638
+
639
+ # draw margin infomation
640
+ GGraph.margin_info($0, gturl+'('+gturlx+','+gturly+')') if $annotate && $OPT_scalar
641
+ GGraph.margin_info($0, gturl+','+gturly) if $annotate && !$OPT_scalar
642
+
643
+ kind_of_fig = draw_setup(gp) # determine figure kind
644
+
645
+ if loopdim # animation
646
+ each_along_dims(gp, gpux, gpuy, loopdim){|gp_sub,gpux_sub,gpuy_sub|
647
+ draw(gp_sub,gpux_sub,gpuy_sub, kind_of_fig)
648
+ }
649
+ else
650
+ draw( gp, gpux, gpuy, kind_of_fig ) # single figure
651
+ end
652
+
653
+ end
654
+
655
+ DCL.grcls
656
+
657
+