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
@@ -0,0 +1,602 @@
1
+ require "numru/gphys/axis"
2
+
3
+ =begin
4
+ =class NumRU::Grid
5
+
6
+ A class to handle discretized grids of physical quantities.
7
+
8
+ ==Class Methods
9
+ ---Grid.new( *axes )
10
+ Constructor.
11
+
12
+ RETURN VALUE
13
+ * a Grid
14
+
15
+ ==Instance Methods
16
+ ---axnames
17
+ Returns the names of the axes
18
+
19
+ RETURN VALUE
20
+ * an Array of String
21
+
22
+ ---lost_axes
23
+ Returns info on axes eliminated during operations.
24
+
25
+ Useful for annotation in plots, for example (See the code of GGraph
26
+ for an application).
27
+
28
+ RETURN VALUE
29
+ * an Array of String
30
+
31
+ ---axis(dim_or_dimname)
32
+ Returns an Axis
33
+
34
+ ARGUMENTS
35
+ * dim_or_dimname (String or Integer) to specify an axis.
36
+
37
+ RETURN VALUE
38
+ * an Axis
39
+
40
+ ---dim_index(dimname)
41
+ Returns the integer id (count from zero) of the dimension
42
+
43
+ ARGUMENT
44
+ * dimname (String or Integer) : this method is trivial if is is an integer
45
+
46
+ RETURN VALUE
47
+ * an Integer
48
+
49
+ ---set_axis(dim_or_dimname,ax)
50
+
51
+ Sets an axis.
52
+
53
+ ARGUMENTS
54
+ * dim_or_dimname (String or Integer) to specify an axis.
55
+ * ax (Axis) the axis
56
+
57
+ RETURN VALUE
58
+ * self
59
+
60
+ ---set_lost_axes( lost )
61
+
62
+ Sets info on axes eliminated.
63
+
64
+ RETURN VALUE
65
+ * self
66
+
67
+ ---add_lost_axes( lost )
68
+
69
+ Adds info on axes eliminated to existing ones.
70
+
71
+ RETURN VALUE
72
+ * self
73
+
74
+ ---delete_axes( at, deleted_by=nil )
75
+
76
+ Delete an axis.
77
+
78
+ ARGUMENTS
79
+ * at (String or Integer) to specify an axis.
80
+ * deleted_by (String or nil) if non-nil, it is written in
81
+ the internal lost-axis info. Best if you put the name of the
82
+ method, in which this method is called.
83
+
84
+ RETURN VALUE
85
+ * a Grid
86
+
87
+ ---copy
88
+ Makes a deep clone onto memory.
89
+
90
+ RETURN VALUE
91
+ * a Grid
92
+
93
+ ---merge(other)
94
+ merge two grids by basically using copies of self's axes but
95
+ using the other's if the length in self is 1 and
96
+ the length in the other is longer
97
+
98
+ ARGUMENTS
99
+ * other (Grid)
100
+
101
+ RETURN VALUE
102
+ * a Grid
103
+
104
+ ---shape
105
+ Returns the shape of self.
106
+
107
+ RETURN VALUE
108
+ * an Array of Integer
109
+
110
+ ---[] (*slicer)
111
+ Returns a subset.
112
+
113
+ ARGUMENTS
114
+ * Same as those for NArray#[], NetCDFVar#[], etc.
115
+
116
+ RETURN VALUE
117
+ * a Grid
118
+
119
+ ---cut(*args)
120
+ Similar to ((<[]>)), but the subset is specified by physical coordinate.
121
+
122
+ ARGUMENTS
123
+ * pattern 1: similar to those for ((<[]>)), where the first
124
+ argument specifies a subset for the first dimension.
125
+ * pattern 2: by a Hash, in which keys are axis names.
126
+
127
+ EXAMPLES
128
+ * Pattern 1
129
+ gphys.cut(135.5,0..20.5,false)
130
+ * Pattern 2
131
+ gphys.cut({'lon'=>135.5,'lat'=>0..20})
132
+
133
+ RETURN VALUE
134
+ * an Array : [a Grid, slicer], where slicer is an array
135
+ to be used to make a subset of an corresponding varray
136
+ (to be used in GPhys#cut).
137
+
138
+ ---cut_rank_conserving(*args)
139
+ Similar to ((<cut>)), but the rank is conserved by not eliminating
140
+ any dimension (whose length could be one).
141
+
142
+ ---exclude(dim_or_dimname)
143
+ Returns a Grid in which an axis is eliminated from self.
144
+
145
+ ARGUMENTS
146
+ * dim_or_dimname (String or Integer) to specify an axis.
147
+
148
+ RETURN VALUE
149
+ * a Grid
150
+
151
+ ---change_axis(dim, axis)
152
+ Replaces an axis. (Returns a new object)
153
+
154
+ ARGUMENTS
155
+ * dim_or_dimname (String or Integer) to specify an axis.
156
+ * axis (Axis)
157
+
158
+ RETURN VALUE
159
+ * a Grid
160
+
161
+ ---change_axis!(dim_or_dimname, axis)
162
+ Replaces an axis. (overwrites self)
163
+
164
+ ARGUMENTS
165
+ * dim_or_dimname (String or Integer) to specify an axis.
166
+ * axis (Axis)
167
+
168
+ RETURN VALUE
169
+ * self
170
+
171
+ ---insert_axis(dim_or_dimname, axis)
172
+ Inserts an axis. (Returns a new object)
173
+
174
+ ARGUMENTS
175
+ * dim_or_dimname (String or Integer) to specify an axis.
176
+ * axis (Axis)
177
+
178
+ RETURN VALUE
179
+ * a Grid
180
+
181
+ ---insert_axis!(dim_or_dimname, axis)
182
+ Inserts an axis. (overwrites self)
183
+
184
+ ARGUMENTS
185
+ * dim_or_dimname (String or Integer) to specify an axis.
186
+ * axis (Axis)
187
+
188
+ RETURN VALUE
189
+ * self
190
+
191
+ ---transpose( *dims )
192
+ Transpose.
193
+
194
+ ARGUMENTS
195
+ * dims (integers) : for example, [1,0] to transpose a 2D object.
196
+ For 3D objects, [1,0,2], [2,1,0], etc.etc.
197
+
198
+ RETURN VALUE
199
+ * a Grid
200
+
201
+ =end
202
+
203
+ module NumRu
204
+
205
+ class Grid
206
+
207
+ def initialize( *axes )
208
+ @axes = Array.new
209
+ axes.each{|ag|
210
+ if ag.is_a?(Axis)
211
+ @axes.push(ag)
212
+ else
213
+ raise ArgumentError, "each argument must be an Axis"
214
+ end
215
+ }
216
+ @lost_axes = Array.new # Array of String
217
+ @rank = @axes.length
218
+ @axnames = Array.new
219
+ __check_and_set_axnames
220
+ end
221
+
222
+ def inspect
223
+ "<#{rank}D grid #{@axes.collect{|ax| ax.inspect}.join("\n\t")}>"
224
+ end
225
+
226
+ def __check_and_set_axnames
227
+ @axnames.clear
228
+ @axes.each{|ax|
229
+ nm=ax.name
230
+ if @axnames.include?(nm)
231
+ raise "Two or more axes share a name: #{nm}"
232
+ end
233
+ @axnames.push(nm)
234
+ }
235
+ end
236
+ private :__check_and_set_axnames
237
+
238
+ attr_reader :rank
239
+
240
+ def axnames
241
+ @axnames.dup
242
+ end
243
+ def lost_axes
244
+ @lost_axes.dup
245
+ end
246
+
247
+ # def axis(i)
248
+ # @axes[i]
249
+ # end
250
+
251
+ def axis(dim_or_dimname)
252
+ ax_dim(dim_or_dimname)[0]
253
+ end
254
+
255
+ alias get_axis axis
256
+
257
+ def dim_index(dimname)
258
+ ax_dim(dimname)[1]
259
+ end
260
+
261
+ def set_axis(dim_or_dimname,ax)
262
+ @axes[ ax_dim(dim_or_dimname)[1] ] = ax
263
+ self
264
+ end
265
+
266
+ def set_lost_axes( lost )
267
+ @lost_axes = lost # Array of String
268
+ self
269
+ end
270
+ def add_lost_axes( lost )
271
+ @lost_axes = @lost_axes + lost # Array of String
272
+ self
273
+ end
274
+
275
+ def delete_axes( at, deleted_by=nil )
276
+ case at
277
+ when String
278
+ at = [dim_index(at)]
279
+ when Numeric
280
+ at = [at]
281
+ when Array
282
+ at = at.collect{|x|
283
+ case x
284
+ when String
285
+ dim_index(x)
286
+ when Integer
287
+ x
288
+ else
289
+ raise ArgumentError,"'at' must consist of Integer and/or String"
290
+ end
291
+ }
292
+ else
293
+ raise TypeError, "1st arg not an Array"
294
+ end
295
+
296
+ at.collect!{|pos|
297
+ if pos < 0
298
+ pos + a.length
299
+ else
300
+ pos
301
+ end
302
+ }
303
+ at.sort!
304
+ newaxes = @axes.dup
305
+ at.reverse.each{|pos|
306
+ del = newaxes.delete_at(pos)
307
+ if !del
308
+ raise ArgumentError, "dimension #{pos} does not exist in a #{rank}D Grid"
309
+ end
310
+ }
311
+
312
+ newgrid = self.class.new( *newaxes )
313
+ newgrid.set_lost_axes( @lost_axes.dup )
314
+
315
+ if !deleted_by
316
+ msg = '(deleted) '
317
+ else
318
+ raise TypeError, "2nd arg not a String" if !deleted_by.is_a?(String)
319
+ msg = '('+deleted_by+') '
320
+ end
321
+ lost = at.collect{|pos|
322
+ mn = sprintf("%g", ( UNumeric===(a=@axes[pos].pos.min) ? a.val : a) )
323
+ mx = sprintf("%g", ( UNumeric===(a=@axes[pos].pos.max) ? a.val : a) )
324
+ msg +
325
+ "#{@axes[pos].name}:#{mn}..#{mx}"
326
+ }
327
+
328
+ newgrid.add_lost_axes( lost )
329
+ newgrid
330
+ end
331
+
332
+ def copy
333
+ # deep clone onto memory
334
+ out = self.class.new( *@axes.collect{|ax| ax.copy} )
335
+ out.set_lost_axes( @lost_axes.dup )
336
+ out
337
+ end
338
+
339
+ def merge(other)
340
+ # merge two grids by basically using copies of self's axes but
341
+ # using the other's if the length in self is 1 and
342
+ # the length in the other is longer
343
+ if self.rank != other.rank
344
+ raise "ranks do not agree (self:#{self.rank} vs other:#{other.rank})"
345
+ end
346
+ axes = Array.new
347
+ for i in 0...self.rank
348
+ if @axes[i].length == 1 and other.axis(i).length > 1
349
+ axes[i] = other.axis(i)
350
+ else
351
+ axes[i] = @axes[i]
352
+ end
353
+ end
354
+ out = self.class.new( *axes )
355
+ out.set_lost_axes( (@lost_axes.dup + other.lost_axes).uniq )
356
+ out
357
+ end
358
+
359
+ def shape
360
+ @axes.collect{|ax| ax.length}
361
+ end
362
+ alias shape_current shape
363
+
364
+ def [] (*slicer)
365
+ if slicer.length == 0
366
+ # make a clone
367
+ axes = Array.new
368
+ (0...rank).each{ |i| axes.push( @axes[i][0..-1] ) }
369
+ self.class.new( *axes )
370
+ else
371
+ slicer = __rubber_expansion(slicer)
372
+ if slicer.length != rank
373
+ raise ArgumentError,"# of the args does not agree with the rank"
374
+ end
375
+ axes = Array.new
376
+ lost = self.lost_axes #Array.new
377
+ for i in 0...rank
378
+ ax = @axes[i][slicer[i]]
379
+ if ax.is_a?(Axis) # else its rank became zero (lost)
380
+ axes.push( ax )
381
+ else
382
+ lost.push( ax )
383
+ end
384
+ end
385
+ grid = self.class.new( *axes )
386
+ grid.set_lost_axes( lost ) if lost.length != 0
387
+ grid
388
+ end
389
+ end
390
+
391
+ def __rubber_expansion( args )
392
+ if (id = args.index(false)) # substitution into id
393
+ # false is incuded
394
+ alen = args.length
395
+ if args.rindex(false) != id
396
+ raise ArguemntError,"only one rubber dimension is permitted"
397
+ elsif alen > rank+1
398
+ raise ArgumentError, "too many args"
399
+ end
400
+ ar = ( id!=0 ? args[0..id-1] : [] )
401
+ args = ar + [true]*(rank-alen+1) + args[id+1..-1]
402
+ end
403
+ args
404
+ end
405
+ private :__rubber_expansion
406
+
407
+ def cut(*args)
408
+ _cut_(false, *args)
409
+ end
410
+ def cut_rank_conserving(*args)
411
+ _cut_(true, *args)
412
+ end
413
+
414
+ def _cut_(conserve_rank, *args)
415
+
416
+ # assume that the coordinates are monotonic (without checking)
417
+
418
+ if args.length==1 && args[0].is_a?(Hash)
419
+ # specification by axis names
420
+ spec = args[0]
421
+ if (spec.keys - axnames).length > 0
422
+ raise ArgumentError,"One or more of the hash keys "+
423
+ "(#{spec.keys.inspect}) are not found in the axis names "+
424
+ "(#{axnames.inspect})."
425
+ end
426
+ args = axnames.collect{|ax| spec[ax] || true}
427
+ end
428
+
429
+ args = __rubber_expansion(args)
430
+
431
+ if rank != args.length
432
+ raise ArgumentError, "# of dims doesn't agree with the rank(#{rank})"
433
+ end
434
+
435
+ slicer = Array.new
436
+
437
+ for dim in 0...rank
438
+ ax = @axes[dim]
439
+ if conserve_rank
440
+ dummy, slicer[dim] = ax.cut_rank_conserving(args[dim])
441
+ else
442
+ dummy, slicer[dim] = ax.cut(args[dim])
443
+ end
444
+ end
445
+
446
+ [ self[*slicer], slicer ]
447
+ end
448
+ private :_cut_
449
+
450
+ def exclude(dim_or_dimname)
451
+ dim = dim_index(dim_or_dimname)
452
+ axes = @axes.dup
453
+ axes.delete_at(dim)
454
+ self.class.new( *axes )
455
+ end
456
+
457
+ def change_axis(dim, axis)
458
+ axes = @axes.dup
459
+ lost = @lost_axes.dup
460
+ if axis.is_a?(Axis)
461
+ axes[dim] = axis
462
+ else
463
+ lost.push(axis) if axis.is_a?(String)
464
+ axes.delete_at(dim)
465
+ end
466
+ self.class.new( *axes ).add_lost_axes( lost )
467
+ end
468
+
469
+ def change_axis!(dim_or_dimname, axis)
470
+ if axis.is_a?(Axis)
471
+ @axes[ ax_dim(dim_or_dimname)[1] ] = axis
472
+ else
473
+ @lost_axes.push(axis) if axis.is_a?(String)
474
+ @axes.delete_at( ax_dim(dim_or_dimname)[1] )
475
+ end
476
+ @rank = @axes.length
477
+ __check_and_set_axnames
478
+ self
479
+ end
480
+
481
+ def insert_axis(dim_or_dimname, axis)
482
+ dim = ax_dim(dim_or_dimname)[1]
483
+ axes = @axes.dup
484
+ if axis.is_a?(Axis)
485
+ axes[dim+1,0] = axis # axes.insert(dim, axis) if ruby 1.7
486
+ else
487
+ # do nothing
488
+ end
489
+ self.class.new( *axes )
490
+ end
491
+
492
+ def insert_axis!(dim_or_dimname, axis)
493
+ dim = ax_dim(dim_or_dimname)[1]
494
+ if axis == nil
495
+ # do nothing
496
+ else
497
+ @axes[dim+1,0] = axis # @axes.insert(dim, axis) if ruby 1.7
498
+ @rank = @axes.length
499
+ __check_and_set_axnames
500
+ end
501
+ self
502
+ end
503
+
504
+ def transpose( *dims )
505
+ if dims.sort != NArray.int(rank).indgen!.to_a
506
+ raise ArgumentError,
507
+ "Args must a permutation of 0..rank-1 (eg, if 3D 2,1,0; 1,0,2;etc)"
508
+ end
509
+ axes = Array.new
510
+ for i in 0...rank
511
+ axes[i] = @axes[dims[i]]
512
+ end
513
+ grid = self.class.new(*axes)
514
+ grid.set_lost_axes( lost_axes )
515
+ grid
516
+ end
517
+
518
+ # Define operations along each axis --- The following defines
519
+ # instance methods such as "average" and "integrate":
520
+
521
+ Axis.defined_operations.each do |method|
522
+ eval <<-EOS, nil, __FILE__, __LINE__+1
523
+ def #{method}(vary, dim_or_dimname, *extra_args)
524
+ ax, dim = self.ax_dim(dim_or_dimname)
525
+ va, new_ax = ax.#{method}(vary, dim, *extra_args)
526
+ if va.is_a?(Numeric) || va.is_a?(UNumeric)
527
+ va
528
+ else
529
+ [va, self.change_axis(dim, new_ax)]
530
+ end
531
+ end
532
+ EOS
533
+ end
534
+
535
+ ######### < protected methods > ###########
536
+
537
+ protected
538
+
539
+ def ax_dim(dim_or_dimname)
540
+ if dim_or_dimname.is_a?(Integer)
541
+ dim = dim_or_dimname
542
+ if dim < -rank || dim >= rank
543
+ raise ArgumentError,"rank=#{rank}: #{dim}th grid does not exist"
544
+ end
545
+ dim += rank if dim < 0
546
+ else
547
+ dim = @axnames.index(dim_or_dimname)
548
+ if !dim
549
+ raise ArgumentError, "Axis #{dim_or_dimname} is not contained"
550
+ end
551
+ end
552
+ [@axes[dim], dim]
553
+ end
554
+
555
+
556
+ end
557
+
558
+ end
559
+
560
+ ######################################################
561
+ ## < test >
562
+ if $0 == __FILE__
563
+ include NumRu
564
+ vx = VArray.new( NArray.float(10).indgen! + 0.5 ).rename("x")
565
+ vy = VArray.new( NArray.float(6).indgen! ).rename("y")
566
+ xax = Axis.new().set_pos(vx)
567
+ yax = Axis.new(true).set_cell_guess_bounds(vy).set_pos_to_center
568
+ grid = Grid.new(xax, yax)
569
+
570
+ z = VArray.new( NArray.float(vx.length, vy.length).indgen! )
571
+ p z.val
572
+ p "average along x-axis:", grid.average(z,0)[0].val,
573
+ grid.average(z,"x")[0].val
574
+ p "average along y-axis:", grid.average(z,1)[0].val,
575
+ grid.average(z,"y")[0].val
576
+ p "grid set by an operation:", (g = grid.average(z,1)[1]).rank, g.shape
577
+
578
+ p grid.shape, grid.axis(0).pos.val, grid.axis(1).pos.val
579
+ subgrid = grid[1..3,1..2]
580
+ p subgrid.shape, subgrid.axis(0).pos.val, subgrid.axis(1).pos.val
581
+ p grid[3,2].lost_axes
582
+
583
+ p grid
584
+
585
+ gr,slice = grid.cut(1.0..4.0, 3.2)
586
+ p "%%",gr.copy,slice,gr.lost_axes
587
+ gr,slice = grid.cut_rank_conserving(-10,false)
588
+ p "%%",gr.copy,slice,gr.lost_axes
589
+
590
+ p grid[0,0]
591
+
592
+ p Grid.new(xax).average(vx,0) # --> scalar
593
+
594
+ p "+++++"
595
+ p grid.delete_axes(0).lost_axes
596
+ p grid.delete_axes([0,1]).lost_axes
597
+ p grid.delete_axes([0,1], 'mean').lost_axes
598
+
599
+ p grid, grid.transpose(1,0)
600
+
601
+ end
602
+