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,21 @@
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/grads2nc_with_gphys</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">NAME</a></h1><!-- RDLabel: "NAME" -->
11
+ <p>grads2nc_with_gphys - GrADS to NetCDF converter</p>
12
+ <h1><a name="label-1" id="label-1">WARNING</a></h1><!-- RDLabel: "WARNING" -->
13
+ <p>Not efficient if the GrADS file has many variables.</p>
14
+ <h1><a name="label-2" id="label-2">USAGE</a></h1><!-- RDLabel: "USAGE" -->
15
+ <pre>% grads2nc_with_gphys infilename outfilename [-v varname1 [varname2 ...]]</pre>
16
+ <h1><a name="label-3" id="label-3">EXAMPLE</a></h1><!-- RDLabel: "EXAMPLE" -->
17
+ <pre>% grads2nc_with_gphys ../testdata/T.jan.ctl tmp.nc
18
+ % grads2nc_with_gphys ../testdata/T.jan.ctl tmp.nc -v T</pre>
19
+
20
+ </body>
21
+ </html>
@@ -0,0 +1,307 @@
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/grads_gridded.rb</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">NumRu::GrADS_Gridded -- a class for GrADS gridded datasets</a></h1><!-- RDLabel: "NumRu::GrADS_Gridded &shy;&shy; a class for GrADS gridded datasets" -->
11
+ <p>by T Horinouchi and R Mizuta</p>
12
+ <h2><a name="label-1" id="label-1">Overview</a></h2><!-- RDLabel: "Overview" -->
13
+ <p>a GrADS_Gridded object corresponds to a GrADS control file,
14
+ through which the users can also access its binary data file(s).</p>
15
+ <h2><a name="label-2" id="label-2">Current Limitations</a></h2><!-- RDLabel: "Current Limitations" -->
16
+ <ul>
17
+ <li>option 365_day_calendar is not interpreted</li>
18
+ <li>Partial support of the "template" option
19
+ (only %y2,%y4,%m1,%m2,%d1,%d2,%h1,%h2,%n2)
20
+ (Time is assumed to be increasing monotonically).</li>
21
+ </ul>
22
+ <h2><a name="label-3" id="label-3">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
23
+ <dl>
24
+ <dt><h4><a name="label-4" id="label-4"><code>GrADS_Gridded.new(<var>ctlfilename</var>, <var>mode</var>="<var>r</var>")</code></a></h4></dt><!-- RDLabel: "GrADS_Gridded.new" -->
25
+ <dd>
26
+ same as GrADS_Gridded.open</dd>
27
+ <dt><h4><a name="label-5" id="label-5"><code>GrADS_Gridded.open(<var>ctlfilename</var>, <var>mode</var>="<var>r</var>")</code></a></h4></dt><!-- RDLabel: "GrADS_Gridded.open" -->
28
+ <dd>
29
+ <p>make a new GrADS_Gridded object. </p>
30
+ <p>ARGUMENTS</p>
31
+ <ul>
32
+ <li>ctlfilename (String): name of the control file to open</li>
33
+ <li>mode (String): IO mode. "r" (read only) or "w" (write only).</li>
34
+ </ul>
35
+ <p>REMARK</p>
36
+ <ul>
37
+ <li>You can modify the object through instance methods even if mode=="r".
38
+ In that case, the modification will not be written in the original
39
+ control file.</li>
40
+ </ul></dd>
41
+ <dt><h4><a name="label-6" id="label-6"><code>GrADS_Gridded.create(<var>ctlfilename</var>, <var>noclobber</var>=<var>false</var>, <var>share</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "GrADS_Gridded.create" -->
42
+ <dd>
43
+ <p>make a new GrADS_Gridded object with creating a new control file</p>
44
+ <p>REMARK</p>
45
+ <ul>
46
+ <li>It is used with writing methods, but currently writing methods
47
+ does not work. </li>
48
+ </ul></dd>
49
+ </dl>
50
+ <h2><a name="label-7" id="label-7">Methods</a></h2><!-- RDLabel: "Methods" -->
51
+ <dl>
52
+ <dt><h4><a name="label-8" id="label-8"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
53
+ <dd>
54
+ returns the number of dimensions in the file (always 4). </dd>
55
+ <dt><h4><a name="label-9" id="label-9"><code>nvars</code></a></h4></dt><!-- RDLabel: "nvars" -->
56
+ <dd>
57
+ returns the number of variables in the file. </dd>
58
+ <dt><h4><a name="label-10" id="label-10"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
59
+ <dd>
60
+ returns the number of attributes of the variable.</dd>
61
+ <dt><h4><a name="label-11" id="label-11"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
62
+ <dd>
63
+ returns the path of the control file.</dd>
64
+ <dt><h4><a name="label-12" id="label-12"><code>put_att( <var>attname</var>, <var>value</var> )</code></a></h4></dt><!-- RDLabel: "put_att" -->
65
+ <dd>
66
+ <p>set global attribute</p>
67
+ <p>ARGUMENTS</p>
68
+ <ul>
69
+ <li>attrname (String): name of an attribute</li>
70
+ <li>value (String): value of an attribute</li>
71
+ </ul></dd>
72
+ <dt><h4><a name="label-13" id="label-13"><code>def_var(<var>name</var>="<var>noname</var>",<var>nlev</var>=<var>0</var>,<var>option</var>="<var>99</var>",<var>description</var>="")</code></a></h4></dt><!-- RDLabel: "def_var" -->
73
+ <dd>
74
+ <p>define a variable</p>
75
+ <p>ARGUMENTS</p>
76
+ <ul>
77
+ <li>name (String): name of the variable</li>
78
+ <li>nlev (Integer): number of vertical levels</li>
79
+ <li>option (String): variable placement option
80
+ ("99": normal, "-1,30": transpose lon and lat)</li>
81
+ </ul></dd>
82
+ <dt><h4><a name="label-14" id="label-14"><code>var( <var>varname</var>=<var>nil</var> )</code></a></h4></dt><!-- RDLabel: "var" -->
83
+ <dd>
84
+ <p>opens an existing variable in the file. </p>
85
+ <p>ARGUMENTS</p>
86
+ <ul>
87
+ <li>varname (String): name of the variable to open</li>
88
+ </ul>
89
+ <p>RETURN VALUE</p>
90
+ <ul>
91
+ <li>a GrADSVar object. </li>
92
+ </ul></dd>
93
+ <dt><h4><a name="label-15" id="label-15"><code>vars( <var>names</var>=<var>nil</var> )</code></a></h4></dt><!-- RDLabel: "vars" -->
94
+ <dd>
95
+ <p>opens existing variables in the file. </p>
96
+ <p>ARGUMENTS</p>
97
+ <ul>
98
+ <li>names (Array): names(String) of the variable to open</li>
99
+ </ul>
100
+ <p>RETURN VALUE</p>
101
+ <ul>
102
+ <li>Array of GrADSVar objects.
103
+ returns all variables if names==nil</li>
104
+ </ul></dd>
105
+ <dt><h4><a name="label-16" id="label-16"><code>get_att( <var>key</var>=<var>nil</var> )</code></a></h4></dt><!-- RDLabel: "get_att" -->
106
+ <dd>
107
+ returns tha value of the global attribute</dd>
108
+ <dt><h4><a name="label-17" id="label-17"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
109
+ <dd>
110
+ returns the names of all dimensions in the control file.</dd>
111
+ <dt><h4><a name="label-18" id="label-18"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
112
+ <dd>
113
+ returns the names of all variables in the control file.</dd>
114
+ <dt><h4><a name="label-19" id="label-19"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
115
+ <dd>
116
+ returns the names of all the global attributes.</dd>
117
+ <dt><h4><a name="label-20" id="label-20"><code>to_ctl</code></a></h4></dt><!-- RDLabel: "to_ctl" -->
118
+ <dd>
119
+ <p>returns the contents of the corresponding control file as a String.</p>
120
+ <p>REMARK</p>
121
+ <ul>
122
+ <li>The contents is reconstructed from the internal data of the object.
123
+ Therefore, even when the object is based on a read-only control file,
124
+ it is not necessarily the same as the original one. It is especially
125
+ true when the object was modified after it is opened.</li>
126
+ </ul></dd>
127
+ <dt><h4><a name="label-21" id="label-21"><code>get(<var>name</var>, <var>z</var>, <var>t</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
128
+ <dd>
129
+ <p>reads the binary data and returns as a NArray.</p>
130
+ <p>ARGUMENTS</p>
131
+ <ul>
132
+ <li>name (String): name of the variable to read</li>
133
+ <li>z (Integer, currently): vertical level to read (0,1,2,...; starting
134
+ from 0). Currently only one vertical levels must be chosen, but in the
135
+ future, it is planned to support multiple levels.</li>
136
+ <li>t (Integer, currently): time to read (0,1,2,...; starting
137
+ from 0). Currently only one time must be chosen, but in the
138
+ future, it is planned to support multiple times.</li>
139
+ </ul></dd>
140
+ <dt><h4><a name="label-22" id="label-22"><code>put(<var>ary</var>)</code></a></h4></dt><!-- RDLabel: "put" -->
141
+ <dd>
142
+ <p>writes the NArray on the binary data file. </p>
143
+ <p>ARGUMENTS</p>
144
+ <ul>
145
+ <li>ary (NArray): data to write. </li>
146
+ </ul></dd>
147
+ <dt><h4><a name="label-23" id="label-23"><code>varnames</code></a></h4></dt><!-- RDLabel: "varnames" -->
148
+ <dd>
149
+ Returns names of the variable in the GrADS file as an Array in the order
150
+ placed.</dd>
151
+ <dt><h4><a name="label-24" id="label-24"><code>dimensions</code></a></h4></dt><!-- RDLabel: "dimensions" -->
152
+ <dd>
153
+ <p>Returns info on the four dimensions.</p>
154
+ <p>RETURN VALUE</p>
155
+ <ul>
156
+ <li><p>an Array of 4 elements: dimension[0] for x, dimension[1] for y,
157
+ dimension[2] for z, and dimension[3] for t. Each of them is a
158
+ Hash like the following:</p>
159
+ <pre>{:name=&gt;"x",
160
+ :len=&gt;132,
161
+ :flag=&gt;"LINEAR",
162
+ :spec=&gt;"-0.7500 1.5000",
163
+ :start=&gt;-0.75, :increment=&gt;1.5,
164
+ :description=&gt;"longitude",
165
+ :units=&gt;"degrees_east"}</pre>
166
+ <p>Here, :len, :flag, and :spec are directly from the control file, while
167
+ others are derived properties for internal use. </p></li>
168
+ </ul>
169
+ <p>WARNING</p>
170
+ <ul>
171
+ <li>Each elements of the return value is not a clone but is a direct
172
+ association to an internal object of the object. Therefore, to
173
+ modify it is to modify the object. That is, dimensions[0][:len]=10
174
+ would actually change the internal variable, while dimensions[0]=nil
175
+ has no effect (the former is a substitution IN a Hash, while the latter
176
+ is a substitution OF the Hash).</li>
177
+ </ul></dd>
178
+ <dt><h4><a name="label-25" id="label-25"><code>get_dim(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "get_dim" -->
179
+ <dd>
180
+ <p>returns positions of a dimension as an NArray.</p>
181
+ <p>ARGUMENTS</p>
182
+ <ul>
183
+ <li>dim (String): a dimension name</li>
184
+ </ul>
185
+ <p>RETURN VALUE</p>
186
+ <ul>
187
+ <li>an NArray</li>
188
+ </ul></dd>
189
+ <dt><h4><a name="label-26" id="label-26"><code>title</code></a></h4></dt><!-- RDLabel: "title" -->
190
+ <dt><h4><a name="label-27" id="label-27"><code>title=</code></a></h4></dt><!-- RDLabel: "title=" -->
191
+ <dd>
192
+ get/set the title</dd>
193
+ <dt><h4><a name="label-28" id="label-28"><code>undef</code></a></h4></dt><!-- RDLabel: "undef" -->
194
+ <dt><h4><a name="label-29" id="label-29"><code>undef=</code></a></h4></dt><!-- RDLabel: "undef=" -->
195
+ <dd>
196
+ get/set the undef value</dd>
197
+ <dt><h4><a name="label-30" id="label-30"><code>dset</code></a></h4></dt><!-- RDLabel: "dset" -->
198
+ <dt><h4><a name="label-31" id="label-31"><code>dset=</code></a></h4></dt><!-- RDLabel: "dset=" -->
199
+ <dd>
200
+ get/set the dset string</dd>
201
+ </dl>
202
+ <h1><a name="label-32" id="label-32">GrADSVar -- a class for a variable of GrADS gridded datasets</a></h1><!-- RDLabel: "GrADSVar &shy;&shy; a class for a variable of GrADS gridded datasets" -->
203
+ <p>by R Mizuta</p>
204
+ <h2><a name="label-33" id="label-33">Overview</a></h2><!-- RDLabel: "Overview" -->
205
+ <p>a GrADSVar object corresponds to one variable in a GrADS control file.
206
+ It is intended to behave as a correspondent of a NetCDFVar object. </p>
207
+ <h2><a name="label-34" id="label-34">Current Limitations</a></h2><!-- RDLabel: "Current Limitations" -->
208
+ <ul>
209
+ <li>Only a part of the methods can work. </li>
210
+ <li>Writing methods are not supported. </li>
211
+ </ul>
212
+ <h2><a name="label-35" id="label-35">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
213
+ <dl>
214
+ <dt><h4><a name="label-36" id="label-36"><code>GrADSVar.new(<var>file</var>, <var>varname</var>)</code></a></h4></dt><!-- RDLabel: "GrADSVar.new" -->
215
+ <dd>
216
+ <p>make a new GrADSVar object. </p>
217
+ <p>ARGUMENTS</p>
218
+ <ul>
219
+ <li>file (GrADS_Gridded or String): a GrADS_Gridded object or
220
+ a name of the control file to open</li>
221
+ <li>varname (String): name of the variable to open</li>
222
+ </ul></dd>
223
+ </dl>
224
+ <h2><a name="label-37" id="label-37">Methods</a></h2><!-- RDLabel: "Methods" -->
225
+ <dl>
226
+ <dt><h4><a name="label-38" id="label-38"><code>shape_ul0</code></a></h4></dt><!-- RDLabel: "shape_ul0" -->
227
+ <dd>
228
+ <p>returns the shape of the variable, but the length of the unlimited
229
+ dimension is set to zero.</p>
230
+ <p>RETURN VALUE</p>
231
+ <ul>
232
+ <li>Array. [length of 0th dim, length of 1st dim,.. ]</li>
233
+ </ul></dd>
234
+ <dt><h4><a name="label-39" id="label-39"><code>shape_current</code></a></h4></dt><!-- RDLabel: "shape_current" -->
235
+ <dd>
236
+ <p>returns the current shape of the variable.</p>
237
+ <p>RETURN VALUE</p>
238
+ <ul>
239
+ <li>Array. [length of 0th dim, length of 1st dim,.. ]</li>
240
+ </ul></dd>
241
+ <dt><h4><a name="label-40" id="label-40"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
242
+ <dd>
243
+ returns the names of all dimensions of the variable.</dd>
244
+ <dt><h4><a name="label-41" id="label-41"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
245
+ <dd>
246
+ returns the names of all attributes of the variable.</dd>
247
+ <dt><h4><a name="label-42" id="label-42"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
248
+ <dd>
249
+ returns the name of the variable. </dd>
250
+ <dt><h4><a name="label-43" id="label-43"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
251
+ <dd>
252
+ returns the number of dimensions in the file (always 4). </dd>
253
+ <dt><h4><a name="label-44" id="label-44"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
254
+ <dd>
255
+ alias of ndims</dd>
256
+ <dt><h4><a name="label-45" id="label-45"><code>vartype</code></a></h4></dt><!-- RDLabel: "vartype" -->
257
+ <dd>
258
+ returns "sfloat" in order to behave as NetCDFVar#vartype. </dd>
259
+ <dt><h4><a name="label-46" id="label-46"><code>natts</code></a></h4></dt><!-- RDLabel: "natts" -->
260
+ <dd>
261
+ returns the number of attributes of the variable.</dd>
262
+ <dt><h4><a name="label-47" id="label-47"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
263
+ <dd>
264
+ returns the file name that controls the variable. </dd>
265
+ <dt><h4><a name="label-48" id="label-48"><code>get_att( <var>name</var>=<var>nil</var> )</code></a></h4></dt><!-- RDLabel: "get_att" -->
266
+ <dd>
267
+ returns tha value of the attribute of the variable.</dd>
268
+ <dt><h4><a name="label-49" id="label-49"><code>put_att( <var>name</var>, <var>value</var> )</code></a></h4></dt><!-- RDLabel: "put_att" -->
269
+ <dd>
270
+ <p>set an attribute of the variable. </p>
271
+ <p>ARGUMENTS</p>
272
+ <ul>
273
+ <li>name (String): name of an attribute</li>
274
+ <li>value (String): value of an attribute</li>
275
+ </ul></dd>
276
+ <dt><h4><a name="label-50" id="label-50"><code>get(<var>hash</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "get" -->
277
+ <dd>
278
+ <p>returns values of the variable.</p>
279
+ <p>ARGUMENTS</p>
280
+ <ul>
281
+ <li>hash (Hash) : Optional argument to limit the portion of the
282
+ variable to output values. If omitted, the whole variable is
283
+ subject to the output. This argument accepts a Hash whose keys
284
+ contain either "index" or a combination of "start","end", and
285
+ "stride". The value of "index" points the index of a scalar
286
+ portion of the variable. The other case is used to designate a
287
+ regularly ordered subset, where "start" and "end" specifies
288
+ bounds in each dimension and "stride" specifies intervals in
289
+ it. As in Array "start", "end", and "index" can take negative
290
+ values to specify index backward from the end. However,
291
+ "stride" has to be positive, so reversing the array must be
292
+ done afterwards if you like.</li>
293
+ </ul>
294
+ <p>RETURN VALUE</p>
295
+ <ul>
296
+ <li>an NArray object</li>
297
+ </ul>
298
+ <p>REMARK
299
+ "stride","index" is not supported yet.</p></dd>
300
+ <dt><h4><a name="label-51" id="label-51"><code>[]</code></a></h4></dt><!-- RDLabel: "[]" -->
301
+ <dd>
302
+ Same as GrADSVar#get but a subset is specified as in the method []
303
+ of NArray. </dd>
304
+ </dl>
305
+
306
+ </body>
307
+ </html>
@@ -0,0 +1,149 @@
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/grib.rb</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">Status</a></h1><!-- RDLabel: "Status" -->
11
+ <ul>
12
+ <li>only a Lon-Lat coordinate is supported</li>
13
+ <li>only simple pakking is supported</li>
14
+ <li>variable list is not complete for NCEP and ECMWF</li>
15
+ </ul>
16
+ <p>if ! 'a'.respond_to?(:ord)</p>
17
+ <pre>class String
18
+ def ord
19
+ self[0]
20
+ end
21
+ end</pre>
22
+ <p>end
23
+ if ! 'a'.respond_to?(:getbyte)</p>
24
+ <pre>class String
25
+ def getbyte(i)
26
+ self[i]
27
+ end
28
+ end</pre>
29
+ <p>end</p>
30
+ <pre>def str2uint1(str)
31
+ return nil if str.length==0
32
+ return str.ord
33
+ end
34
+ def str2uint2(str)
35
+ return nil if str.length==0
36
+ return (str.ord&lt;&lt;8)+str.getbyte(1)
37
+ end
38
+ def str2uint3(str)
39
+ return nil if str.length==0
40
+ return (str.ord&lt;&lt;16)+(str.getbyte(1)&lt;&lt;8)+str.getbyte(2)
41
+ end</pre>
42
+ <pre>index[1].each{|j|
43
+ jj = j-index[1].first
44
+ sb = j*nlon+index[0].first
45
+ sb = sb-map[true,0..jj-1].count_false if jj&gt;0
46
+ sb = sb*nbits_pack
47
+ eb = sb+mask[true,j].count_true*nbits_pack
48
+ if sb!=eb
49
+ var[mask[true,j].where,jj] = get_value(@sgm.file,@pos+8,sb,eb,nbits_pack,nstep)
50
+ end
51
+ }</pre>
52
+ <pre>sb = index[1].first*nlon*nbits_pack
53
+ eb = (index[1].end+1)*nlon*nbits_pack
54
+ var = get_value(@sgm.file,@pos+8,sb,eb,nbits_pack,nstep)
55
+ var.reshape!(nlon, var.length/nlon)
56
+ var = var[index[0],true]</pre>
57
+ <pre>eb = nlen*nbits_pack
58
+ var = get_value(@sgm.file,@pos+8,0,eb,nbits_pack,nstep)
59
+ var.reshape!(nlon,nlat)</pre>
60
+ <h1><a name="label-1" id="label-1">NumRu::GPhys::Grib -- a class for Grib datasets</a></h1><!-- RDLabel: "NumRu::GPhys::Grib &shy;&shy; a class for Grib datasets" -->
61
+ <h2><a name="label-2" id="label-2">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
62
+ <dl>
63
+ <dt><h4><a name="label-3" id="label-3"><code>Grib.new(<var>filename</var>, <var>mode</var>="<var>r</var>")</code></a></h4></dt><!-- RDLabel: "Grib.new" -->
64
+ <dd>
65
+ <p>make a new Grib object.</p>
66
+ <p>ARGUMENTS</p>
67
+ <ul>
68
+ <li>filename (String): name of the file to open</li>
69
+ <li>mode (String): IO mode. "r" (read only) or "w" (write only).</li>
70
+ </ul></dd>
71
+ <dt><h4><a name="label-4" id="label-4"><code>Grib.open(<var>filename</var>)</code></a></h4></dt><!-- RDLabel: "Grib.open" -->
72
+ <dd>
73
+ open a Grib file.</dd>
74
+ <dt><h4><a name="label-5" id="label-5"><code>Grib.create(<var>filename</var>)</code></a></h4></dt><!-- RDLabel: "Grib.create" -->
75
+ <dd>
76
+ create a Grib file.</dd>
77
+ <dt><h4><a name="label-6" id="label-6"><code>Grib.is_aGrib?(<var>filename</var>)</code></a></h4></dt><!-- RDLabel: "Grib.is_aGrib?" -->
78
+ <dd>
79
+ return true when file is a Grib dataset</dd>
80
+ </dl>
81
+ <h2><a name="label-7" id="label-7">Methods</a></h2><!-- RDLabel: "Methods" -->
82
+ <dl>
83
+ <dt><h4><a name="label-8" id="label-8"><code>close</code></a></h4></dt><!-- RDLabel: "close" -->
84
+ <dt><h4><a name="label-9" id="label-9"><code>parse</code></a></h4></dt><!-- RDLabel: "parse" -->
85
+ <dt><h4><a name="label-10" id="label-10"><code>path</code></a></h4></dt><!-- RDLabel: "path" -->
86
+ <dt><h4><a name="label-11" id="label-11"><code>var_names</code></a></h4></dt><!-- RDLabel: "var_names" -->
87
+ <dt><h4><a name="label-12" id="label-12"><code>var( <var>name</var> )</code></a></h4></dt><!-- RDLabel: "var" -->
88
+ <dt><h4><a name="label-13" id="label-13"><code>def_var( <var>name</var> )</code></a></h4></dt><!-- RDLabel: "def_var" -->
89
+ <dt><h4><a name="label-14" id="label-14"><code>enddef</code></a></h4></dt><!-- RDLabel: "enddef" -->
90
+ <dt><h4><a name="label-15" id="label-15"><code>write</code></a></h4></dt><!-- RDLabel: "write" -->
91
+ </dl>
92
+ <h1><a name="label-16" id="label-16">NumRu::GPhys::GribDim</a></h1><!-- RDLabel: "NumRu::GPhys::GribDim" -->
93
+ <h2><a name="label-17" id="label-17">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
94
+ <dl>
95
+ <dt><h4><a name="label-18" id="label-18"><code>new( <var>vat</var>, <var>name</var>, <var>length</var> )</code></a></h4></dt><!-- RDLabel: "new" -->
96
+ </dl>
97
+ <h2><a name="label-19" id="label-19">Methods</a></h2><!-- RDLabel: "Methods" -->
98
+ <dl>
99
+ <dt><h4><a name="label-20" id="label-20"><code>var</code></a></h4></dt><!-- RDLabel: "var" -->
100
+ <dt><h4><a name="label-21" id="label-21"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
101
+ <dt><h4><a name="label-22" id="label-22"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
102
+ <dt><h4><a name="label-23" id="label-23"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
103
+ <dt><h4><a name="label-24" id="label-24"><code>get</code></a></h4></dt><!-- RDLabel: "get" -->
104
+ <dt><h4><a name="label-25" id="label-25"><code>[<var>indices</var>]</code></a></h4></dt><!-- RDLabel: "[]" -->
105
+ <dt><h4><a name="label-26" id="label-26"><code>put_att(<var>key</var>,<var>val</var>)</code></a></h4></dt><!-- RDLabel: "put_att" -->
106
+ <dt><h4><a name="label-27" id="label-27"><code>set_att(<var>key</var>,<var>val</var>)</code></a></h4></dt><!-- RDLabel: "set_att" -->
107
+ <dt><h4><a name="label-28" id="label-28"><code>att(<var>key</var>)</code></a></h4></dt><!-- RDLabel: "att" -->
108
+ <dt><h4><a name="label-29" id="label-29"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
109
+ <dt><h4><a name="label-30" id="label-30"><code>inspect</code></a></h4></dt><!-- RDLabel: "inspect" -->
110
+ </dl>
111
+ <h1><a name="label-31" id="label-31">NumRu::GPhys::GribVar</a></h1><!-- RDLabel: "NumRu::GPhys::GribVar" -->
112
+ <h2><a name="label-32" id="label-32">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
113
+ <dl>
114
+ <dt><h4><a name="label-33" id="label-33"><code>always_time_seq=(<var>t_or_f</var>)</code></a></h4></dt><!-- RDLabel: "always_time_seq=" -->
115
+ </dl>
116
+ <p>If true is given, a GribVar will always have a time dimension,
117
+ even when the time is unique (i.e., length of the time coordinate is 1).</p>
118
+ <dl>
119
+ <dt><h4><a name="label-34" id="label-34"><code>new( <var>file</var>, <var>name</var>, <var>obj</var>, <var>dims</var> )</code></a></h4></dt><!-- RDLabel: "new" -->
120
+ </dl>
121
+ <h2><a name="label-35" id="label-35">Methods</a></h2><!-- RDLabel: "Methods" -->
122
+ <dl>
123
+ <dt><h4><a name="label-36" id="label-36"><code>file</code></a></h4></dt><!-- RDLabel: "file" -->
124
+ <dt><h4><a name="label-37" id="label-37"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
125
+ <dt><h4><a name="label-38" id="label-38"><code>rank</code></a></h4></dt><!-- RDLabel: "rank" -->
126
+ <dt><h4><a name="label-39" id="label-39"><code>total</code></a></h4></dt><!-- RDLabel: "total" -->
127
+ <dt><h4><a name="label-40" id="label-40"><code>set_var</code></a></h4></dt><!-- RDLabel: "set_var" -->
128
+ <dt><h4><a name="label-41" id="label-41"><code>set_miss</code></a></h4></dt><!-- RDLabel: "set_miss" -->
129
+ <dt><h4><a name="label-42" id="label-42"><code>dim_names</code></a></h4></dt><!-- RDLabel: "dim_names" -->
130
+ <dt><h4><a name="label-43" id="label-43"><code>dim( <var>index</var> )</code></a></h4></dt><!-- RDLabel: "dim" -->
131
+ <dt><h4><a name="label-44" id="label-44"><code>ndims</code></a></h4></dt><!-- RDLabel: "ndims" -->
132
+ <dt><h4><a name="label-45" id="label-45"><code>def_dim(<var>name</var>,<var>index</var>)</code></a></h4></dt><!-- RDLabel: "def_dim" -->
133
+ <dt><h4><a name="label-46" id="label-46"><code>put_att( <var>key</var>, <var>value</var> )</code></a></h4></dt><!-- RDLabel: "put_att" -->
134
+ <dt><h4><a name="label-47" id="label-47"><code>set_att( <var>key</var>, <var>value</var> )</code></a></h4></dt><!-- RDLabel: "set_att" -->
135
+ <dt><h4><a name="label-48" id="label-48"><code>att( <var>key</var> )</code></a></h4></dt><!-- RDLabel: "att" -->
136
+ <dt><h4><a name="label-49" id="label-49"><code>att_names</code></a></h4></dt><!-- RDLabel: "att_names" -->
137
+ <dt><h4><a name="label-50" id="label-50"><code>shape</code></a></h4></dt><!-- RDLabel: "shape" -->
138
+ <dt><h4><a name="label-51" id="label-51"><code>typecode</code></a></h4></dt><!-- RDLabel: "typecode" -->
139
+ <dt><h4><a name="label-52" id="label-52"><code>get( <var>indics</var> )</code></a></h4></dt><!-- RDLabel: "get" -->
140
+ <dt><h4><a name="label-53" id="label-53"><code>[ <var>indics</var> ]</code></a></h4></dt><!-- RDLabel: "[]" -->
141
+ <dt><h4><a name="label-54" id="label-54"><code>inspect</code></a></h4></dt><!-- RDLabel: "inspect" -->
142
+ </dl>
143
+ <pre>if pds1.time_range!=pds2.time_range
144
+ warn("time range is not same: #{pds1.time_range} != #{pds2.time_range}")
145
+ return true
146
+ end</pre>
147
+
148
+ </body>
149
+ </html>