gphys 1.2.2.1 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -17
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/ChangeLog +5762 -753
- data/LICENSE.txt +30 -18
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/gpcat +43 -2
- data/bin/gpcut +16 -0
- data/bin/gpvect +167 -15
- data/bin/gpview +254 -51
- data/bin/setup +7 -0
- data/dim_op.c +1220 -0
- data/doc/attribute.html +19 -0
- data/doc/attributenetcdf.html +15 -0
- data/doc/axis.html +387 -0
- data/doc/coordmapping.html +111 -0
- data/doc/coordtransform.html +36 -0
- data/doc/dclext.html +821 -0
- data/doc/derivative/gphys-derivative.html +100 -0
- data/doc/derivative/index.html +21 -0
- data/doc/derivative/index.rd +14 -0
- data/doc/derivative/math-doc/document.pdf +0 -0
- data/doc/derivative/math-doc/document.tex +158 -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/numru-derivative.html +158 -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.pdf +0 -0
- data/doc/ep_flux/math-doc/document.tex +2018 -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/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 +1119 -0
- data/doc/gpcat.html +45 -0
- data/doc/gpcut.html +47 -0
- data/doc/gphys.html +624 -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 +183 -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 +52 -0
- data/doc/gpmaxmin.html +32 -0
- data/doc/gpprint.html +35 -0
- data/doc/gpview.html +349 -0
- data/doc/grads2nc_with_gphys.html +21 -0
- data/doc/grads_gridded.html +307 -0
- data/doc/grib.html +149 -0
- data/doc/grid.html +224 -0
- data/doc/index.html +145 -0
- data/doc/index.rd +138 -0
- data/doc/netcdf_convention.html +136 -0
- data/doc/unumeric.html +176 -0
- data/doc/update +69 -0
- data/doc/update_rdoc +8 -0
- data/doc/varray.html +299 -0
- data/doc/varraycomposite.html +67 -0
- data/ext_init.c +1 -0
- data/extconf.rb +16 -6
- data/gphys.gemspec +33 -26
- data/interpo.c +1 -1
- data/lib/numru/dclext.rb +718 -546
- data/lib/numru/derivative.rb +2 -0
- data/lib/numru/ganalysis.rb +38 -0
- data/lib/numru/ganalysis/beta_plane.rb +103 -0
- data/lib/numru/ganalysis/eof.rb +3 -2
- data/lib/numru/ganalysis/fitting.rb +559 -0
- data/lib/numru/ganalysis/histogram.rb +36 -19
- data/lib/numru/ganalysis/log_p.rb +130 -0
- data/lib/numru/ganalysis/met.rb +396 -2
- data/lib/numru/ganalysis/met_z.rb +300 -0
- data/lib/numru/ganalysis/planet.rb +17 -7
- data/lib/numru/ganalysis/qg.rb +685 -0
- data/lib/numru/ganalysis/sigma_coord.rb +90 -0
- data/lib/numru/gdir.rb +2 -1
- data/lib/numru/ggraph.rb +204 -60
- data/lib/numru/ggraph_on_merdional_section.rb +1 -1
- data/lib/numru/gphys.rb +6 -0
- data/lib/numru/gphys/assoccoords.rb +18 -3
- data/lib/numru/gphys/axis.rb +209 -8
- data/lib/numru/gphys/derivative.rb +11 -0
- data/lib/numru/gphys/gphys.rb +539 -48
- data/lib/numru/gphys/gphys_dim_op.rb +331 -0
- data/lib/numru/gphys/gphys_fft.rb +48 -2
- data/lib/numru/gphys/gphys_io.rb +241 -13
- data/lib/numru/gphys/gphys_netcdf_io.rb +77 -39
- data/lib/numru/gphys/gphys_nusdas_io.rb +3 -0
- data/lib/numru/gphys/grib.rb +133 -54
- data/lib/numru/gphys/grib_params.rb +26 -3
- data/lib/numru/gphys/grid.rb +75 -34
- data/lib/numru/gphys/interpolate.rb +24 -10
- data/lib/numru/gphys/mdstorage.rb +160 -0
- data/lib/numru/gphys/netcdf_convention.rb +4 -2
- data/lib/numru/gphys/subsetmapping.rb +0 -1
- data/lib/numru/gphys/unumeric.rb +50 -5
- data/lib/numru/gphys/varray.rb +15 -30
- data/lib/numru/gphys/varraycomposite.rb +107 -24
- data/lib/numru/gphys/varraynetcdf.rb +9 -3
- data/lib/numru/gphys/version.rb +5 -0
- data/sample/druby_cli1.rb +2 -0
- data/sample/druby_cli2.rb +0 -6
- data/sample/druby_serv2.rb +0 -13
- data/spec/gphys_spec.rb +11 -0
- data/spec/spec_helper.rb +2 -0
- data/test/test_assoccoords.rb +102 -0
- data/test/test_axis.rb +61 -0
- data/test/test_fitting.rb +116 -0
- data/test/test_gphys.rb +20 -0
- data/test/test_met_z.rb +96 -0
- data/test/test_sigma_coord.rb +50 -0
- data/{test → test_old}/eof_slp.rb +0 -0
- data/{test → test_old}/mltbit.dat +0 -0
- data/{test → test_old}/test_ep_flux.rb +0 -0
- data/{test → test_old}/test_multibitIO.rb +0 -0
- metadata +530 -191
- data/README.md +0 -29
- data/lib/gphys.rb +0 -2
- data/lib/numru/dclext_datetime_ax.rb +0 -220
- data/lib/version.rb +0 -3
data/LICENSE.txt
CHANGED
@@ -1,22 +1,34 @@
|
|
1
|
-
|
1
|
+
GPhys is copyrighted free software by Takeshi Horinouchi and
|
2
|
+
GFD Dennou Club (http://www.gfd-dennou.org/).
|
2
3
|
|
3
|
-
|
4
|
+
Copyright 2003-2015 (C) Takeshi Horinouchi and GFD Dennou Club
|
5
|
+
(http://www.gfd-dennou.org/) All rights reserved.
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
7
|
+
Redistribution and use in source and binary forms, with or without
|
8
|
+
modification, are permitted provided that the following conditions are
|
9
|
+
met:
|
12
10
|
|
13
|
-
|
14
|
-
|
11
|
+
1. Redistributions of source code must retain the above copyright
|
12
|
+
notice, this list of conditions and the following disclaimer.
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
2. Redistributions in binary form must reproduce the above copyright
|
15
|
+
notice, this list of conditions and the following disclaimer in
|
16
|
+
the documentation and/or other materials provided with the
|
17
|
+
distribution.
|
18
|
+
|
19
|
+
THIS SOFTWARE IS PROVIDED BY GFD DENNOU CLUB AND CONTRIBUTORS ``AS IS''
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
21
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
22
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GFD DENNOU CLUB OR
|
23
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
24
|
+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
25
|
+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
26
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
27
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
28
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
29
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
30
|
+
|
31
|
+
The views and conclusions contained in the software and documentation
|
32
|
+
are those of the authors and should not be interpreted as representing
|
33
|
+
official policies, either expressed or implied, of Takeshi Horinouchi
|
34
|
+
and GFD Dennou Club.
|
data/Rakefile
CHANGED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "gphys"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/gpcat
CHANGED
@@ -21,6 +21,12 @@ gpcat - Read a variable in multiple NetCDF files, concatenate and write them to
|
|
21
21
|
variable name (required).
|
22
22
|
:-s sfmt, --slice sfmt
|
23
23
|
slice,thinnng (optional).
|
24
|
+
:-m axis --mean axis
|
25
|
+
mean along axis (optional)
|
26
|
+
:-d axis --stddev axis
|
27
|
+
stddev along axis (optional)
|
28
|
+
:-e axis --eddy axis
|
29
|
+
eddy along axis (optional)
|
24
30
|
:-o file, --output file
|
25
31
|
output filename (optional). Default output filename is 'gphys.nc'.
|
26
32
|
|
@@ -32,6 +38,8 @@ gpcat - Read a variable in multiple NetCDF files, concatenate and write them to
|
|
32
38
|
2005/08/21 S Takehiro (global attributes copied to the output file)
|
33
39
|
2005/08/23 S Takehiro (common methods to gp* command moved to gpcommon.rb)
|
34
40
|
2010/03/10 Y SASAKI (change help block into RD format)
|
41
|
+
2014/03/10 S Takehiro (big fix for ruby 1.9)
|
42
|
+
2015/02/03 S Takehiro (option --mean, --stddev, --eddy added)
|
35
43
|
|
36
44
|
=end
|
37
45
|
|
@@ -41,7 +49,6 @@ include NumRu
|
|
41
49
|
|
42
50
|
require "getoptlong"
|
43
51
|
|
44
|
-
|
45
52
|
#-------------------- Slice parameter analysis --------------------
|
46
53
|
def parse_slice(arg_slice)
|
47
54
|
|
@@ -56,7 +63,7 @@ def parse_slice(arg_slice)
|
|
56
63
|
case subset
|
57
64
|
when /(.*):(.*):(.*)/
|
58
65
|
slice[dimname] = ($1.to_f)..($2.to_f)
|
59
|
-
thinning[dimname] = {0..-1
|
66
|
+
thinning[dimname] = {0..-1=>$3.to_i}
|
60
67
|
when /(.*):(.*)/
|
61
68
|
slice[dimname] = ($1.to_f)..($2.to_f)
|
62
69
|
else
|
@@ -80,6 +87,9 @@ parser = GetoptLong.new(
|
|
80
87
|
["--variable", "-v", GetoptLong::REQUIRED_ARGUMENT],
|
81
88
|
["--output", "-o", GetoptLong::REQUIRED_ARGUMENT],
|
82
89
|
["--slice", "-s", GetoptLong::REQUIRED_ARGUMENT],
|
90
|
+
["--mean", "-m", GetoptLong::REQUIRED_ARGUMENT],
|
91
|
+
["--stddev", "-d", GetoptLong::REQUIRED_ARGUMENT],
|
92
|
+
["--eddy", "-e", GetoptLong::REQUIRED_ARGUMENT],
|
83
93
|
["--help", "-h", GetoptLong::NO_ARGUMENT ])
|
84
94
|
begin
|
85
95
|
parser.each{|opt, arg|
|
@@ -87,6 +97,9 @@ begin
|
|
87
97
|
when "--variable" then eval "$OPT_var='#{arg}'"
|
88
98
|
when "--output" then eval "$OPT_output='#{arg}'"
|
89
99
|
when "--slice" then eval "$OPT_slice='#{arg}'"
|
100
|
+
when "--mean" then eval "$OPT_mean='#{arg}'"
|
101
|
+
when "--stddiv" then eval "$OPT_stddev='#{arg}'"
|
102
|
+
when "--eddy" then eval "$OPT_eddy='#{arg}'"
|
90
103
|
when "--help" then eval "$HELP=true"
|
91
104
|
else
|
92
105
|
raise "must not happen"
|
@@ -140,6 +153,34 @@ end
|
|
140
153
|
gphys = gphys.cut(slice) if slice
|
141
154
|
gphys = gphys[thinning] if thinning
|
142
155
|
|
156
|
+
#------------------- mean/eddy gphys variable --------------------
|
157
|
+
## mean along any axis
|
158
|
+
if ($OPT_mean)
|
159
|
+
dims_mean = ($OPT_mean).split(/\s*,\s*/)
|
160
|
+
dims_mean = dims_mean.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
|
161
|
+
dims_mean.each{|dim|
|
162
|
+
gphys = gphys.mean(dim)
|
163
|
+
}
|
164
|
+
end
|
165
|
+
|
166
|
+
## standard deviation along any axis
|
167
|
+
if ($OPT_stddev)
|
168
|
+
dims_stddev = ($OPT_stddev).split(/\s*,\s*/)
|
169
|
+
dims_stddev = dims_stddev.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
|
170
|
+
dims_stddev.each{|dim|
|
171
|
+
gphys = gphys.stddev(dim)
|
172
|
+
}
|
173
|
+
end
|
174
|
+
|
175
|
+
## deviation from mean along any axis
|
176
|
+
if ($OPT_eddy)
|
177
|
+
dims_eddy = ($OPT_eddy).split(/\s*,\s*/)
|
178
|
+
dims_eddy = dims_eddy.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
|
179
|
+
dims_eddy.each{|dim|
|
180
|
+
gphys = gphys.eddy(dim)
|
181
|
+
}
|
182
|
+
end
|
183
|
+
|
143
184
|
#---------------------- Output GPhys variable ------------------------
|
144
185
|
GPhys::IO.write( outncfile, gphys )
|
145
186
|
NetCDF_Conventions.add_history(outncfile, File.basename($0)+" "+ARGV[0])
|
data/bin/gpcut
CHANGED
@@ -18,6 +18,8 @@ gpcut - Extract, slicing and thinning a GPhys variable.
|
|
18
18
|
print this message.
|
19
19
|
:-m dim, --mean dim
|
20
20
|
average along dim axis (optional).
|
21
|
+
:-e dim, --eddy dim:
|
22
|
+
deviation from mean along dim axis (optional).
|
21
23
|
:-o file, --output file
|
22
24
|
output filename (optional).
|
23
25
|
Default output filename is 'gphys.nc'.
|
@@ -31,6 +33,7 @@ gpcut - Extract, slicing and thinning a GPhys variable.
|
|
31
33
|
2005/08/23 S Takehiro (common methods to gp* command moved to gpcommon.rb)
|
32
34
|
2010/03/10 Y SASAKI (change help block into RD format)
|
33
35
|
2012/02/19 S Takehiro (description for gturl format updated)
|
36
|
+
2014/04/23 S Takehiro (add --eddy option)
|
34
37
|
|
35
38
|
=end
|
36
39
|
|
@@ -47,12 +50,14 @@ URLfmt = "path[@|/]varname[,dimname=pos1[:pos2[:thinning_intv]][,dimname=...]]"
|
|
47
50
|
#---------------------- Option Configuration ----------------------
|
48
51
|
parser = GetoptLong.new(
|
49
52
|
["--mean", "-m", GetoptLong::REQUIRED_ARGUMENT],
|
53
|
+
['--eddy', "-e", GetoptLong::REQUIRED_ARGUMENT],
|
50
54
|
["--output", "-o", GetoptLong::REQUIRED_ARGUMENT],
|
51
55
|
["--help", "-h", GetoptLong::NO_ARGUMENT ])
|
52
56
|
begin
|
53
57
|
parser.each{|opt, arg|
|
54
58
|
case opt
|
55
59
|
when "--mean" then eval "$OPT_mean='#{arg}'"
|
60
|
+
when "--eddy" then eval "$OPT_eddy='#{arg}'"
|
56
61
|
when "--output" then eval "$OPT_output='#{arg}'"
|
57
62
|
when "--help" then eval "$OPT_help=true"
|
58
63
|
else
|
@@ -86,6 +91,7 @@ gphys = GPhys::IO.open_gturl(gturl)
|
|
86
91
|
outncfile.copy_global_att(gphys) # Copy global attributes (only for NetCDF)
|
87
92
|
|
88
93
|
#----------------------- mean along any axis -------------------------
|
94
|
+
## mean along any axis
|
89
95
|
if ($OPT_mean)
|
90
96
|
dims = ($OPT_mean).split(/\s*,\s*/)
|
91
97
|
dims.each{|dim|
|
@@ -94,6 +100,16 @@ if ($OPT_mean)
|
|
94
100
|
}
|
95
101
|
end
|
96
102
|
|
103
|
+
## deviation from mean along any axis
|
104
|
+
if ($OPT_eddy)
|
105
|
+
dims_eddy = ($OPT_eddy).split(/\s*,\s*/)
|
106
|
+
dims_eddy = dims_eddy.map{|dim| dim.to_i.to_s == dim ? dim.to_i : dim}
|
107
|
+
dims_eddy.each{|dim|
|
108
|
+
dim = dim.to_i if dim.to_i.to_s == dim
|
109
|
+
gphys = gphys.eddy(dim)
|
110
|
+
}
|
111
|
+
end
|
112
|
+
|
97
113
|
|
98
114
|
#---------------------- Output GPhys variable ------------------------
|
99
115
|
GPhys::IO.write( outncfile, gphys )
|
data/bin/gpvect
CHANGED
@@ -111,6 +111,13 @@ gturl_x gturl_y.
|
|
111
111
|
:--scalar:
|
112
112
|
plot scaler field (contour,tone)
|
113
113
|
|
114
|
+
:-xx:yyyy=value:
|
115
|
+
specify Dennou Club Library internal variable.
|
116
|
+
'xx' is a package name prefix of DCL (eg. sg=>sgpack).
|
117
|
+
'yy' is a variable name of DCL.
|
118
|
+
'value' is a value of the DCL variable.
|
119
|
+
|
120
|
+
|
114
121
|
===CONTOUR/TONE OPTIONS
|
115
122
|
|
116
123
|
:--shade:
|
@@ -153,8 +160,13 @@ gturl_x gturl_y.
|
|
153
160
|
:--patterns:
|
154
161
|
set each patterns for tone plot.
|
155
162
|
|
156
|
-
:--
|
157
|
-
|
163
|
+
:--tone [a|e|f|b|c]:
|
164
|
+
set tone subroutine:
|
165
|
+
a (=> tone routine is selected automatically depending on the datasize)
|
166
|
+
e (=> DCL.uetone is used)
|
167
|
+
f (=> DCL.uetonf is used)
|
168
|
+
b (=> DCL.uetonb is used)
|
169
|
+
c (=> DCL.uetonc is used)
|
158
170
|
|
159
171
|
:--nocolorbar:
|
160
172
|
do not draw color bar
|
@@ -162,19 +174,21 @@ gturl_x gturl_y.
|
|
162
174
|
:--nozero:
|
163
175
|
do not draw zero contour
|
164
176
|
|
177
|
+
:--udsfmt [strings]:
|
178
|
+
change contour label format. see UDCNTR/DCL manual for the format.
|
179
|
+
|
180
|
+
|
165
181
|
===VECTOR OPTIONS
|
166
182
|
|
167
183
|
:--noflow_vect:
|
168
184
|
DCL::ugvect is used.
|
169
185
|
|
170
186
|
:--xintv <xintv>:
|
171
|
-
|
172
|
-
|
187
|
+
interval of data sampling in x
|
173
188
|
|
174
189
|
:--yintv <yintv>:
|
175
|
-
|
190
|
+
interval of data sampling in y
|
176
191
|
|
177
|
-
|
178
192
|
:--factor <factor>:
|
179
193
|
(Effective only if flow_vect) scaling factor to strech/reduce the
|
180
194
|
arrow lengths
|
@@ -184,7 +198,22 @@ gturl_x gturl_y.
|
|
184
198
|
|
185
199
|
:--max_unit_vect:
|
186
200
|
(Effective only if flow_vect && unit_vect) use the maximum arrows to
|
187
|
-
|
201
|
+
scale the unit vector
|
202
|
+
|
203
|
+
:--ux_unit <value>:
|
204
|
+
(Effective only if flow_vect) length of the x direction unit vector
|
205
|
+
(precedence of this option is lower than max_unit_vect)
|
206
|
+
|
207
|
+
:--uy_unit <value>:
|
208
|
+
(Effective only if flow_vect) length of the y direction unit vector
|
209
|
+
(precedence of this option is lower than max_unit_vect)
|
210
|
+
|
211
|
+
:--xscale <value>:
|
212
|
+
(Effective only if noflow_vect) scaling of the x direction vector
|
213
|
+
|
214
|
+
:--yscale <value>:
|
215
|
+
(Effective only if noflow_vect) scaling of the y direction vector
|
216
|
+
|
188
217
|
|
189
218
|
==EXAMPLES
|
190
219
|
|
@@ -210,6 +239,12 @@ For the second command format,
|
|
210
239
|
2010/07/16 Y SASAKI (option --clrmap implemented)
|
211
240
|
2011/07/29 S Takehiro (option --clrmap fixed)
|
212
241
|
2012/02/19 S Takehiro (description for gturl format updated)
|
242
|
+
2012/07/28 S Takehiro (option --ux_unit, --uy_unit, --xscale, --yscale
|
243
|
+
implemented)
|
244
|
+
2014/02/21 Y Naito && S Takehiro (implement DCL internal variable setting,
|
245
|
+
add option --udsfmt)
|
246
|
+
2014/02/23 S Takehiro (option --tonf is changed to --tone)
|
247
|
+
2014/03/10 Y Kawai && S Takehiro (setting labels for contours)
|
213
248
|
|
214
249
|
=end
|
215
250
|
#################################################
|
@@ -305,6 +340,7 @@ def draw_setup(gp)
|
|
305
340
|
'max' => ( max_srange || max_range )
|
306
341
|
)
|
307
342
|
if ( $OPT_clevels || $OPT_levels )
|
343
|
+
$OPT_label=($OPT_clevels || $OPT_levels).split(',')
|
308
344
|
$OPT_clevels=($OPT_clevels || $OPT_levels).split(',').map!{|v| v.to_f }
|
309
345
|
end
|
310
346
|
|
@@ -386,6 +422,32 @@ def draw_setup(gp)
|
|
386
422
|
$max_unit_vect = false
|
387
423
|
end
|
388
424
|
|
425
|
+
if ($OPT_ux_unit)
|
426
|
+
$ux_unit = $OPT_ux_unit.to_f
|
427
|
+
else
|
428
|
+
$ux_unit = nil
|
429
|
+
end
|
430
|
+
|
431
|
+
if ($OPT_uy_unit)
|
432
|
+
$uy_unit = $OPT_uy_unit.to_f
|
433
|
+
else
|
434
|
+
$uy_unit = nil
|
435
|
+
end
|
436
|
+
|
437
|
+
if ($OPT_xscale)
|
438
|
+
xscale = $OPT_xscale.to_f
|
439
|
+
DCL.ugpset('LNRMAL',false)
|
440
|
+
vx_unit=DCL.ugpget('VXUNIT')
|
441
|
+
DCL.ugpset('XFACT1',vx_unit/xscale)
|
442
|
+
end
|
443
|
+
|
444
|
+
if ($OPT_yscale)
|
445
|
+
yscale = $OPT_yscale.to_f
|
446
|
+
DCL.ugpset('LNRMAL',false)
|
447
|
+
vy_unit=DCL.ugpget('VYUNIT')
|
448
|
+
DCL.ugpset('YFACT1',vy_unit/yscale)
|
449
|
+
end
|
450
|
+
|
389
451
|
$xintv=($OPT_xintv||1).to_i
|
390
452
|
$yintv=($OPT_yintv||1).to_i
|
391
453
|
$factor=($OPT_factor||1).to_f
|
@@ -406,13 +468,17 @@ def draw(gp, gpux, gpuy, draw_flag)
|
|
406
468
|
"transpose"=>$OPT_exch,
|
407
469
|
"levels"=>$OPT_slevels,
|
408
470
|
"patterns"=>$OPT_patterns,
|
409
|
-
"
|
471
|
+
"auto"=>$auto,
|
472
|
+
"tonf"=>$tonf,
|
473
|
+
"tonb"=>$tonb,
|
474
|
+
"tonc"=>$tonc
|
410
475
|
)
|
411
476
|
GGraph.contour(gp,
|
412
477
|
false,
|
413
478
|
"transpose"=>$OPT_exch,
|
414
479
|
"levels"=>$OPT_clevels,
|
415
|
-
"nozero"=>$OPT_nozero
|
480
|
+
"nozero"=>$OPT_nozero,
|
481
|
+
"label"=>$OPT_label
|
416
482
|
)
|
417
483
|
vnewframe = false
|
418
484
|
|
@@ -424,7 +490,10 @@ def draw(gp, gpux, gpuy, draw_flag)
|
|
424
490
|
"transpose"=>$OPT_exch,
|
425
491
|
"levels"=>$OPT_slevels,
|
426
492
|
"patterns"=>$OPT_patterns,
|
427
|
-
"
|
493
|
+
"auto"=>$auto,
|
494
|
+
"tonf"=>$tonf,
|
495
|
+
"tonb"=>$tonb,
|
496
|
+
"tonc"=>$tonc
|
428
497
|
)
|
429
498
|
vnewframe = false
|
430
499
|
|
@@ -438,7 +507,8 @@ def draw(gp, gpux, gpuy, draw_flag)
|
|
438
507
|
"annotate"=>$annotate,
|
439
508
|
"transpose"=>$OPT_exch,
|
440
509
|
"levels"=>$OPT_clevels,
|
441
|
-
"nozero"=>$OPT_nozero
|
510
|
+
"nozero"=>$OPT_nozero,
|
511
|
+
"label"=>$OPT_label
|
442
512
|
)
|
443
513
|
vnewframe = false
|
444
514
|
|
@@ -459,7 +529,9 @@ def draw(gp, gpux, gpuy, draw_flag)
|
|
459
529
|
"yintv"=>$yintv,
|
460
530
|
"factor"=>$factor,
|
461
531
|
"unit_vect"=>$unit_vect,
|
462
|
-
"max_unit_vect"=>$max_unit_vect
|
532
|
+
"max_unit_vect"=>$max_unit_vect,
|
533
|
+
"ux_unit"=>$ux_unit,
|
534
|
+
"uy_unit"=>$uy_unit
|
463
535
|
)
|
464
536
|
else
|
465
537
|
GGraph.vector(gpux, gpuy, newframe=vnewframe,
|
@@ -471,7 +543,9 @@ def draw(gp, gpux, gpuy, draw_flag)
|
|
471
543
|
"yintv"=>$yintv,
|
472
544
|
"factor"=>$factor,
|
473
545
|
"unit_vect"=>$unit_vect,
|
474
|
-
"max_unit_vect"=>$max_unit_vect
|
546
|
+
"max_unit_vect"=>$max_unit_vect,
|
547
|
+
"ux_unit"=>$ux_unit,
|
548
|
+
"uy_unit"=>$uy_unit
|
475
549
|
)
|
476
550
|
end
|
477
551
|
|
@@ -536,10 +610,60 @@ def __split_range(range)
|
|
536
610
|
return min, max
|
537
611
|
end
|
538
612
|
|
613
|
+
def check_dclopts
|
614
|
+
|
615
|
+
indices = []
|
616
|
+
ARGV.each_index{|i|
|
617
|
+
if /^-(.)(.):(.*)=(.*)/ =~ ARGV[i]
|
618
|
+
indices << i
|
619
|
+
end
|
620
|
+
}
|
621
|
+
|
622
|
+
dclopts = []
|
623
|
+
indices.reverse_each{|i|
|
624
|
+
dclopts << ARGV[i]
|
625
|
+
ARGV.slice!(i)
|
626
|
+
}
|
627
|
+
|
628
|
+
dclopts.each{|opt|
|
629
|
+
pkg = opt[1..2]
|
630
|
+
name = opt[4..-1].split('=')[0]
|
631
|
+
value = opt[4..-1].split('=')[1]
|
632
|
+
dcl_set_params(pkg,name,value)
|
633
|
+
}
|
634
|
+
|
635
|
+
end
|
636
|
+
|
637
|
+
def dcl_set_params(pkg,name,value)
|
638
|
+
|
639
|
+
set = 'stx'
|
640
|
+
case name
|
641
|
+
when /^c/i
|
642
|
+
eval( "DCL.#{pkg}c#{set}(name,value.to_s)" )
|
643
|
+
when /^l/i
|
644
|
+
if /(.*)(T|t)(.*)/ =~ value
|
645
|
+
eval( "DCL.#{pkg}l#{set}(name,true)" )
|
646
|
+
else
|
647
|
+
if /(.*)(F|f)(.*)/ =~ value
|
648
|
+
eval( "DCL.#{pkg}l#{set}(name,false)" )
|
649
|
+
else
|
650
|
+
raise "value of logical parameter must include 't' or 'f'"
|
651
|
+
end
|
652
|
+
end
|
653
|
+
when /^[i-n]/i
|
654
|
+
eval( "DCL.#{pkg}i#{set}(name,value.to_i)" )
|
655
|
+
else
|
656
|
+
eval( "DCL.#{pkg}r#{set}(name,value.to_f)" )
|
657
|
+
end
|
658
|
+
|
659
|
+
end
|
539
660
|
|
540
661
|
#####################################################
|
541
662
|
###++++++ Main Routine ++++++###
|
542
663
|
|
664
|
+
## options for DCL
|
665
|
+
check_dclopts
|
666
|
+
|
543
667
|
## parse options
|
544
668
|
parser = GetoptLong.new
|
545
669
|
parser.set_options(
|
@@ -583,7 +707,8 @@ parser.set_options(
|
|
583
707
|
['--clevels', GetoptLong::REQUIRED_ARGUMENT],
|
584
708
|
['--slevels', GetoptLong::REQUIRED_ARGUMENT],
|
585
709
|
['--patterns', GetoptLong::REQUIRED_ARGUMENT],
|
586
|
-
['--
|
710
|
+
['--tone', GetoptLong::REQUIRED_ARGUMENT],
|
711
|
+
['--udsfmt', GetoptLong::REQUIRED_ARGUMENT],
|
587
712
|
['--nocolorbar', GetoptLong::NO_ARGUMENT],
|
588
713
|
['--nozero', GetoptLong::NO_ARGUMENT],
|
589
714
|
### vector option ###
|
@@ -593,6 +718,10 @@ parser.set_options(
|
|
593
718
|
['--factor', GetoptLong::REQUIRED_ARGUMENT],
|
594
719
|
['--unit_vect', GetoptLong::NO_ARGUMENT],
|
595
720
|
['--max_unit_vect', GetoptLong::NO_ARGUMENT],
|
721
|
+
['--ux_unit', GetoptLong::REQUIRED_ARGUMENT],
|
722
|
+
['--uy_unit', GetoptLong::REQUIRED_ARGUMENT],
|
723
|
+
['--xscale', GetoptLong::REQUIRED_ARGUMENT],
|
724
|
+
['--yscale', GetoptLong::REQUIRED_ARGUMENT],
|
596
725
|
['--help', GetoptLong::NO_ARGUMENT]
|
597
726
|
# ['--version', GetoptLong::NO_ARGUMENT] # to be defined
|
598
727
|
)
|
@@ -628,12 +757,35 @@ else
|
|
628
757
|
$colorbar = true
|
629
758
|
end
|
630
759
|
|
760
|
+
if ($OPT_tone)
|
761
|
+
case $OPT_tone
|
762
|
+
when "a"
|
763
|
+
$auto, $tonf, $tona, $toneb, $tonec = true,false,false,false
|
764
|
+
when "e"
|
765
|
+
$auto, $tonf, $tona, $toneb, $tonec = false,false,false,false
|
766
|
+
when "f"
|
767
|
+
$auto, $tonf, $tona, $toneb, $tonec = false,true,false,false
|
768
|
+
when "b"
|
769
|
+
$auto, $tonf, $tona, $toneb, $tonec = false,false,true,false
|
770
|
+
when "c"
|
771
|
+
$auto, $tonf, $tona, $toneb, $tonec = false,false,false,true
|
772
|
+
else
|
773
|
+
raise "The value of option --tone should be 'a','e','f','b' or 'c'."
|
774
|
+
end
|
775
|
+
else
|
776
|
+
$auto, $tonf, $tona, $toneb, $tonec = true,false,false,false
|
777
|
+
end
|
778
|
+
|
631
779
|
## decide VIEWPORT
|
632
780
|
$VIEWPORT = set_vpsize( VIEWPORT, ($OPT_aspect||2.0) )
|
633
781
|
|
634
782
|
## tune the size of axis parameters.
|
635
783
|
DCL.uzfact(0.7)
|
636
784
|
|
785
|
+
## set the format of contour labels.
|
786
|
+
udsfmt = ($OPT_udsfmt||DCL.udqfmt())
|
787
|
+
DCL.udsfmt(udsfmt)
|
788
|
+
|
637
789
|
## draw figure
|
638
790
|
loopdim = ( $OPT_animate || $OPT_anim )
|
639
791
|
loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
|
@@ -641,7 +793,7 @@ loopdim = loopdim.to_i if loopdim.to_i.to_s == loopdim
|
|
641
793
|
## set colormap
|
642
794
|
DCL.sgscmn($OPT_clrmap||1)
|
643
795
|
## open work station
|
644
|
-
DCL.gropn($OPT_wsn||
|
796
|
+
DCL.gropn($OPT_wsn||4)
|
645
797
|
|
646
798
|
## open netcdf variables
|
647
799
|
|