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
data/bin/gpvect
ADDED
@@ -0,0 +1,706 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
##################################################
|
3
|
+
=begin
|
4
|
+
=NAME
|
5
|
+
|
6
|
+
gpvect - drawing 2-dim vector fiels. Contour/tone of scalar field can be plotted simultaneously.
|
7
|
+
|
8
|
+
==USAGE
|
9
|
+
|
10
|
+
The first command form is for only vector field plotting.
|
11
|
+
|
12
|
+
% gpvect [options] gturl_x gturl_y ....
|
13
|
+
|
14
|
+
where the format of the gturl is
|
15
|
+
|
16
|
+
path@varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]
|
17
|
+
|
18
|
+
The command loads two gphys variables in each time and draws
|
19
|
+
vector field whose x and y components are the first and the second argument,
|
20
|
+
gturl_x gturl_y.
|
21
|
+
|
22
|
+
When the slice parameters are the same throughout the all Gphys
|
23
|
+
variables, the following form can be used:
|
24
|
+
|
25
|
+
% gpvect --slice <slice> [options] file@var_x file@var_y ...
|
26
|
+
|
27
|
+
where the format of the slice is
|
28
|
+
|
29
|
+
dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]
|
30
|
+
|
31
|
+
The second command form is
|
32
|
+
|
33
|
+
% gpvect --scalar [options] gturl_c gturl_x gturl_y ....
|
34
|
+
|
35
|
+
In this case the command loads three gphys variables in each time and
|
36
|
+
draws a contour/tone of the first argument gturl_c, and vector fields
|
37
|
+
whose x and y components are the second and the thrid argument,
|
38
|
+
gturl_x gturl_y.
|
39
|
+
|
40
|
+
==OPTIONS
|
41
|
+
|
42
|
+
===GLOBAL OPTIONS
|
43
|
+
|
44
|
+
:--help:
|
45
|
+
print this message.
|
46
|
+
|
47
|
+
:--slice url:
|
48
|
+
set the slicing parameters.
|
49
|
+
|
50
|
+
:--wsn [1-4]:
|
51
|
+
set work staion number. each number represent output device.
|
52
|
+
1: X window.
|
53
|
+
2: PS file. (named dcl.ps)
|
54
|
+
3: Tektronix output.
|
55
|
+
4: GTK Windows (depend on dcl-5.3)
|
56
|
+
|
57
|
+
:--clrmap [1-]:
|
58
|
+
set colormap to draw tone/contour. default is 1.
|
59
|
+
|
60
|
+
:--itr [1-4,5-7,10-15,20-23,30-33]:
|
61
|
+
set axis scale. default is 1.
|
62
|
+
1: linear scale for x/y axis
|
63
|
+
2: linear scale for x , log scale for y axis
|
64
|
+
3: log scale for x , linear scale for y axis
|
65
|
+
4: log scale for x/y axis
|
66
|
+
|
67
|
+
:--similar [simfac,vxoff,vyoff]:
|
68
|
+
(for 5<=itr<=7) set similarity parameters which are fed in DCL.grssim.
|
69
|
+
|
70
|
+
:--map_axis [uxc,uyc,rot]:
|
71
|
+
(for 10<=itr<=33) set mapping parameters which are fed in DCL.umpcnt.
|
72
|
+
|
73
|
+
:--title:
|
74
|
+
set title of figure
|
75
|
+
|
76
|
+
:--aspect <aspect>:
|
77
|
+
set aspect ratio of Viewport. default is 2.0.
|
78
|
+
|
79
|
+
:--noannotate:
|
80
|
+
not draw annotations.
|
81
|
+
|
82
|
+
:--animate/anim <dim>:
|
83
|
+
plot animation along <dim>. <dim> must be name of dimension.
|
84
|
+
|
85
|
+
:--alternate, --Ga:
|
86
|
+
enable to backing store.
|
87
|
+
|
88
|
+
:--nowait, --Gw:
|
89
|
+
not wait for any actions if animate
|
90
|
+
|
91
|
+
:--reverse, --Gr:
|
92
|
+
plot animation reversible if animate
|
93
|
+
|
94
|
+
:--smooth, --Gaw:
|
95
|
+
equal to --anlternate && --nowait
|
96
|
+
|
97
|
+
:--exch:
|
98
|
+
exchange(transpose) x/y axis.
|
99
|
+
|
100
|
+
:--mean <dim>:
|
101
|
+
mean along axis <dim>.
|
102
|
+
|
103
|
+
:--m, --map <map_type>:
|
104
|
+
plot map. itr number must be set. this option is neglect if itr
|
105
|
+
number is 1-4. abailable map type is coast_world, border_world,
|
106
|
+
plate_world, state_usa, coast_japan, pref_japan
|
107
|
+
|
108
|
+
:--scalar:
|
109
|
+
plot scaler field (contour,tone)
|
110
|
+
|
111
|
+
===CONTOUR/TONE OPTIONS
|
112
|
+
|
113
|
+
:--shade:
|
114
|
+
make contour and tone plot.
|
115
|
+
|
116
|
+
:--noshade:
|
117
|
+
make contour plot, without tone.
|
118
|
+
|
119
|
+
:--nocont:
|
120
|
+
make tone plot, without contour.
|
121
|
+
|
122
|
+
:--range [min:max]:
|
123
|
+
set min/max value for contour/tone plot. min or max must be set.
|
124
|
+
|
125
|
+
:--crange:
|
126
|
+
set min/max value for contour plot. this is more dominant than --range
|
127
|
+
|
128
|
+
:--srange:
|
129
|
+
set min/max value for tone plot. this is more dominant than --interval/int
|
130
|
+
|
131
|
+
:--interval,--int [num]:
|
132
|
+
set interval value for contour/tone plot.set the number of lines if
|
133
|
+
you set negative value.
|
134
|
+
|
135
|
+
:--cint:
|
136
|
+
set interval value for contour plot. this is more dominant than --interval/int
|
137
|
+
|
138
|
+
:--sint:
|
139
|
+
set interval value for tone plot. this is more dominant than --interval/int.
|
140
|
+
|
141
|
+
:--levels:
|
142
|
+
set values of contour/tone levels.
|
143
|
+
|
144
|
+
:--clevels:
|
145
|
+
set values of contour levels.
|
146
|
+
|
147
|
+
:--slevels:
|
148
|
+
set tone of contour levels.
|
149
|
+
|
150
|
+
:--patterns:
|
151
|
+
set each patterns for tone plot.
|
152
|
+
|
153
|
+
:--nocolorbar:
|
154
|
+
do not draw color bar
|
155
|
+
|
156
|
+
:--nozero:
|
157
|
+
do not draw zero contour
|
158
|
+
|
159
|
+
===VECTOR OPTIONS
|
160
|
+
|
161
|
+
:--noflow_vect:
|
162
|
+
DCL::ugvect is used.
|
163
|
+
|
164
|
+
:--xintv <xintv>:
|
165
|
+
(Effective only if flow_vect) interval of data sampling in x
|
166
|
+
|
167
|
+
|
168
|
+
:--yintv <yintv>:
|
169
|
+
(Effective only if flow_vect) interval of data sampling in y
|
170
|
+
|
171
|
+
|
172
|
+
:--factor <factor>:
|
173
|
+
(Effective only if flow_vect) scaling factor to strech/reduce the
|
174
|
+
arrow lengths
|
175
|
+
|
176
|
+
:--unit_vect:
|
177
|
+
Show the unit vector
|
178
|
+
|
179
|
+
:--max_unit_vect:
|
180
|
+
(Effective only if flow_vect && unit_vect) use the maximum arrows to
|
181
|
+
scale the unit vector
|
182
|
+
|
183
|
+
==EXAMPLES
|
184
|
+
|
185
|
+
For the first command format,
|
186
|
+
|
187
|
+
% gpvect data.nc@vx data.nc@vy
|
188
|
+
% gpvect data.nc@vx,lon=0 data.nc@vy,lon=0
|
189
|
+
% gpvect --scalar data.nc@temp datax.nc@vx datay.nc@vy
|
190
|
+
% gpvect --scalar --anim t --nocont data.nc@temp data.nc@vx data.nc@vy
|
191
|
+
|
192
|
+
For the second command format,
|
193
|
+
% gpvect --scalar --slice lat=0 data.nc@temp data.nc@vx data.nc@vy
|
194
|
+
|
195
|
+
|
196
|
+
==HISTORY
|
197
|
+
|
198
|
+
2007/07/02 S Takehiro (created based on gpview)
|
199
|
+
2007/07/04 S Takehiro (polar coodinate vector component conversion
|
200
|
+
from U to N coordinates moved to ggraph.rb)
|
201
|
+
2007/07/06 S Takehiro (default title was set when --scalar option is given)
|
202
|
+
2009/09/30 S Takehiro (option --nocolorbar and --nozero implemented)
|
203
|
+
2010/03/10 Y SASAKI (change help block into RD format)
|
204
|
+
2010/07/16 Y SASAKI (option --clrmap implemented)
|
205
|
+
2011/07/29 S Takehiro (option --clrmap fixed)
|
206
|
+
=end
|
207
|
+
#################################################
|
208
|
+
require "getoptlong" # for option_parse
|
209
|
+
require "numru/ggraph" # ggraph library
|
210
|
+
require "numru/gphys/gpcommon"
|
211
|
+
|
212
|
+
include NumRu
|
213
|
+
|
214
|
+
#####################################################
|
215
|
+
## Default param.
|
216
|
+
|
217
|
+
VIEWPORT = [0.15,0.85,0.2,0.55]
|
218
|
+
URLfmt = "path@varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]"
|
219
|
+
|
220
|
+
#####################################################
|
221
|
+
def GGraph::annotate(str_ary)
|
222
|
+
lclip = DCL.sgpget('lclip')
|
223
|
+
DCL.sgpset('lclip',nil)
|
224
|
+
lnum = 0
|
225
|
+
str_ary.each{ |str|lnum += 1 }
|
226
|
+
charsize = 0.7 * DCL.uzpget('rsizec1')
|
227
|
+
dvx = 0.01
|
228
|
+
dvy = charsize*1.5
|
229
|
+
raise TypeError,"Array expected" if ! str_ary.is_a?(Array)
|
230
|
+
vxmin,vxmax,vymin,vymax = DCL.sgqvpt
|
231
|
+
vx = 0.70
|
232
|
+
vy = 0.045 + (lnum-1)*dvy
|
233
|
+
str_ary.each{|str|
|
234
|
+
DCL::sgtxzv(vx,vy,str,charsize,0,-1,1)
|
235
|
+
vy -= dvy
|
236
|
+
}
|
237
|
+
DCL.sgpset('lclip',lclip)
|
238
|
+
nil
|
239
|
+
end
|
240
|
+
|
241
|
+
def each_along_dims(gp1, gp2, gp3, loopdim)
|
242
|
+
|
243
|
+
raise ArgumentError,"1st argument must be an GPhys." if !gp1.is_a?(GPhys)
|
244
|
+
raise ArgumentError,"1st argument must be an GPhys." if !gp2.is_a?(GPhys)
|
245
|
+
raise ArgumentError,"1st argument must be an GPhys." if !gp3.is_a?(GPhys)
|
246
|
+
|
247
|
+
if loopdim.is_a?(String)
|
248
|
+
dimname = loopdim
|
249
|
+
elsif
|
250
|
+
if loopdim < 0
|
251
|
+
dimname = gp1.coord(gphys.rank + loopdim).name
|
252
|
+
else
|
253
|
+
dimname = gp1.coord(loopdim).name
|
254
|
+
end
|
255
|
+
else
|
256
|
+
raise ArgumentError,"loopdims must consist of Integer and/or String"
|
257
|
+
end
|
258
|
+
|
259
|
+
loopdim_na = gp1.coord(dimname).val # get coord ary
|
260
|
+
loopdim_na = loopdim_na[-1..0] if $OPT_reverse || $OPT_Gr # reverse
|
261
|
+
loopdim_na.each { |x|
|
262
|
+
yield( gp1.cut(dimname=>x), gp2.cut(dimname=>x), gp3.cut(dimname=>x) )
|
263
|
+
}
|
264
|
+
end
|
265
|
+
|
266
|
+
|
267
|
+
def draw_setup(gp)
|
268
|
+
|
269
|
+
# set missing value
|
270
|
+
DCLExt.gl_set_params('lmiss'=>true)
|
271
|
+
|
272
|
+
# fontsize
|
273
|
+
DCL.sgpset('lcntl', false)
|
274
|
+
# DCL.uzfact(0.7)
|
275
|
+
DCL.sgpset('lfull', true) # use full area in the window
|
276
|
+
DCL.sgpset('lfprop',true) # use proportional font
|
277
|
+
DCL.uscset('cyspos', 'B' ) # move unit y axis
|
278
|
+
|
279
|
+
# viewport size
|
280
|
+
GGraph.set_fig('viewport'=>$VIEWPORT)
|
281
|
+
GGraph.set_fig( 'itr'=>($OPT_itr == nil) ? 1 : $OPT_itr.to_i )
|
282
|
+
GGraph.set_fig("xrev"=>"units:mb,units:hPa,units:millibar,positive:down",
|
283
|
+
"yrev"=>"units:mb,units:hPa,units:millibar,positive:down")
|
284
|
+
|
285
|
+
# set options
|
286
|
+
min_range, max_range = __split_range($OPT_range)
|
287
|
+
min_crange, max_crange = __split_range($OPT_crange)
|
288
|
+
min_srange, max_srange = __split_range($OPT_srange)
|
289
|
+
GGraph.set_linear_contour_options(
|
290
|
+
'int' => ( $OPT_cint || $OPT_interval || $OPT_int ),
|
291
|
+
'min' => ( min_crange || min_range ),
|
292
|
+
'max' => ( max_crange || max_range )
|
293
|
+
)
|
294
|
+
GGraph.set_linear_tone_options(
|
295
|
+
'int' => ( $OPT_sint || $OPT_interval || $OPT_int ),
|
296
|
+
'min' => ( min_srange || min_range ),
|
297
|
+
'max' => ( max_srange || max_range )
|
298
|
+
)
|
299
|
+
if ( $OPT_clevels || $OPT_levels )
|
300
|
+
$OPT_clevels=($OPT_clevels || $OPT_levels).split(',').map!{|v| v.to_f }
|
301
|
+
end
|
302
|
+
|
303
|
+
if ( $OPT_slevels || $OPT_levels )
|
304
|
+
$OPT_slevels=($OPT_slevels||$OPT_levels).split(',').map!{|v| v.to_f }
|
305
|
+
p $OPT_slevels
|
306
|
+
end
|
307
|
+
|
308
|
+
if ( $OPT_patterns )
|
309
|
+
$OPT_patterns=$OPT_patterns.split(',').map!{|v| v.to_f }
|
310
|
+
end
|
311
|
+
|
312
|
+
# judge draw kind
|
313
|
+
gp_rank = gp.rank
|
314
|
+
gp_rank = gp_rank - 1 if ( $OPT_animate || $OPT_anim )
|
315
|
+
|
316
|
+
raise "The rank of gphys variables must be >=2 " if (gp_rank < 2)
|
317
|
+
|
318
|
+
if ( $OPT_scalar )
|
319
|
+
if ( !$OPT_noshade && $OPT_nocont )
|
320
|
+
draw_flag = "nocont"
|
321
|
+
elsif ( $OPT_noshade && !$OPT_nocont )
|
322
|
+
draw_flag = "noshade"
|
323
|
+
elsif ( !$OPT_noshade && !$OPT_nocont )
|
324
|
+
draw_flag = "full"
|
325
|
+
end
|
326
|
+
else
|
327
|
+
draw_flag = 'noscalar'
|
328
|
+
end
|
329
|
+
|
330
|
+
# similar projection
|
331
|
+
if ($OPT_similar)
|
332
|
+
if /([\d\-.]*),([\d\-.]*),([\d\-.]*)/ =~ $OPT_similar
|
333
|
+
similar=[$1.to_f,$2.to_f,$3.to_f]
|
334
|
+
elsif /([\d\-.]*),([\d\-.]*)/ =~ $OPT_similar
|
335
|
+
similar=[$1.to_f,$2.to_f,0]
|
336
|
+
elsif /([\d\-.]*)/ =~ $OPT_similar
|
337
|
+
similar=[$1.to_f,0,0]
|
338
|
+
end
|
339
|
+
GGraph.set_fig('similar'=>similar)
|
340
|
+
end
|
341
|
+
|
342
|
+
# similar projection
|
343
|
+
if ($OPT_map_axis)
|
344
|
+
if /([\d\-.]*),([\d\-.]*),([\d\-.]*)/ =~ $OPT_map_axis
|
345
|
+
map_axis=[$1.to_f,$2.to_f,$3.to_f]
|
346
|
+
elsif /([\d\-.]*),([\d\-.]*)/ =~ $OPT_map_axis
|
347
|
+
map_axis=[$1.to_f,$2.to_f,0]
|
348
|
+
elsif /([\d\-.]*)/ =~ $OPT_similar
|
349
|
+
map_axis=[$1.to_f,0,0]
|
350
|
+
end
|
351
|
+
GGraph.set_fig('map_axis'=>map_axis)
|
352
|
+
end
|
353
|
+
|
354
|
+
|
355
|
+
# map
|
356
|
+
if ( $OPT_m || $OPT_map)
|
357
|
+
map_type = "coast_world" if $OPT_m
|
358
|
+
map_type = $OPT_map if $OPT_map
|
359
|
+
GGraph::set_map(map_type=>true)
|
360
|
+
end
|
361
|
+
|
362
|
+
# vector
|
363
|
+
if ($OPT_noflow_vect)
|
364
|
+
$flow_vect = false
|
365
|
+
else
|
366
|
+
$flow_vect = true
|
367
|
+
end
|
368
|
+
|
369
|
+
if ($OPT_unit_vect)
|
370
|
+
$unit_vect = true
|
371
|
+
else
|
372
|
+
$unit_vect = false
|
373
|
+
end
|
374
|
+
|
375
|
+
if ($OPT_max_unit_vect)
|
376
|
+
$max_unit_vect = true
|
377
|
+
else
|
378
|
+
$max_unit_vect = false
|
379
|
+
end
|
380
|
+
|
381
|
+
$xintv=($OPT_xintv||1).to_i
|
382
|
+
$yintv=($OPT_yintv||1).to_i
|
383
|
+
$factor=($OPT_factor||1).to_f
|
384
|
+
|
385
|
+
return draw_flag
|
386
|
+
|
387
|
+
end
|
388
|
+
|
389
|
+
def draw(gp, gpux, gpuy, draw_flag)
|
390
|
+
|
391
|
+
# draw contour/tone
|
392
|
+
case draw_flag
|
393
|
+
when "full"
|
394
|
+
GGraph.tone(gp,
|
395
|
+
true,
|
396
|
+
"title"=>$OPT_title,
|
397
|
+
"annotate"=>$annotate,
|
398
|
+
"transpose"=>$OPT_exch,
|
399
|
+
"levels"=>$OPT_slevels,
|
400
|
+
"patterns"=>$OPT_patterns
|
401
|
+
)
|
402
|
+
GGraph.contour(gp,
|
403
|
+
false,
|
404
|
+
"transpose"=>$OPT_exch,
|
405
|
+
"levels"=>$OPT_clevels,
|
406
|
+
"nozero"=>$OPT_nozero
|
407
|
+
)
|
408
|
+
vnewframe = false
|
409
|
+
|
410
|
+
when "nocont"
|
411
|
+
GGraph.tone(gp,
|
412
|
+
true,
|
413
|
+
"title"=>$OPT_title,
|
414
|
+
"annotate"=>$annotate,
|
415
|
+
"transpose"=>$OPT_exch,
|
416
|
+
"levels"=>$OPT_slevels,
|
417
|
+
"patterns"=>$OPT_patterns
|
418
|
+
)
|
419
|
+
vnewframe = false
|
420
|
+
|
421
|
+
when "noshade"
|
422
|
+
mj = DCL.udpget('indxmj')
|
423
|
+
mn = DCL.udpget('indxmn')
|
424
|
+
GGraph.contour(gp,
|
425
|
+
true,
|
426
|
+
"title" =>$OPT_title,
|
427
|
+
"label" =>true,
|
428
|
+
"annotate"=>$annotate,
|
429
|
+
"transpose"=>$OPT_exch,
|
430
|
+
"levels"=>$OPT_clevels,
|
431
|
+
"nozero"=>$OPT_nozero
|
432
|
+
)
|
433
|
+
vnewframe = false
|
434
|
+
|
435
|
+
when "noscalar"
|
436
|
+
vnewframe = true
|
437
|
+
end
|
438
|
+
|
439
|
+
# draw vector
|
440
|
+
|
441
|
+
if ($OPT_itr == '5')
|
442
|
+
GGraph.vector( gpux, gpuy, newframe=vnewframe,
|
443
|
+
"title"=>$OPT_title,
|
444
|
+
"annotate"=>$annotate,
|
445
|
+
"exchange"=>$OPT_exch,
|
446
|
+
"flow_vect"=>false,
|
447
|
+
"flow_itr5"=>true,
|
448
|
+
"xintv"=>$xintv,
|
449
|
+
"yintv"=>$yintv,
|
450
|
+
"factor"=>$factor,
|
451
|
+
"unit_vect"=>$unit_vect,
|
452
|
+
"max_unit_vect"=>$max_unit_vect
|
453
|
+
)
|
454
|
+
else
|
455
|
+
GGraph.vector(gpux, gpuy, newframe=vnewframe,
|
456
|
+
"title"=>$OPT_title,
|
457
|
+
"annotate"=>$annotate,
|
458
|
+
"exchange"=>$OPT_exch,
|
459
|
+
"flow_vect"=>$flow_vect,
|
460
|
+
"xintv"=>$xintv,
|
461
|
+
"yintv"=>$yintv,
|
462
|
+
"factor"=>$factor,
|
463
|
+
"unit_vect"=>$unit_vect,
|
464
|
+
"max_unit_vect"=>$max_unit_vect
|
465
|
+
)
|
466
|
+
end
|
467
|
+
|
468
|
+
# color bar
|
469
|
+
if ( ( draw_flag == "full") || ( draw_flag == "nocont") ) && $colorbar
|
470
|
+
GGraph::color_bar(
|
471
|
+
"left" => true,
|
472
|
+
"landscape" => true
|
473
|
+
)
|
474
|
+
end
|
475
|
+
|
476
|
+
end
|
477
|
+
|
478
|
+
|
479
|
+
def set_vpsize( default_vp, aspect=2.0 )
|
480
|
+
|
481
|
+
raise "#{aspect} must be a positive Numeric" if (aspect.to_f <= 0.0)
|
482
|
+
aspect = aspect.to_f
|
483
|
+
|
484
|
+
# default viewport
|
485
|
+
x0 = default_vp[0]; x1 = default_vp[1]
|
486
|
+
y0 = default_vp[2]; y1 = default_vp[3]
|
487
|
+
# viewport size
|
488
|
+
hlength = x1 - x0
|
489
|
+
vlength = y1 - y0
|
490
|
+
# center grid of viewport
|
491
|
+
cen_of_vp = [ x0 + hlength/2.0, y0 + vlength/2.0 ]
|
492
|
+
|
493
|
+
if aspect <= 2.0
|
494
|
+
hlength = vlength * aspect
|
495
|
+
x0 = cen_of_vp[0] - hlength/2.0
|
496
|
+
x1 = cen_of_vp[0] + hlength/2.0
|
497
|
+
else
|
498
|
+
vlength = hlength / aspect
|
499
|
+
y0 = cen_of_vp[1] - vlength/2.0
|
500
|
+
y1 = cen_of_vp[1] + vlength/2.0
|
501
|
+
end
|
502
|
+
|
503
|
+
return [ x0, x1, y0, y1 ]
|
504
|
+
|
505
|
+
end
|
506
|
+
|
507
|
+
def __split_range(range)
|
508
|
+
|
509
|
+
if /(.*):(.*)/ =~ range
|
510
|
+
if $1 == ""
|
511
|
+
min = nil
|
512
|
+
else
|
513
|
+
min = $1.to_f
|
514
|
+
end
|
515
|
+
if $2 == ""
|
516
|
+
max = nil
|
517
|
+
else
|
518
|
+
max = $2.to_f
|
519
|
+
end
|
520
|
+
elsif range == nil
|
521
|
+
min = max = nil
|
522
|
+
else
|
523
|
+
raise "invalid range: variable subset specification error. split range with ':'\n\n"
|
524
|
+
end
|
525
|
+
|
526
|
+
return min, max
|
527
|
+
end
|
528
|
+
|
529
|
+
|
530
|
+
#####################################################
|
531
|
+
###++++++ Main Routine ++++++###
|
532
|
+
|
533
|
+
## parse options
|
534
|
+
parser = GetoptLong.new
|
535
|
+
parser.set_options(
|
536
|
+
### global option ###
|
537
|
+
['--slice', GetoptLong::REQUIRED_ARGUMENT],
|
538
|
+
['--wsn', GetoptLong::REQUIRED_ARGUMENT],
|
539
|
+
['--clrmap', GetoptLong::REQUIRED_ARGUMENT],
|
540
|
+
['--itr', GetoptLong::REQUIRED_ARGUMENT],
|
541
|
+
['--similar', GetoptLong::REQUIRED_ARGUMENT],
|
542
|
+
['--map_axis', GetoptLong::REQUIRED_ARGUMENT],
|
543
|
+
['--title', GetoptLong::REQUIRED_ARGUMENT],
|
544
|
+
['--aspect', GetoptLong::REQUIRED_ARGUMENT],
|
545
|
+
['--anim', GetoptLong::REQUIRED_ARGUMENT],
|
546
|
+
['--animate', GetoptLong::REQUIRED_ARGUMENT],
|
547
|
+
['--noannotate', GetoptLong::NO_ARGUMENT],
|
548
|
+
['--alternate', GetoptLong::NO_ARGUMENT],
|
549
|
+
['--Ga', GetoptLong::NO_ARGUMENT],
|
550
|
+
['--nowait', GetoptLong::NO_ARGUMENT],
|
551
|
+
['--Gw', GetoptLong::NO_ARGUMENT],
|
552
|
+
['--smooth', GetoptLong::NO_ARGUMENT],
|
553
|
+
['--Gaw', GetoptLong::NO_ARGUMENT],
|
554
|
+
['--exch', GetoptLong::NO_ARGUMENT],
|
555
|
+
['--reverse', GetoptLong::NO_ARGUMENT],
|
556
|
+
['--Gr', GetoptLong::NO_ARGUMENT],
|
557
|
+
['--mean', GetoptLong::REQUIRED_ARGUMENT],
|
558
|
+
['--map', GetoptLong::REQUIRED_ARGUMENT],
|
559
|
+
['--m', GetoptLong::NO_ARGUMENT],
|
560
|
+
['--scalar', GetoptLong::NO_ARGUMENT],
|
561
|
+
### tone or cont option ###
|
562
|
+
['--nocont', GetoptLong::NO_ARGUMENT],
|
563
|
+
['--noshade', GetoptLong::NO_ARGUMENT],
|
564
|
+
['--range', GetoptLong::REQUIRED_ARGUMENT],
|
565
|
+
['--crange', GetoptLong::REQUIRED_ARGUMENT],
|
566
|
+
['--srange', GetoptLong::REQUIRED_ARGUMENT],
|
567
|
+
['--interval', GetoptLong::REQUIRED_ARGUMENT],
|
568
|
+
['--int', GetoptLong::REQUIRED_ARGUMENT],
|
569
|
+
['--cint', GetoptLong::REQUIRED_ARGUMENT],
|
570
|
+
['--sint', GetoptLong::REQUIRED_ARGUMENT],
|
571
|
+
['--levels', GetoptLong::REQUIRED_ARGUMENT],
|
572
|
+
['--clevels', GetoptLong::REQUIRED_ARGUMENT],
|
573
|
+
['--slevels', GetoptLong::REQUIRED_ARGUMENT],
|
574
|
+
['--patterns', GetoptLong::REQUIRED_ARGUMENT],
|
575
|
+
['--nocolorbar', GetoptLong::NO_ARGUMENT],
|
576
|
+
['--nozero', GetoptLong::NO_ARGUMENT],
|
577
|
+
### vector option ###
|
578
|
+
['--noflow_vect', GetoptLong::NO_ARGUMENT],
|
579
|
+
['--xintv', GetoptLong::REQUIRED_ARGUMENT],
|
580
|
+
['--yintv', GetoptLong::REQUIRED_ARGUMENT],
|
581
|
+
['--factor', GetoptLong::REQUIRED_ARGUMENT],
|
582
|
+
['--unit_vect', GetoptLong::NO_ARGUMENT],
|
583
|
+
['--max_unit_vect', GetoptLong::NO_ARGUMENT],
|
584
|
+
['--help', GetoptLong::NO_ARGUMENT]
|
585
|
+
# ['--version', GetoptLong::NO_ARGUMENT] # to be defined
|
586
|
+
)
|
587
|
+
begin
|
588
|
+
parser.each_option do |name, arg|
|
589
|
+
eval "$OPT_#{name.sub(/^--/, '').gsub(/-/, '_')} = '#{arg}'" # strage option value to $OPT_val
|
590
|
+
end
|
591
|
+
rescue
|
592
|
+
help
|
593
|
+
raise
|
594
|
+
end
|
595
|
+
|
596
|
+
## Print out help message
|
597
|
+
if ($OPT_help)
|
598
|
+
help
|
599
|
+
exit(1)
|
600
|
+
end
|
601
|
+
|
602
|
+
## set some figure option
|
603
|
+
DCL::swlset('lwait', false) if ($OPT_nowait || $OPT_Gw || $OPT_smooth || $OPT_Gaw)
|
604
|
+
# set wait or nowait
|
605
|
+
DCL::swlset('lalt', true) if ($OPT_alternate || $OPT_Ga || $OPT_smooth || $OPT_Gaw)
|
606
|
+
# set backing store option
|
607
|
+
if ($OPT_noannotate)
|
608
|
+
$annotate = false
|
609
|
+
else
|
610
|
+
$annotate = true
|
611
|
+
end
|
612
|
+
|
613
|
+
if ($OPT_nocolorbar)
|
614
|
+
$colorbar = false
|
615
|
+
else
|
616
|
+
$colorbar = true
|
617
|
+
end
|
618
|
+
|
619
|
+
## decide VIEWPORT
|
620
|
+
$VIEWPORT = set_vpsize( VIEWPORT, ($OPT_aspect||2.0) )
|
621
|
+
|
622
|
+
## tune the size of axis parameters.
|
623
|
+
DCL.uzfact(0.7)
|
624
|
+
|
625
|
+
## draw figure
|
626
|
+
loopdim = ( $OPT_animate || $OPT_anim )
|
627
|
+
loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
|
628
|
+
|
629
|
+
## set colormap
|
630
|
+
DCL.sgscmn($OPT_clrmap||1)
|
631
|
+
## open work station
|
632
|
+
DCL.gropn($OPT_wsn||1)
|
633
|
+
|
634
|
+
## open netcdf variables
|
635
|
+
|
636
|
+
while ARGV[0] do
|
637
|
+
gturl = ARGV[0]
|
638
|
+
gturl = gturl+','+$OPT_slice if $OPT_slice
|
639
|
+
gp = GPhys::IO.open_gturl(gturl)
|
640
|
+
print " Reading #{gturl}\n"
|
641
|
+
|
642
|
+
ARGV.shift
|
643
|
+
|
644
|
+
if ( $OPT_scalar )
|
645
|
+
gturlx = ARGV[0]
|
646
|
+
gturlx = gturlx+','+$OPT_slice if $OPT_slice
|
647
|
+
|
648
|
+
gpux = GPhys::IO.open_gturl(gturlx)
|
649
|
+
print " Reading #{gturlx}\n"
|
650
|
+
ARGV.shift
|
651
|
+
else
|
652
|
+
gpux = gp
|
653
|
+
end
|
654
|
+
|
655
|
+
gturly = ARGV[0]
|
656
|
+
gturly = gturly+','+$OPT_slice if $OPT_slice
|
657
|
+
|
658
|
+
gpuy = GPhys::IO.open_gturl(gturly)
|
659
|
+
print " Reading #{gturly}\n"
|
660
|
+
ARGV.shift
|
661
|
+
|
662
|
+
sh = gp.shape
|
663
|
+
if sh != gpux.shape
|
664
|
+
raise ArgumentError, "shapes of 1st and 2nd variables do not agree with each other"
|
665
|
+
elsif sh != gpuy.shape
|
666
|
+
raise ArgumentError, "shapes of 1st and 3rd variables do not agree with each other"
|
667
|
+
end
|
668
|
+
|
669
|
+
## mean along any axis
|
670
|
+
if ($OPT_mean)
|
671
|
+
dims = ($OPT_mean).split(/\s*,\s*/)
|
672
|
+
dims.each{|dim|
|
673
|
+
dim = dim.to_i if dim.to_i.to_s == dim
|
674
|
+
gp = gp.mean(dim)
|
675
|
+
gpux = gpux.mean(dim)
|
676
|
+
gpuy = gpuy.mean(dim)
|
677
|
+
}
|
678
|
+
end
|
679
|
+
|
680
|
+
# set title
|
681
|
+
if !$OPT_title && $OPT_scalar
|
682
|
+
gpnm = gp.data.get_att('long_name') || gp.name
|
683
|
+
gpuxnm = gpux.data.get_att('long_name') || gpux.name
|
684
|
+
gpuynm = gpuy.data.get_att('long_name') || gpuy.name
|
685
|
+
$OPT_title = gpnm+'('+gpuxnm+','+gpuynm+')'
|
686
|
+
end
|
687
|
+
|
688
|
+
# draw margin infomation
|
689
|
+
GGraph.margin_info($0, gturl+'('+gturlx+','+gturly+')') if $annotate && $OPT_scalar
|
690
|
+
GGraph.margin_info($0, gturl+','+gturly) if $annotate && !$OPT_scalar
|
691
|
+
|
692
|
+
kind_of_fig = draw_setup(gp) # determine figure kind
|
693
|
+
|
694
|
+
if loopdim # animation
|
695
|
+
each_along_dims(gp, gpux, gpuy, loopdim){|gp_sub,gpux_sub,gpuy_sub|
|
696
|
+
draw(gp_sub,gpux_sub,gpuy_sub, kind_of_fig)
|
697
|
+
}
|
698
|
+
else
|
699
|
+
draw( gp, gpux, gpuy, kind_of_fig ) # single figure
|
700
|
+
end
|
701
|
+
|
702
|
+
end
|
703
|
+
|
704
|
+
DCL.grcls
|
705
|
+
|
706
|
+
|