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,452 @@
1
+ require "numru/units"
2
+ require "rational" # for UNumeric#sqrt
3
+ require "date" # for DateTime
4
+
5
+ ## require "numru/gphys/gphys" # --> in the test program
6
+
7
+ =begin
8
+ =class NumRu::UNumeric
9
+
10
+ Class of Numeric with Units.
11
+
12
+ Dependent on
13
+ ((<NumRu::Units|URL:http://ruby.gfd-dennou.org/products/numru=units>))
14
+ and Rational, a standard library.
15
+
16
+ ==Class Methods
17
+
18
+ ---new(val, uni)
19
+
20
+ Constractor.
21
+
22
+ ARGUMENTS
23
+ * ((|val|)) (Numeric)
24
+ * ((|units|)) (NumRu::Units or String): if string, internally converted to
25
+ a NumRu::Units
26
+
27
+ ---[val, uni]
28
+
29
+ Same as new
30
+
31
+ ---from_date(date, units)
32
+
33
+ Convert a DateTime (or Date) to a UNUmeric
34
+
35
+ ARGUMENTS
36
+ * date (Date or DateTime)
37
+ * units (Units or String) : units of the UNumeric to be created
38
+
39
+ ==Methods
40
+
41
+ ---val
42
+
43
+ RETURN VALUE
44
+ * the value (Numeric)
45
+
46
+ ---units
47
+
48
+ RETURN VALUE
49
+ * the units (NumRu::Units)
50
+
51
+ ---inspect
52
+
53
+ RETURN VALUE
54
+ * a String (e.g., '1 m')
55
+
56
+ ---to_s
57
+
58
+ aliasesed to ((<inspect>)).
59
+
60
+ ---to_f
61
+ RETURN VALUE
62
+ * val.to_f
63
+
64
+ ---to_i
65
+ RETURN VALUE
66
+ * val.to_i
67
+
68
+ ---convert(to_units)
69
+
70
+ Convert to ((|to_units|)).
71
+
72
+ RETURN VALUE
73
+ * a UNumeric
74
+
75
+ EXCEPTION
76
+ * when the current units is incompatible with to_units.
77
+
78
+ ---convert2
79
+
80
+ Same as ((<convert>)), but returns ((|self|)) if the units are
81
+ incompatible (Warned).
82
+
83
+ EXCEPTION
84
+ * none
85
+
86
+ WARING MADE
87
+
88
+ Warning is made to $stderr if the following
89
+ condition is satisfied.
90
+
91
+ * the units of ((|self|)) and ((|to_units|)) are incompatible.
92
+
93
+ ---coerce(other)
94
+
95
+ As you know. Can handle Numeric, Array, NArray.
96
+ NOTE: VArray and GPhys know UNumeric.
97
+
98
+ --- *(other)
99
+
100
+ Multiplication. Knows Numeric, UNumeric, VArray, and GPhys.
101
+ The units are multipled too. (if other is Numeric, it is assumed
102
+ to be non-dimension)
103
+
104
+ RETURN VALUE
105
+ * a UNumeric, VArray, or GPhys
106
+
107
+ --- /(other)
108
+
109
+ Division. See ((<*>)).
110
+
111
+ --- +(other)
112
+
113
+ Addition. Knows Numeric, UNumeric, VArray, and GPhys.
114
+ The return value will have the units of ((|self|)).
115
+
116
+ SPECIAL REMARK!
117
+
118
+ If ((|other|)) has units within a factor and/or offset
119
+ of difference, It is CONVERTED before addition (by using ((<convert2>)))!
120
+
121
+ RETURN VALUE
122
+ * a UNumeric, VArray, or GPhys
123
+
124
+ WARING MADE
125
+
126
+ Warning is made to $stderr if the following
127
+ condition is satisfied.
128
+
129
+ * the units of ((|self|)) and ((|to_units|)) are incompatible.
130
+ * ((|other|)) is Numeric.
131
+
132
+ --- -(other)
133
+
134
+ Subtraction. See ((<+>)).
135
+
136
+ --- **(num)
137
+
138
+ Power.
139
+
140
+ --- abs
141
+
142
+ Absolute value. Other math functions are also avialable as instance
143
+ methods.
144
+
145
+ ---to_datetime(eps_sec=0.0)
146
+
147
+ Convert a time UNumeric into a DateTime
148
+
149
+ ARGUMENTS
150
+ * eps_sec (Float) : Magic epsilon to prevent the round-off of
151
+ DateTime [seconds]. Recommended value is 0.1.
152
+
153
+ RETURN VALUE
154
+ * a DateTime
155
+
156
+ EXCEPTION
157
+ * raised if self does not have a time unit with a since field
158
+
159
+ ---strftime(fmt)
160
+
161
+ Text expression of the date and time of a time UNumeric.
162
+ Implemented as
163
+ self.to_datetime(0.1).strftime(fmt)
164
+
165
+ ARGUMENTS
166
+ * fmt (Sting) : the format. Try
167
+ % man 3 strftime
168
+ to find how to write it.
169
+
170
+ RETURN VALUE
171
+ * a String
172
+
173
+ =end
174
+
175
+ module NumRu
176
+
177
+ class UNumeric
178
+
179
+ def initialize(val, uni)
180
+ raise TypeError unless Numeric === val
181
+ uni = Units.new(uni) if String === uni
182
+ raise TypeError unless Units === uni
183
+ @val, @uni = val, uni
184
+ end
185
+
186
+ def self::[](val, uni)
187
+ new(val, uni)
188
+ end
189
+
190
+ # * date (Date or DateTime)
191
+ # * units (Units or String) : units of the UNumeric to be created
192
+ def self::from_date(date, units)
193
+ sunits = units.to_s
194
+ /(.*) *since *(.*)/ =~ sunits
195
+ if (!$1 or !$2)
196
+ raise("Units mismatch. Requires time units that includes 'since'")
197
+ end
198
+ tun = Units[$1]
199
+ since = DateTime.parse($2)
200
+ if( tun =~ Units['months since 0001-01-01'] )
201
+ year0,mon0 = since.year,since.mon
202
+ year,mon = date.year,date.mon
203
+ time = Units['months'].convert((year*12+mon)-(year0*12+mon0), tun)
204
+ elsif( tun =~ Units['days since 0001-01-01'] )
205
+ time = Units['days'].convert( date-since, tun )
206
+ else
207
+ raise("Unrecognized time units #{tun.to_s} -- may be a BUG?")
208
+ end
209
+ time = time.to_f
210
+ UNumeric[time, units]
211
+ end
212
+
213
+ def val; @val; end
214
+
215
+ def units; @uni; end
216
+
217
+ def inspect
218
+ val.to_s + ' ' +units.to_s
219
+ end
220
+
221
+ alias to_s inspect
222
+
223
+ def to_f; @val.to_f; end
224
+ def to_i; @val.to_i; end
225
+
226
+ def convert(to_units)
227
+ if ( units == to_units )
228
+ self
229
+ else
230
+ UNumeric[ units.convert(val, to_units), to_units ]
231
+ end
232
+ end
233
+
234
+ def convert2(to_units)
235
+ # returns self if the units are incompatible
236
+ begin
237
+ convert(to_units)
238
+ rescue
239
+ #if $VERBOSE
240
+ $stderr.print(
241
+ "WARNING: incompatible units: #{units.to_s} - #{to_units.to_s}\n")
242
+ #end # warn in Ruby 1.8
243
+ self
244
+ end
245
+ end
246
+
247
+ def strftime(fmt)
248
+ self.to_datetime(0.1).strftime(fmt)
249
+ end
250
+
251
+ # * eps_sec : Magic epsilon to prevent the round-off of DateTime [seconds].
252
+ # Recommended value is 0.1.
253
+ def to_datetime(eps_sec=0.0)
254
+ time = self.val
255
+ sunits = self.units.to_s
256
+ /(.*) *since *(.*)/ =~ sunits
257
+ if (!$1 or !$2)
258
+ raise("Units mismatch. Requires time units that includes 'since'")
259
+ end
260
+ tun = Units[$1]
261
+ since = DateTime.parse($2)
262
+ if( tun =~ Units['months since 0001-01-01'] )
263
+ datetime = since >> tun.convert( time, Units['months'] )
264
+ elsif( tun =~ Units['days since 0001-01-01'] )
265
+ datetime = since + tun.convert( time, Units['days'] )
266
+ else
267
+ raise("Unrecognized time units #{tun.to_s} -- may be a BUG?")
268
+ end
269
+ if eps_sec != 0.0
270
+ datetime = datetime + eps_sec/8.64e4
271
+ end
272
+ datetime
273
+ end
274
+
275
+ def coerce(other)
276
+ case
277
+ when Numeric
278
+ c_other = UNumeric.new( other, Units.new("1") )
279
+ when Array
280
+ c_other = VArray.new( NArray.to_na(other) )
281
+ when NArray
282
+ c_other = VArray.new( other )
283
+ else
284
+ raise "#{self.class}: cannot coerce #{other.class}"
285
+ end
286
+ [ c_other, self ]
287
+ end
288
+
289
+ def *(other)
290
+ case other
291
+ when UNumeric
292
+ UNumeric.new( val * other.val , units * other.units )
293
+ when Numeric
294
+ # assumed to be non-dimensional
295
+ UNumeric.new( val * other, units )
296
+ when VArray, GPhys
297
+ result = other * val
298
+ result.units = units * other.units
299
+ result
300
+ else
301
+ s, o = other.coerce( self )
302
+ s * o
303
+ end
304
+ end
305
+
306
+ def +(other)
307
+ case other
308
+ when UNumeric
309
+ v = val + other.convert2( units ).val
310
+ UNumeric.new( v , units )
311
+ when Numeric
312
+ v = val + other
313
+ $stderr.print("WARNING: raw Numeric added to #{inspect}\n") #if $VERBOSE
314
+ UNumeric.new( v, units )
315
+ when VArray, GPhys
316
+ ans = other.units.convert2(other, units) + val
317
+ ans.units = units # units are taken from the lhs
318
+ ans
319
+ else
320
+ s, o = other.coerce( self )
321
+ s + o
322
+ end
323
+ end
324
+
325
+ def **(other)
326
+ UNumeric.new( val**other, units**other )
327
+ end
328
+
329
+ def abs
330
+ UNumeric.new( val.abs, units )
331
+ end
332
+
333
+ def -@
334
+ UNumeric.new( -val, units )
335
+ end
336
+
337
+ def +@
338
+ self
339
+ end
340
+
341
+ def -(other)
342
+ self + (-other) # not efficient --> Rewrite later!
343
+ end
344
+
345
+ def /(other)
346
+ self * (other**(-1)) # not efficient --> Rewrite later!
347
+ end
348
+
349
+ LogicalOps = [">",">=","<","<=","==","==="]
350
+ LogicalOps.each { |op|
351
+ eval <<-EOS, nil, __FILE__, __LINE__+1
352
+ def #{op}(other)
353
+ case other
354
+ when UNumeric
355
+ val #{op} other.convert2( units ).val
356
+ when Numeric
357
+ $stderr.print("WARNING: raw Numeric added to #{inspect}\n") #\
358
+ # if $VERBOSE # warn in Ruby 1.8
359
+ val #{op} other
360
+ when VArray, GPhys
361
+ val #{op} other.units.convert2(other, units)
362
+ else
363
+ s, o = other.coerce( self )
364
+ s #{op} o
365
+ end
366
+ end
367
+ EOS
368
+ }
369
+
370
+ Math_funcs_nondim = ["exp","log","log10","log2","sin","cos","tan",
371
+ "sinh","cosh","tanh","asinh","acosh",
372
+ "atanh","csc","sec","cot","csch","sech","coth",
373
+ "acsch","asech","acoth"]
374
+ Math_funcs_nondim.each{ |f|
375
+ eval <<-EOS, nil, __FILE__, __LINE__+1
376
+ def #{f}
377
+ UNumeric.new( Math.#{f}(val), Units.new('1') )
378
+ end
379
+ EOS
380
+ }
381
+ Math_funcs_radian = ["asin","acos","atan","acsc","asec","acot"]
382
+ Math_funcs_radian.each{ |f|
383
+ eval <<-EOS, nil, __FILE__, __LINE__+1
384
+ def #{f}
385
+ UNumeric.new( Math.#{f}(val), Units.new('rad') )
386
+ end
387
+ EOS
388
+ }
389
+
390
+ def atan2(other)
391
+ case other
392
+ when Numeric
393
+ UNumeric.new( Math.atan2(val, other), Units.new('rad') )
394
+ when UNumeric
395
+ UNumeric.new( Math.atan2(val, other.val), Units.new('rad') )
396
+ else
397
+ c_me, c_other = other.coerce(self)
398
+ c_me.atan2(c_other)
399
+ end
400
+ end
401
+
402
+ def sqrt
403
+ UNumeric.new( Math.sqrt(val), units**Rational(1,2) )
404
+ end
405
+
406
+ end # class UNumeric
407
+ end # module NumRu
408
+
409
+ ######################################
410
+ if $0 == __FILE__
411
+
412
+ require "narray"
413
+
414
+ include NumRu
415
+ a = UNumeric[ 10.0, Units['m/s'] ]
416
+ b = UNumeric[ 2.0, Units['m/s'] ]
417
+ c = UNumeric[ 5.0, Units['m'] ]
418
+
419
+ print "\n** Section 1 **\n"
420
+ p a
421
+ p a*b
422
+ p a+b
423
+ p a+c
424
+ p a+7
425
+ p a*7
426
+ p -a
427
+ p a-b, a-1000, a/100
428
+ p a.log, a.sin
429
+ p UNumeric[1.0,Units['1']].atan2( UNumeric[1.0,Units['1']] )
430
+
431
+ print "\n** Section 2 **\n"
432
+ p a > 1
433
+ p 1 > a
434
+
435
+ print "\n** Section 3 **\n"
436
+
437
+ require "numru/gphys/varray"
438
+
439
+ na = NArray.float(4).indgen
440
+ va = VArray.new( na )
441
+ vb = a + va
442
+ p vb, vb.units, vb.att_names
443
+
444
+ a = UNumeric[ 3721.0, Units['seconds since 2008-01-01'] ]
445
+ p a.to_datetime.to_s, a.strftime('%Y-%m-%d %H:%M:%S')
446
+ b = UNumeric[ 3.0, Units['months since 2008-01-01'] ]
447
+ p b.strftime('%Y-%m-%d %H:%M:%S')
448
+ p (UNumeric::from_date(DateTime.parse('2008-01-01 00:00-0200'),
449
+ 'seconds since 2008-01-01')).to_s
450
+ p (UNumeric::from_date(DateTime.parse('2008-6-01'),
451
+ 'months since 2008-01-01')).to_s
452
+ end