gphys 1.2.2.1 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -262,7 +262,7 @@ PARAM_RDN_LWTOP = 114
|
|
|
262
262
|
PARAM_RDN_LW = 115
|
|
263
263
|
PARAM_RDN_SW = 116
|
|
264
264
|
PARAM_RDN_GLBL = 117
|
|
265
|
-
|
|
265
|
+
PARAM_BRTMP = 118
|
|
266
266
|
#PARAM_LWRAD = 119
|
|
267
267
|
#PARAM_SWRAD = 120
|
|
268
268
|
PARAM_LAT_HT = 121
|
|
@@ -529,7 +529,7 @@ NAMES_UNITS = {
|
|
|
529
529
|
PARAM_PTND => ["Pressure tendency", "PTEND", "Pa/s", "tendency_of_air_pressure"],
|
|
530
530
|
# PARAM_ICAHT => nil,
|
|
531
531
|
PARAM_GPT => ["Geopotential", "GP", "m2/s2", "geopotential"],
|
|
532
|
-
PARAM_GPT_HGT => ["Geopotential height", "
|
|
532
|
+
PARAM_GPT_HGT => ["Geopotential height", "HGT", "Gpm", "geopotential_height"],
|
|
533
533
|
PARAM_GEOM_HGT => ["Geometric height", "DIST", "M", "altitude"],
|
|
534
534
|
PARAM_HSTDV => ["Standard deviation of height", "HSTDV", "M", "equivalent_thickness_at_stp_of_atmosphere_o3_content"],
|
|
535
535
|
PARAM_TOZNE => ["Total ozone", "TOZNE", "Dobson", "equivalent_thickness_at_stp_of_atmosphere_o3_content"],
|
|
@@ -640,7 +640,7 @@ NAMES_UNITS = {
|
|
|
640
640
|
PARAM_RDN_LW => ["Long wave radiation", "LWAVR", "W/m2", "net_upward_longwave_flux_in_air"],
|
|
641
641
|
PARAM_RDN_SW => ["Short wave radiation", "SWAVR", "W/m2", "net_upward_shortwave_flux_in_air"],
|
|
642
642
|
PARAM_RDN_GLBL => ["Global radiation", "GRAD", "W/m2", "surface_downwelling_shortwave_flux"],
|
|
643
|
-
|
|
643
|
+
PARAM_BRTMP => ["Brightness temperature", "BRTMP", "K", "brightness_temperature"],
|
|
644
644
|
# PARAM_LWRAD => nil,
|
|
645
645
|
# PARAM_SWRAD => nil,
|
|
646
646
|
PARAM_LAT_HT => ["Latent heat net flux", "LHTFL", "W/m2", "surface_upward_latent_heat_flux"],
|
|
@@ -1463,3 +1463,26 @@ PARAMS_JMA = {
|
|
|
1463
1463
|
251 => PARAM_LWHR,
|
|
1464
1464
|
253 => PARAM_LRGMR,
|
|
1465
1465
|
}
|
|
1466
|
+
|
|
1467
|
+
## JRA parameter code table
|
|
1468
|
+
## JRA-55: Code Table 200:
|
|
1469
|
+
## http://rda.ucar.edu/datasets/ds628.0/#metadata/grib.html?_do=y
|
|
1470
|
+
## Ref JRA-25:
|
|
1471
|
+
## http://rda.ucar.edu/datasets/ds625.0/docs/jra-25_grib_table.html
|
|
1472
|
+
## POT_VOR is also 4 in JRA-25. Otherwise, JRA-25 is supported by
|
|
1473
|
+
## the PARAMS_JMA table (as of 2014-08)
|
|
1474
|
+
PARAMS_JRA55 = PARAMS_2.merge( PARAMS_JMA )
|
|
1475
|
+
PARAMS_JRA55[4] = PARAM_POT_VOR
|
|
1476
|
+
PARAMS_JRA55[118] = PARAM_BRTMP # 118 is mean surface pressure in JRA-25
|
|
1477
|
+
PARAMS_JRA55[221] = PARAM_CLWMR
|
|
1478
|
+
PARAMS_JRA55[225] = PARAM_SOILW
|
|
1479
|
+
=begin
|
|
1480
|
+
Yet to be supported (JRA-55)
|
|
1481
|
+
190 UTHE Zonal thermal energy flux W m-1
|
|
1482
|
+
191 VTHE Meridional thermal energy flux W m-1
|
|
1483
|
+
226 SMC Mass concentration of condensed water in soil kg m-3
|
|
1484
|
+
227 CW Cloud liquid water kg m-2
|
|
1485
|
+
228 CLWC Cloud liquid water kg kg-1
|
|
1486
|
+
229 CIWC Cloud ice kg kg-1
|
|
1487
|
+
252 VTYPE Type of vegetation code
|
|
1488
|
+
=end
|
data/lib/numru/gphys/grid.rb
CHANGED
|
@@ -186,16 +186,16 @@ A class to handle discretized grids of physical quantities.
|
|
|
186
186
|
# RETURN VALUE
|
|
187
187
|
# * self
|
|
188
188
|
#
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
189
|
+
---insert_axis(dim, axis)
|
|
190
|
+
Inserts an axis. (non destructive; returns a new object)
|
|
191
|
+
|
|
192
|
+
ARGUMENTS
|
|
193
|
+
* dim (Integer) to specify the position to insert
|
|
194
|
+
* axis (Axis)
|
|
195
|
+
|
|
196
|
+
RETURN VALUE
|
|
197
|
+
* a Grid
|
|
198
|
+
|
|
199
199
|
#---insert_axis!(dim_or_dimname, axis)
|
|
200
200
|
# Inserts an axis. (overwrites self)
|
|
201
201
|
#
|
|
@@ -225,11 +225,12 @@ module NumRu
|
|
|
225
225
|
def initialize( *axes )
|
|
226
226
|
@axes = Array.new
|
|
227
227
|
axes.each{|ag|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
### commented out for the duck typing:
|
|
229
|
+
#if ag.is_a?(Axis)
|
|
230
|
+
@axes.push(ag)
|
|
231
|
+
#else
|
|
232
|
+
# raise ArgumentError, "each argument must be an Axis"
|
|
233
|
+
#end
|
|
233
234
|
}
|
|
234
235
|
@lost_axes = Array.new # Array of String
|
|
235
236
|
@rank = @axes.length
|
|
@@ -409,7 +410,18 @@ module NumRu
|
|
|
409
410
|
newgrid = self.class.new( *newaxes )
|
|
410
411
|
newgrid.set_lost_axes( @lost_axes.dup )
|
|
411
412
|
if @assoc_coords
|
|
412
|
-
|
|
413
|
+
if deleted_by && VArray::NArray_type3_methods.include?(deleted_by)
|
|
414
|
+
assoc_coords = Array.new
|
|
415
|
+
assoccoordnames.each do |aname|
|
|
416
|
+
g = assoc_coord_gphys(aname)
|
|
417
|
+
args = g.axnames & at.collect{|i| @axnames[i]}
|
|
418
|
+
g = g.mean(*args) unless args.empty?
|
|
419
|
+
assoc_coords.push g if GPhys === g
|
|
420
|
+
end
|
|
421
|
+
newgrid.set_assoc_coords assoc_coords
|
|
422
|
+
else
|
|
423
|
+
newgrid.assoc_coords = @assoc_coords.subset_having_axnames(newgrid.axnames)
|
|
424
|
+
end
|
|
413
425
|
end
|
|
414
426
|
|
|
415
427
|
if !deleted_by
|
|
@@ -466,6 +478,26 @@ module NumRu
|
|
|
466
478
|
end
|
|
467
479
|
alias shape_current shape
|
|
468
480
|
|
|
481
|
+
# similar to [] but only for cut
|
|
482
|
+
def _new_grid_for_cut(slicer, axes)
|
|
483
|
+
axs = Array.new
|
|
484
|
+
lost = self.lost_axes #Array.new
|
|
485
|
+
for i in 0...rank
|
|
486
|
+
if axes[i].is_a?(String)
|
|
487
|
+
lost.push( axes[i] )
|
|
488
|
+
else
|
|
489
|
+
axs.push( axes[i] )
|
|
490
|
+
end
|
|
491
|
+
end
|
|
492
|
+
grid = self.class.new( *axs )
|
|
493
|
+
grid.set_lost_axes( lost ) if lost.length != 0
|
|
494
|
+
if @assoc_coords
|
|
495
|
+
grid.assoc_coords = @assoc_coords[*slicer]
|
|
496
|
+
end
|
|
497
|
+
grid
|
|
498
|
+
end
|
|
499
|
+
private :_new_grid_for_cut
|
|
500
|
+
|
|
469
501
|
def [] (*slicer)
|
|
470
502
|
if slicer.length == 0
|
|
471
503
|
# make a clone
|
|
@@ -481,15 +513,14 @@ module NumRu
|
|
|
481
513
|
lost = self.lost_axes #Array.new
|
|
482
514
|
for i in 0...rank
|
|
483
515
|
ax = @axes[i][slicer[i]]
|
|
484
|
-
if ax.is_a?(
|
|
485
|
-
|
|
516
|
+
if ax.is_a?(String)
|
|
517
|
+
lost.push( ax )
|
|
486
518
|
else
|
|
487
|
-
|
|
519
|
+
axes.push( ax )
|
|
488
520
|
end
|
|
489
521
|
end
|
|
490
522
|
grid = self.class.new( *axes )
|
|
491
523
|
grid.set_lost_axes( lost ) if lost.length != 0
|
|
492
|
-
grid
|
|
493
524
|
end
|
|
494
525
|
if @assoc_coords
|
|
495
526
|
grid.assoc_coords = @assoc_coords[*slicer]
|
|
@@ -550,17 +581,18 @@ module NumRu
|
|
|
550
581
|
end
|
|
551
582
|
|
|
552
583
|
slicer = Array.new
|
|
584
|
+
axes = Array.new
|
|
553
585
|
|
|
554
586
|
for dim in 0...rank
|
|
555
587
|
ax = @axes[dim]
|
|
556
588
|
if conserve_rank
|
|
557
|
-
|
|
589
|
+
axes[dim], slicer[dim] = ax.cut_rank_conserving(args[dim])
|
|
558
590
|
else
|
|
559
|
-
|
|
591
|
+
axes[dim], slicer[dim] = ax.cut(args[dim])
|
|
560
592
|
end
|
|
561
593
|
end
|
|
562
594
|
|
|
563
|
-
[
|
|
595
|
+
[ _new_grid_for_cut(slicer,axes), slicer ]
|
|
564
596
|
end
|
|
565
597
|
private :_cut_
|
|
566
598
|
|
|
@@ -599,17 +631,6 @@ module NumRu
|
|
|
599
631
|
# self
|
|
600
632
|
# end
|
|
601
633
|
|
|
602
|
-
# def insert_axis(dim_or_dimname, axis)
|
|
603
|
-
# dim = dim_index(dim_or_dimname)
|
|
604
|
-
# axes = @axes.dup
|
|
605
|
-
# if axis.is_a?(Axis)
|
|
606
|
-
# axes[dim+1,0] = axis # axes.insert(dim, axis) if ruby 1.7
|
|
607
|
-
# else
|
|
608
|
-
# # do nothing
|
|
609
|
-
# end
|
|
610
|
-
# self.class.new( *axes )
|
|
611
|
-
# end
|
|
612
|
-
|
|
613
634
|
# def insert_axis!(dim_or_dimname, axis)
|
|
614
635
|
# dim = dim_index(dim_or_dimname)
|
|
615
636
|
# if axis == nil
|
|
@@ -622,6 +643,20 @@ module NumRu
|
|
|
622
643
|
# self
|
|
623
644
|
# end
|
|
624
645
|
|
|
646
|
+
def insert_axis(dim, axis)
|
|
647
|
+
axes = @axes.dup
|
|
648
|
+
### commented out for the duck typing:
|
|
649
|
+
#if axis.is_a?(Axis)
|
|
650
|
+
axes.insert(dim, axis)
|
|
651
|
+
#else
|
|
652
|
+
# raise ArgumentError, "2nd arg must be an Axis"
|
|
653
|
+
#end
|
|
654
|
+
grid = self.class.new( *axes )
|
|
655
|
+
grid.set_lost_axes( lost_axes )
|
|
656
|
+
grid.assoc_coords = @assoc_coords.dup if @assoc_coords
|
|
657
|
+
grid
|
|
658
|
+
end
|
|
659
|
+
|
|
625
660
|
def transpose( *dims )
|
|
626
661
|
if dims.sort != NArray.int(rank).indgen!.to_a
|
|
627
662
|
raise ArgumentError,
|
|
@@ -719,5 +754,11 @@ if $0 == __FILE__
|
|
|
719
754
|
p grid.delete_axes([0,1], 'mean').lost_axes
|
|
720
755
|
|
|
721
756
|
p grid, grid.transpose(1,0)
|
|
757
|
+
|
|
758
|
+
puts "Test insert_axis..."
|
|
759
|
+
vz = VArray.new( NArray.float(3).indgen! + 10 ).rename("z")
|
|
760
|
+
zax = Axis.new().set_pos(vz)
|
|
761
|
+
grid3 = grid.insert_axis(-1,zax)
|
|
762
|
+
p grid3
|
|
722
763
|
end
|
|
723
764
|
|
|
@@ -477,11 +477,18 @@ module NumRu
|
|
|
477
477
|
f2 = NArray.float(len)
|
|
478
478
|
for j in 0...len
|
|
479
479
|
## [�J������] (������) ���̃��[�v��C�ɂ����ق��������i1D�Ȃ̂ł܂��������ǁC����2D�̂�����Ȃ�ꏏ�Ɂj�D���̍ہCg2ictr �͒T�������������ĂȂ��̂ŁCinterpo_find_loc_1D ��2D�ł̒T����������� g2ibl2 �ڌĂԕ��������D
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
480
|
+
begin
|
|
481
|
+
uxi, uyi = DCL.g2ictr(txi[j], tyi[j])
|
|
482
|
+
ids1[j] = [ [uxi.floor,0].max, uxg.length-2 ].min
|
|
483
|
+
ids2[j] = [ [uyi.floor,0].max, uyg.length-2 ].min
|
|
484
|
+
f1[j] = uxi - ids1[j]
|
|
485
|
+
f2[j] = uyi - ids2[j]
|
|
486
|
+
rescue
|
|
487
|
+
ids1[j] = -999
|
|
488
|
+
ids2[j] = -999
|
|
489
|
+
f1[j] = 0.0
|
|
490
|
+
f2[j] = 0.0
|
|
491
|
+
end
|
|
485
492
|
end
|
|
486
493
|
idxmap.push( [ od[0], m[1][0][0], nil, ids1, f1] ) # mapping from 1D
|
|
487
494
|
idxmap.push( [ od[1], m[1][0][0], nil, ids2, f2] ) # mapping from 1D
|
|
@@ -497,11 +504,18 @@ module NumRu
|
|
|
497
504
|
for k in 0...leny
|
|
498
505
|
for j in 0...lenx
|
|
499
506
|
## [�J������] (������) ���̃��[�v��C�ɂ����ق�������(2D��������)�D���̍ہCg2ictr �͒T�������������ĂȂ��̂ŁCinterpo_find_loc_1D ��2D�ł̒T����������� g2ibl2 �ڌĂԕ��������D
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
507
|
+
begin
|
|
508
|
+
uxi, uyi = DCL.g2ictr(txi[j], tyi[k])
|
|
509
|
+
ids1[j,k] = [ [uxi.floor,0].max, uxg.length-2 ].min
|
|
510
|
+
ids2[j,k] = [ [uyi.floor,0].max, uyg.length-2 ].min
|
|
511
|
+
f1[j,k] = uxi - ids1[j,k]
|
|
512
|
+
f2[j,k] = uyi - ids2[j,k]
|
|
513
|
+
rescue
|
|
514
|
+
ids1[j,k] = -999
|
|
515
|
+
ids2[j,k] = -999
|
|
516
|
+
f1[j] = 0.0
|
|
517
|
+
f2[j] = 0.0
|
|
518
|
+
end
|
|
505
519
|
end
|
|
506
520
|
end
|
|
507
521
|
idxmap.push( [ od[0], m[1][0][0], [m[1][1][0]], ids1, f1] ) # mapping from 2D
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
require "narray"
|
|
2
|
+
|
|
3
|
+
module NumRu
|
|
4
|
+
class MDStorage
|
|
5
|
+
def initialize(rank=1)
|
|
6
|
+
raise(ArgumentError,"rank must be a positive integer") if !(rank>0)
|
|
7
|
+
@rank = rank
|
|
8
|
+
@shape = []
|
|
9
|
+
rank.times{@shape.push(1)}
|
|
10
|
+
@data = [nil]
|
|
11
|
+
(rank-1).times{
|
|
12
|
+
@data = [@data]
|
|
13
|
+
}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
attr_reader :rank
|
|
17
|
+
|
|
18
|
+
def shape
|
|
19
|
+
@shape.dup
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# add a new dimension to the last
|
|
23
|
+
def add_dim
|
|
24
|
+
@rank += 1
|
|
25
|
+
@shape.push(1)
|
|
26
|
+
@data = [@data]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# increase the length of a dimension by one
|
|
30
|
+
def extend(dim)
|
|
31
|
+
if dim<0 or dim>=rank
|
|
32
|
+
raise(ArgumentError,"invalid dim (#{dim}): not in #{0..rank-1}")
|
|
33
|
+
end
|
|
34
|
+
yield_at_depth(@data,rank-1-dim){|a|
|
|
35
|
+
a.push( dim==0 ? nil : make_nested_array(shape[0..dim-1]) )
|
|
36
|
+
}
|
|
37
|
+
@shape[dim] += 1
|
|
38
|
+
self
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# substituion at a position specified with integers (only one element)
|
|
42
|
+
def []=(*args)
|
|
43
|
+
val = args.pop
|
|
44
|
+
raise(ArgumentError,"# of args != rank (#{rank})") if args.length != rank
|
|
45
|
+
x = @data
|
|
46
|
+
(rank-1).downto(1) do |d|
|
|
47
|
+
idx = args[d]
|
|
48
|
+
raise(ArgumentError,"all args must be integers") if !idx.is_a?(Integer)
|
|
49
|
+
len = shape[d]
|
|
50
|
+
idx += len if idx<0
|
|
51
|
+
raise("Too big negative index for dim #{d}: #{idx-len}") if idx<0
|
|
52
|
+
if 0<=idx and idx<len
|
|
53
|
+
x = x[idx]
|
|
54
|
+
elsif idx >= len
|
|
55
|
+
(idx-len+1).times{extend(d)}
|
|
56
|
+
x = x[idx]
|
|
57
|
+
else
|
|
58
|
+
raise(ArgumentError,"invalid specification")
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
idx = args[0]
|
|
63
|
+
len = shape[0]
|
|
64
|
+
idx += len if idx<0
|
|
65
|
+
raise("Too big negative index for dim #{0}: #{idx-len}") if idx<0
|
|
66
|
+
if idx >= len
|
|
67
|
+
(idx-len+1).times{extend(0)}
|
|
68
|
+
end
|
|
69
|
+
x[idx] = val
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# read from a position specified with integers (only one element)
|
|
73
|
+
def [](*args)
|
|
74
|
+
raise(ArgumentError,"# of args != rank (#{rank})") if args.length != rank
|
|
75
|
+
x = @data
|
|
76
|
+
args.reverse_each do |idx|
|
|
77
|
+
raise(ArgumentError,"all args must be integers") if !idx.is_a?(Integer)
|
|
78
|
+
x = x[idx]
|
|
79
|
+
return(x) if x.nil?
|
|
80
|
+
end
|
|
81
|
+
x
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def to_na
|
|
85
|
+
NArray.to_na(@data)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# count the total length (including nil)
|
|
89
|
+
def length
|
|
90
|
+
len = 1
|
|
91
|
+
@shape.each{|s| len *= s}
|
|
92
|
+
len
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# count the number of non-nil objects
|
|
96
|
+
def count_non_nil
|
|
97
|
+
a = @data.flatten
|
|
98
|
+
a.delete(nil)
|
|
99
|
+
a.length
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
#############################################
|
|
103
|
+
## < private methods >
|
|
104
|
+
private
|
|
105
|
+
=begin
|
|
106
|
+
def __rubber_expansion( args )
|
|
107
|
+
if (id = args.index(false)) # substitution into id
|
|
108
|
+
# false is incuded
|
|
109
|
+
alen = args.length
|
|
110
|
+
if args.rindex(false) != id
|
|
111
|
+
raise ArguemntError,"only one rubber dimension is permitted"
|
|
112
|
+
elsif alen > rank+1
|
|
113
|
+
raise ArgumentError, "too many args"
|
|
114
|
+
end
|
|
115
|
+
ar = ( id!=0 ? args[0..id-1] : [] )
|
|
116
|
+
args = ar + [true]*(rank-alen+1) + args[id+1..-1]
|
|
117
|
+
end
|
|
118
|
+
args
|
|
119
|
+
end
|
|
120
|
+
=end
|
|
121
|
+
|
|
122
|
+
# make a neste multi-D Array filled with nil
|
|
123
|
+
def make_nested_array(shape)
|
|
124
|
+
if shape.length == 1
|
|
125
|
+
Array.new(shape[0]) # => [nil,nil,...,nil]
|
|
126
|
+
elsif shape.length > 1 # recursive construction
|
|
127
|
+
(0...shape[-1]).collect{make_nested_array(shape[0..-2])}
|
|
128
|
+
else
|
|
129
|
+
raise ArgumentError, "shape must have 1 or more elements"
|
|
130
|
+
end
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# call the block at the depth in the nested array
|
|
134
|
+
def yield_at_depth(ary,depth, &blk)
|
|
135
|
+
if depth==0
|
|
136
|
+
blk.call(ary) # call the block
|
|
137
|
+
elsif depth>0
|
|
138
|
+
ary.each{|sub| yield_at_depth(sub,depth-1,&blk)}
|
|
139
|
+
else
|
|
140
|
+
raise ArgumentError, "depth must be >= 0"
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if $0 == __FILE__
|
|
147
|
+
include NumRu
|
|
148
|
+
a = MDStorage.new(3)
|
|
149
|
+
p a
|
|
150
|
+
p a.extend(2)
|
|
151
|
+
p a.extend(2)
|
|
152
|
+
p a.extend(0)
|
|
153
|
+
a[0,0,0] = 10.9
|
|
154
|
+
a[1,0,-1] = "XX"
|
|
155
|
+
p a, a[0,0,0], a[1,0,-1]
|
|
156
|
+
a[2,0,2] = '###'
|
|
157
|
+
p a
|
|
158
|
+
p a.to_na
|
|
159
|
+
p a.length, a.count_non_nil
|
|
160
|
+
end
|
|
@@ -328,10 +328,12 @@ module NumRu
|
|
|
328
328
|
nms = s.split(/ +/)
|
|
329
329
|
case data.file
|
|
330
330
|
when NArray
|
|
331
|
-
|
|
331
|
+
fl = data.file[0]
|
|
332
332
|
else
|
|
333
|
-
|
|
333
|
+
fl = data.file
|
|
334
334
|
end
|
|
335
|
+
nms.delete_if{|nm| !fl.var(nm)}
|
|
336
|
+
nms.delete_if{|nm| fl.dim_names.include?(nm)}
|
|
335
337
|
nms
|
|
336
338
|
else
|
|
337
339
|
nil
|