gphys 1.2.2.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -1,22 +1,34 @@
1
- Copyright (c) 2012 Eriko Nishimoto
1
+ GPhys is copyrighted free software by Takeshi Horinouchi and
2
+ GFD Dennou Club (http://www.gfd-dennou.org/).
2
3
 
3
- MIT License
4
+ Copyright 2003-2015 (C) Takeshi Horinouchi and GFD Dennou Club
5
+ (http://www.gfd-dennou.org/) All rights reserved.
4
6
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are
9
+ met:
12
10
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
11
+ 1. Redistributions of source code must retain the above copyright
12
+ notice, this list of conditions and the following disclaimer.
15
13
 
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+ 2. Redistributions in binary form must reproduce the above copyright
15
+ notice, this list of conditions and the following disclaimer in
16
+ the documentation and/or other materials provided with the
17
+ distribution.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY GFD DENNOU CLUB AND CONTRIBUTORS ``AS IS''
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
21
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22
+ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GFD DENNOU CLUB OR
23
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ The views and conclusions contained in the software and documentation
32
+ are those of the authors and should not be interpreted as representing
33
+ official policies, either expressed or implied, of Takeshi Horinouchi
34
+ and GFD Dennou Club.
data/Rakefile CHANGED
@@ -1 +1,2 @@
1
1
  require "bundler/gem_tasks"
2
+
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "gphys"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/gpcat CHANGED
@@ -21,6 +21,12 @@ gpcat - Read a variable in multiple NetCDF files, concatenate and write them to
21
21
  variable name (required).
22
22
  :-s sfmt, --slice sfmt
23
23
  slice,thinnng (optional).
24
+ :-m axis --mean axis
25
+ mean along axis (optional)
26
+ :-d axis --stddev axis
27
+ stddev along axis (optional)
28
+ :-e axis --eddy axis
29
+ eddy along axis (optional)
24
30
  :-o file, --output file
25
31
  output filename (optional). Default output filename is 'gphys.nc'.
26
32
 
@@ -32,6 +38,8 @@ gpcat - Read a variable in multiple NetCDF files, concatenate and write them to
32
38
  2005/08/21 S Takehiro (global attributes copied to the output file)
33
39
  2005/08/23 S Takehiro (common methods to gp* command moved to gpcommon.rb)
34
40
  2010/03/10 Y SASAKI (change help block into RD format)
41
+ 2014/03/10 S Takehiro (big fix for ruby 1.9)
42
+ 2015/02/03 S Takehiro (option --mean, --stddev, --eddy added)
35
43
 
36
44
  =end
37
45
 
@@ -41,7 +49,6 @@ include NumRu
41
49
 
42
50
  require "getoptlong"
43
51
 
44
-
45
52
  #-------------------- Slice parameter analysis --------------------
46
53
  def parse_slice(arg_slice)
47
54
 
@@ -56,7 +63,7 @@ def parse_slice(arg_slice)
56
63
  case subset
57
64
  when /(.*):(.*):(.*)/
58
65
  slice[dimname] = ($1.to_f)..($2.to_f)
59
- thinning[dimname] = {0..-1,$3.to_i}
66
+ thinning[dimname] = {0..-1=>$3.to_i}
60
67
  when /(.*):(.*)/
61
68
  slice[dimname] = ($1.to_f)..($2.to_f)
62
69
  else
@@ -80,6 +87,9 @@ parser = GetoptLong.new(
80
87
  ["--variable", "-v", GetoptLong::REQUIRED_ARGUMENT],
81
88
  ["--output", "-o", GetoptLong::REQUIRED_ARGUMENT],
82
89
  ["--slice", "-s", GetoptLong::REQUIRED_ARGUMENT],
90
+ ["--mean", "-m", GetoptLong::REQUIRED_ARGUMENT],
91
+ ["--stddev", "-d", GetoptLong::REQUIRED_ARGUMENT],
92
+ ["--eddy", "-e", GetoptLong::REQUIRED_ARGUMENT],
83
93
  ["--help", "-h", GetoptLong::NO_ARGUMENT ])
84
94
  begin
85
95
  parser.each{|opt, arg|
@@ -87,6 +97,9 @@ begin
87
97
  when "--variable" then eval "$OPT_var='#{arg}'"
88
98
  when "--output" then eval "$OPT_output='#{arg}'"
89
99
  when "--slice" then eval "$OPT_slice='#{arg}'"
100
+ when "--mean" then eval "$OPT_mean='#{arg}'"
101
+ when "--stddiv" then eval "$OPT_stddev='#{arg}'"
102
+ when "--eddy" then eval "$OPT_eddy='#{arg}'"
90
103
  when "--help" then eval "$HELP=true"
91
104
  else
92
105
  raise "must not happen"
@@ -140,6 +153,34 @@ end
140
153
  gphys = gphys.cut(slice) if slice
141
154
  gphys = gphys[thinning] if thinning
142
155
 
156
+ #------------------- mean/eddy gphys variable --------------------
157
+ ## mean along any axis
158
+ if ($OPT_mean)
159
+ dims_mean = ($OPT_mean).split(/\s*,\s*/)
160
+ dims_mean = dims_mean.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
161
+ dims_mean.each{|dim|
162
+ gphys = gphys.mean(dim)
163
+ }
164
+ end
165
+
166
+ ## standard deviation along any axis
167
+ if ($OPT_stddev)
168
+ dims_stddev = ($OPT_stddev).split(/\s*,\s*/)
169
+ dims_stddev = dims_stddev.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
170
+ dims_stddev.each{|dim|
171
+ gphys = gphys.stddev(dim)
172
+ }
173
+ end
174
+
175
+ ## deviation from mean along any axis
176
+ if ($OPT_eddy)
177
+ dims_eddy = ($OPT_eddy).split(/\s*,\s*/)
178
+ dims_eddy = dims_eddy.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
179
+ dims_eddy.each{|dim|
180
+ gphys = gphys.eddy(dim)
181
+ }
182
+ end
183
+
143
184
  #---------------------- Output GPhys variable ------------------------
144
185
  GPhys::IO.write( outncfile, gphys )
145
186
  NetCDF_Conventions.add_history(outncfile, File.basename($0)+" "+ARGV[0])
data/bin/gpcut CHANGED
@@ -18,6 +18,8 @@ gpcut - Extract, slicing and thinning a GPhys variable.
18
18
  print this message.
19
19
  :-m dim, --mean dim
20
20
  average along dim axis (optional).
21
+ :-e dim, --eddy dim:
22
+ deviation from mean along dim axis (optional).
21
23
  :-o file, --output file
22
24
  output filename (optional).
23
25
  Default output filename is 'gphys.nc'.
@@ -31,6 +33,7 @@ gpcut - Extract, slicing and thinning a GPhys variable.
31
33
  2005/08/23 S Takehiro (common methods to gp* command moved to gpcommon.rb)
32
34
  2010/03/10 Y SASAKI (change help block into RD format)
33
35
  2012/02/19 S Takehiro (description for gturl format updated)
36
+ 2014/04/23 S Takehiro (add --eddy option)
34
37
 
35
38
  =end
36
39
 
@@ -47,12 +50,14 @@ URLfmt = "path[@|/]varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]"
47
50
  #---------------------- Option Configuration ----------------------
48
51
  parser = GetoptLong.new(
49
52
  ["--mean", "-m", GetoptLong::REQUIRED_ARGUMENT],
53
+ ['--eddy', "-e", GetoptLong::REQUIRED_ARGUMENT],
50
54
  ["--output", "-o", GetoptLong::REQUIRED_ARGUMENT],
51
55
  ["--help", "-h", GetoptLong::NO_ARGUMENT ])
52
56
  begin
53
57
  parser.each{|opt, arg|
54
58
  case opt
55
59
  when "--mean" then eval "$OPT_mean='#{arg}'"
60
+ when "--eddy" then eval "$OPT_eddy='#{arg}'"
56
61
  when "--output" then eval "$OPT_output='#{arg}'"
57
62
  when "--help" then eval "$OPT_help=true"
58
63
  else
@@ -86,6 +91,7 @@ gphys = GPhys::IO.open_gturl(gturl)
86
91
  outncfile.copy_global_att(gphys) # Copy global attributes (only for NetCDF)
87
92
 
88
93
  #----------------------- mean along any axis -------------------------
94
+ ## mean along any axis
89
95
  if ($OPT_mean)
90
96
  dims = ($OPT_mean).split(/\s*,\s*/)
91
97
  dims.each{|dim|
@@ -94,6 +100,16 @@ if ($OPT_mean)
94
100
  }
95
101
  end
96
102
 
103
+ ## deviation from mean along any axis
104
+ if ($OPT_eddy)
105
+ dims_eddy = ($OPT_eddy).split(/\s*,\s*/)
106
+ dims_eddy = dims_eddy.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
107
+ dims_eddy.each{|dim|
108
+ dim = dim.to_i if dim.to_i.to_s == dim
109
+ gphys = gphys.eddy(dim)
110
+ }
111
+ end
112
+
97
113
 
98
114
  #---------------------- Output GPhys variable ------------------------
99
115
  GPhys::IO.write( outncfile, gphys )
data/bin/gpvect CHANGED
@@ -111,6 +111,13 @@ gturl_x gturl_y.
111
111
  :--scalar:
112
112
  plot scaler field (contour,tone)
113
113
 
114
+ :-xx:yyyy=value:
115
+ specify Dennou Club Library internal variable.
116
+ 'xx' is a package name prefix of DCL (eg. sg=>sgpack).
117
+ 'yy' is a variable name of DCL.
118
+ 'value' is a value of the DCL variable.
119
+
120
+
114
121
  ===CONTOUR/TONE OPTIONS
115
122
 
116
123
  :--shade:
@@ -153,8 +160,13 @@ gturl_x gturl_y.
153
160
  :--patterns:
154
161
  set each patterns for tone plot.
155
162
 
156
- :--tonf:
157
- use tonf instead of tone.
163
+ :--tone [a|e|f|b|c]:
164
+ set tone subroutine:
165
+ a (=> tone routine is selected automatically depending on the datasize)
166
+ e (=> DCL.uetone is used)
167
+ f (=> DCL.uetonf is used)
168
+ b (=> DCL.uetonb is used)
169
+ c (=> DCL.uetonc is used)
158
170
 
159
171
  :--nocolorbar:
160
172
  do not draw color bar
@@ -162,19 +174,21 @@ gturl_x gturl_y.
162
174
  :--nozero:
163
175
  do not draw zero contour
164
176
 
177
+ :--udsfmt [strings]:
178
+ change contour label format. see UDCNTR/DCL manual for the format.
179
+
180
+
165
181
  ===VECTOR OPTIONS
166
182
 
167
183
  :--noflow_vect:
168
184
  DCL::ugvect is used.
169
185
 
170
186
  :--xintv <xintv>:
171
- (Effective only if flow_vect) interval of data sampling in x
172
-
187
+ interval of data sampling in x
173
188
 
174
189
  :--yintv <yintv>:
175
- (Effective only if flow_vect) interval of data sampling in y
190
+ interval of data sampling in y
176
191
 
177
-
178
192
  :--factor <factor>:
179
193
  (Effective only if flow_vect) scaling factor to strech/reduce the
180
194
  arrow lengths
@@ -184,7 +198,22 @@ gturl_x gturl_y.
184
198
 
185
199
  :--max_unit_vect:
186
200
  (Effective only if flow_vect && unit_vect) use the maximum arrows to
187
- s scale the unit vector
201
+ scale the unit vector
202
+
203
+ :--ux_unit <value>:
204
+ (Effective only if flow_vect) length of the x direction unit vector
205
+ (precedence of this option is lower than max_unit_vect)
206
+
207
+ :--uy_unit <value>:
208
+ (Effective only if flow_vect) length of the y direction unit vector
209
+ (precedence of this option is lower than max_unit_vect)
210
+
211
+ :--xscale <value>:
212
+ (Effective only if noflow_vect) scaling of the x direction vector
213
+
214
+ :--yscale <value>:
215
+ (Effective only if noflow_vect) scaling of the y direction vector
216
+
188
217
 
189
218
  ==EXAMPLES
190
219
 
@@ -210,6 +239,12 @@ For the second command format,
210
239
  2010/07/16 Y SASAKI (option --clrmap implemented)
211
240
  2011/07/29 S Takehiro (option --clrmap fixed)
212
241
  2012/02/19 S Takehiro (description for gturl format updated)
242
+ 2012/07/28 S Takehiro (option --ux_unit, --uy_unit, --xscale, --yscale
243
+ implemented)
244
+ 2014/02/21 Y Naito && S Takehiro (implement DCL internal variable setting,
245
+ add option --udsfmt)
246
+ 2014/02/23 S Takehiro (option --tonf is changed to --tone)
247
+ 2014/03/10 Y Kawai && S Takehiro (setting labels for contours)
213
248
 
214
249
  =end
215
250
  #################################################
@@ -305,6 +340,7 @@ def draw_setup(gp)
305
340
  'max' => ( max_srange || max_range )
306
341
  )
307
342
  if ( $OPT_clevels || $OPT_levels )
343
+ $OPT_label=($OPT_clevels || $OPT_levels).split(',')
308
344
  $OPT_clevels=($OPT_clevels || $OPT_levels).split(',').map!{|v| v.to_f }
309
345
  end
310
346
 
@@ -386,6 +422,32 @@ def draw_setup(gp)
386
422
  $max_unit_vect = false
387
423
  end
388
424
 
425
+ if ($OPT_ux_unit)
426
+ $ux_unit = $OPT_ux_unit.to_f
427
+ else
428
+ $ux_unit = nil
429
+ end
430
+
431
+ if ($OPT_uy_unit)
432
+ $uy_unit = $OPT_uy_unit.to_f
433
+ else
434
+ $uy_unit = nil
435
+ end
436
+
437
+ if ($OPT_xscale)
438
+ xscale = $OPT_xscale.to_f
439
+ DCL.ugpset('LNRMAL',false)
440
+ vx_unit=DCL.ugpget('VXUNIT')
441
+ DCL.ugpset('XFACT1',vx_unit/xscale)
442
+ end
443
+
444
+ if ($OPT_yscale)
445
+ yscale = $OPT_yscale.to_f
446
+ DCL.ugpset('LNRMAL',false)
447
+ vy_unit=DCL.ugpget('VYUNIT')
448
+ DCL.ugpset('YFACT1',vy_unit/yscale)
449
+ end
450
+
389
451
  $xintv=($OPT_xintv||1).to_i
390
452
  $yintv=($OPT_yintv||1).to_i
391
453
  $factor=($OPT_factor||1).to_f
@@ -406,13 +468,17 @@ def draw(gp, gpux, gpuy, draw_flag)
406
468
  "transpose"=>$OPT_exch,
407
469
  "levels"=>$OPT_slevels,
408
470
  "patterns"=>$OPT_patterns,
409
- "tonf"=>$OPT_tonf
471
+ "auto"=>$auto,
472
+ "tonf"=>$tonf,
473
+ "tonb"=>$tonb,
474
+ "tonc"=>$tonc
410
475
  )
411
476
  GGraph.contour(gp,
412
477
  false,
413
478
  "transpose"=>$OPT_exch,
414
479
  "levels"=>$OPT_clevels,
415
- "nozero"=>$OPT_nozero
480
+ "nozero"=>$OPT_nozero,
481
+ "label"=>$OPT_label
416
482
  )
417
483
  vnewframe = false
418
484
 
@@ -424,7 +490,10 @@ def draw(gp, gpux, gpuy, draw_flag)
424
490
  "transpose"=>$OPT_exch,
425
491
  "levels"=>$OPT_slevels,
426
492
  "patterns"=>$OPT_patterns,
427
- "tonf"=>$OPT_tonf
493
+ "auto"=>$auto,
494
+ "tonf"=>$tonf,
495
+ "tonb"=>$tonb,
496
+ "tonc"=>$tonc
428
497
  )
429
498
  vnewframe = false
430
499
 
@@ -438,7 +507,8 @@ def draw(gp, gpux, gpuy, draw_flag)
438
507
  "annotate"=>$annotate,
439
508
  "transpose"=>$OPT_exch,
440
509
  "levels"=>$OPT_clevels,
441
- "nozero"=>$OPT_nozero
510
+ "nozero"=>$OPT_nozero,
511
+ "label"=>$OPT_label
442
512
  )
443
513
  vnewframe = false
444
514
 
@@ -459,7 +529,9 @@ def draw(gp, gpux, gpuy, draw_flag)
459
529
  "yintv"=>$yintv,
460
530
  "factor"=>$factor,
461
531
  "unit_vect"=>$unit_vect,
462
- "max_unit_vect"=>$max_unit_vect
532
+ "max_unit_vect"=>$max_unit_vect,
533
+ "ux_unit"=>$ux_unit,
534
+ "uy_unit"=>$uy_unit
463
535
  )
464
536
  else
465
537
  GGraph.vector(gpux, gpuy, newframe=vnewframe,
@@ -471,7 +543,9 @@ def draw(gp, gpux, gpuy, draw_flag)
471
543
  "yintv"=>$yintv,
472
544
  "factor"=>$factor,
473
545
  "unit_vect"=>$unit_vect,
474
- "max_unit_vect"=>$max_unit_vect
546
+ "max_unit_vect"=>$max_unit_vect,
547
+ "ux_unit"=>$ux_unit,
548
+ "uy_unit"=>$uy_unit
475
549
  )
476
550
  end
477
551
 
@@ -536,10 +610,60 @@ def __split_range(range)
536
610
  return min, max
537
611
  end
538
612
 
613
+ def check_dclopts
614
+
615
+ indices = []
616
+ ARGV.each_index{|i|
617
+ if /^-(.)(.):(.*)=(.*)/ =~ ARGV[i]
618
+ indices << i
619
+ end
620
+ }
621
+
622
+ dclopts = []
623
+ indices.reverse_each{|i|
624
+ dclopts << ARGV[i]
625
+ ARGV.slice!(i)
626
+ }
627
+
628
+ dclopts.each{|opt|
629
+ pkg = opt[1..2]
630
+ name = opt[4..-1].split('=')[0]
631
+ value = opt[4..-1].split('=')[1]
632
+ dcl_set_params(pkg,name,value)
633
+ }
634
+
635
+ end
636
+
637
+ def dcl_set_params(pkg,name,value)
638
+
639
+ set = 'stx'
640
+ case name
641
+ when /^c/i
642
+ eval( "DCL.#{pkg}c#{set}(name,value.to_s)" )
643
+ when /^l/i
644
+ if /(.*)(T|t)(.*)/ =~ value
645
+ eval( "DCL.#{pkg}l#{set}(name,true)" )
646
+ else
647
+ if /(.*)(F|f)(.*)/ =~ value
648
+ eval( "DCL.#{pkg}l#{set}(name,false)" )
649
+ else
650
+ raise "value of logical parameter must include 't' or 'f'"
651
+ end
652
+ end
653
+ when /^[i-n]/i
654
+ eval( "DCL.#{pkg}i#{set}(name,value.to_i)" )
655
+ else
656
+ eval( "DCL.#{pkg}r#{set}(name,value.to_f)" )
657
+ end
658
+
659
+ end
539
660
 
540
661
  #####################################################
541
662
  ###++++++ Main Routine ++++++###
542
663
 
664
+ ## options for DCL
665
+ check_dclopts
666
+
543
667
  ## parse options
544
668
  parser = GetoptLong.new
545
669
  parser.set_options(
@@ -583,7 +707,8 @@ parser.set_options(
583
707
  ['--clevels', GetoptLong::REQUIRED_ARGUMENT],
584
708
  ['--slevels', GetoptLong::REQUIRED_ARGUMENT],
585
709
  ['--patterns', GetoptLong::REQUIRED_ARGUMENT],
586
- ['--tonf', GetoptLong::NO_ARGUMENT],
710
+ ['--tone', GetoptLong::REQUIRED_ARGUMENT],
711
+ ['--udsfmt', GetoptLong::REQUIRED_ARGUMENT],
587
712
  ['--nocolorbar', GetoptLong::NO_ARGUMENT],
588
713
  ['--nozero', GetoptLong::NO_ARGUMENT],
589
714
  ### vector option ###
@@ -593,6 +718,10 @@ parser.set_options(
593
718
  ['--factor', GetoptLong::REQUIRED_ARGUMENT],
594
719
  ['--unit_vect', GetoptLong::NO_ARGUMENT],
595
720
  ['--max_unit_vect', GetoptLong::NO_ARGUMENT],
721
+ ['--ux_unit', GetoptLong::REQUIRED_ARGUMENT],
722
+ ['--uy_unit', GetoptLong::REQUIRED_ARGUMENT],
723
+ ['--xscale', GetoptLong::REQUIRED_ARGUMENT],
724
+ ['--yscale', GetoptLong::REQUIRED_ARGUMENT],
596
725
  ['--help', GetoptLong::NO_ARGUMENT]
597
726
  # ['--version', GetoptLong::NO_ARGUMENT] # to be defined
598
727
  )
@@ -628,12 +757,35 @@ else
628
757
  $colorbar = true
629
758
  end
630
759
 
760
+ if ($OPT_tone)
761
+ case $OPT_tone
762
+ when "a"
763
+ $auto, $tonf, $tona, $toneb, $tonec = true,false,false,false
764
+ when "e"
765
+ $auto, $tonf, $tona, $toneb, $tonec = false,false,false,false
766
+ when "f"
767
+ $auto, $tonf, $tona, $toneb, $tonec = false,true,false,false
768
+ when "b"
769
+ $auto, $tonf, $tona, $toneb, $tonec = false,false,true,false
770
+ when "c"
771
+ $auto, $tonf, $tona, $toneb, $tonec = false,false,false,true
772
+ else
773
+ raise "The value of option --tone should be 'a','e','f','b' or 'c'."
774
+ end
775
+ else
776
+ $auto, $tonf, $tona, $toneb, $tonec = true,false,false,false
777
+ end
778
+
631
779
  ## decide VIEWPORT
632
780
  $VIEWPORT = set_vpsize( VIEWPORT, ($OPT_aspect||2.0) )
633
781
 
634
782
  ## tune the size of axis parameters.
635
783
  DCL.uzfact(0.7)
636
784
 
785
+ ## set the format of contour labels.
786
+ udsfmt = ($OPT_udsfmt||DCL.udqfmt())
787
+ DCL.udsfmt(udsfmt)
788
+
637
789
  ## draw figure
638
790
  loopdim = ( $OPT_animate || $OPT_anim )
639
791
  loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
@@ -641,7 +793,7 @@ loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
641
793
  ## set colormap
642
794
  DCL.sgscmn($OPT_clrmap||1)
643
795
  ## open work station
644
- DCL.gropn($OPT_wsn||1)
796
+ DCL.gropn($OPT_wsn||4)
645
797
 
646
798
  ## open netcdf variables
647
799