gphys 1.1.1a
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +1777 -0
- data/LICENSE.txt +34 -0
- data/README +33 -0
- data/Rakefile +57 -0
- data/TODO_ep_flux +6 -0
- data/bin/gdir_client +27 -0
- data/bin/gdir_server +129 -0
- data/bin/gpaop +146 -0
- data/bin/gpcat +148 -0
- data/bin/gpcut +102 -0
- data/bin/gpedit +228 -0
- data/bin/gplist +68 -0
- data/bin/gpmath +120 -0
- data/bin/gpmaxmin +128 -0
- data/bin/gpprint +60 -0
- data/bin/gpvect +706 -0
- data/bin/gpview +704 -0
- data/bin/grads2nc_with_gphys +61 -0
- data/doc/attribute.html +19 -0
- data/doc/attributenetcdf.html +15 -0
- data/doc/axis.html +376 -0
- data/doc/coordmapping.html +111 -0
- data/doc/coordtransform.html +36 -0
- data/doc/derivative/gphys-derivative.html +80 -0
- data/doc/derivative/index.html +21 -0
- data/doc/derivative/index.rd +14 -0
- data/doc/derivative/math-doc/document/document.css +30 -0
- data/doc/derivative/math-doc/document/document.html +57 -0
- data/doc/derivative/math-doc/document/images.aux +1 -0
- data/doc/derivative/math-doc/document/images.log +385 -0
- data/doc/derivative/math-doc/document/images.pl +186 -0
- data/doc/derivative/math-doc/document/images.tex +364 -0
- data/doc/derivative/math-doc/document/img1.png +0 -0
- data/doc/derivative/math-doc/document/img10.png +0 -0
- data/doc/derivative/math-doc/document/img11.png +0 -0
- data/doc/derivative/math-doc/document/img12.png +0 -0
- data/doc/derivative/math-doc/document/img13.png +0 -0
- data/doc/derivative/math-doc/document/img14.png +0 -0
- data/doc/derivative/math-doc/document/img15.png +0 -0
- data/doc/derivative/math-doc/document/img16.png +0 -0
- data/doc/derivative/math-doc/document/img17.png +0 -0
- data/doc/derivative/math-doc/document/img18.png +0 -0
- data/doc/derivative/math-doc/document/img19.png +0 -0
- data/doc/derivative/math-doc/document/img2.png +0 -0
- data/doc/derivative/math-doc/document/img20.png +0 -0
- data/doc/derivative/math-doc/document/img21.png +0 -0
- data/doc/derivative/math-doc/document/img22.png +0 -0
- data/doc/derivative/math-doc/document/img23.png +0 -0
- data/doc/derivative/math-doc/document/img24.png +0 -0
- data/doc/derivative/math-doc/document/img25.png +0 -0
- data/doc/derivative/math-doc/document/img26.png +0 -0
- data/doc/derivative/math-doc/document/img27.png +0 -0
- data/doc/derivative/math-doc/document/img28.png +0 -0
- data/doc/derivative/math-doc/document/img29.png +0 -0
- data/doc/derivative/math-doc/document/img3.png +0 -0
- data/doc/derivative/math-doc/document/img30.png +0 -0
- data/doc/derivative/math-doc/document/img4.png +0 -0
- data/doc/derivative/math-doc/document/img5.png +0 -0
- data/doc/derivative/math-doc/document/img6.png +0 -0
- data/doc/derivative/math-doc/document/img7.png +0 -0
- data/doc/derivative/math-doc/document/img8.png +0 -0
- data/doc/derivative/math-doc/document/img9.png +0 -0
- data/doc/derivative/math-doc/document/index.html +57 -0
- data/doc/derivative/math-doc/document/labels.pl +13 -0
- data/doc/derivative/math-doc/document/next.png +0 -0
- data/doc/derivative/math-doc/document/next_g.png +0 -0
- data/doc/derivative/math-doc/document/node1.html +238 -0
- data/doc/derivative/math-doc/document/node2.html +75 -0
- data/doc/derivative/math-doc/document/prev.png +0 -0
- data/doc/derivative/math-doc/document/prev_g.png +0 -0
- data/doc/derivative/math-doc/document/up.png +0 -0
- data/doc/derivative/math-doc/document/up_g.png +0 -0
- data/doc/derivative/math-doc/document.pdf +0 -0
- data/doc/derivative/math-doc/document.tex +158 -0
- data/doc/derivative/numru-derivative.html +129 -0
- data/doc/ep_flux/ep_flux.html +469 -0
- data/doc/ep_flux/ggraph_on_merdional_section.html +71 -0
- data/doc/ep_flux/index.html +31 -0
- data/doc/ep_flux/index.rd +24 -0
- data/doc/ep_flux/math-doc/document/WARNINGS +1 -0
- data/doc/ep_flux/math-doc/document/contents.png +0 -0
- data/doc/ep_flux/math-doc/document/crossref.png +0 -0
- data/doc/ep_flux/math-doc/document/document.css +30 -0
- data/doc/ep_flux/math-doc/document/document.html +101 -0
- data/doc/ep_flux/math-doc/document/images.aux +1 -0
- data/doc/ep_flux/math-doc/document/images.log +1375 -0
- data/doc/ep_flux/math-doc/document/images.pl +1328 -0
- data/doc/ep_flux/math-doc/document/images.tex +1471 -0
- data/doc/ep_flux/math-doc/document/img1.png +0 -0
- data/doc/ep_flux/math-doc/document/img10.png +0 -0
- data/doc/ep_flux/math-doc/document/img100.png +0 -0
- data/doc/ep_flux/math-doc/document/img101.png +0 -0
- data/doc/ep_flux/math-doc/document/img102.png +0 -0
- data/doc/ep_flux/math-doc/document/img103.png +0 -0
- data/doc/ep_flux/math-doc/document/img104.png +0 -0
- data/doc/ep_flux/math-doc/document/img105.png +0 -0
- data/doc/ep_flux/math-doc/document/img106.png +0 -0
- data/doc/ep_flux/math-doc/document/img107.png +0 -0
- data/doc/ep_flux/math-doc/document/img108.png +0 -0
- data/doc/ep_flux/math-doc/document/img109.png +0 -0
- data/doc/ep_flux/math-doc/document/img11.png +0 -0
- data/doc/ep_flux/math-doc/document/img110.png +0 -0
- data/doc/ep_flux/math-doc/document/img111.png +0 -0
- data/doc/ep_flux/math-doc/document/img112.png +0 -0
- data/doc/ep_flux/math-doc/document/img113.png +0 -0
- data/doc/ep_flux/math-doc/document/img114.png +0 -0
- data/doc/ep_flux/math-doc/document/img115.png +0 -0
- data/doc/ep_flux/math-doc/document/img116.png +0 -0
- data/doc/ep_flux/math-doc/document/img117.png +0 -0
- data/doc/ep_flux/math-doc/document/img118.png +0 -0
- data/doc/ep_flux/math-doc/document/img119.png +0 -0
- data/doc/ep_flux/math-doc/document/img12.png +0 -0
- data/doc/ep_flux/math-doc/document/img120.png +0 -0
- data/doc/ep_flux/math-doc/document/img121.png +0 -0
- data/doc/ep_flux/math-doc/document/img122.png +0 -0
- data/doc/ep_flux/math-doc/document/img123.png +0 -0
- data/doc/ep_flux/math-doc/document/img124.png +0 -0
- data/doc/ep_flux/math-doc/document/img125.png +0 -0
- data/doc/ep_flux/math-doc/document/img126.png +0 -0
- data/doc/ep_flux/math-doc/document/img127.png +0 -0
- data/doc/ep_flux/math-doc/document/img128.png +0 -0
- data/doc/ep_flux/math-doc/document/img129.png +0 -0
- data/doc/ep_flux/math-doc/document/img13.png +0 -0
- data/doc/ep_flux/math-doc/document/img130.png +0 -0
- data/doc/ep_flux/math-doc/document/img131.png +0 -0
- data/doc/ep_flux/math-doc/document/img132.png +0 -0
- data/doc/ep_flux/math-doc/document/img133.png +0 -0
- data/doc/ep_flux/math-doc/document/img134.png +0 -0
- data/doc/ep_flux/math-doc/document/img135.png +0 -0
- data/doc/ep_flux/math-doc/document/img136.png +0 -0
- data/doc/ep_flux/math-doc/document/img137.png +0 -0
- data/doc/ep_flux/math-doc/document/img138.png +0 -0
- data/doc/ep_flux/math-doc/document/img139.png +0 -0
- data/doc/ep_flux/math-doc/document/img14.png +0 -0
- data/doc/ep_flux/math-doc/document/img140.png +0 -0
- data/doc/ep_flux/math-doc/document/img141.png +0 -0
- data/doc/ep_flux/math-doc/document/img142.png +0 -0
- data/doc/ep_flux/math-doc/document/img143.png +0 -0
- data/doc/ep_flux/math-doc/document/img144.png +0 -0
- data/doc/ep_flux/math-doc/document/img145.png +0 -0
- data/doc/ep_flux/math-doc/document/img146.png +0 -0
- data/doc/ep_flux/math-doc/document/img147.png +0 -0
- data/doc/ep_flux/math-doc/document/img148.png +0 -0
- data/doc/ep_flux/math-doc/document/img149.png +0 -0
- data/doc/ep_flux/math-doc/document/img15.png +0 -0
- data/doc/ep_flux/math-doc/document/img150.png +0 -0
- data/doc/ep_flux/math-doc/document/img151.png +0 -0
- data/doc/ep_flux/math-doc/document/img152.png +0 -0
- data/doc/ep_flux/math-doc/document/img153.png +0 -0
- data/doc/ep_flux/math-doc/document/img154.png +0 -0
- data/doc/ep_flux/math-doc/document/img155.png +0 -0
- data/doc/ep_flux/math-doc/document/img156.png +0 -0
- data/doc/ep_flux/math-doc/document/img157.png +0 -0
- data/doc/ep_flux/math-doc/document/img158.png +0 -0
- data/doc/ep_flux/math-doc/document/img159.png +0 -0
- data/doc/ep_flux/math-doc/document/img16.png +0 -0
- data/doc/ep_flux/math-doc/document/img160.png +0 -0
- data/doc/ep_flux/math-doc/document/img161.png +0 -0
- data/doc/ep_flux/math-doc/document/img162.png +0 -0
- data/doc/ep_flux/math-doc/document/img163.png +0 -0
- data/doc/ep_flux/math-doc/document/img164.png +0 -0
- data/doc/ep_flux/math-doc/document/img165.png +0 -0
- data/doc/ep_flux/math-doc/document/img166.png +0 -0
- data/doc/ep_flux/math-doc/document/img167.png +0 -0
- data/doc/ep_flux/math-doc/document/img168.png +0 -0
- data/doc/ep_flux/math-doc/document/img169.png +0 -0
- data/doc/ep_flux/math-doc/document/img17.png +0 -0
- data/doc/ep_flux/math-doc/document/img170.png +0 -0
- data/doc/ep_flux/math-doc/document/img171.png +0 -0
- data/doc/ep_flux/math-doc/document/img172.png +0 -0
- data/doc/ep_flux/math-doc/document/img173.png +0 -0
- data/doc/ep_flux/math-doc/document/img174.png +0 -0
- data/doc/ep_flux/math-doc/document/img175.png +0 -0
- data/doc/ep_flux/math-doc/document/img176.png +0 -0
- data/doc/ep_flux/math-doc/document/img177.png +0 -0
- data/doc/ep_flux/math-doc/document/img178.png +0 -0
- data/doc/ep_flux/math-doc/document/img179.png +0 -0
- data/doc/ep_flux/math-doc/document/img18.png +0 -0
- data/doc/ep_flux/math-doc/document/img180.png +0 -0
- data/doc/ep_flux/math-doc/document/img181.png +0 -0
- data/doc/ep_flux/math-doc/document/img182.png +0 -0
- data/doc/ep_flux/math-doc/document/img183.png +0 -0
- data/doc/ep_flux/math-doc/document/img184.png +0 -0
- data/doc/ep_flux/math-doc/document/img185.png +0 -0
- data/doc/ep_flux/math-doc/document/img186.png +0 -0
- data/doc/ep_flux/math-doc/document/img187.png +0 -0
- data/doc/ep_flux/math-doc/document/img188.png +0 -0
- data/doc/ep_flux/math-doc/document/img189.png +0 -0
- data/doc/ep_flux/math-doc/document/img19.png +0 -0
- data/doc/ep_flux/math-doc/document/img190.png +0 -0
- data/doc/ep_flux/math-doc/document/img191.png +0 -0
- data/doc/ep_flux/math-doc/document/img192.png +0 -0
- data/doc/ep_flux/math-doc/document/img193.png +0 -0
- data/doc/ep_flux/math-doc/document/img194.png +0 -0
- data/doc/ep_flux/math-doc/document/img195.png +0 -0
- data/doc/ep_flux/math-doc/document/img196.png +0 -0
- data/doc/ep_flux/math-doc/document/img197.png +0 -0
- data/doc/ep_flux/math-doc/document/img198.png +0 -0
- data/doc/ep_flux/math-doc/document/img199.png +0 -0
- data/doc/ep_flux/math-doc/document/img2.png +0 -0
- data/doc/ep_flux/math-doc/document/img20.png +0 -0
- data/doc/ep_flux/math-doc/document/img200.png +0 -0
- data/doc/ep_flux/math-doc/document/img21.png +0 -0
- data/doc/ep_flux/math-doc/document/img22.png +0 -0
- data/doc/ep_flux/math-doc/document/img23.png +0 -0
- data/doc/ep_flux/math-doc/document/img24.png +0 -0
- data/doc/ep_flux/math-doc/document/img25.png +0 -0
- data/doc/ep_flux/math-doc/document/img26.png +0 -0
- data/doc/ep_flux/math-doc/document/img27.png +0 -0
- data/doc/ep_flux/math-doc/document/img28.png +0 -0
- data/doc/ep_flux/math-doc/document/img29.png +0 -0
- data/doc/ep_flux/math-doc/document/img3.png +0 -0
- data/doc/ep_flux/math-doc/document/img30.png +0 -0
- data/doc/ep_flux/math-doc/document/img31.png +0 -0
- data/doc/ep_flux/math-doc/document/img32.png +0 -0
- data/doc/ep_flux/math-doc/document/img33.png +0 -0
- data/doc/ep_flux/math-doc/document/img34.png +0 -0
- data/doc/ep_flux/math-doc/document/img35.png +0 -0
- data/doc/ep_flux/math-doc/document/img36.png +0 -0
- data/doc/ep_flux/math-doc/document/img37.png +0 -0
- data/doc/ep_flux/math-doc/document/img38.png +0 -0
- data/doc/ep_flux/math-doc/document/img39.png +0 -0
- data/doc/ep_flux/math-doc/document/img4.png +0 -0
- data/doc/ep_flux/math-doc/document/img40.png +0 -0
- data/doc/ep_flux/math-doc/document/img41.png +0 -0
- data/doc/ep_flux/math-doc/document/img42.png +0 -0
- data/doc/ep_flux/math-doc/document/img43.png +0 -0
- data/doc/ep_flux/math-doc/document/img44.png +0 -0
- data/doc/ep_flux/math-doc/document/img45.png +0 -0
- data/doc/ep_flux/math-doc/document/img46.png +0 -0
- data/doc/ep_flux/math-doc/document/img47.png +0 -0
- data/doc/ep_flux/math-doc/document/img48.png +0 -0
- data/doc/ep_flux/math-doc/document/img49.png +0 -0
- data/doc/ep_flux/math-doc/document/img5.png +0 -0
- data/doc/ep_flux/math-doc/document/img50.png +0 -0
- data/doc/ep_flux/math-doc/document/img51.png +0 -0
- data/doc/ep_flux/math-doc/document/img52.png +0 -0
- data/doc/ep_flux/math-doc/document/img53.png +0 -0
- data/doc/ep_flux/math-doc/document/img54.png +0 -0
- data/doc/ep_flux/math-doc/document/img55.png +0 -0
- data/doc/ep_flux/math-doc/document/img56.png +0 -0
- data/doc/ep_flux/math-doc/document/img57.png +0 -0
- data/doc/ep_flux/math-doc/document/img58.png +0 -0
- data/doc/ep_flux/math-doc/document/img59.png +0 -0
- data/doc/ep_flux/math-doc/document/img6.png +0 -0
- data/doc/ep_flux/math-doc/document/img60.png +0 -0
- data/doc/ep_flux/math-doc/document/img61.png +0 -0
- data/doc/ep_flux/math-doc/document/img62.png +0 -0
- data/doc/ep_flux/math-doc/document/img63.png +0 -0
- data/doc/ep_flux/math-doc/document/img64.png +0 -0
- data/doc/ep_flux/math-doc/document/img65.png +0 -0
- data/doc/ep_flux/math-doc/document/img66.png +0 -0
- data/doc/ep_flux/math-doc/document/img67.png +0 -0
- data/doc/ep_flux/math-doc/document/img68.png +0 -0
- data/doc/ep_flux/math-doc/document/img69.png +0 -0
- data/doc/ep_flux/math-doc/document/img7.png +0 -0
- data/doc/ep_flux/math-doc/document/img70.png +0 -0
- data/doc/ep_flux/math-doc/document/img71.png +0 -0
- data/doc/ep_flux/math-doc/document/img72.png +0 -0
- data/doc/ep_flux/math-doc/document/img73.png +0 -0
- data/doc/ep_flux/math-doc/document/img74.png +0 -0
- data/doc/ep_flux/math-doc/document/img75.png +0 -0
- data/doc/ep_flux/math-doc/document/img76.png +0 -0
- data/doc/ep_flux/math-doc/document/img77.png +0 -0
- data/doc/ep_flux/math-doc/document/img78.png +0 -0
- data/doc/ep_flux/math-doc/document/img79.png +0 -0
- data/doc/ep_flux/math-doc/document/img8.png +0 -0
- data/doc/ep_flux/math-doc/document/img80.png +0 -0
- data/doc/ep_flux/math-doc/document/img81.png +0 -0
- data/doc/ep_flux/math-doc/document/img82.png +0 -0
- data/doc/ep_flux/math-doc/document/img83.png +0 -0
- data/doc/ep_flux/math-doc/document/img84.png +0 -0
- data/doc/ep_flux/math-doc/document/img85.png +0 -0
- data/doc/ep_flux/math-doc/document/img86.png +0 -0
- data/doc/ep_flux/math-doc/document/img87.png +0 -0
- data/doc/ep_flux/math-doc/document/img88.png +0 -0
- data/doc/ep_flux/math-doc/document/img89.png +0 -0
- data/doc/ep_flux/math-doc/document/img9.png +0 -0
- data/doc/ep_flux/math-doc/document/img90.png +0 -0
- data/doc/ep_flux/math-doc/document/img91.png +0 -0
- data/doc/ep_flux/math-doc/document/img92.png +0 -0
- data/doc/ep_flux/math-doc/document/img93.png +0 -0
- data/doc/ep_flux/math-doc/document/img94.png +0 -0
- data/doc/ep_flux/math-doc/document/img95.png +0 -0
- data/doc/ep_flux/math-doc/document/img96.png +0 -0
- data/doc/ep_flux/math-doc/document/img97.png +0 -0
- data/doc/ep_flux/math-doc/document/img98.png +0 -0
- data/doc/ep_flux/math-doc/document/img99.png +0 -0
- data/doc/ep_flux/math-doc/document/index.html +101 -0
- data/doc/ep_flux/math-doc/document/internals.pl +258 -0
- data/doc/ep_flux/math-doc/document/labels.pl +265 -0
- data/doc/ep_flux/math-doc/document/next.png +0 -0
- data/doc/ep_flux/math-doc/document/next_g.png +0 -0
- data/doc/ep_flux/math-doc/document/node1.html +104 -0
- data/doc/ep_flux/math-doc/document/node10.html +164 -0
- data/doc/ep_flux/math-doc/document/node11.html +86 -0
- data/doc/ep_flux/math-doc/document/node12.html +166 -0
- data/doc/ep_flux/math-doc/document/node13.html +897 -0
- data/doc/ep_flux/math-doc/document/node14.html +1065 -0
- data/doc/ep_flux/math-doc/document/node15.html +72 -0
- data/doc/ep_flux/math-doc/document/node16.html +81 -0
- data/doc/ep_flux/math-doc/document/node2.html +82 -0
- data/doc/ep_flux/math-doc/document/node3.html +91 -0
- data/doc/ep_flux/math-doc/document/node4.html +149 -0
- data/doc/ep_flux/math-doc/document/node5.html +330 -0
- data/doc/ep_flux/math-doc/document/node6.html +99 -0
- data/doc/ep_flux/math-doc/document/node7.html +98 -0
- data/doc/ep_flux/math-doc/document/node8.html +83 -0
- data/doc/ep_flux/math-doc/document/node9.html +140 -0
- data/doc/ep_flux/math-doc/document/prev.png +0 -0
- data/doc/ep_flux/math-doc/document/prev_g.png +0 -0
- data/doc/ep_flux/math-doc/document/up.png +0 -0
- data/doc/ep_flux/math-doc/document/up_g.png +0 -0
- data/doc/ep_flux/math-doc/document.pdf +0 -0
- data/doc/ep_flux/math-doc/document.tex +2018 -0
- data/doc/gdir.html +412 -0
- data/doc/gdir_client.html +16 -0
- data/doc/gdir_connect_ftp-like.html +61 -0
- data/doc/gdir_server.html +45 -0
- data/doc/ggraph.html +1615 -0
- data/doc/gpcat.html +44 -0
- data/doc/gpcut.html +41 -0
- data/doc/gphys.html +532 -0
- data/doc/gphys_fft.html +324 -0
- data/doc/gphys_grads_io.html +69 -0
- data/doc/gphys_grib_io.html +82 -0
- data/doc/gphys_io.html +120 -0
- data/doc/gphys_io_common.html +18 -0
- data/doc/gphys_netcdf_io.html +283 -0
- data/doc/gplist.html +24 -0
- data/doc/gpmath.html +51 -0
- data/doc/gpmaxmin.html +31 -0
- data/doc/gpprint.html +34 -0
- data/doc/gpview.html +270 -0
- data/doc/grads2nc_with_gphys.html +21 -0
- data/doc/grads_gridded.html +307 -0
- data/doc/grib.html +144 -0
- data/doc/grid.html +212 -0
- data/doc/index.html +133 -0
- data/doc/index.rd +127 -0
- data/doc/netcdf_convention.html +136 -0
- data/doc/unumeric.html +176 -0
- data/doc/update +64 -0
- data/doc/varray.html +299 -0
- data/doc/varraycomposite.html +67 -0
- data/ext_coord.c +209 -0
- data/ext_init.c +7 -0
- data/extconf.rb +42 -0
- data/install.rb +130 -0
- data/interpo.c +497 -0
- data/lib/numru/dcl_mouse.rb +71 -0
- data/lib/numru/dclext_datetime_ax.rb +220 -0
- data/lib/numru/derivative.rb +348 -0
- data/lib/numru/ganalysis/covariance.rb +154 -0
- data/lib/numru/ganalysis/eof.rb +298 -0
- data/lib/numru/ganalysis/histogram.rb +252 -0
- data/lib/numru/ganalysis/met.rb +317 -0
- data/lib/numru/ganalysis/planet.rb +182 -0
- data/lib/numru/ganalysis.rb +7 -0
- data/lib/numru/gdir.rb +1038 -0
- data/lib/numru/gdir_connect_ftp-like.rb +149 -0
- data/lib/numru/ggraph.rb +5838 -0
- data/lib/numru/ggraph_on_merdional_section.rb +178 -0
- data/lib/numru/gphys/assoccoords.rb +359 -0
- data/lib/numru/gphys/attribute.rb +129 -0
- data/lib/numru/gphys/attributenetcdf.rb +80 -0
- data/lib/numru/gphys/axis.rb +963 -0
- data/lib/numru/gphys/coordmapping.rb +286 -0
- data/lib/numru/gphys/coordtransform.rb +209 -0
- data/lib/numru/gphys/derivative.rb +314 -0
- data/lib/numru/gphys/ep_flux.rb +868 -0
- data/lib/numru/gphys/gpcommon.rb +52 -0
- data/lib/numru/gphys/gphys.rb +1207 -0
- data/lib/numru/gphys/gphys_fft.rb +886 -0
- data/lib/numru/gphys/gphys_grads_io.rb +212 -0
- data/lib/numru/gphys/gphys_grib_io.rb +214 -0
- data/lib/numru/gphys/gphys_gtool3_io.rb +162 -0
- data/lib/numru/gphys/gphys_hdfeos5_io.rb +672 -0
- data/lib/numru/gphys/gphys_io.rb +452 -0
- data/lib/numru/gphys/gphys_io_common.rb +126 -0
- data/lib/numru/gphys/gphys_netcdf_io.rb +800 -0
- data/lib/numru/gphys/gphys_nusdas_io.rb +132 -0
- data/lib/numru/gphys/grads_gridded.rb +1638 -0
- data/lib/numru/gphys/grib.rb +2049 -0
- data/lib/numru/gphys/grib_params.rb +1465 -0
- data/lib/numru/gphys/grid.rb +723 -0
- data/lib/numru/gphys/gtool3.rb +771 -0
- data/lib/numru/gphys/interpolate.rb +854 -0
- data/lib/numru/gphys/narray_ext.rb +34 -0
- data/lib/numru/gphys/netcdf_convention.rb +406 -0
- data/lib/numru/gphys/subsetmapping.rb +332 -0
- data/lib/numru/gphys/unumeric.rb +522 -0
- data/lib/numru/gphys/varray.rb +1109 -0
- data/lib/numru/gphys/varraycomposite.rb +415 -0
- data/lib/numru/gphys/varraygrads.rb +225 -0
- data/lib/numru/gphys/varraygrib.rb +177 -0
- data/lib/numru/gphys/varraygtool3.rb +226 -0
- data/lib/numru/gphys/varrayhdfeos5.rb +451 -0
- data/lib/numru/gphys/varraynetcdf.rb +350 -0
- data/lib/numru/gphys/varraynusdas.rb +59 -0
- data/lib/numru/gphys.rb +9 -0
- data/lib/numru/htdir.rb +170 -0
- data/multibitIO.c +567 -0
- data/sample/cira86_to_nc.rb +122 -0
- data/sample/druby_cli1.rb +21 -0
- data/sample/druby_cli2.rb +34 -0
- data/sample/druby_serv1.rb +30 -0
- data/sample/druby_serv2.rb +64 -0
- data/sample/ep_flux/demo_NCEP_1.rb +48 -0
- data/sample/ep_flux/demo_NCEP_2.rb +57 -0
- data/sample/ep_flux/demo_NCEP_3.rb +81 -0
- data/sample/ggraph_latlon_labelling_dr002690.rb +159 -0
- data/sample/ggraph_mapfit-axes_dr002687.rb +131 -0
- data/sample/map_projection.rb +121 -0
- data/sample/ncep_theta_coord.rb +79 -0
- data/test/eof_slp.rb +28 -0
- data/test/mltbit.dat +0 -0
- data/test/test_ep_flux.rb +533 -0
- data/test/test_multibitIO.rb +19 -0
- data/testdata/T.jan.ctl +12 -0
- data/testdata/T.jan.dat +0 -0
- data/testdata/T.jan.grib +0 -0
- data/testdata/T.jan.nc +0 -0
- data/testdata/T.jan.packed.withmiss.nc +0 -0
- data/testdata/UV.jan.nc +0 -0
- data/testdata/assoc_crds.nc +0 -0
- data/testdata/cira86.dat +1332 -0
- metadata +621 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
##############################################################
|
4
|
+
=begin
|
5
|
+
= NAME
|
6
|
+
|
7
|
+
grads2nc_with_gphys - GrADS to NetCDF converter
|
8
|
+
|
9
|
+
= WARNING
|
10
|
+
|
11
|
+
Not efficient if the GrADS file has many variables.
|
12
|
+
|
13
|
+
= USAGE
|
14
|
+
|
15
|
+
% grads2nc_with_gphys infilename outfilename [-v varname1 [varname2 ...]]
|
16
|
+
|
17
|
+
= EXAMPLE
|
18
|
+
|
19
|
+
% grads2nc_with_gphys ../testdata/T.jan.ctl tmp.nc
|
20
|
+
% grads2nc_with_gphys ../testdata/T.jan.ctl tmp.nc -v T
|
21
|
+
|
22
|
+
=end
|
23
|
+
##############################################################
|
24
|
+
|
25
|
+
usage = "\n\n"+<<EOS
|
26
|
+
#{$0}: GrADS to NetCDF converter.
|
27
|
+
|
28
|
+
USAGE:
|
29
|
+
% #{$0} infilename outfilename [-v varname1 [varname2 ...]]
|
30
|
+
Here, the -v option is used to limit variables to copy
|
31
|
+
(all variables are copied by default). Note that to copy many
|
32
|
+
variables may not be effifient.
|
33
|
+
EOS
|
34
|
+
|
35
|
+
# < interpret command-line arguments >
|
36
|
+
|
37
|
+
varnames = nil
|
38
|
+
if ARGV[2] == '-v'
|
39
|
+
varnames = []
|
40
|
+
(ARGV.length-3).times{ varnames.unshift( ARGV.pop ) }
|
41
|
+
ARGV.pop
|
42
|
+
end
|
43
|
+
|
44
|
+
if ARGV.length != 2
|
45
|
+
raise usage
|
46
|
+
else
|
47
|
+
infilename, outfilename = ARGV[0..1]
|
48
|
+
end
|
49
|
+
|
50
|
+
# < convert >
|
51
|
+
|
52
|
+
require "numru/gphys"
|
53
|
+
include NumRu
|
54
|
+
grfile = GrADS_Gridded.open(infilename)
|
55
|
+
varnames = grfile.varnames if !varnames
|
56
|
+
out_file = NetCDF.create(outfilename)
|
57
|
+
varnames.each do |varname|
|
58
|
+
temp = GPhys::GrADS_IO.open(grfile,varname)
|
59
|
+
GPhys::NetCDF_IO.write(out_file,temp)
|
60
|
+
end
|
61
|
+
out_file.close
|
data/doc/attribute.html
ADDED
@@ -0,0 +1,19 @@
|
|
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/attribute.rb</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1><a name="label-0" id="label-0">class Attribute < Hash</a></h1><!-- RDLabel: "class Attribute < Hash" -->
|
11
|
+
<p>A Hash class compatible with NetCDF attributes.</p>
|
12
|
+
<ul>
|
13
|
+
<li>Values are restricted to NetCDFAttr values</li>
|
14
|
+
<li>Keys must be String or Symbol (Symbol is converted into String such that
|
15
|
+
they are used interchangeably. E.g., attr[:units] == attr["units"] )</li>
|
16
|
+
</ul>
|
17
|
+
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
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/attributenetcdf.rb</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1><a name="label:0" id="label:0">class Attribute_NetCDF</a></h1><!-- RDLabel: "class Attribute_NetCDF" -->
|
11
|
+
<p>A class to handle NetCDF attributes in the same way as in the
|
12
|
+
NumRu::Attribute class.</p>
|
13
|
+
|
14
|
+
</body>
|
15
|
+
</html>
|
data/doc/axis.html
ADDED
@@ -0,0 +1,376 @@
|
|
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/axis.rb</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1><a name="label-0" id="label-0">class NumRu::Axis</a></h1><!-- RDLabel: "class NumRu::Axis" -->
|
11
|
+
<p>A class of to handle a descretized physical coordinate.</p>
|
12
|
+
<h2><a name="label-1" id="label-1">Overview</a></h2><!-- RDLabel: "Overview" -->
|
13
|
+
<p>An NumRu::Axis object is meant to represent a dimension in a NumRu::Grid
|
14
|
+
object, which is used in NumRu::Grid (Hereafter, NumRu:: is omitted).
|
15
|
+
An Axis has 1-dimensional data on grid-point posisions as a VArray.
|
16
|
+
In addition, it can have supplementary data (as VArray objects).</p>
|
17
|
+
<p>Three types of axes are supported in this class:</p>
|
18
|
+
<pre>1. Simple (mostly point-sampled) axes
|
19
|
+
2. Cell-type axes. In this case, grid points are either
|
20
|
+
at cell boundaries or within the cells (oftern at the center).
|
21
|
+
3. Simple ("bare") indexing (without particular physical meaning)</pre>
|
22
|
+
<p>In most applications, the 1st type would be enough, but
|
23
|
+
the 2nd type would be useful for some type of numerical
|
24
|
+
simulation. The 3rd is not physical and may not be considered as
|
25
|
+
"axes", but this could be convenient for some practical applications.</p>
|
26
|
+
<h2><a name="label-2" id="label-2">Class Methods</a></h2><!-- RDLabel: "Class Methods" -->
|
27
|
+
<dl>
|
28
|
+
<dt><h4><a name="label-3" id="label-3"><code>Axis.new(<var>cell</var>=<var>false</var>,<var>bare_index</var>=<var>false</var>,<var>name</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "Axis.new" -->
|
29
|
+
<dd>
|
30
|
+
<p>Constructor. The first two arguments are to specify one of the
|
31
|
+
types explained above.</p>
|
32
|
+
<p>ARGUMENTS</p>
|
33
|
+
<ul>
|
34
|
+
<li>cell (true or false)</li>
|
35
|
+
<li>bare_index (true or false)</li>
|
36
|
+
<li>name (String or nil): the default name (when nil) is "noname"</li>
|
37
|
+
</ul>
|
38
|
+
<p>RETURN VALUE</p>
|
39
|
+
<ul>
|
40
|
+
<li>an Axis</li>
|
41
|
+
</ul></dd>
|
42
|
+
<dt><h4><a name="label-4" id="label-4"><code>Axis.defined_operations</code></a></h4></dt><!-- RDLabel: "Axis.defined_operations" -->
|
43
|
+
<dd>
|
44
|
+
<p>Returns the name of the methods defined in Axis to do
|
45
|
+
some operation along the axis.</p>
|
46
|
+
<p>RETURN VALUE</p>
|
47
|
+
<ul>
|
48
|
+
<li>an Array of String. Current default value is ["integrate","average"].</li>
|
49
|
+
</ul></dd>
|
50
|
+
<dt><h4><a name="label-5" id="label-5"><code>Axis.humane_messaging = <var>t_or_f</var></code></a></h4></dt><!-- RDLabel: "Axis.humane_messaging = t_or_f" -->
|
51
|
+
<dd>
|
52
|
+
If false is given, the [] method is changed to return a naive
|
53
|
+
straightforward message if the axis is lost. -- By default,
|
54
|
+
it returns a fancy but sometimes unwanted message if the
|
55
|
+
axis is the time with since field in the form of yyyy-mm-dd.... </dd>
|
56
|
+
</dl>
|
57
|
+
<h2><a name="label-6" id="label-6">Instance Methods</a></h2><!-- RDLabel: "Instance Methods" -->
|
58
|
+
<dl>
|
59
|
+
<dt><h4><a name="label-7" id="label-7"><code>name=(<var>nm</var>)</code></a></h4></dt><!-- RDLabel: "name=" -->
|
60
|
+
<dd>
|
61
|
+
<p>Set a name.</p>
|
62
|
+
<p>ARGUMENTS</p>
|
63
|
+
<ul>
|
64
|
+
<li>name (String)</li>
|
65
|
+
</ul>
|
66
|
+
<p>RETURN VALUE</p>
|
67
|
+
<ul>
|
68
|
+
<li>name (the argument)</li>
|
69
|
+
</ul></dd>
|
70
|
+
<dt><h4><a name="label-8" id="label-8"><code>name</code></a></h4></dt><!-- RDLabel: "name" -->
|
71
|
+
<dd>
|
72
|
+
<p>Returns the name.</p>
|
73
|
+
<p>RETURN VALUE</p>
|
74
|
+
<ul>
|
75
|
+
<li>a String</li>
|
76
|
+
</ul></dd>
|
77
|
+
<dt><h4><a name="label-9" id="label-9"><code>cell?</code></a></h4></dt><!-- RDLabel: "cell?" -->
|
78
|
+
<dd>
|
79
|
+
<p>Whether or not self is a cell-type axis.</p>
|
80
|
+
<p>RETURN VALUE</p>
|
81
|
+
<ul>
|
82
|
+
<li>true or false</li>
|
83
|
+
</ul></dd>
|
84
|
+
<dt><h4><a name="label-10" id="label-10"><code>cell_center?</code></a></h4></dt><!-- RDLabel: "cell_center?" -->
|
85
|
+
<dd>
|
86
|
+
<p>Whether or not self represents data points within the cells (which is
|
87
|
+
often, but not necessarily, the centers of the cells).</p>
|
88
|
+
<p>RETURN VALUE</p>
|
89
|
+
<ul>
|
90
|
+
<li>true, false, or nil (when the axis is not cell-type)</li>
|
91
|
+
</ul></dd>
|
92
|
+
<dt><h4><a name="label-11" id="label-11"><code>cell_bounds?</code></a></h4></dt><!-- RDLabel: "cell_bounds?" -->
|
93
|
+
<dd>
|
94
|
+
<p>Whether or not self represents data points at the cell bondaries.</p>
|
95
|
+
<p>RETURN VALUE</p>
|
96
|
+
<ul>
|
97
|
+
<li>true, false, or nil (when the axis is not cell-type)</li>
|
98
|
+
</ul></dd>
|
99
|
+
<dt><h4><a name="label-12" id="label-12"><code>bare_index?</code></a></h4></dt><!-- RDLabel: "bare_index?" -->
|
100
|
+
<dd>
|
101
|
+
<p>Whether or not self is of the bare-index type.</p>
|
102
|
+
<p>RETURN VALUE</p>
|
103
|
+
<ul>
|
104
|
+
<li>true or false.</li>
|
105
|
+
</ul></dd>
|
106
|
+
<dt><h4><a name="label-13" id="label-13"><code>flatten</code></a></h4></dt><!-- RDLabel: "flatten" -->
|
107
|
+
<dd>
|
108
|
+
<p>Returns the VArray objects in self as a flat Array. No cloning is made.</p>
|
109
|
+
<p>RETURN VALUE</p>
|
110
|
+
<ul>
|
111
|
+
<li>an Array of VArray objects.</li>
|
112
|
+
</ul></dd>
|
113
|
+
<dt><h4><a name="label-14" id="label-14"><code>each_varray</code></a></h4></dt><!-- RDLabel: "each_varray" -->
|
114
|
+
<dd>
|
115
|
+
<p>Iterator for each VArray object in self (dependent on <a href="#label-13">flatten</a>.</p>
|
116
|
+
<p>RETURN VALUE</p>
|
117
|
+
<ul>
|
118
|
+
<li>an Array of VArray objects (same as <a href="#label-13">flatten</a>).</li>
|
119
|
+
</ul></dd>
|
120
|
+
<dt><h4><a name="label-15" id="label-15"><code>copy</code></a></h4></dt><!-- RDLabel: "copy" -->
|
121
|
+
<dd>
|
122
|
+
<p>Make a deep clone onto memory.
|
123
|
+
All the VArray objects in the return value will be
|
124
|
+
of the root class of VArray.</p>
|
125
|
+
<p>RETURN VALUE</p>
|
126
|
+
<ul>
|
127
|
+
<li>an Axis</li>
|
128
|
+
</ul></dd>
|
129
|
+
<dt><h4><a name="label-16" id="label-16"><code>collect</code></a></h4></dt><!-- RDLabel: "collect" -->
|
130
|
+
<dd>
|
131
|
+
<p>This method is like <a href="#label-15">copy</a>, but it is the 'collect'
|
132
|
+
iterator for each VArray in self (block required).</p>
|
133
|
+
<p>RETURN VALUE</p>
|
134
|
+
<ul>
|
135
|
+
<li>an Axis</li>
|
136
|
+
</ul></dd>
|
137
|
+
<dt><h4><a name="label-17" id="label-17"><code>pos=(<var>pos</var>)</code></a></h4></dt><!-- RDLabel: "pos=" -->
|
138
|
+
<dd>
|
139
|
+
<p>Sets the grid-point positions (disretized coordinate values).</p>
|
140
|
+
<p>ARGUMENTS</p>
|
141
|
+
<ul>
|
142
|
+
<li>pos (a 1D VArray)</li>
|
143
|
+
</ul>
|
144
|
+
<p>RETURN VALUE</p>
|
145
|
+
<ul>
|
146
|
+
<li>pos (the argument)</li>
|
147
|
+
</ul></dd>
|
148
|
+
<dt><h4><a name="label-18" id="label-18"><code>set_pos(<var>pos</var>)</code></a></h4></dt><!-- RDLabel: "set_pos" -->
|
149
|
+
<dd>
|
150
|
+
<p>Sets the grid-point positions (disretized coordinate values).</p>
|
151
|
+
<p>ARGUMENTS</p>
|
152
|
+
<ul>
|
153
|
+
<li>pos (a 1D VArray)</li>
|
154
|
+
</ul>
|
155
|
+
<p>RETURN VALUE</p>
|
156
|
+
<ul>
|
157
|
+
<li>self</li>
|
158
|
+
</ul></dd>
|
159
|
+
<dt><h4><a name="label-19" id="label-19"><code>pos</code></a></h4></dt><!-- RDLabel: "pos" -->
|
160
|
+
<dd>
|
161
|
+
<p>Returns the grid-point positions (disretized coordinate values).</p>
|
162
|
+
<p>RETURN VALUE</p>
|
163
|
+
<ul>
|
164
|
+
<li>a VArray (no duplication is made)</li>
|
165
|
+
</ul></dd>
|
166
|
+
<dt><h4><a name="label-20" id="label-20"><code>cell_center</code></a></h4></dt><!-- RDLabel: "cell_center" -->
|
167
|
+
<dd>
|
168
|
+
<p>When cell-type, returns the positions of grid points at cell centers.</p>
|
169
|
+
<p>RETURN VALUE</p>
|
170
|
+
<ul>
|
171
|
+
<li>a VArray (no duplication is made)</li>
|
172
|
+
</ul></dd>
|
173
|
+
<dt><h4><a name="label-21" id="label-21"><code>cell_bounds</code></a></h4></dt><!-- RDLabel: "cell_bounds" -->
|
174
|
+
<dd>
|
175
|
+
<p>When cell-type, returns the positions of grid points at cell boundaries.</p>
|
176
|
+
<p>RETURN VALUE</p>
|
177
|
+
<ul>
|
178
|
+
<li>a VArray (no duplication is made)</li>
|
179
|
+
</ul></dd>
|
180
|
+
<dt><h4><a name="label-22" id="label-22"><code>length</code></a></h4></dt><!-- RDLabel: "length" -->
|
181
|
+
<dd>
|
182
|
+
<p>Returns the length of the axis.</p>
|
183
|
+
<p>RETURN VALUE</p>
|
184
|
+
<ul>
|
185
|
+
<li>an Integer</li>
|
186
|
+
</ul></dd>
|
187
|
+
<dt><h4><a name="label-23" id="label-23"><code>set_cell(<var>center</var>, <var>bounds</var>, <var>name</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "set_cell" -->
|
188
|
+
<dd>
|
189
|
+
<p>Set up cell-type axis, by giving both the cell centers and boundaries.
|
190
|
+
Completion of the set up is deferred until one of <a href="#label-25">set_pos_to_center</a>
|
191
|
+
and <a href="#label-26">set_pos_to_bounds</a> is called.</p>
|
192
|
+
<p>ARGUMENTS</p>
|
193
|
+
<ul>
|
194
|
+
<li>center (a 1D VArray)</li>
|
195
|
+
<li>bounds (a 1D VArray)</li>
|
196
|
+
<li>name (String)</li>
|
197
|
+
</ul>
|
198
|
+
<p>RETURN VALUE</p>
|
199
|
+
<ul>
|
200
|
+
<li>self</li>
|
201
|
+
</ul></dd>
|
202
|
+
<dt><h4><a name="label-24" id="label-24"><code>set_cell_guess_bounds(<var>center</var>, <var>name</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "set_cell_guess_bounds" -->
|
203
|
+
<dd>
|
204
|
+
<p>Set up cell-type axis, by specifing only the cell centers
|
205
|
+
and deriving bounds with a naive assumption.</p>
|
206
|
+
<p>ARGUMENTS</p>
|
207
|
+
<ul>
|
208
|
+
<li>center (a 1D VArray)</li>
|
209
|
+
<li>name (String)</li>
|
210
|
+
</ul>
|
211
|
+
<p>RETURN VALUE</p>
|
212
|
+
<ul>
|
213
|
+
<li>self</li>
|
214
|
+
</ul></dd>
|
215
|
+
<dt><h4><a name="label-25" id="label-25"><code>set_pos_to_center</code></a></h4></dt><!-- RDLabel: "set_pos_to_center" -->
|
216
|
+
<dd>
|
217
|
+
Set the position of the current axis to the centers of the cells.
|
218
|
+
This or <a href="#label-26">set_pos_to_bounds</a> is needed to complete the set up
|
219
|
+
with set_cell_* methods.</dd>
|
220
|
+
<dt><h4><a name="label-26" id="label-26"><code>set_pos_to_bounds</code></a></h4></dt><!-- RDLabel: "set_pos_to_bounds" -->
|
221
|
+
<dd>
|
222
|
+
Set the position of the current axis to the cell bondaries.
|
223
|
+
This or <a href="#label-25">set_pos_to_center</a> is needed to complete the set up
|
224
|
+
with set_cell_* methods.</dd>
|
225
|
+
<dt><h4><a name="label-27" id="label-27"><code>set_aux(<var>name</var>,<var>vary</var>)</code></a></h4></dt><!-- RDLabel: "set_aux" -->
|
226
|
+
<dd>
|
227
|
+
<p>Set auxiliary data</p>
|
228
|
+
<p>ARGUMENTS</p>
|
229
|
+
<ul>
|
230
|
+
<li>name (String) a tag to express the kind of the data</li>
|
231
|
+
<li>vary (a VArray) the data</li>
|
232
|
+
</ul>
|
233
|
+
<p>RETURN VALUE</p>
|
234
|
+
<ul>
|
235
|
+
<li>vary (the 2nd argument)</li>
|
236
|
+
</ul></dd>
|
237
|
+
<dt><h4><a name="label-28" id="label-28"><code>get_aux(<var>name</var>)</code></a></h4></dt><!-- RDLabel: "get_aux" -->
|
238
|
+
<dd>
|
239
|
+
<p>Returns auxiliary data</p>
|
240
|
+
<p>ARGUMENTS</p>
|
241
|
+
<ul>
|
242
|
+
<li>name (String) a tag to express the kind of the data (see <a href="#label-27">set_aux</a>).</li>
|
243
|
+
</ul>
|
244
|
+
<p>RETURN VALUE</p>
|
245
|
+
<ul>
|
246
|
+
<li>a VArray</li>
|
247
|
+
</ul></dd>
|
248
|
+
<dt><h4><a name="label-29" id="label-29"><code>aux_names</code></a></h4></dt><!-- RDLabel: "aux_names" -->
|
249
|
+
<dd>
|
250
|
+
<p>Returns a list of the names of auxiliary data</p>
|
251
|
+
<p>RETURN VALUE</p>
|
252
|
+
<ul>
|
253
|
+
<li>an Array of String</li>
|
254
|
+
</ul></dd>
|
255
|
+
<dt><h4><a name="label-30" id="label-30"><code>to_gphys(<var>datavary1d</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "to_gphys" -->
|
256
|
+
<dd>
|
257
|
+
<p>To construct a GPhys object from an Axis.</p>
|
258
|
+
<p>ARGUMENTS</p>
|
259
|
+
<ul>
|
260
|
+
<li>datavary1d (nil or VArray) :
|
261
|
+
If nil, the position object of self becomes the main data object.
|
262
|
+
If a VArray, it is used as the main data object.</li>
|
263
|
+
</ul>
|
264
|
+
<p>RETURN VALUE</p>
|
265
|
+
<ul>
|
266
|
+
<li>a GPhys</li>
|
267
|
+
</ul></dd>
|
268
|
+
<dt><h4><a name="label-31" id="label-31"><code>[<var>slicer</var>]</code></a></h4></dt><!-- RDLabel: "[]" -->
|
269
|
+
<dd>
|
270
|
+
<p>Returns a subset. Its specification is the same as in NArray.</p>
|
271
|
+
<p>RETURN VALUE</p>
|
272
|
+
<ul>
|
273
|
+
<li>an Axis</li>
|
274
|
+
</ul></dd>
|
275
|
+
<dt><h4><a name="label-32" id="label-32"><code>cut(<var>coord_cutter</var>)</code></a></h4></dt><!-- RDLabel: "cut" -->
|
276
|
+
<dd>
|
277
|
+
<p>Similar to <a href="#label-31">[]</a>, but is based on the physical coordinate.</p>
|
278
|
+
<p>RETURN VALUE</p>
|
279
|
+
<ul>
|
280
|
+
<li>an Axis</li>
|
281
|
+
</ul></dd>
|
282
|
+
<dt><h4><a name="label-33" id="label-33"><code>cut_rank_conserving(<var>coord_cutter</var>)</code></a></h4></dt><!-- RDLabel: "cut_rank_conserving" -->
|
283
|
+
<dd>
|
284
|
+
<p>Similar to <a href="#label-32">cut</a>, but is always rank-conserving. That is,
|
285
|
+
a subset specification like [i] is treated as [i..i]</p>
|
286
|
+
<p>RETURN VALUE</p>
|
287
|
+
<ul>
|
288
|
+
<li>an Axis</li>
|
289
|
+
</ul></dd>
|
290
|
+
<dt><h4><a name="label-34" id="label-34"><code>integrate(<var>ary</var>,<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "integrate" -->
|
291
|
+
<dd>
|
292
|
+
<p>Does integration along the axis</p>
|
293
|
+
<p>ARGUMENTS</p>
|
294
|
+
<ul>
|
295
|
+
<li>ary (NArray or NArray-like multi-dimensional data class)
|
296
|
+
the data, whose dim-th dimension must have the same length as the axis.</li>
|
297
|
+
<li>dim (Integer) : The dimension of ary, to which the operation is applied.</li>
|
298
|
+
</ul>
|
299
|
+
<p>RETURN VALUE</p>
|
300
|
+
<ul>
|
301
|
+
<li>an obejct with the same class as ary, or of a Numeric
|
302
|
+
class if ary is 1D.</li>
|
303
|
+
</ul></dd>
|
304
|
+
<dt><h4><a name="label-35" id="label-35"><code>integ_weight</code></a></h4></dt><!-- RDLabel: "integ_weight" -->
|
305
|
+
<dd>
|
306
|
+
Returns the integration weight (whose default is nil).</dd>
|
307
|
+
<dt><h4><a name="label-36" id="label-36"><code>integ_weight=(<var>wgt</var>)</code></a></h4></dt><!-- RDLabel: "integ_weight=" -->
|
308
|
+
<dd>
|
309
|
+
Sets the integration weight (whose default is nil).</dd>
|
310
|
+
<dt><h4><a name="label-37" id="label-37"><code>average(<var>ary</var>,<var>dim</var>)</code></a></h4></dt><!-- RDLabel: "average" -->
|
311
|
+
<dd>
|
312
|
+
<p>Similar to <a href="#label-34">integrate</a>, but does averaging</p>
|
313
|
+
<p>ARGUMENTS</p>
|
314
|
+
<ul>
|
315
|
+
<li>see <a href="#label-34">integrate</a></li>
|
316
|
+
</ul>
|
317
|
+
<p>RETURN VALUE</p>
|
318
|
+
<ul>
|
319
|
+
<li>see <a href="#label-34">integrate</a></li>
|
320
|
+
</ul></dd>
|
321
|
+
<dt><h4><a name="label-38" id="label-38"><code>average_weight</code></a></h4></dt><!-- RDLabel: "average_weight" -->
|
322
|
+
<dd>
|
323
|
+
Returns the integration weight (whose default is nil).</dd>
|
324
|
+
<dt><h4><a name="label-39" id="label-39"><code>average_weight=(<var>wgt</var>)</code></a></h4></dt><!-- RDLabel: "average_weight=" -->
|
325
|
+
<dd>
|
326
|
+
Sets the integration weight (whose default is nil).</dd>
|
327
|
+
<dt><h4><a name="label-40" id="label-40"><code>draw_positive</code></a></h4></dt><!-- RDLabel: "draw_positive" -->
|
328
|
+
<dd>
|
329
|
+
<p>Returns the direction to plot the axis, which relies on the
|
330
|
+
VArray#axis_draw_positive method.</p>
|
331
|
+
<p>RETURN VALUE</p>
|
332
|
+
<ul>
|
333
|
+
<li>one of the following:
|
334
|
+
<ul>
|
335
|
+
<li>true: axis should be drawn in the increasing order (to right/upward)</li>
|
336
|
+
<li>false: axis should be drawn in the decreasing order</li>
|
337
|
+
<li>nil: not specified</li>
|
338
|
+
</ul></li>
|
339
|
+
</ul></dd>
|
340
|
+
<dt><h4><a name="label-41" id="label-41"><code>cyclic?</code></a></h4></dt><!-- RDLabel: "cyclic?" -->
|
341
|
+
<dd>
|
342
|
+
<p>Returns whether the axis is cyclic.
|
343
|
+
(Relies on the VArray#axis_cyclic? method.)</p>
|
344
|
+
<p>RETURN VALUE</p>
|
345
|
+
<ul>
|
346
|
+
<li>one of the following:
|
347
|
+
<ul>
|
348
|
+
<li>true: cyclic</li>
|
349
|
+
<li>false: not cyclic</li>
|
350
|
+
<li>nil: not specified</li>
|
351
|
+
</ul></li>
|
352
|
+
</ul></dd>
|
353
|
+
<dt><h4><a name="label-42" id="label-42"><code>modulo</code></a></h4></dt><!-- RDLabel: "modulo" -->
|
354
|
+
<dd>
|
355
|
+
<p>Returns the modulo of a cyclic axis
|
356
|
+
(Relies on the VArray#axis_modulo method.)</p>
|
357
|
+
<p>RETURN VALUE</p>
|
358
|
+
<ul>
|
359
|
+
<li>one of the following:
|
360
|
+
<ul>
|
361
|
+
<li>Float if the modulo is defined</li>
|
362
|
+
<li>nil if modulo is not found</li>
|
363
|
+
</ul></li>
|
364
|
+
</ul></dd>
|
365
|
+
<dt><h4><a name="label-43" id="label-43"><code>cyclic_extendible?</code></a></h4></dt><!-- RDLabel: "cyclic_extendible?" -->
|
366
|
+
<dd>
|
367
|
+
<p>Returns whether the axis is cyclic and appropriate to extend.
|
368
|
+
(Relies on the VArray#axis_cyclic_extendible? method.)</p>
|
369
|
+
<p>RETURN VALUE</p>
|
370
|
+
<ul>
|
371
|
+
<li>true or false</li>
|
372
|
+
</ul></dd>
|
373
|
+
</dl>
|
374
|
+
|
375
|
+
</body>
|
376
|
+
</html>
|
@@ -0,0 +1,111 @@
|
|
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/coordmapping.rb</title>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<h1><a name="label:0" id="label:0">class CoordMapping</a></h1><!-- RDLabel: "class CoordMapping" -->
|
11
|
+
<h2><a name="label:1" id="label:1">Overview</a></h2><!-- RDLabel: "Overview" -->
|
12
|
+
<p>Mapping of a coordinate to another. It supports analytic and
|
13
|
+
grid-point-based mapping in subclasses. Here in this root
|
14
|
+
CoordMapping class only the invariant unity mapping (or no mapping)
|
15
|
+
is defined.</p>
|
16
|
+
<h2><a name="label:2" id="label:2">Class methods</a></h2><!-- RDLabel: "Class methods" -->
|
17
|
+
<dl>
|
18
|
+
<dt><h4><a name="label:3" id="label:3"><code>CoordMapping.new</code></a></h4></dt><!-- RDLabel: "CoordMapping.new" -->
|
19
|
+
<dd>
|
20
|
+
<p>Constructor. One or more arguments can be needed in subclasses</p></dd>
|
21
|
+
</dl>
|
22
|
+
<h2><a name="label:4" id="label:4">Methods</a></h2><!-- RDLabel: "Methods" -->
|
23
|
+
<dl>
|
24
|
+
<dt><h4><a name="label:5" id="label:5"><code>map(<var>x</var>,<var>y</var>,<var>z</var>,...)</code></a></h4></dt><!-- RDLabel: "map" -->
|
25
|
+
<dd>
|
26
|
+
<p>Maps data point(s)</p>
|
27
|
+
<p>ARGUMENTS</p>
|
28
|
+
<ul>
|
29
|
+
<li>x,y,z,... (one or more Numeric or NArray) : data points.
|
30
|
+
Mapping is made of [x,y,z,..] (if Numeric) or
|
31
|
+
[x[0],y[0],z[0],..], [x[1],y[1],z[1],..], ..(if NArray).
|
32
|
+
Thus, the number of arguments must be equal to the rank of
|
33
|
+
the mapping. Also, their lengths must agree with each other.</li>
|
34
|
+
</ul>
|
35
|
+
<p>RETURN VALUE</p>
|
36
|
+
<ul>
|
37
|
+
<li>Array of p,q,r,... (Numeric or NArray) : mapping result</li>
|
38
|
+
</ul></dd>
|
39
|
+
<dt><h4><a name="label:6" id="label:6"><code>map_grid(<var>x</var>,<var>y</var>,<var>z</var>,...)</code></a></h4></dt><!-- RDLabel: "map_grid" -->
|
40
|
+
<dd>
|
41
|
+
<p>Same as <a href="#label:5">map</a> but for a regular grid.</p>
|
42
|
+
<p>ARGUMENTS</p>
|
43
|
+
<ul>
|
44
|
+
<li>x,y,z,... (one or more 1D NArray) : coordinate values of
|
45
|
+
a regular grid [x_i, y_j, z_k,..]. The shape of the grid is thus
|
46
|
+
[x.length, y.length, z.length,..]. This method needs no redefinition,
|
47
|
+
since it calls <a href="#label:5">map</a> inside.</li>
|
48
|
+
</ul></dd>
|
49
|
+
<dt><h4><a name="label:7" id="label:7"><code>inverse_map(<var>p</var>,<var>q</var>,<var>r</var>,...)</code></a></h4></dt><!-- RDLabel: "inverse_map" -->
|
50
|
+
<dd>
|
51
|
+
<p>Inversely maps data point(s).</p>
|
52
|
+
<p>ARGUMENTS</p>
|
53
|
+
<ul>
|
54
|
+
<li>p,q,r,... (one or more Numeric or NArray) : data points.
|
55
|
+
Inverse mapping is made of [p,q,r,..] (if Numeric) or
|
56
|
+
[p[0],q[0],r[0],..], [p[1],q[1],r[1],..], ..(if NArray).
|
57
|
+
Thus, the number of arguments must be equal to the rank of
|
58
|
+
the mapping. Also, if NArray, their lengths must agree with each other.</li>
|
59
|
+
</ul>
|
60
|
+
<p>RETURN VALUE</p>
|
61
|
+
<ul>
|
62
|
+
<li>Array of x,y,z,... (Numeric or NArray) : inverse mapping result</li>
|
63
|
+
</ul></dd>
|
64
|
+
<dt><h4><a name="label:8" id="label:8"><code>inverse</code></a></h4></dt><!-- RDLabel: "inverse" -->
|
65
|
+
<dd>
|
66
|
+
<p>Returns the inverse mapping.</p>
|
67
|
+
<p>RETURN VALUE</p>
|
68
|
+
<ul>
|
69
|
+
<li>a CoordMapping</li>
|
70
|
+
</ul></dd>
|
71
|
+
<dt><h4><a name="label:9" id="label:9"><code>inversion_rigorous?</code></a></h4></dt><!-- RDLabel: "inversion_rigorous?" -->
|
72
|
+
<dd>
|
73
|
+
<p>Whether the inversion is rigorous (analytical)</p>
|
74
|
+
<p>RETURN VALUE</p>
|
75
|
+
<ul>
|
76
|
+
<li>true or false</li>
|
77
|
+
</ul></dd>
|
78
|
+
</dl>
|
79
|
+
<h1><a name="label:10" id="label:10">class LinearCoordMapping < CoordMapping</a></h1><!-- RDLabel: "class LinearCoordMapping < CoordMapping" -->
|
80
|
+
<h2><a name="label:11" id="label:11">Overview</a></h2><!-- RDLabel: "Overview" -->
|
81
|
+
<p>Linear coordinate mapping expressed as offset + factor*x,
|
82
|
+
where offset is a vector (NVect) and factor is a matrix (NMatrix).</p>
|
83
|
+
<p>Methods listed below are only those newly defined or those whose
|
84
|
+
arguments are changed.</p>
|
85
|
+
<h2><a name="label:12" id="label:12">Class methods</a></h2><!-- RDLabel: "Class methods" -->
|
86
|
+
<dl>
|
87
|
+
<dt><h4><a name="label:13" id="label:13"><code>LinearCoordMapping.new(<var>offset</var>=<var>nil</var>, <var>factor</var>=<var>nil</var>)</code></a></h4></dt><!-- RDLabel: "LinearCoordMapping.new" -->
|
88
|
+
<dd>
|
89
|
+
<p>Constructor. If one of offset and factor is not
|
90
|
+
specified (nil), a zero vector / a unit matrix is used (at least
|
91
|
+
one of them must be given).</p>
|
92
|
+
<p>ARGUMENTS</p>
|
93
|
+
<ul>
|
94
|
+
<li>offset (NVector or nil) : the offset. Its length represents the rank
|
95
|
+
of mapping. (if nil a zero vector is assumed)</li>
|
96
|
+
<li>factor (NMatrix or nil) : the factor. For consistency,
|
97
|
+
( offset.length == factor.shape[0] == factor.shape[1] ) is required.</li>
|
98
|
+
</ul></dd>
|
99
|
+
</dl>
|
100
|
+
<h2><a name="label:14" id="label:14">Methods</a></h2><!-- RDLabel: "Methods" -->
|
101
|
+
<dl>
|
102
|
+
<dt><h4><a name="label:15" id="label:15"><code>offset</code></a></h4></dt><!-- RDLabel: "offset" -->
|
103
|
+
<dd>
|
104
|
+
<p>Returns the internally stored offset.</p></dd>
|
105
|
+
<dt><h4><a name="label:16" id="label:16"><code>factor</code></a></h4></dt><!-- RDLabel: "factor" -->
|
106
|
+
<dd>
|
107
|
+
<p>Returns the internally stored factor.</p></dd>
|
108
|
+
</dl>
|
109
|
+
|
110
|
+
</body>
|
111
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
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/coordtransform.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
|
+
<p>Additional methods regarding coordinate transformation.</p>
|
12
|
+
<h2><a name="label:1" id="label:1">Methods</a></h2><!-- RDLabel: "Methods" -->
|
13
|
+
<dl>
|
14
|
+
<dt><h4><a name="label:2" id="label:2"><code>coordtransform( <var>coordmapping</var>, <var>axes_to</var>, *<var>dims</var> )</code></a></h4></dt><!-- RDLabel: "coordtransform" -->
|
15
|
+
<dd>
|
16
|
+
<p>Coordinate transformation with <var>coordmapping</var> into <var>axes_to</var>.</p>
|
17
|
+
<p>ARGUMENTS</p>
|
18
|
+
<ul>
|
19
|
+
<li><var>coordmapping</var> (CoordMapping) : relation between the new and
|
20
|
+
original coordinate systems. Mapping is defined from the new one to
|
21
|
+
the orinal one. If the rank of the mapping is smaller than
|
22
|
+
the rank of self, <var>dims</var> must be used to specify the
|
23
|
+
correspondence. e.g., if the rank of the mapping is 2 and that
|
24
|
+
of self is 3 and the mapping is regarding the first 2 dimensions
|
25
|
+
of the three, <var>dims</var> must be [0,1].</li>
|
26
|
+
<li><var>axes_to</var> (Array of Axis) : grid in the new coordinate system.
|
27
|
+
Its length must be the same as the rank of <var>coordmapping</var></li>
|
28
|
+
<li><var>dims</var> (integers) : Specifies the dimensions to which
|
29
|
+
<var>coordmapping</var> is applied. Needed if
|
30
|
+
<code>self.rank!=coordmapping.rank</code> (neglected otherwise).
|
31
|
+
The number of integers must agree with the rank of the mapping.</li>
|
32
|
+
</ul></dd>
|
33
|
+
</dl>
|
34
|
+
|
35
|
+
</body>
|
36
|
+
</html>
|