gphys 1.2.2.1 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
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,324 @@
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_fft.rb</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">extension of class NumRu::GPhys -- Fast Fourier transformation and its applications</a></h1><!-- RDLabel: "extension of class NumRu::GPhys &shy;&shy; Fast Fourier transformation and its applications" -->
11
+ <p>This manual documents the methods of NumRu::GPhys defined in gphys_fft.rb</p>
12
+ <h1><a name="label-1" id="label-1">class methods</a></h1><!-- RDLabel: "class methods" -->
13
+ <dl>
14
+ <dt><h4><a name="label-2" id="label-2"><code>GPhys::fft_ignore_missing( <var>ignore</var>=<var>true</var>, <var>replace_val</var>=<var>nil</var> )</code></a></h4></dt><!-- RDLabel: "GPhys::fft_ignore_missing" -->
15
+ <dd>
16
+ Set a flag (class variable) to ignore missing values.
17
+ This is for data that do not have missing
18
+ but is treated as potentially having missing (often
19
+ by having the valid_* attributes of NetCDF.)
20
+ If replace_val is specified, data missing with replaced
21
+ with that value.</dd>
22
+ </dl>
23
+ <h1><a name="label-3" id="label-3">methods</a></h1><!-- RDLabel: "methods" -->
24
+ <dl>
25
+ <dt><h4><a name="label-4" id="label-4"><code>fft(<var>backward</var>=<var>false</var>, *<var>dims</var>)</code></a></h4></dt><!-- RDLabel: "fft" -->
26
+ <dd>
27
+ <p>Fast Fourier Transformation (FFT) by using
28
+ (<a href="http://www.fftw.org">FFTW</a>) ver 3 or ver 2.
29
+ A FFTW ver.2 interface is included in NArray, while
30
+ to use FFTW ver.3, you have to install separately.
31
+ Dimension specification by the argument dims is available
32
+ only with ver.3. By default, FFT is applied to all dimensions.</p>
33
+ <p>The transformation is complex. If the input data is not complex,
34
+ it will be coerced to complex before transformation.</p>
35
+ <p>When the FT is forward, the result is normalized
36
+ (i.e., divided by the data number), unlike the default behavior of
37
+ FFTW.</p>
38
+ <p>Each coordinate is assumed to be equally spaced without checking.
39
+ The new coordinate variables will be set equal to wavenumbers,
40
+ derived as 2*PI/(length of the axis)*[0,1,2,..], where the length
41
+ of the axis is derived as (coord.val.max - coord.val.min)*(n+1)/n.</p>
42
+ <p>REMARK</p>
43
+ <ul>
44
+ <li>If the units of the original coordinate is degree (or its
45
+ equivalent ones such as degrees_east), the wavenumber was
46
+ made in integers by converting the coordinate based on
47
+ radian.</li>
48
+ </ul>
49
+ <p>ARGUMENTS</p>
50
+ <ul>
51
+ <li>backward (true of false) : when true, backward FT is done;
52
+ otherwise forward FT is done.</li>
53
+ <li>dims (integers) : dimensions to apply FFT</li>
54
+ </ul>
55
+ <p>RETURN VALUE</p>
56
+ <ul>
57
+ <li>a GPhys</li>
58
+ </ul>
59
+ <p>EXAMPLE</p>
60
+ <pre>gphy.fft # forward, for all dimensions
61
+ gphy.fft(true) # backward, for all dimensions
62
+ gphy.fft(nil, 0,1) # forward, for the first and second dimensions.
63
+ gphy.fft(true, -1) # backward, for the last dimension.</pre></dd>
64
+ <dt><h4><a name="label-5" id="label-5"><code>detrend(<var>dim1</var>[,<var>dim2</var>[,...]])</code></a></h4></dt><!-- RDLabel: "detrend" -->
65
+ <dd>
66
+ <p>Remove means and linear trends along dimension(s) specified.
67
+ Algorithm: 1st order polynomial fitting.</p>
68
+ <p>ARGUMENTS</p>
69
+ <ul>
70
+ <li>dim? (Integer of String): the dimension along which you want to remove
71
+ trends.</li>
72
+ </ul>
73
+ <p>RETURN VALUE</p>
74
+ <ul>
75
+ <li>a GPhys</li>
76
+ </ul>
77
+ <p>EXAMPLE</p>
78
+ <ul>
79
+ <li>See <a href="#label-5">detrend</a>.</li>
80
+ </ul></dd>
81
+ <dt><h4><a name="label-6" id="label-6"><code>cos_taper(<var>dim1</var>[,<var>dim2</var>[,...]])</code></a></h4></dt><!-- RDLabel: "cos_taper" -->
82
+ <dd>
83
+ <p>Cosine tapering along dimension(s) specified.</p>
84
+ <p>Algorithm: to multiply with the half cosine curves at the both
85
+ 1/10 ends of the data.</p>
86
+ <pre>cos taper shape:
87
+ _____________
88
+ _/ \_
89
+ -&gt; &lt;- -&gt; &lt;-
90
+ T/10 T/10
91
+ half-cosine half-cosine
92
+ shaped shaped</pre>
93
+ <p>The spectra of tapered data should be multiplied by 1/0.875,
94
+ which is stored as GPhys::COS_TAPER_SP_FACTOR (==1/0.875).</p>
95
+ <p>ARGUMENTS</p>
96
+ <ul>
97
+ <li>dim? (Integer of String): the dimension along which you want to remove
98
+ trends.</li>
99
+ </ul>
100
+ <p>RETURN VALUE</p>
101
+ <ul>
102
+ <li>a GPhys</li>
103
+ </ul>
104
+ <p>EXAMPLE</p>
105
+ <pre>dim = 0 # for the 1st dimension
106
+ fc = gphys.detrend(dim).cos_taper(dim).fft(nil,dim)
107
+ sp = fc.abs**2 * GPhys::COS_TAPER_SP_FACTOR</pre></dd>
108
+ <dt><h4><a name="label-7" id="label-7"><code>spect_zero_centering(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "spect_zero_centering" -->
109
+ <dd>
110
+ <p>Shifts the wavenumber axis to cover from -K/2 to K/2 instead of
111
+ from 0 to K-1, where the wavenumber is symbolically treated as integer,
112
+ which is actually not the case, though. Since the first (-K/2) and
113
+ the last (K/2) elements are duplicated, both are divided by 2.
114
+ Therefore, this method is to be used for spectra (squared quantity)
115
+ rather than the raw Fourier coefficients. (That is why the method name
116
+ is prefixed by "spect_").</p>
117
+ <p>The method is applied for a single dimension (specified by the argument
118
+ dim). If you need to apply for multiple dimensions, use it for multiple
119
+ times.</p>
120
+ <p>ARGUMENTS</p>
121
+ <ul>
122
+ <li>dim (integer): the dimension you want to shift spectra elements.
123
+ Count starts from zero.</li>
124
+ </ul>
125
+ <p>RETURN VALUE</p>
126
+ <ul>
127
+ <li>a GPhys</li>
128
+ </ul>
129
+ <p>EXAMPLE</p>
130
+ <ul>
131
+ <li><p>To get a spectra of a variable var along the 1st and 2nd dimensions:</p>
132
+ <pre>fc = var.fft(nil, 0,1) # --&gt; Fourier coef
133
+ sp = ( fc.abs**2 ).spect_zero_centering(0).spect_zero_centering(1)</pre>
134
+ <p>Note that spect_zero_centering is applied after taking |fc|^2.</p></li>
135
+ <li><p>Same but if you want to have the 2nd dimension one-sided:</p>
136
+ <pre>fc = var.fft(nil, 0,1)
137
+ sp = ( fc.abs**2 ).spect_zero_centering(0).spect_one_sided(1)</pre></li>
138
+ <li><p>Similar to the first example but for cross spectra:</p>
139
+ <pre>fc1 = var1.fft(nil, 0,1)
140
+ fc2 = var2.fft(nil, 0,1)
141
+ xsp = (fc1 * fc2.conj).spect_zero_centering(0).spect_zero_centering(1)</pre></li>
142
+ </ul></dd>
143
+ <dt><h4><a name="label-8" id="label-8"><code>spect_one_sided(<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "spect_one_sided" -->
144
+ <dd>
145
+ <p>Similar to <a href="#label-7">spect_zero_centering</a> but to make one-sided spectra.
146
+ Namely, to convert from 0..K-1 to 0..K/2. To be applied for spectra;
147
+ wavenumber 2..K/2-1 are multiplied by 2.</p>
148
+ <p>ARGUMENTS</p>
149
+ <ul>
150
+ <li>dim (integer): the dimension you want to shift spectra elements.
151
+ Count starts from zero.</li>
152
+ </ul>
153
+ <p>RETURN VALUE</p>
154
+ <ul>
155
+ <li>a GPhys</li>
156
+ </ul>
157
+ <p>EXAMPLE</p>
158
+ <ul>
159
+ <li>See the 2nd example of <a href="#label-7">spect_zero_centering</a>.</li>
160
+ </ul></dd>
161
+ <dt><h4><a name="label-9" id="label-9"><code>rawspect2powerspect(*<var>dims</var>)</code></a></h4></dt><!-- RDLabel: "rawspect2powerspect" -->
162
+ <dd>
163
+ <p>Converts raw spectra obtained by gphys.fft.abs**2 into
164
+ power spectra by dividing by wavenumber increments
165
+ along the dimensions specified by dims.</p>
166
+ <p>ARGUMENTS</p>
167
+ <ul>
168
+ <li>dims (integers): the dimensions corresponding to wavenumbers.</li>
169
+ </ul>
170
+ <p>RETURN VALUE</p>
171
+ <ul>
172
+ <li>a GPhys</li>
173
+ </ul>
174
+ <p>EXAMPLE</p>
175
+ <ul>
176
+ <li><p>Suppose a 2 (or more) dimensional data gphys.</p>
177
+ <pre>fc = gphys.fft(nil, 0, 1)
178
+ sp = fc.abs**2
179
+ ps = sp.rawspect2powerspect(0,1)</pre>
180
+ <p>Here, sp is the raw spectrum of gphys, and ps is the power spectrum.
181
+ The Parseval relation for them are as follows:</p>
182
+ <pre>(gphys**2).mean == sp.sum
183
+ == pw.sum*dk*dl (== \int pw dk dl, mathematically),</pre>
184
+ <p>where, dk = (pw.coord(0)[1] - pw.coord(0)[0]), and
185
+ dl = (pw.coord(1)[1] - pw.coord(1)[0]).</p></li>
186
+ </ul></dd>
187
+ <dt><h4><a name="label-10" id="label-10"><code>phase_velocity_filter(<var>xdim</var>, <var>tdim</var>, <var>cmin</var>=<var>nil</var>, <var>cmax</var>=<var>nil</var>, <var>xconv</var>=<var>nil</var>, <var>tconv</var>=<var>nil</var>, <var>remove_xtmean</var>=<var>false</var>)</code></a></h4></dt><!-- RDLabel: "phase_velocity_filter" -->
188
+ <dd>
189
+ <p>Filtering by phase velocity (between cmin and cmax)</p>
190
+ <p>REMARKS</p>
191
+ <ul>
192
+ <li>If the number of the grid points along x or t is an even number,
193
+ the maximum wavenumber or frequency is treated as positive
194
+ and negative, respectively, which results in an asymmetry of
195
+ the treatment of positive and negative phase speeds.
196
+ (That should be ok. -- In case its effect is significant,
197
+ to do the filtering itself is not meaningful.)</li>
198
+ </ul>
199
+ <p>ARGUMENTS</p>
200
+ <ul>
201
+ <li>xdim (Integer or String): spacial dimension</li>
202
+ <li>tdim (Integer or String): time dimension</li>
203
+ <li>cmin (Float or nil): minimum phase velocity. nil means no specification.
204
+ (at least cmin or cmax must be given by Float)</li>
205
+ <li>cmax (Float or nil): maximum phase velocity. nil means no specification.
206
+ (at least cmin or cmax must be given by Float)</li>
207
+ <li>xconv (nil or UNumeric) : (optional) if given, xconv is multiplied
208
+ with the x axis before computing the phase velocity
209
+ (kconv=1/xconv is used to scale wavenumbers)</li>
210
+ <li>tconv (nil or UNumeric) : (optional) if given, tconv is multiplied
211
+ with the t axis before computing the phase velocity
212
+ (fconv=1/tconv is used to scale frequency)</li>
213
+ <li>remove_xtmean (false or true) : if false (default),
214
+ components with k=0 and f=0 are counted as c=0 (stationary),
215
+ (unlike <a href="#label-12">phase_velocity_binning</a>), so they are included if
216
+ cmin*cmax &lt;= 0; if true, k=0 &amp; f=0 components are always removed.</li>
217
+ </ul>
218
+ <p>RETURN VALUE</p>
219
+ <ul>
220
+ <li>a GPhys</li>
221
+ </ul>
222
+ <p>EXAMPLE</p>
223
+ <ul>
224
+ <li><p>For a 4D data with [x,y,z,t] dimensions, filtering by the phase
225
+ velocity in the y dimension greater than 10.0 (in the unit
226
+ of y/t) can be made by</p>
227
+ <pre>cmin = 10.0; cmax = nil
228
+ gpfilt = gp.phase_velocity_filter(1, 3, cmin, cmax)</pre></li>
229
+ <li><p>For a global data (on the Earth's surface) with
230
+ [lon, lat, z, time] axes, where the units of lon is
231
+ "degrees" (or "degrees_east" or "radian")
232
+ and the units of time is "hours", to filter disturbances
233
+ whose zonal phase speed MEASURED AT THE EQUATOR is less or
234
+ equal to 30 m/s can be made by</p>
235
+ <pre>cmin = -30.0; cmax = 30.0
236
+ xconv = UNumeric[6.37e6, "m"] # Earth's radius (i.e., m/radian)
237
+ # This is a special case since "radian" is exceptionally omitted.
238
+ # See the private method __predefined_coord_units_conversion.
239
+ tconv = UNumeric[3.6e3, "s/hours"]
240
+ gpfilt = gp.phase_velocity_filter(1, 3, cmin, cmax, xconv, tconv)</pre></li>
241
+ </ul></dd>
242
+ <dt><h4><a name="label-11" id="label-11"><code>phase_velocity_binning_iso_norml(<var>kdim</var>, <var>fdim</var>, <var>cmin</var>, <var>cmax</var>, <var>cint</var>, <var>kconv</var>=<var>nil</var>, <var>fconv</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "phase_velocity_binning_iso_norml" -->
243
+ <dd>
244
+ <p>Same as <a href="#label-12">phase_velocity_binning</a> but exclusively for
245
+ equal phase velocity spacing. Also, a normalization is
246
+ additionally made, to scale spectra in terms of integration
247
+ along phase velocity axis --- The result of
248
+ <a href="#label-12">phase_velocity_binning</a> called inside
249
+ this method is divided by cint along with corresponding
250
+ units conversion. Therefore, if this method is applied
251
+ to spectra, a normalization is made such that an integration
252
+ (not summation) along the phase velocity gives the variance
253
+ (or covariance etc.) -- This normalization is suitable to
254
+ quadratic quantities (such as spectra) but is not suitable to
255
+ raw Fourier coefficients.</p>
256
+ <p>ARGUMENTS</p>
257
+ <ul>
258
+ <li>kdim (Integer or String): see <a href="#label-12">phase_velocity_binning</a></li>
259
+ <li>fdim (Integer or String): see <a href="#label-12">phase_velocity_binning</a></li>
260
+ <li>cmin (Float) : minimum phase velocity</li>
261
+ <li>cmin (Float) : maximum phase velocity</li>
262
+ <li>cint (Float) : inter val with which the range [cmin and cmax]
263
+ is divided.</li>
264
+ <li>kconv (nil or UNumeric) : see <a href="#label-12">phase_velocity_binning</a></li>
265
+ <li>fconv (nil or UNumeric) : see <a href="#label-12">phase_velocity_binning</a></li>
266
+ </ul>
267
+ <p>RETURN VALUE</p>
268
+ <ul>
269
+ <li>a GPhys</li>
270
+ </ul></dd>
271
+ <dt><h4><a name="label-12" id="label-12"><code>phase_velocity_binning(<var>kdim</var>, <var>fdim</var>, <var>cbins</var>, <var>kconv</var>=<var>nil</var>, <var>fconv</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "phase_velocity_binning" -->
272
+ <dd>
273
+ <p>Bin a 2D spectrum in space and time based on phase velocity.
274
+ The operand (self) must be Fourier coefficients or spectra,
275
+ whose grid has not been altered since the call of the method
276
+ fft (i.e., those that have not applied with zero centering
277
+ etc, since it is done in this method).</p>
278
+ <p>Binning by this method is based on summation, leaving
279
+ the units unchanged.</p>
280
+ <p>REMARKS</p>
281
+ <ul>
282
+ <li>Components whose phase velocities are exactly equal to one
283
+ of the boundaries are divided into the two bins half by half</li>
284
+ <li>components with k=0 and f=0 are excluded -- the spatio-temporal
285
+ mean do not reflect in the result </li>
286
+ </ul>
287
+ <p>ARGUMENTS</p>
288
+ <ul>
289
+ <li>kdim (Integer or String): wavenumber dimension (from spacial dimension)</li>
290
+ <li>fdim (Integer or String): frequency dimension (from time dimension)</li>
291
+ <li>cbins : an Array of bin bounds or a Hash of max, min, int
292
+ e.g., [-10,-1,-0.1,0.1,11,10], {"min"=&gt;-30,"max"=&gt;30,"int"=&gt;5}</li>
293
+ <li>kconv (nil or UNumeric) : (optional) if given, kconv is multiplied
294
+ with the wavenumber axis before computing the phase velocity</li>
295
+ <li>fconv (nil or UNumeric) : (optional) if given, fconv is multiplied
296
+ with the frequency axis before computing the phase velocity</li>
297
+ </ul>
298
+ <p>RETURN VALUE</p>
299
+ <ul>
300
+ <li>a GPhys</li>
301
+ </ul>
302
+ <p>EXAMPLES</p>
303
+ <ul>
304
+ <li><p>Example A</p>
305
+ <pre>fu = u.fft(nil, 0, 2)
306
+ cfu = fu.phase_velocity_binning(0, 2, {"min"=&gt;-1,"max"=&gt;1,"int"=&gt;0.1})</pre></li>
307
+ <li><p>Example B</p>
308
+ <pre>fu = u.fft(nil, 0, 2)
309
+ pw = fu.abs**2rawspect2powerspect(0,2) # power spectrum
310
+ cbins = [-100.0, -10.0, -1.0, 1.0, 10.0, 100.0] # logarithmic spacing
311
+ cpw = pw.phase_velocity_binning(0, 2, cbins)</pre></li>
312
+ <li><p>Example C</p>
313
+ <pre>fu = u.fft(nil, 0, 3)
314
+ fv = v.fft(nil, 0, 3)
315
+ kconv = UNumeric[1/6.37e6, "m-1"]
316
+ fconv = UNumeric[1/3.6e3, "hours/s"]
317
+ fuv = (fu * fv.conj) # cross spectra
318
+ cfuv = fuv.phase_velocity_binning(0, 3, {"min"=&gt;-50,"max"=&gt;50,"int"=&gt;5},
319
+ kconv, fconv)</pre></li>
320
+ </ul></dd>
321
+ </dl>
322
+
323
+ </body>
324
+ </html>
@@ -0,0 +1,69 @@
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_grads_io.rb</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">module NumRu::GPhys::GrADS_IO</a></h1><!-- RDLabel: "module NumRu::GPhys::GrADS_IO" -->
11
+ <p>helps read/write GrADS-formatted data</p>
12
+ <h2><a name="label-1" id="label-1">Module functions</a></h2><!-- RDLabel: "Module functions" -->
13
+ <dl>
14
+ <dt><h4><a name="label-2" id="label-2"><code>is_a_GrADS?(<var>filename</var>)</code></a></h4></dt><!-- RDLabel: "is_a_GrADS?" -->
15
+ <dd>
16
+ <p>test whether the file is a GrADS control file.</p>
17
+ <p>ARGUMENTS</p>
18
+ <ul>
19
+ <li>filename (String): filename to test.</li>
20
+ </ul>
21
+ <p>RETURN VALUE</p>
22
+ <ul>
23
+ <li>true/false</li>
24
+ </ul></dd>
25
+ <dt><h4><a name="label-3" id="label-3"><code>open(<var>file</var>, <var>varname</var>)</code></a></h4></dt><!-- RDLabel: "open" -->
26
+ <dd>
27
+ <p>GPhys constructor from GrADS.</p>
28
+ <p>ARGUMENTS</p>
29
+ <ul>
30
+ <li>file (GrADS_Gridded or String): file to read. If string,
31
+ it must be the name (path) of a GrADS control file. </li>
32
+ <li>varname (String): name of the varible in the file, for which
33
+ a GPhys object is constructed.</li>
34
+ </ul>
35
+ <p>RETURN VALUE</p>
36
+ <ul>
37
+ <li>a GPhys</li>
38
+ </ul>
39
+ <p>EXAMPLE</p>
40
+ <ul>
41
+ <li><p>Suppose that you have a file T.jan.ctl in the currentdirectly,
42
+ and it contains a variable "T". The following creates a GPhys
43
+ object representing the variable in the file.</p>
44
+ <pre>require "numru/gphys"
45
+ include GPhys
46
+ temp = GPhys::GrADS_IO.open("T.jan.ctl","T")</pre></li>
47
+ </ul></dd>
48
+ <dt><h4><a name="label-4" id="label-4"><code>write(<var>file</var>, <var>gphys</var>, <var>name</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "write" -->
49
+ <dd>
50
+ writes a GPhys object into a GrADS file. -- !!only 4D data is supported!!</dd>
51
+ <dt><h4><a name="label-5" id="label-5"><code>var_names(<var>file</var>)</code></a></h4></dt><!-- RDLabel: "var_names" -->
52
+ <dd>
53
+ <p>ARGUMENTS</p>
54
+ <ul>
55
+ <li>file (GrADS_Gridded or String): if string,
56
+ it must be the name (path) of a GrADS control file.</li>
57
+ </ul>
58
+ <p>RETURN VALUE</p>
59
+ <ul>
60
+ <li>names of variables (Array): this return the names of variables
61
+ which the file has.</li>
62
+ </ul></dd>
63
+ <dt><h4><a name="label-6" id="label-6"><code>var_names_except_coordinates(<var>file</var>)</code></a></h4></dt><!-- RDLabel: "var_names_except_coordinates" -->
64
+ <dd>
65
+ same as var_names</dd>
66
+ </dl>
67
+
68
+ </body>
69
+ </html>
@@ -0,0 +1,82 @@
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_grib_io.rb</title>
8
+ </head>
9
+ <body>
10
+ <h1><a name="label-0" id="label-0">module NumRu::GPhys::Grib_IO</a></h1><!-- RDLabel: "module NumRu::GPhys::Grib_IO" -->
11
+ <p>helps read Grib-formatted data</p>
12
+ <h2><a name="label-1" id="label-1">Module functions</a></h2><!-- RDLabel: "Module functions" -->
13
+ <dl>
14
+ <dt><h4><a name="label-2" id="label-2"><code>is_a_Grib? <var>filename</var>)</code></a></h4></dt><!-- RDLabel: "is_a_Grib? filename)" -->
15
+ <dd>
16
+ <p>test whether the file is a Grib file.</p>
17
+ <p>ARGUMENTS</p>
18
+ <ul>
19
+ <li>filename (String): filename to test.</li>
20
+ </ul>
21
+ <p>RETURN VALUE</p>
22
+ <ul>
23
+ <li>true/false</li>
24
+ </ul></dd>
25
+ <dt><h4><a name="label-3" id="label-3"><code>open(<var>file</var>, <var>varname</var>)</code></a></h4></dt><!-- RDLabel: "open" -->
26
+ <dd>
27
+ <p>GPhys constructor from Grib.</p>
28
+ <p>ARGUMENTS</p>
29
+ <ul>
30
+ <li>file (Grib or String): file to read. If string,
31
+ it must be the name (path) of a Grib file. </li>
32
+ <li>varname (String): name of the varible in the file, for which
33
+ a GPhys object is constructed.</li>
34
+ </ul>
35
+ <p>RETURN VALUE</p>
36
+ <ul>
37
+ <li>a GPhys</li>
38
+ </ul>
39
+ <p>EXAMPLE</p>
40
+ <ul>
41
+ <li><p>Suppose that you have a file temp in the currentdirectly,
42
+ and it contains a variable "T". The following creates a GPhys
43
+ object representing the variable in the file.</p>
44
+ <pre>require "numru/gphys"
45
+ include GPhys
46
+ temp = GPhys::Grib_IO.open("temp","T")</pre></li>
47
+ </ul></dd>
48
+ <dt><h4><a name="label-4" id="label-4"><code>write(<var>file</var>, <var>gphys</var>, <var>name_dummy</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "write" -->
49
+ <dd>
50
+ <p>Write a GPhys into a Grib file. The whole data under the GPhys
51
+ (such as coordinate vars) are written self-descriptively.</p>
52
+ <p>ARGUMENTS</p>
53
+ <ul>
54
+ <li>file (Grib): the Grib file to write in. Must be writable of course.</li>
55
+ <li>gphys (GPhys): the GPhys to write.</li>
56
+ <li>name_dummy (nil) : Unused in this module; Just for consistency with others.</li>
57
+ </ul>
58
+ <p>RETURN VALUE</p>
59
+ <ul>
60
+ <li>nil</li>
61
+ </ul></dd>
62
+ <dt><h4><a name="label-5" id="label-5"><code>var_names(<var>file</var>)</code></a></h4></dt><!-- RDLabel: "var_names" -->
63
+ <dd>
64
+ <p>ARGUMENTS</p>
65
+ <ul>
66
+ <li>file (Grib or String): if string,
67
+ it must be the name (path) of a Grib file.</li>
68
+ </ul>
69
+ <p>RETURN VALUE</p>
70
+ <ul>
71
+ <li>names of variables (Array): this return the names of variables
72
+ which the file has.</li>
73
+ </ul></dd>
74
+ <dt><h4><a name="label-6" id="label-6"><code>var_names_except_coordinates(<var>file</var>)</code></a></h4></dt><!-- RDLabel: "var_names_except_coordinates" -->
75
+ <dd>
76
+ <ul>
77
+ <li>same as var_names</li>
78
+ </ul></dd>
79
+ </dl>
80
+
81
+ </body>
82
+ </html>