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
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" ?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml">
6
+ <head>
7
+ <title>../bin/gpcat</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">NAME</a></h1><!-- RDLabel: "NAME" -->
11
+ <p>gpcat - Read a variable in multiple NetCDF files, concatenate and write them to a single netcdf file. </p>
12
+ <h1><a name="label-1" id="label-1">DESCRIPTION</a></h1><!-- RDLabel: "DESCRIPTION" -->
13
+ <p><em>gpcat</em> is command line tools for read a variable in multiple</p>
14
+ <pre>NetCDF files, concatenate and write them to a single netcdf file.</pre>
15
+ <h1><a name="label-2" id="label-2">USAGE</a></h1><!-- RDLabel: "USAGE" -->
16
+ <pre>% gpcat -v VAR [options] FILE1 FILE2...</pre>
17
+ <h1><a name="label-3" id="label-3">OPTIONS</a></h1><!-- RDLabel: "OPTIONS" -->
18
+ <dl>
19
+ <dt><h4><a name="label-4" id="label-4">-h, --help</a></h4></dt><!-- RDLabel: "-h, &shy;&shy;help" -->
20
+ <dd>
21
+ print this message.
22
+ </dd>
23
+ <dt><h4><a name="label-5" id="label-5">-v var, --variable var</a></h4></dt><!-- RDLabel: "-v var, &shy;&shy;variable var" -->
24
+ <dd>
25
+ variable name (required).
26
+ </dd>
27
+ <dt><h4><a name="label-6" id="label-6">-s sfmt, --slice sfmt</a></h4></dt><!-- RDLabel: "-s sfmt, &shy;&shy;slice sfmt" -->
28
+ <dd>
29
+ slice,thinnng (optional).
30
+ </dd>
31
+ <dt><h4><a name="label-7" id="label-7">-o file, --output file</a></h4></dt><!-- RDLabel: "-o file, &shy;&shy;output file" -->
32
+ <dd>
33
+ output filename (optional). Default output filename is 'gphys.nc'.
34
+ </dd>
35
+ </dl>
36
+ <h1><a name="label-8" id="label-8">HISTORY</a></h1><!-- RDLabel: "HISTORY" -->
37
+ <pre>2005/05/17 S Takehiro (created)
38
+ 2005/08/10 S Takehiro (utilize internal function for printing help message)
39
+ 2005/08/21 S Takehiro (global attributes copied to the output file)
40
+ 2005/08/23 S Takehiro (common methods to gp* command moved to gpcommon.rb)
41
+ 2010/03/10 Y SASAKI (change help block into RD format)
42
+ 2014/03/10 S Takehiro (big fix for ruby 1.9)</pre>
43
+
44
+ </body>
45
+ </html>
@@ -0,0 +1,47 @@
1
+ <?xml version="1.0" ?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml">
6
+ <head>
7
+ <title>../bin/gpcut</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">NAME</a></h1><!-- RDLabel: "NAME" -->
11
+ <p>gpcut - Extract, slicing and thinning a GPhys variable.</p>
12
+ <h1><a name="label-1" id="label-1">DESCRIPTION</a></h1><!-- RDLabel: "DESCRIPTION" -->
13
+ <p><em>gpcut</em> is command line tools for extract, slicing and thinning a GPhys variables.</p>
14
+ <h1><a name="label-2" id="label-2">USAGE</a></h1><!-- RDLabel: "USAGE" -->
15
+ <pre>% gpcut [options] path[@|/]varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]</pre>
16
+ <h1><a name="label-3" id="label-3">OPTIONS</a></h1><!-- RDLabel: "OPTIONS" -->
17
+ <dl>
18
+ <dt><h4><a name="label-4" id="label-4">-h, --help</a></h4></dt><!-- RDLabel: "-h, &shy;&shy;help" -->
19
+ <dd>
20
+ print this message.
21
+ </dd>
22
+ <dt><h4><a name="label-5" id="label-5">-m dim, --mean dim</a></h4></dt><!-- RDLabel: "-m dim, &shy;&shy;mean dim" -->
23
+ <dd>
24
+ average along dim axis (optional).
25
+ </dd>
26
+ <dt><h4><a name="label-6" id="label-6">-e dim, --eddy dim:</a></h4></dt><!-- RDLabel: "-e dim, &shy;&shy;eddy dim:" -->
27
+ <dd>
28
+ deviation from mean along dim axis (optional).
29
+ </dd>
30
+ <dt><h4><a name="label-7" id="label-7">-o file, --output file</a></h4></dt><!-- RDLabel: "-o file, &shy;&shy;output file" -->
31
+ <dd>
32
+ output filename (optional).
33
+ Default output filename is 'gphys.nc'.
34
+ </dd>
35
+ </dl>
36
+ <h1><a name="label-8" id="label-8">HISTORY</a></h1><!-- RDLabel: "HISTORY" -->
37
+ <pre>2005/05/17 S Takehiro (created)
38
+ 2005/07/15 S Takehiro (open_gturl method is used for opening gphys variable)
39
+ 2005/08/10 S Takehiro (utilize internal function for printing help message)
40
+ 2005/08/21 S Takehiro (global attributes copied to the output file)
41
+ 2005/08/23 S Takehiro (common methods to gp* command moved to gpcommon.rb)
42
+ 2010/03/10 Y SASAKI (change help block into RD format)
43
+ 2012/02/19 S Takehiro (description for gturl format updated)
44
+ 2014/04/23 S Takehiro (add --eddy option)</pre>
45
+
46
+ </body>
47
+ </html>
@@ -0,0 +1,624 @@
1
+ <?xml version="1.0" ?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+ <html xmlns="http://www.w3.org/1999/xhtml">
6
+ <head>
7
+ <title>../lib/numru/gphys/gphys.rb</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">class NumRu::GPhys</a></h1><!-- RDLabel: "class NumRu::GPhys" -->
11
+ <h2><a name="label-1" id="label-1">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
12
+ <dl>
13
+ <dt><h4><a name="label-2" id="label-2"><code>GPhys.new(<var>grid</var>, <var>data</var>)</code></a></h4></dt><!-- RDLabel: "GPhys.new" -->
14
+ <dd>
15
+ <p>Constructor.</p>
16
+ <p>ARGUMENTS</p>
17
+ <ul>
18
+ <li>grid (a Grid) : the grid</li>
19
+ <li>data (a VArray) : the data. grid and data must have
20
+ the same shape.</li>
21
+ </ul>
22
+ <p>RETURN VALUE</p>
23
+ <ul>
24
+ <li>a GPhys</li>
25
+ </ul>
26
+ <p>NOTE</p>
27
+ <ul>
28
+ <li>the arguments are NOT duplicated to construct a GPhys.</li>
29
+ </ul></dd>
30
+ <dt><h4><a name="label-3" id="label-3"><code>GPhys.each_along_dims(<var>gphyses</var>, *<var>loopdims</var>){...} # <var>a</var> <var>block</var> <var>is</var> <var>expected</var></code></a></h4></dt><!-- RDLabel: "GPhys.each_along_dims" -->
31
+ <dd>
32
+ <p>Iterator to process GPhys objects too big to read on memory at once.</p>
33
+ <p>Makes a loop (loops) by dividing the GPhys object(s) (<var>gphyses</var>)
34
+ with the dimension(s) specified by <var>loopdims</var>.
35
+ If the return value of the block is an Array, it is assumed to consist
36
+ of GPhys objects, and the return value of this method is an Array
37
+ in which the whole of the results are reconstructed as if no
38
+ iteration is made, which is the same behavior as
39
+ <var>GPhys::IO.each_along_dims_write</var>. If the return value of
40
+ the block is not an Array, this methods returns nil.</p>
41
+ <p>WARNING: Unlike <var>GPhys::IO.each_along_dims_write</var>,
42
+ the results of this method is NOT written in file(s),
43
+ so be careful about memory usage if you put an Array of GPhys as the
44
+ return value of the block. You will probably need to have the size
45
+ of them smaller than input data.</p>
46
+ <p>ARGUMENTS</p>
47
+ <ul>
48
+ <li>gphyses (GPhys or Array of GPhys): GPhys object(s) to be processed.
49
+ All of them must have dimensions specified with <var>loopdims</var>,
50
+ and their lengths must not vary among files. Other dimensions
51
+ are arbitrary, so, for example, <var>gphyses</var> could be
52
+ [a(lon,lat,time), b(lat,time)] as long as loopdims==["time"].</li>
53
+ <li>loopdims (Array of String or Integer) : name (when String) or
54
+ count starting from zero (when Integer) </li>
55
+ <li>expected block : Number of arguments == number of GPhys objects in
56
+ <var>gphyses</var>.</li>
57
+ </ul>
58
+ <p>RETURN VALUE</p>
59
+ <ul>
60
+ <li>If the return value of the block is an Array,
61
+ GPhys objects in which the whole results are written in
62
+ (the Array must consist of GPhys objects).
63
+ If the return value of the block is NOT an Array,
64
+ nil is returned.</li>
65
+ </ul>
66
+ <p>ERRORS</p>
67
+ <p>The following raise exceptions (in addition to errors in arguments).</p>
68
+ <ul>
69
+ <li>Dimensions specified by <var>loopdims</var> are not shared among
70
+ GPhys objects in <var>gphyses</var>.</li>
71
+ <li>Return value of the block is an Array, but it does not consist of
72
+ GPhys objects.</li>
73
+ <li>(Only when the return value of the block is an Array):
74
+ Dimension(s) used for looping (<var>loopdims</var>) is(are) eliminated
75
+ from the returned GPhys objects.</li>
76
+ </ul>
77
+ <p>USAGE</p>
78
+ <p>See the manual of <var>GPhys::IO.each_along_dims_write</var>.</p></dd>
79
+ <dt><h4><a name="label-4" id="label-4"><code>GPhys.join_md_nocheck(<var>gpnary</var>)</code></a></h4></dt><!-- RDLabel: "GPhys.join_md_nocheck" -->
80
+ <dd>
81
+ <p>Join multiple GPhys objects that are ordered perfectly in a NArray.</p>
82
+ <p>LIMITATION (as of 2013-03-04)</p>
83
+ <ul>
84
+ <li>joining assoc_coords is yet to be supported; Currently
85
+ assoc_coords are ignored if any.</li>
86
+ </ul>
87
+ <p>ARGUMENT</p>
88
+ <ul>
89
+ <li>gpnarray [NArray of GPhys] having the same rank with that of
90
+ its component GPhys objects. multiple GPhys objects are joined
91
+ along the dimension with multiple elements (the order is kept). </li>
92
+ </ul>
93
+ <p>RETURN VALUE</p>
94
+ <ul>
95
+ <li>a GPhys</li>
96
+ </ul></dd>
97
+ <dt><h4><a name="label-5" id="label-5"><code>GPhys.join_md(<var>gpnary</var>)</code></a></h4></dt><!-- RDLabel: "GPhys.join_md" -->
98
+ <dd>
99
+ <p>Join multiple GPhys objects (ordered in a NArray).</p>
100
+ <p>Like GPhys.join_md_nocheck but it supports insersion
101
+ of omitted 1-element dimensions and transpose for
102
+ gpnary (the input NArray). It means that the rank of gpnary
103
+ can be smaller than that of its compoent GPhys objects, and
104
+ the order of dimensions can be arbitrary. Also,
105
+ the order of coordinate values along each dimension does not
106
+ have to be monotonic; the method supports sorting and spliting
107
+ along dimensions. For example, if gpnary == NArray.object(2):[gp0, gp1],
108
+ where the first object gp0 has the 1st coordinate [0,1,7,8] and
109
+ the second object gp1 has the 1st coordinate [3,4,5,6],
110
+ gpnary is restructured as [ gp0[0..1,false], gp1, gp0[2..3,false] ],
111
+ and join is made by using GPhys.join_md_nocheck.</p>
112
+ <p>This method is generally faster than GPhys.join unless the split
113
+ is one-dimensional.</p>
114
+ <p>ARGUMENT</p>
115
+ <ul>
116
+ <li>gpnarray [NArray of GPhys] </li>
117
+ </ul>
118
+ <p>RETURN VALUE</p>
119
+ <ul>
120
+ <li>a GPhys</li>
121
+ </ul></dd>
122
+ <dt><h4><a name="label-6" id="label-6"><code>GPhys.join(<var>gpary</var>)</code></a></h4></dt><!-- RDLabel: "GPhys.join" -->
123
+ <dd>
124
+ <p>Join multiple GPhys objects (no need for any pre-ordering).</p>
125
+ <p>ARGUMENT</p>
126
+ <ul>
127
+ <li>gpnarray [Array (or 1D NArray) of GPhys]</li>
128
+ </ul>
129
+ <p>RETURN VALUE</p>
130
+ <ul>
131
+ <li>a GPhys</li>
132
+ </ul></dd>
133
+ <dt><h4><a name="label-7" id="label-7"><code>GPhys.concat(<var>gpary</var>, <var>axis_or_ary</var>, <var>name</var>=<var>nil</var>, <var>attr</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "GPhys.concat" -->
134
+ <dd>
135
+ <p>Concatenate an Array (or 1D NArray) of GPhys objects
136
+ along the new dimension specified by the 2nd to 4th arguments.
137
+ The rank of the result (a GPhys) is one plus the rank of
138
+ the GPhys objects.</p>
139
+ <p>ARGUMENTS</p>
140
+ <ul>
141
+ <li>gpary [1D NArray or Array of GPhys]</li>
142
+ <li>axis_or_ary [an Axis or a 1D NArray or Array of floats]</li>
143
+ <li>name [String; optional] name of the coordinate;
144
+ needed if axis_or_ary is not an Axis.</li>
145
+ <li>attr [Hash; optional] attributes of the coordinate;
146
+ used if axis_or_ary is not an Axis.</li>
147
+ </ul>
148
+ <p>RETURN VALUE</p>
149
+ <ul>
150
+ <li>a GPhys</li>
151
+ </ul></dd>
152
+ </dl>
153
+ <h2><a name="label-8" id="label-8">Instance Methods</a></h2><!-- RDLabel: "Instance Methods" -->
154
+ <dl>
155
+ <dt><h4><a name="label-9" id="label-9"><code>data</code></a></h4></dt><!-- RDLabel: "data" -->
156
+ <dd>
157
+ <p>Returns the data object</p>
158
+ <p>RETURN VALUE</p>
159
+ <ul>
160
+ <li>a VArray</li>
161
+ </ul>
162
+ <p>NOTE</p>
163
+ <ul>
164
+ <li>the data object is NOT duplicated.</li>
165
+ </ul></dd>
166
+ <dt><h4><a name="label-10" id="label-10"><code>grid_copy</code></a></h4></dt><!-- RDLabel: "grid_copy" -->
167
+ <dd>
168
+ <p>Returns a copy (deep clone) of the grid object.</p>
169
+ <p>RETURN VALUE</p>
170
+ <ul>
171
+ <li>a Grid</li>
172
+ </ul>
173
+ <p>NOTE</p>
174
+ <ul>
175
+ <li>grid does not make a copy.</li>
176
+ </ul></dd>
177
+ <dt><h4><a name="label-11" id="label-11"><code>grid</code></a></h4></dt><!-- RDLabel: "grid" -->
178
+ <dd>
179
+ <p>Returns the grid object without copying.</p>
180
+ <p>RETURN VALUE</p>
181
+ <ul>
182
+ <li>a Grid</li>
183
+ </ul>
184
+ <p>NOTE</p>
185
+ <ul>
186
+ <li>Use grid_copy to avoid side effects</li>
187
+ </ul></dd>
188
+ <dt><h4><a name="label-12" id="label-12"><code>copy</code></a></h4></dt><!-- RDLabel: "copy" -->
189
+ <dd>
190
+ <p>Make a deep clone onto memory</p>
191
+ <p>RETURN VALUE</p>
192
+ <ul>
193
+ <li>a GPhys</li>
194
+ </ul></dd>
195
+ <dt><h4><a name="label-13" id="label-13"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
196
+ <dd>
197
+ <p>Returns the name of the GPhys object, which is equal to the
198
+ name of the data object in the GPhys object.</p>
199
+ <p>RETURN VALUE</p>
200
+ <ul>
201
+ <li>a String</li>
202
+ </ul></dd>
203
+ <dt><h4><a name="label-14" id="label-14"><code>name=(<var>nm</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
204
+ <dd>
205
+ <p>Set the name of the GPhys object.</p>
206
+ <p>ARGUMENTS</p>
207
+ <ul>
208
+ <li>nm (String)</li>
209
+ </ul>
210
+ <p>RETURN VALUE</p>
211
+ <ul>
212
+ <li>nm (the argument)</li>
213
+ </ul></dd>
214
+ <dt><h4><a name="label-15" id="label-15"><code>rename(<var>nm</var>)</code></a></h4></dt><!-- RDLabel: "rename" -->
215
+ <dd>
216
+ <p>Same as <a href="#label-14">name=</a>, but self is returned.</p>
217
+ <p>ARGUMENTS</p>
218
+ <ul>
219
+ <li>nm (String)</li>
220
+ </ul>
221
+ <p>RETURN VALUE</p>
222
+ <ul>
223
+ <li>self</li>
224
+ </ul></dd>
225
+ <dt><h4><a name="label-16" id="label-16"><code>val</code></a></h4></dt><!-- RDLabel: "val" -->
226
+ <dd>
227
+ <p>Returns data values</p>
228
+ <p>RETURN VALUE</p>
229
+ <ul>
230
+ <li>a NArray or NArrayMiss. It is always a copy and to write in it
231
+ will not affect self.</li>
232
+ </ul></dd>
233
+ <dt><h4><a name="label-17" id="label-17"><code>val=(<var>v</var>)</code></a></h4></dt><!-- RDLabel: "val=" -->
234
+ <dd>
235
+ <p>Writes in data values.</p>
236
+ <p>ARGUMENTS</p>
237
+ <ul>
238
+ <li>v (NArray, NArrayMiss, or Numeric) : data to be written in.</li>
239
+ </ul>
240
+ <p>RETURN VALUE</p>
241
+ <ul>
242
+ <li>v (the argument)</li>
243
+ </ul>
244
+ <p>NOTE</p>
245
+ <ul>
246
+ <li>the contents of v are copied in, unlike <a href="#label-18">replace_val</a></li>
247
+ </ul></dd>
248
+ <dt><h4><a name="label-18" id="label-18"><code>replace_val(<var>v</var>)</code></a></h4></dt><!-- RDLabel: "replace_val" -->
249
+ <dd>
250
+ <p>Replace the data values.</p>
251
+ <p>ARGUMENTS</p>
252
+ <ul>
253
+ <li>v (NArray or NArrayMiss) : data to be written in.</li>
254
+ </ul>
255
+ <p>RETURN VALUE</p>
256
+ <ul>
257
+ <li>self</li>
258
+ </ul>
259
+ <p>NOTE</p>
260
+ <ul>
261
+ <li>This method is similar to <a href="#label-17">val=</a>, but
262
+ the whole numeric data object is replaced with v.
263
+ It is not very meaningful if the data is in a file:
264
+ the file is not modified, but you just get an GPhys object on memory.</li>
265
+ </ul></dd>
266
+ <dt><h4><a name="label-19" id="label-19"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
267
+ <dd>
268
+ <p>Returns attribute names of the data object.</p>
269
+ <p>RETURN VALUE</p>
270
+ <ul>
271
+ <li>Array of String</li>
272
+ </ul></dd>
273
+ <dt><h4><a name="label-20" id="label-20"><code>get_att(<var>name</var>)</code></a></h4></dt><!-- RDLabel: "get_att" -->
274
+ <dd>
275
+ <p>Get the value of the attribute named name.</p>
276
+ <p>ARGUMENTS</p>
277
+ <ul>
278
+ <li>name (String)</li>
279
+ </ul>
280
+ <p>RETURN VALUE</p>
281
+ <ul>
282
+ <li>String, NArray, or nil</li>
283
+ </ul></dd>
284
+ <dt><h4><a name="label-21" id="label-21"><code>set_att(<var>name</var>, <var>val</var>)</code></a></h4></dt><!-- RDLabel: "set_att" -->
285
+ <dt><h4><a name="label-22" id="label-22"><code>put_att(<var>name</var>, <var>val</var>)</code></a></h4></dt><!-- RDLabel: "put_att" -->
286
+ <dd>
287
+ <p>Set an attribute of the data object</p>
288
+ <p>ARGUMENTS</p>
289
+ <ul>
290
+ <li>name (String)</li>
291
+ <li>val (String, NArray, or nil)</li>
292
+ </ul>
293
+ <p>RETURN VALUE</p>
294
+ <ul>
295
+ <li>self</li>
296
+ </ul></dd>
297
+ <dt><h4><a name="label-23" id="label-23"><code>del_att(<var>name</var>)</code></a></h4></dt><!-- RDLabel: "del_att" -->
298
+ <dd>
299
+ <p>Delete an attribute of the data object.</p>
300
+ <p>ARGUMENTS</p>
301
+ <ul>
302
+ <li>name (String)</li>
303
+ </ul>
304
+ <p>RETURN VALUE</p>
305
+ <ul>
306
+ <li>self</li>
307
+ </ul></dd>
308
+ <dt><h4><a name="label-24" id="label-24"><code>ntype</code></a></h4></dt><!-- RDLabel: "ntype" -->
309
+ <dd>
310
+ <p>Returns the numeric type of the data object.</p>
311
+ <p>RETURN VALUE</p>
312
+ <ul>
313
+ <li>String such as "float", and "sfloat"</li>
314
+ </ul>
315
+ <p>NOTE</p>
316
+ <ul>
317
+ <li>See also <a href="#label-25">typecode</a>.</li>
318
+ </ul></dd>
319
+ <dt><h4><a name="label-25" id="label-25"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
320
+ <dd>
321
+ <p>Returns the numeric type of the data object.</p>
322
+ <p>RETURN VALUE</p>
323
+ <ul>
324
+ <li>NArray constants such as NArray::FLOAT and NArray::SFLOAT.</li>
325
+ </ul>
326
+ <p>NOTE</p>
327
+ <ul>
328
+ <li>See also <a href="#label-24">ntype</a>.</li>
329
+ </ul></dd>
330
+ <dt><h4><a name="label-26" id="label-26"><code>units</code></a></h4></dt><!-- RDLabel: "units" -->
331
+ <dd>
332
+ <p>Returns the units of the data object</p>
333
+ <p>RETURN VALUE</p>
334
+ <ul>
335
+ <li>a Units</li>
336
+ </ul></dd>
337
+ <dt><h4><a name="label-27" id="label-27"><code>units=(<var>units</var>)</code></a></h4></dt><!-- RDLabel: "units=" -->
338
+ <dd>
339
+ <p>Changes the units of the data object</p>
340
+ <p>ARGUMENTS</p>
341
+ <ul>
342
+ <li>units (Units or String)</li>
343
+ </ul>
344
+ <p>RETURN VALUE</p>
345
+ <ul>
346
+ <li>units (the argument)</li>
347
+ </ul></dd>
348
+ <dt><h4><a name="label-28" id="label-28"><code>convert_units(<var>to</var>)</code></a></h4></dt><!-- RDLabel: "convert_units" -->
349
+ <dd>
350
+ <p>Convert the units of the data object</p>
351
+ <p>ARGUMENTS</p>
352
+ <ul>
353
+ <li>to (a Units)</li>
354
+ </ul>
355
+ <p>RETURN VALUE</p>
356
+ <ul>
357
+ <li>a GPhys</li>
358
+ </ul></dd>
359
+ <dt><h4><a name="label-29" id="label-29"><code>long_name</code></a></h4></dt><!-- RDLabel: "long_name" -->
360
+ <dd>
361
+ <p>Returns the "long_name" attribute the data object</p>
362
+ <p>RETURN VALUE</p>
363
+ <ul>
364
+ <li>a String</li>
365
+ </ul></dd>
366
+ <dt><h4><a name="label-30" id="label-30"><code>long_name=(<var>to</var>)</code></a></h4></dt><!-- RDLabel: "long_name=" -->
367
+ <dd>
368
+ <p>Changes/sets the "long_name" attribute the data object</p>
369
+ <p>ARGUMENTS</p>
370
+ <ul>
371
+ <li>to (a String)</li>
372
+ </ul>
373
+ <p>RETURN VALUE</p>
374
+ <ul>
375
+ <li>to (the argument)</li>
376
+ </ul></dd>
377
+ <dt><h4><a name="label-31" id="label-31"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
378
+ <dd>
379
+ <p>Returns a subset.</p>
380
+ <p>ARGUMENTS</p>
381
+ <ul>
382
+ <li>Same as those for NArray#[], NetCDFVar#[], etc.</li>
383
+ </ul>
384
+ <p>RETURN VALUE</p>
385
+ <ul>
386
+ <li>a GPhys</li>
387
+ </ul></dd>
388
+ <dt><h4><a name="label-32" id="label-32"><code>[] = </code></a></h4></dt><!-- RDLabel: "[]=" -->
389
+ <dd>
390
+ <p>Sets values of a subset</p>
391
+ <p>RETURN VALUE</p>
392
+ <ul>
393
+ <li>the data object on the rhs</li>
394
+ </ul></dd>
395
+ <dt><h4><a name="label-33" id="label-33"><code>cut</code></a></h4></dt><!-- RDLabel: "cut" -->
396
+ <dd>
397
+ <p>Similar to <a href="#label-31">[]</a>, but the subset is specified by physical coordinate.</p>
398
+ <p>ARGUMENTS</p>
399
+ <ul>
400
+ <li>pattern 1: similar to those for <a href="#label-31">[]</a>, where the first
401
+ argument specifies a subset for the first dimension.</li>
402
+ <li>pattern 2: by a Hash, in which keys are axis names.</li>
403
+ </ul>
404
+ <p>EXAMPLES</p>
405
+ <ul>
406
+ <li><p>Pattern 1</p>
407
+ <pre>gphys.cut(135.5,0..20.5,false)</pre></li>
408
+ <li><p>Pattern 2</p>
409
+ <pre>gphys.cut({'lon'=&gt;135.5,'lat'=&gt;0..20})</pre></li>
410
+ </ul>
411
+ <p>RETURN VALUE</p>
412
+ <ul>
413
+ <li>a GPhys</li>
414
+ </ul></dd>
415
+ <dt><h4><a name="label-34" id="label-34"><code>cut_rank_conserving</code></a></h4></dt><!-- RDLabel: "cut_rank_conserving" -->
416
+ <dd>
417
+ Similar to <a href="#label-33">cut</a>, but the rank is conserved by not eliminating
418
+ any dimension (whose length could be one).</dd>
419
+ <dt><h4><a name="label-35" id="label-35"><code>axnames</code></a></h4></dt><!-- RDLabel: "axnames" -->
420
+ <dd>
421
+ <p>Returns the names of the axes</p>
422
+ <p>RETURN VALUE</p>
423
+ <ul>
424
+ <li>an Array of String</li>
425
+ </ul></dd>
426
+ <dt><h4><a name="label-36" id="label-36"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
427
+ <dd>
428
+ <p>Returns the rank</p>
429
+ <p>RETURN VALUE</p>
430
+ <ul>
431
+ <li>an Integer</li>
432
+ </ul></dd>
433
+ <dt><h4><a name="label-37" id="label-37"><code>axis(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "axis" -->
434
+ <dd>
435
+ <p>Returns the Axis object of a dimension.</p>
436
+ <p>ARGEMENTS</p>
437
+ <ul>
438
+ <li>dim (Integer or String)</li>
439
+ </ul>
440
+ <p>RETURN VALUE</p>
441
+ <ul>
442
+ <li>an Axis</li>
443
+ </ul></dd>
444
+ <dt><h4><a name="label-38" id="label-38"><code>coord(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "coord" -->
445
+ <dt><h4><a name="label-39" id="label-39"><code>coordinate(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "coordinate" -->
446
+ <dd>
447
+ <p>Returns the coordinate variable</p>
448
+ <p>ARGUMENTS</p>
449
+ <ul>
450
+ <li>dim (Integer or String)</li>
451
+ </ul>
452
+ <p>RETURN VALUE</p>
453
+ <ul>
454
+ <li>a VArray</li>
455
+ </ul>
456
+ <p>NOTE</p>
457
+ <ul>
458
+ <li>coord(dim) is equivalent to axis(dim).pos</li>
459
+ </ul></dd>
460
+ <dt><h4><a name="label-40" id="label-40"><code>lost_axes</code></a></h4></dt><!-- RDLabel: "lost_axes" -->
461
+ <dd>
462
+ <p>Returns info on axes eliminated during operations.</p>
463
+ <p>Useful for annotation in plots, for example (See the code of GGraph
464
+ for an application).</p>
465
+ <p>RETURN VALUE</p>
466
+ <ul>
467
+ <li>an Array of String</li>
468
+ </ul></dd>
469
+ <dt><h4><a name="label-41" id="label-41"><code>dim_index( <var>dimname</var> )</code></a></h4></dt><!-- RDLabel: "dim_index" -->
470
+ <dd>
471
+ <p>Returns the integer id (count from zero) of the dimension</p>
472
+ <p>ARGUMENT</p>
473
+ <ul>
474
+ <li>dimname (String or Integer) : this method is trivial if is is an integer</li>
475
+ </ul>
476
+ <p>RETURN VALUE</p>
477
+ <ul>
478
+ <li>an Integer</li>
479
+ </ul></dd>
480
+ <dt><h4><a name="label-42" id="label-42"><code>integrate(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "integrate" -->
481
+ <dd>
482
+ <p>Integration along a dimension.</p>
483
+ <p>RETURN VALUE</p>
484
+ <ul>
485
+ <li>a GPhys</li>
486
+ </ul>
487
+ <p>NOTE</p>
488
+ <ul>
489
+ <li>Algorithm implementation is done in Axis class.</li>
490
+ </ul></dd>
491
+ <dt><h4><a name="label-43" id="label-43"><code>average(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "average" -->
492
+ <dd>
493
+ <p>Averaging along a dimension.</p>
494
+ <p>RETURN VALUE</p>
495
+ <ul>
496
+ <li>a GPhys</li>
497
+ </ul>
498
+ <p>NOTE</p>
499
+ <ul>
500
+ <li>Algorithm implementation is done in Axis class.</li>
501
+ </ul></dd>
502
+ <dt><h4><a name="label-44" id="label-44"><code>eddy(*<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "eddy" -->
503
+ <dd>
504
+ <p>Deviation from mean</p>
505
+ <p>ARGUMENT</p>
506
+ <ul>
507
+ <li>a list of dimensions (including none) [Integer or String] along which
508
+ the mean is taken.</li>
509
+ </ul>
510
+ <p>RETURN VALUE</p>
511
+ <ul>
512
+ <li>a GPhys</li>
513
+ </ul>
514
+ <p>NOTE</p>
515
+ <ul>
516
+ <li><p>Simply defined as</p>
517
+ <pre>def eddy(*dim)
518
+ self - self.mean(*dim)
519
+ end</pre></li>
520
+ </ul></dd>
521
+ <dt><h4><a name="label-45" id="label-45"><code>first1D</code></a></h4></dt><!-- RDLabel: "first1D" -->
522
+ <dd>
523
+ <p>Returns a 1D subset selecting the first elements of 2nd, 3rd, ..
524
+ dimensions, i.e., self[true, 0, 0, ...]. (For graphics)</p>
525
+ <p>ARGUMENTS</p>
526
+ <ul>
527
+ <li>(none)</li>
528
+ </ul>
529
+ <p>RETURN VALUE</p>
530
+ <ul>
531
+ <li>a GPhys</li>
532
+ </ul></dd>
533
+ <dt><h4><a name="label-46" id="label-46"><code>first2D</code></a></h4></dt><!-- RDLabel: "first2D" -->
534
+ <dd>
535
+ <p>Returns a 2D subset selecting the first elements of 3rd, 4th, ..
536
+ dimensions, i.e., self[true, true, 0, 0, ...]. (For graphics)</p>
537
+ <p>ARGUMENTS</p>
538
+ <ul>
539
+ <li>(none)</li>
540
+ </ul>
541
+ <p>RETURN VALUE</p>
542
+ <ul>
543
+ <li>a GPhys</li>
544
+ </ul></dd>
545
+ <dt><h4><a name="label-47" id="label-47"><code>first3D</code></a></h4></dt><!-- RDLabel: "first3D" -->
546
+ <dd>
547
+ <p>Returns a 3D subset selecting the first elements of 4th, 5th, ..
548
+ dimensions, i.e., self[true, true, true, 0, ...]. (For graphics)</p>
549
+ <p>ARGUMENTS</p>
550
+ <ul>
551
+ <li>(none)</li>
552
+ </ul>
553
+ <p>RETURN VALUE</p>
554
+ <ul>
555
+ <li>a GPhys</li>
556
+ </ul></dd>
557
+ <dt><h4><a name="label-48" id="label-48"><code>coerce(<var>other</var>)</code></a></h4></dt><!-- RDLabel: "coerce" -->
558
+ <dd>
559
+ <var>You know what it is.</var></dd>
560
+ <dt><h4><a name="label-49" id="label-49"><code>shape_coerce(<var>other</var>)</code></a></h4></dt><!-- RDLabel: "shape_coerce" -->
561
+ <dd>
562
+ Like <a href="#label-48">coerce</a>, but just changes shape without changing numeric type
563
+ by possibly inserting dimensions whose lengths are one (i.e.,
564
+ without changeing the total length of data).</dd>
565
+ <dt><h4><a name="label-50" id="label-50"><code>shape_coerce_full(<var>other</var>)</code></a></h4></dt><!-- RDLabel: "shape_coerce_full" -->
566
+ <dd>
567
+ Similar to <a href="#label-49">shape_coerce</a> but to return the gphyses having
568
+ really the same shape with possible expansion by replication.</dd>
569
+ <dt><h4><a name="label-51" id="label-51"><code>transpose(*<var>dims</var>)</code></a></h4></dt><!-- RDLabel: "transpose" -->
570
+ <dd>
571
+ <p>Transpose.</p>
572
+ <p>ARGUMENTS</p>
573
+ <ul>
574
+ <li>dims (integers) : for example, [1,0] to transpose a 2D object.
575
+ For 3D objects, [1,0,2], [2,1,0], etc.etc.</li>
576
+ </ul>
577
+ <p>RETURN VALUE</p>
578
+ <ul>
579
+ <li>a GPhys</li>
580
+ </ul></dd>
581
+ <dt><h4><a name="label-52" id="label-52"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
582
+ <dd>
583
+ <p>Returns the current shape of the GPhys object.</p>
584
+ <p>RETURN VALUE</p>
585
+ <ul>
586
+ <li>an Array of Integer</li>
587
+ </ul></dd>
588
+ <dt><h4><a name="label-53" id="label-53"><code>shape</code></a></h4></dt><!-- RDLabel: "shape" -->
589
+ <dd>
590
+ Aliased to <a href="#label-52">shape_current</a></dd>
591
+ <dt><h4><a name="label-54" id="label-54"><code>cyclic_ext(<var>dim_or_dimname</var>)</code></a></h4></dt><!-- RDLabel: "cyclic_ext" -->
592
+ <dd>
593
+ <p>Extend a dimension cyclically.</p>
594
+ <p>The extension is done only when adding one grid point makes a full circle.
595
+ Thus, data at coordinate values [0,90,180,270] with modulo 360 are extended
596
+ (to at [0,90,180,270,360]), but data at [0,90,180] are not extended with
597
+ the same modulo: in this case, self is returned.</p>
598
+ <p>ARGUMENTS</p>
599
+ <ul>
600
+ <li>dim_or_dimname (String or Integer)</li>
601
+ </ul>
602
+ <p>RETURN VALUE</p>
603
+ <ul>
604
+ <li>a GPhys (possibly self)</li>
605
+ </ul></dd>
606
+ </dl>
607
+ <h3><a name="label-55" id="label-55">Math functions (instance methods)</a></h3><!-- RDLabel: "Math functions (instance methods)" -->
608
+ <h4><a name="label-56" id="label-56">sqrt, exp, log, log10, log2, sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh, csc, sec, cot, csch, sech, coth, acsc, asec, acot, acsch, asech, acoth</a></h4><!-- RDLabel: "sqrt, exp, log, log10, log2, sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh, csc, sec, cot, csch, sech, coth, acsc, asec, acot, acsch, asech, acoth" -->
609
+ <h3><a name="label-57" id="label-57">Binary operators</a></h3><!-- RDLabel: "Binary operators" -->
610
+ <h4><a name="label-58" id="label-58">-, +, *, /, %, **, .add!, .sub!, .mul!, .div!, mod!, &gt;, &gt;=, &lt;, &lt;=, &amp;, |, ^, .eq, .ne, .gt, .ge, .lt, .le, .and, .or, .xor, .not</a></h4><!-- RDLabel: "-, +, *, /, %, **, .add!, .sub!, .mul!, .div!, mod!, >, >=, <, <=, &, |, ^, .eq, .ne, .gt, .ge, .lt, .le, .and, .or, .xor, .not" -->
611
+ <h3><a name="label-59" id="label-59">Unary operators</a></h3><!-- RDLabel: "Unary operators" -->
612
+ <h4><a name="label-60" id="label-60">~ - +</a></h4><!-- RDLabel: "~ - +" -->
613
+ <h3><a name="label-61" id="label-61">Mean etc (instance methods)</a></h3><!-- RDLabel: "Mean etc (instance methods)" -->
614
+ <h4><a name="label-62" id="label-62">mean, sum, stddev, min, max, median</a></h4><!-- RDLabel: "mean, sum, stddev, min, max, median" -->
615
+ <h3><a name="label-63" id="label-63">Other instance methods</a></h3><!-- RDLabel: "Other instance methods" -->
616
+ <p>These methods returns a NArray (not a GPhys).</p>
617
+ <h4><a name="label-64" id="label-64">all?, any?, none?, where, where2, floor, ceil, round, to_f, to_i, to_a</a></h4><!-- RDLabel: "all?, any?, none?, where, where2, floor, ceil, round, to_f, to_i, to_a" -->
618
+ <pre>gp00.set_assoc_coords([GPhys.new(Grid.new(xax0,yax0),VArray.new(x,nil,"A"))])
619
+ gp10.set_assoc_coords([GPhys.new(Grid.new(xax1,yax0),VArray.new(x,nil,"A"))])
620
+ gp01.set_assoc_coords([GPhys.new(Grid.new(xax0,yax1),VArray.new(x,nil,"A"))])
621
+ gp11.set_assoc_coords([GPhys.new(Grid.new(xax1,yax1),VArray.new(x,nil,"A"))])</pre>
622
+
623
+ </body>
624
+ </html>