gphys 1.1.1a
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +1777 -0
- data/LICENSE.txt +34 -0
- data/README +33 -0
- data/Rakefile +57 -0
- data/TODO_ep_flux +6 -0
- data/bin/gdir_client +27 -0
- data/bin/gdir_server +129 -0
- data/bin/gpaop +146 -0
- data/bin/gpcat +148 -0
- data/bin/gpcut +102 -0
- data/bin/gpedit +228 -0
- data/bin/gplist +68 -0
- data/bin/gpmath +120 -0
- data/bin/gpmaxmin +128 -0
- data/bin/gpprint +60 -0
- data/bin/gpvect +706 -0
- data/bin/gpview +704 -0
- data/bin/grads2nc_with_gphys +61 -0
- data/doc/attribute.html +19 -0
- data/doc/attributenetcdf.html +15 -0
- data/doc/axis.html +376 -0
- data/doc/coordmapping.html +111 -0
- data/doc/coordtransform.html +36 -0
- data/doc/derivative/gphys-derivative.html +80 -0
- data/doc/derivative/index.html +21 -0
- data/doc/derivative/index.rd +14 -0
- data/doc/derivative/math-doc/document/document.css +30 -0
- data/doc/derivative/math-doc/document/document.html +57 -0
- data/doc/derivative/math-doc/document/images.aux +1 -0
- data/doc/derivative/math-doc/document/images.log +385 -0
- data/doc/derivative/math-doc/document/images.pl +186 -0
- data/doc/derivative/math-doc/document/images.tex +364 -0
- data/doc/derivative/math-doc/document/img1.png +0 -0
- data/doc/derivative/math-doc/document/img10.png +0 -0
- data/doc/derivative/math-doc/document/img11.png +0 -0
- data/doc/derivative/math-doc/document/img12.png +0 -0
- data/doc/derivative/math-doc/document/img13.png +0 -0
- data/doc/derivative/math-doc/document/img14.png +0 -0
- data/doc/derivative/math-doc/document/img15.png +0 -0
- data/doc/derivative/math-doc/document/img16.png +0 -0
- data/doc/derivative/math-doc/document/img17.png +0 -0
- data/doc/derivative/math-doc/document/img18.png +0 -0
- data/doc/derivative/math-doc/document/img19.png +0 -0
- data/doc/derivative/math-doc/document/img2.png +0 -0
- data/doc/derivative/math-doc/document/img20.png +0 -0
- data/doc/derivative/math-doc/document/img21.png +0 -0
- data/doc/derivative/math-doc/document/img22.png +0 -0
- data/doc/derivative/math-doc/document/img23.png +0 -0
- data/doc/derivative/math-doc/document/img24.png +0 -0
- data/doc/derivative/math-doc/document/img25.png +0 -0
- data/doc/derivative/math-doc/document/img26.png +0 -0
- data/doc/derivative/math-doc/document/img27.png +0 -0
- data/doc/derivative/math-doc/document/img28.png +0 -0
- data/doc/derivative/math-doc/document/img29.png +0 -0
- data/doc/derivative/math-doc/document/img3.png +0 -0
- data/doc/derivative/math-doc/document/img30.png +0 -0
- data/doc/derivative/math-doc/document/img4.png +0 -0
- data/doc/derivative/math-doc/document/img5.png +0 -0
- data/doc/derivative/math-doc/document/img6.png +0 -0
- data/doc/derivative/math-doc/document/img7.png +0 -0
- data/doc/derivative/math-doc/document/img8.png +0 -0
- data/doc/derivative/math-doc/document/img9.png +0 -0
- data/doc/derivative/math-doc/document/index.html +57 -0
- data/doc/derivative/math-doc/document/labels.pl +13 -0
- data/doc/derivative/math-doc/document/next.png +0 -0
- data/doc/derivative/math-doc/document/next_g.png +0 -0
- data/doc/derivative/math-doc/document/node1.html +238 -0
- data/doc/derivative/math-doc/document/node2.html +75 -0
- data/doc/derivative/math-doc/document/prev.png +0 -0
- data/doc/derivative/math-doc/document/prev_g.png +0 -0
- data/doc/derivative/math-doc/document/up.png +0 -0
- data/doc/derivative/math-doc/document/up_g.png +0 -0
- data/doc/derivative/math-doc/document.pdf +0 -0
- data/doc/derivative/math-doc/document.tex +158 -0
- data/doc/derivative/numru-derivative.html +129 -0
- data/doc/ep_flux/ep_flux.html +469 -0
- data/doc/ep_flux/ggraph_on_merdional_section.html +71 -0
- data/doc/ep_flux/index.html +31 -0
- data/doc/ep_flux/index.rd +24 -0
- data/doc/ep_flux/math-doc/document/WARNINGS +1 -0
- data/doc/ep_flux/math-doc/document/contents.png +0 -0
- data/doc/ep_flux/math-doc/document/crossref.png +0 -0
- data/doc/ep_flux/math-doc/document/document.css +30 -0
- data/doc/ep_flux/math-doc/document/document.html +101 -0
- data/doc/ep_flux/math-doc/document/images.aux +1 -0
- data/doc/ep_flux/math-doc/document/images.log +1375 -0
- data/doc/ep_flux/math-doc/document/images.pl +1328 -0
- data/doc/ep_flux/math-doc/document/images.tex +1471 -0
- data/doc/ep_flux/math-doc/document/img1.png +0 -0
- data/doc/ep_flux/math-doc/document/img10.png +0 -0
- data/doc/ep_flux/math-doc/document/img100.png +0 -0
- data/doc/ep_flux/math-doc/document/img101.png +0 -0
- data/doc/ep_flux/math-doc/document/img102.png +0 -0
- data/doc/ep_flux/math-doc/document/img103.png +0 -0
- data/doc/ep_flux/math-doc/document/img104.png +0 -0
- data/doc/ep_flux/math-doc/document/img105.png +0 -0
- data/doc/ep_flux/math-doc/document/img106.png +0 -0
- data/doc/ep_flux/math-doc/document/img107.png +0 -0
- data/doc/ep_flux/math-doc/document/img108.png +0 -0
- data/doc/ep_flux/math-doc/document/img109.png +0 -0
- data/doc/ep_flux/math-doc/document/img11.png +0 -0
- data/doc/ep_flux/math-doc/document/img110.png +0 -0
- data/doc/ep_flux/math-doc/document/img111.png +0 -0
- data/doc/ep_flux/math-doc/document/img112.png +0 -0
- data/doc/ep_flux/math-doc/document/img113.png +0 -0
- data/doc/ep_flux/math-doc/document/img114.png +0 -0
- data/doc/ep_flux/math-doc/document/img115.png +0 -0
- data/doc/ep_flux/math-doc/document/img116.png +0 -0
- data/doc/ep_flux/math-doc/document/img117.png +0 -0
- data/doc/ep_flux/math-doc/document/img118.png +0 -0
- data/doc/ep_flux/math-doc/document/img119.png +0 -0
- data/doc/ep_flux/math-doc/document/img12.png +0 -0
- data/doc/ep_flux/math-doc/document/img120.png +0 -0
- data/doc/ep_flux/math-doc/document/img121.png +0 -0
- data/doc/ep_flux/math-doc/document/img122.png +0 -0
- data/doc/ep_flux/math-doc/document/img123.png +0 -0
- data/doc/ep_flux/math-doc/document/img124.png +0 -0
- data/doc/ep_flux/math-doc/document/img125.png +0 -0
- data/doc/ep_flux/math-doc/document/img126.png +0 -0
- data/doc/ep_flux/math-doc/document/img127.png +0 -0
- data/doc/ep_flux/math-doc/document/img128.png +0 -0
- data/doc/ep_flux/math-doc/document/img129.png +0 -0
- data/doc/ep_flux/math-doc/document/img13.png +0 -0
- data/doc/ep_flux/math-doc/document/img130.png +0 -0
- data/doc/ep_flux/math-doc/document/img131.png +0 -0
- data/doc/ep_flux/math-doc/document/img132.png +0 -0
- data/doc/ep_flux/math-doc/document/img133.png +0 -0
- data/doc/ep_flux/math-doc/document/img134.png +0 -0
- data/doc/ep_flux/math-doc/document/img135.png +0 -0
- data/doc/ep_flux/math-doc/document/img136.png +0 -0
- data/doc/ep_flux/math-doc/document/img137.png +0 -0
- data/doc/ep_flux/math-doc/document/img138.png +0 -0
- data/doc/ep_flux/math-doc/document/img139.png +0 -0
- data/doc/ep_flux/math-doc/document/img14.png +0 -0
- data/doc/ep_flux/math-doc/document/img140.png +0 -0
- data/doc/ep_flux/math-doc/document/img141.png +0 -0
- data/doc/ep_flux/math-doc/document/img142.png +0 -0
- data/doc/ep_flux/math-doc/document/img143.png +0 -0
- data/doc/ep_flux/math-doc/document/img144.png +0 -0
- data/doc/ep_flux/math-doc/document/img145.png +0 -0
- data/doc/ep_flux/math-doc/document/img146.png +0 -0
- data/doc/ep_flux/math-doc/document/img147.png +0 -0
- data/doc/ep_flux/math-doc/document/img148.png +0 -0
- data/doc/ep_flux/math-doc/document/img149.png +0 -0
- data/doc/ep_flux/math-doc/document/img15.png +0 -0
- data/doc/ep_flux/math-doc/document/img150.png +0 -0
- data/doc/ep_flux/math-doc/document/img151.png +0 -0
- data/doc/ep_flux/math-doc/document/img152.png +0 -0
- data/doc/ep_flux/math-doc/document/img153.png +0 -0
- data/doc/ep_flux/math-doc/document/img154.png +0 -0
- data/doc/ep_flux/math-doc/document/img155.png +0 -0
- data/doc/ep_flux/math-doc/document/img156.png +0 -0
- data/doc/ep_flux/math-doc/document/img157.png +0 -0
- data/doc/ep_flux/math-doc/document/img158.png +0 -0
- data/doc/ep_flux/math-doc/document/img159.png +0 -0
- data/doc/ep_flux/math-doc/document/img16.png +0 -0
- data/doc/ep_flux/math-doc/document/img160.png +0 -0
- data/doc/ep_flux/math-doc/document/img161.png +0 -0
- data/doc/ep_flux/math-doc/document/img162.png +0 -0
- data/doc/ep_flux/math-doc/document/img163.png +0 -0
- data/doc/ep_flux/math-doc/document/img164.png +0 -0
- data/doc/ep_flux/math-doc/document/img165.png +0 -0
- data/doc/ep_flux/math-doc/document/img166.png +0 -0
- data/doc/ep_flux/math-doc/document/img167.png +0 -0
- data/doc/ep_flux/math-doc/document/img168.png +0 -0
- data/doc/ep_flux/math-doc/document/img169.png +0 -0
- data/doc/ep_flux/math-doc/document/img17.png +0 -0
- data/doc/ep_flux/math-doc/document/img170.png +0 -0
- data/doc/ep_flux/math-doc/document/img171.png +0 -0
- data/doc/ep_flux/math-doc/document/img172.png +0 -0
- data/doc/ep_flux/math-doc/document/img173.png +0 -0
- data/doc/ep_flux/math-doc/document/img174.png +0 -0
- data/doc/ep_flux/math-doc/document/img175.png +0 -0
- data/doc/ep_flux/math-doc/document/img176.png +0 -0
- data/doc/ep_flux/math-doc/document/img177.png +0 -0
- data/doc/ep_flux/math-doc/document/img178.png +0 -0
- data/doc/ep_flux/math-doc/document/img179.png +0 -0
- data/doc/ep_flux/math-doc/document/img18.png +0 -0
- data/doc/ep_flux/math-doc/document/img180.png +0 -0
- data/doc/ep_flux/math-doc/document/img181.png +0 -0
- data/doc/ep_flux/math-doc/document/img182.png +0 -0
- data/doc/ep_flux/math-doc/document/img183.png +0 -0
- data/doc/ep_flux/math-doc/document/img184.png +0 -0
- data/doc/ep_flux/math-doc/document/img185.png +0 -0
- data/doc/ep_flux/math-doc/document/img186.png +0 -0
- data/doc/ep_flux/math-doc/document/img187.png +0 -0
- data/doc/ep_flux/math-doc/document/img188.png +0 -0
- data/doc/ep_flux/math-doc/document/img189.png +0 -0
- data/doc/ep_flux/math-doc/document/img19.png +0 -0
- data/doc/ep_flux/math-doc/document/img190.png +0 -0
- data/doc/ep_flux/math-doc/document/img191.png +0 -0
- data/doc/ep_flux/math-doc/document/img192.png +0 -0
- data/doc/ep_flux/math-doc/document/img193.png +0 -0
- data/doc/ep_flux/math-doc/document/img194.png +0 -0
- data/doc/ep_flux/math-doc/document/img195.png +0 -0
- data/doc/ep_flux/math-doc/document/img196.png +0 -0
- data/doc/ep_flux/math-doc/document/img197.png +0 -0
- data/doc/ep_flux/math-doc/document/img198.png +0 -0
- data/doc/ep_flux/math-doc/document/img199.png +0 -0
- data/doc/ep_flux/math-doc/document/img2.png +0 -0
- data/doc/ep_flux/math-doc/document/img20.png +0 -0
- data/doc/ep_flux/math-doc/document/img200.png +0 -0
- data/doc/ep_flux/math-doc/document/img21.png +0 -0
- data/doc/ep_flux/math-doc/document/img22.png +0 -0
- data/doc/ep_flux/math-doc/document/img23.png +0 -0
- data/doc/ep_flux/math-doc/document/img24.png +0 -0
- data/doc/ep_flux/math-doc/document/img25.png +0 -0
- data/doc/ep_flux/math-doc/document/img26.png +0 -0
- data/doc/ep_flux/math-doc/document/img27.png +0 -0
- data/doc/ep_flux/math-doc/document/img28.png +0 -0
- data/doc/ep_flux/math-doc/document/img29.png +0 -0
- data/doc/ep_flux/math-doc/document/img3.png +0 -0
- data/doc/ep_flux/math-doc/document/img30.png +0 -0
- data/doc/ep_flux/math-doc/document/img31.png +0 -0
- data/doc/ep_flux/math-doc/document/img32.png +0 -0
- data/doc/ep_flux/math-doc/document/img33.png +0 -0
- data/doc/ep_flux/math-doc/document/img34.png +0 -0
- data/doc/ep_flux/math-doc/document/img35.png +0 -0
- data/doc/ep_flux/math-doc/document/img36.png +0 -0
- data/doc/ep_flux/math-doc/document/img37.png +0 -0
- data/doc/ep_flux/math-doc/document/img38.png +0 -0
- data/doc/ep_flux/math-doc/document/img39.png +0 -0
- data/doc/ep_flux/math-doc/document/img4.png +0 -0
- data/doc/ep_flux/math-doc/document/img40.png +0 -0
- data/doc/ep_flux/math-doc/document/img41.png +0 -0
- data/doc/ep_flux/math-doc/document/img42.png +0 -0
- data/doc/ep_flux/math-doc/document/img43.png +0 -0
- data/doc/ep_flux/math-doc/document/img44.png +0 -0
- data/doc/ep_flux/math-doc/document/img45.png +0 -0
- data/doc/ep_flux/math-doc/document/img46.png +0 -0
- data/doc/ep_flux/math-doc/document/img47.png +0 -0
- data/doc/ep_flux/math-doc/document/img48.png +0 -0
- data/doc/ep_flux/math-doc/document/img49.png +0 -0
- data/doc/ep_flux/math-doc/document/img5.png +0 -0
- data/doc/ep_flux/math-doc/document/img50.png +0 -0
- data/doc/ep_flux/math-doc/document/img51.png +0 -0
- data/doc/ep_flux/math-doc/document/img52.png +0 -0
- data/doc/ep_flux/math-doc/document/img53.png +0 -0
- data/doc/ep_flux/math-doc/document/img54.png +0 -0
- data/doc/ep_flux/math-doc/document/img55.png +0 -0
- data/doc/ep_flux/math-doc/document/img56.png +0 -0
- data/doc/ep_flux/math-doc/document/img57.png +0 -0
- data/doc/ep_flux/math-doc/document/img58.png +0 -0
- data/doc/ep_flux/math-doc/document/img59.png +0 -0
- data/doc/ep_flux/math-doc/document/img6.png +0 -0
- data/doc/ep_flux/math-doc/document/img60.png +0 -0
- data/doc/ep_flux/math-doc/document/img61.png +0 -0
- data/doc/ep_flux/math-doc/document/img62.png +0 -0
- data/doc/ep_flux/math-doc/document/img63.png +0 -0
- data/doc/ep_flux/math-doc/document/img64.png +0 -0
- data/doc/ep_flux/math-doc/document/img65.png +0 -0
- data/doc/ep_flux/math-doc/document/img66.png +0 -0
- data/doc/ep_flux/math-doc/document/img67.png +0 -0
- data/doc/ep_flux/math-doc/document/img68.png +0 -0
- data/doc/ep_flux/math-doc/document/img69.png +0 -0
- data/doc/ep_flux/math-doc/document/img7.png +0 -0
- data/doc/ep_flux/math-doc/document/img70.png +0 -0
- data/doc/ep_flux/math-doc/document/img71.png +0 -0
- data/doc/ep_flux/math-doc/document/img72.png +0 -0
- data/doc/ep_flux/math-doc/document/img73.png +0 -0
- data/doc/ep_flux/math-doc/document/img74.png +0 -0
- data/doc/ep_flux/math-doc/document/img75.png +0 -0
- data/doc/ep_flux/math-doc/document/img76.png +0 -0
- data/doc/ep_flux/math-doc/document/img77.png +0 -0
- data/doc/ep_flux/math-doc/document/img78.png +0 -0
- data/doc/ep_flux/math-doc/document/img79.png +0 -0
- data/doc/ep_flux/math-doc/document/img8.png +0 -0
- data/doc/ep_flux/math-doc/document/img80.png +0 -0
- data/doc/ep_flux/math-doc/document/img81.png +0 -0
- data/doc/ep_flux/math-doc/document/img82.png +0 -0
- data/doc/ep_flux/math-doc/document/img83.png +0 -0
- data/doc/ep_flux/math-doc/document/img84.png +0 -0
- data/doc/ep_flux/math-doc/document/img85.png +0 -0
- data/doc/ep_flux/math-doc/document/img86.png +0 -0
- data/doc/ep_flux/math-doc/document/img87.png +0 -0
- data/doc/ep_flux/math-doc/document/img88.png +0 -0
- data/doc/ep_flux/math-doc/document/img89.png +0 -0
- data/doc/ep_flux/math-doc/document/img9.png +0 -0
- data/doc/ep_flux/math-doc/document/img90.png +0 -0
- data/doc/ep_flux/math-doc/document/img91.png +0 -0
- data/doc/ep_flux/math-doc/document/img92.png +0 -0
- data/doc/ep_flux/math-doc/document/img93.png +0 -0
- data/doc/ep_flux/math-doc/document/img94.png +0 -0
- data/doc/ep_flux/math-doc/document/img95.png +0 -0
- data/doc/ep_flux/math-doc/document/img96.png +0 -0
- data/doc/ep_flux/math-doc/document/img97.png +0 -0
- data/doc/ep_flux/math-doc/document/img98.png +0 -0
- data/doc/ep_flux/math-doc/document/img99.png +0 -0
- data/doc/ep_flux/math-doc/document/index.html +101 -0
- data/doc/ep_flux/math-doc/document/internals.pl +258 -0
- data/doc/ep_flux/math-doc/document/labels.pl +265 -0
- data/doc/ep_flux/math-doc/document/next.png +0 -0
- data/doc/ep_flux/math-doc/document/next_g.png +0 -0
- data/doc/ep_flux/math-doc/document/node1.html +104 -0
- data/doc/ep_flux/math-doc/document/node10.html +164 -0
- data/doc/ep_flux/math-doc/document/node11.html +86 -0
- data/doc/ep_flux/math-doc/document/node12.html +166 -0
- data/doc/ep_flux/math-doc/document/node13.html +897 -0
- data/doc/ep_flux/math-doc/document/node14.html +1065 -0
- data/doc/ep_flux/math-doc/document/node15.html +72 -0
- data/doc/ep_flux/math-doc/document/node16.html +81 -0
- data/doc/ep_flux/math-doc/document/node2.html +82 -0
- data/doc/ep_flux/math-doc/document/node3.html +91 -0
- data/doc/ep_flux/math-doc/document/node4.html +149 -0
- data/doc/ep_flux/math-doc/document/node5.html +330 -0
- data/doc/ep_flux/math-doc/document/node6.html +99 -0
- data/doc/ep_flux/math-doc/document/node7.html +98 -0
- data/doc/ep_flux/math-doc/document/node8.html +83 -0
- data/doc/ep_flux/math-doc/document/node9.html +140 -0
- data/doc/ep_flux/math-doc/document/prev.png +0 -0
- data/doc/ep_flux/math-doc/document/prev_g.png +0 -0
- data/doc/ep_flux/math-doc/document/up.png +0 -0
- data/doc/ep_flux/math-doc/document/up_g.png +0 -0
- data/doc/ep_flux/math-doc/document.pdf +0 -0
- data/doc/ep_flux/math-doc/document.tex +2018 -0
- data/doc/gdir.html +412 -0
- data/doc/gdir_client.html +16 -0
- data/doc/gdir_connect_ftp-like.html +61 -0
- data/doc/gdir_server.html +45 -0
- data/doc/ggraph.html +1615 -0
- data/doc/gpcat.html +44 -0
- data/doc/gpcut.html +41 -0
- data/doc/gphys.html +532 -0
- data/doc/gphys_fft.html +324 -0
- data/doc/gphys_grads_io.html +69 -0
- data/doc/gphys_grib_io.html +82 -0
- data/doc/gphys_io.html +120 -0
- data/doc/gphys_io_common.html +18 -0
- data/doc/gphys_netcdf_io.html +283 -0
- data/doc/gplist.html +24 -0
- data/doc/gpmath.html +51 -0
- data/doc/gpmaxmin.html +31 -0
- data/doc/gpprint.html +34 -0
- data/doc/gpview.html +270 -0
- data/doc/grads2nc_with_gphys.html +21 -0
- data/doc/grads_gridded.html +307 -0
- data/doc/grib.html +144 -0
- data/doc/grid.html +212 -0
- data/doc/index.html +133 -0
- data/doc/index.rd +127 -0
- data/doc/netcdf_convention.html +136 -0
- data/doc/unumeric.html +176 -0
- data/doc/update +64 -0
- data/doc/varray.html +299 -0
- data/doc/varraycomposite.html +67 -0
- data/ext_coord.c +209 -0
- data/ext_init.c +7 -0
- data/extconf.rb +42 -0
- data/install.rb +130 -0
- data/interpo.c +497 -0
- data/lib/numru/dcl_mouse.rb +71 -0
- data/lib/numru/dclext_datetime_ax.rb +220 -0
- data/lib/numru/derivative.rb +348 -0
- data/lib/numru/ganalysis/covariance.rb +154 -0
- data/lib/numru/ganalysis/eof.rb +298 -0
- data/lib/numru/ganalysis/histogram.rb +252 -0
- data/lib/numru/ganalysis/met.rb +317 -0
- data/lib/numru/ganalysis/planet.rb +182 -0
- data/lib/numru/ganalysis.rb +7 -0
- data/lib/numru/gdir.rb +1038 -0
- data/lib/numru/gdir_connect_ftp-like.rb +149 -0
- data/lib/numru/ggraph.rb +5838 -0
- data/lib/numru/ggraph_on_merdional_section.rb +178 -0
- data/lib/numru/gphys/assoccoords.rb +359 -0
- data/lib/numru/gphys/attribute.rb +129 -0
- data/lib/numru/gphys/attributenetcdf.rb +80 -0
- data/lib/numru/gphys/axis.rb +963 -0
- data/lib/numru/gphys/coordmapping.rb +286 -0
- data/lib/numru/gphys/coordtransform.rb +209 -0
- data/lib/numru/gphys/derivative.rb +314 -0
- data/lib/numru/gphys/ep_flux.rb +868 -0
- data/lib/numru/gphys/gpcommon.rb +52 -0
- data/lib/numru/gphys/gphys.rb +1207 -0
- data/lib/numru/gphys/gphys_fft.rb +886 -0
- data/lib/numru/gphys/gphys_grads_io.rb +212 -0
- data/lib/numru/gphys/gphys_grib_io.rb +214 -0
- data/lib/numru/gphys/gphys_gtool3_io.rb +162 -0
- data/lib/numru/gphys/gphys_hdfeos5_io.rb +672 -0
- data/lib/numru/gphys/gphys_io.rb +452 -0
- data/lib/numru/gphys/gphys_io_common.rb +126 -0
- data/lib/numru/gphys/gphys_netcdf_io.rb +800 -0
- data/lib/numru/gphys/gphys_nusdas_io.rb +132 -0
- data/lib/numru/gphys/grads_gridded.rb +1638 -0
- data/lib/numru/gphys/grib.rb +2049 -0
- data/lib/numru/gphys/grib_params.rb +1465 -0
- data/lib/numru/gphys/grid.rb +723 -0
- data/lib/numru/gphys/gtool3.rb +771 -0
- data/lib/numru/gphys/interpolate.rb +854 -0
- data/lib/numru/gphys/narray_ext.rb +34 -0
- data/lib/numru/gphys/netcdf_convention.rb +406 -0
- data/lib/numru/gphys/subsetmapping.rb +332 -0
- data/lib/numru/gphys/unumeric.rb +522 -0
- data/lib/numru/gphys/varray.rb +1109 -0
- data/lib/numru/gphys/varraycomposite.rb +415 -0
- data/lib/numru/gphys/varraygrads.rb +225 -0
- data/lib/numru/gphys/varraygrib.rb +177 -0
- data/lib/numru/gphys/varraygtool3.rb +226 -0
- data/lib/numru/gphys/varrayhdfeos5.rb +451 -0
- data/lib/numru/gphys/varraynetcdf.rb +350 -0
- data/lib/numru/gphys/varraynusdas.rb +59 -0
- data/lib/numru/gphys.rb +9 -0
- data/lib/numru/htdir.rb +170 -0
- data/multibitIO.c +567 -0
- data/sample/cira86_to_nc.rb +122 -0
- data/sample/druby_cli1.rb +21 -0
- data/sample/druby_cli2.rb +34 -0
- data/sample/druby_serv1.rb +30 -0
- data/sample/druby_serv2.rb +64 -0
- data/sample/ep_flux/demo_NCEP_1.rb +48 -0
- data/sample/ep_flux/demo_NCEP_2.rb +57 -0
- data/sample/ep_flux/demo_NCEP_3.rb +81 -0
- data/sample/ggraph_latlon_labelling_dr002690.rb +159 -0
- data/sample/ggraph_mapfit-axes_dr002687.rb +131 -0
- data/sample/map_projection.rb +121 -0
- data/sample/ncep_theta_coord.rb +79 -0
- data/test/eof_slp.rb +28 -0
- data/test/mltbit.dat +0 -0
- data/test/test_ep_flux.rb +533 -0
- data/test/test_multibitIO.rb +19 -0
- data/testdata/T.jan.ctl +12 -0
- data/testdata/T.jan.dat +0 -0
- data/testdata/T.jan.grib +0 -0
- data/testdata/T.jan.nc +0 -0
- data/testdata/T.jan.packed.withmiss.nc +0 -0
- data/testdata/UV.jan.nc +0 -0
- data/testdata/assoc_crds.nc +0 -0
- data/testdata/cira86.dat +1332 -0
- metadata +621 -0
@@ -0,0 +1,314 @@
|
|
1
|
+
require 'narray'
|
2
|
+
require 'numru/gphys'
|
3
|
+
require 'numru/derivative'
|
4
|
+
|
5
|
+
############################################################
|
6
|
+
|
7
|
+
=begin
|
8
|
+
=module NumRu::GPhys::Derivative in derivative.rb
|
9
|
+
|
10
|
+
==Index
|
11
|
+
* ((<module NumRu::GPhys::Derivative>))
|
12
|
+
* ((<threepoint_O2nd_deriv>))
|
13
|
+
* First derivative (2nd Order difference use three point.)
|
14
|
+
* ((<cderiv>))
|
15
|
+
* First derivative (using center difference method)
|
16
|
+
|
17
|
+
=module NumRu::GPhys::Derivative
|
18
|
+
|
19
|
+
Module functions of Derivative Operater for GPhys.
|
20
|
+
|
21
|
+
---threepoint_O2nd_deriv(gp, dim_or_dimname, bc=LINEAR_EXT))
|
22
|
+
|
23
|
+
Derivate (({z})) respect to (({dim})) th dimension with 2nd Order difference.
|
24
|
+
return an NArray which result of the difference ((<z>)) divided difference
|
25
|
+
(({x})) (in other wards,
|
26
|
+
(s**2*z_{i+1} + (t**2 - s**2)*f_{i} - t**2*f_{i-1}) / (s*t*(s + t)):
|
27
|
+
now s represents (x_{i} - x_{i-1}) ,t represents (x_{i+1} - x_{i})
|
28
|
+
and _{i} represents the suffix of {i} th element in the ((<dim>)) th
|
29
|
+
dimension of array. ).
|
30
|
+
|
31
|
+
ARGUMENTS
|
32
|
+
* z (NArray): a NArray which you want to derivative.
|
33
|
+
* x (NArray): a NArray represents the dimension which derivative respect
|
34
|
+
to. z.rank must be 1.
|
35
|
+
* dim (Numeric): a Numeric represents the dimention which derivative
|
36
|
+
respect to. you can give number count backward (((<dim>))<0), but
|
37
|
+
((<z.rank ��dim>)) must be > 0.
|
38
|
+
* bc (Numeric) : a Numeric which represent boundary condition.
|
39
|
+
Supported conditions are:
|
40
|
+
* LINEAR_EXT(=1) : default value
|
41
|
+
* CYCLIC_EXT(=2)
|
42
|
+
|
43
|
+
RETURN VALUE
|
44
|
+
* O2nd_deriv_data (NArray):
|
45
|
+
(s**2*z_{i+1} + (t**2 - s**2)*f_{i} - t**2*f_{i-1}) / (s*t*(s + t))
|
46
|
+
|
47
|
+
---cderiv(gp, dim_or_dimname, bc=LINEAR_EXT, altcoord=nil)
|
48
|
+
|
49
|
+
Derivate (({gp})) respect to (({dim})) th or (({dimname})) dimension
|
50
|
+
with center difference. return a GPhys which result of the difference
|
51
|
+
((<gp>)) divided difference axis.
|
52
|
+
( in other wards, (z_{i+1} - z_{i-1}) / (x_{i+1} - x_{i-1}): now x is
|
53
|
+
axis array which you wants to respects to, _{i} represents the suffix
|
54
|
+
of {i} th element in the ((<dim>)) th dimension of array. ).
|
55
|
+
|
56
|
+
ARGUMENTS
|
57
|
+
* gp (GPhys): a GPhys which you want to derivative.
|
58
|
+
* dim_or_dimname (Numeric or String): a Numeric or String represents
|
59
|
+
the dimension which derivate respect to. you can give number count
|
60
|
+
backward (((<dim>))<0), but ((<z.rank ��dim>)) must be > 0.
|
61
|
+
* bc (Numeric) : a Numeric which represent boundary condition.
|
62
|
+
Supported conditions are:
|
63
|
+
* LINEAR_EXT(=1) : default value
|
64
|
+
* CYCLIC_EXT(=2)
|
65
|
+
* altcoord (nil or 1D VArray): if a VArray, it is used as the
|
66
|
+
coordiante variable with which differentiation is made.
|
67
|
+
-- conveneient to make deribative in a different cooridate scaling.
|
68
|
+
(e.g., differenciate in radian, while the coordinate is in degrees)
|
69
|
+
|
70
|
+
RETURN VALUE
|
71
|
+
* a GPhys
|
72
|
+
|
73
|
+
=end
|
74
|
+
############################################################
|
75
|
+
|
76
|
+
module NumRu
|
77
|
+
class GPhys
|
78
|
+
|
79
|
+
def cderiv(*args)
|
80
|
+
Derivative::cderiv(self,*args)
|
81
|
+
end
|
82
|
+
def threepoint_O2nd_deriv(*args)
|
83
|
+
Derivative::threepoint_O2nd_deriv(self,*args)
|
84
|
+
end
|
85
|
+
|
86
|
+
module Derivative
|
87
|
+
|
88
|
+
CYCLIC_OR_LINEAR = -1
|
89
|
+
LINEAR_EXT = NumRu::Derivative::LINEAR_EXT # ==1
|
90
|
+
CYCLIC_EXT = NumRu::Derivative::CYCLIC_EXT # ==2
|
91
|
+
MIRROR_A = NumRu::Derivative::MIRROR_A # ==3
|
92
|
+
MIRROR_B = NumRu::Derivative::MIRROR_B # ==3
|
93
|
+
|
94
|
+
module_function
|
95
|
+
|
96
|
+
def threepoint_O2nd_deriv(gp, dim, bc=LINEAR_EXT, altcoord=nil)
|
97
|
+
__deriv(gp, dim, bc, altcoord, "threepoint_O2nd_deriv")
|
98
|
+
end
|
99
|
+
|
100
|
+
def cderiv(gp, dim, bc=LINEAR_EXT, altcoord=nil)
|
101
|
+
__deriv(gp, dim, bc, altcoord, "cderiv")
|
102
|
+
end
|
103
|
+
|
104
|
+
def __deriv(gp,dim,bc, altcoord, dtype="cderiv")
|
105
|
+
if bc == CYCLIC_OR_LINEAR
|
106
|
+
bc = ( gp.axis(dim).cyclic_extendible? ? CYCLIC_EXT : LINEAR_EXT )
|
107
|
+
end
|
108
|
+
|
109
|
+
# <<get dimention number>>
|
110
|
+
if (dim.is_a?(Numeric) && dim < 0)
|
111
|
+
dim += gp.rank
|
112
|
+
elsif dim.is_a?(String)
|
113
|
+
dim = gp.axnames.index(dim)
|
114
|
+
end
|
115
|
+
|
116
|
+
# <<derivate gp>>
|
117
|
+
v_data = gp.data # get varray
|
118
|
+
if altcoord
|
119
|
+
v_x = altcoord
|
120
|
+
else
|
121
|
+
v_x = gp.coord(dim)
|
122
|
+
end
|
123
|
+
n_data = v_data.val # get narray
|
124
|
+
n_x = v_x.val
|
125
|
+
case dtype
|
126
|
+
when "cderiv"
|
127
|
+
n_dgpdx = NumRu::Derivative::cderiv(n_data,n_x,dim,bc)
|
128
|
+
when "threepoint_O2nd_deriv"
|
129
|
+
n_dgpdx = NumRu::Derivative::threepoint_O2nd_deriv(n_data,n_x,dim,bc)
|
130
|
+
else
|
131
|
+
raise ArgumentError, "Unsupported derivative type :'#{dtype}'"
|
132
|
+
end
|
133
|
+
name = "d#{gp.name}_d#{v_x.name}" # ex. "dT_dx"
|
134
|
+
v_dgpdx = VArray.new(n_dgpdx, gp.data, name) # make varray
|
135
|
+
g_dgpdx = GPhys.new( gp.grid_copy, v_dgpdx ) # make gphys
|
136
|
+
|
137
|
+
# <<set attribute>>
|
138
|
+
u_data = v_data.units
|
139
|
+
u_x = v_x.units
|
140
|
+
g_dgpdx.units = u_data/u_x # set units
|
141
|
+
if v_data.get_att('long_name') && v_x.get_att('long_name')
|
142
|
+
long_name = "d_#{v_data.get_att('long_name')}_d_#{v_x.get_att('long_name')}"
|
143
|
+
else
|
144
|
+
long_name = name
|
145
|
+
end
|
146
|
+
g_dgpdx.data.set_att("long_name",long_name) # set long_name
|
147
|
+
return g_dgpdx
|
148
|
+
end
|
149
|
+
private :__deriv
|
150
|
+
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
######################################################
|
157
|
+
## < test >
|
158
|
+
if $0 == __FILE__
|
159
|
+
|
160
|
+
include NumRu
|
161
|
+
include NMath
|
162
|
+
|
163
|
+
#### define method for tests.
|
164
|
+
##
|
165
|
+
# genarate narray
|
166
|
+
|
167
|
+
def gen_x(n)
|
168
|
+
2*PI*NArray.sfloat(n).indgen!/(n-1)
|
169
|
+
end
|
170
|
+
def gen_y(n)
|
171
|
+
PI*(NArray.sfloat(n).indgen!/(n-1)-0.5)
|
172
|
+
end
|
173
|
+
def gen_z1(n)
|
174
|
+
NArray.sfloat(n).indgen!/(n-1)
|
175
|
+
end
|
176
|
+
def gen_z2(n)
|
177
|
+
exp(-NArray.sfloat(n).indgen!/(n-1))
|
178
|
+
end
|
179
|
+
|
180
|
+
def make_gp1D(f,x)
|
181
|
+
ax = Axis.new.set_pos( VArray.new( x ,
|
182
|
+
{"long_name"=>"longitude", "units"=>"rad"},
|
183
|
+
"lon" ))
|
184
|
+
data = VArray.new( f,
|
185
|
+
{"long_name"=>"temperature", "units"=>"K"},
|
186
|
+
"t" )
|
187
|
+
return GPhys.new( Grid.new(ax), data)
|
188
|
+
end
|
189
|
+
|
190
|
+
def make_gp3D(f,x,y,z)
|
191
|
+
vax = VArray.new( x,
|
192
|
+
{"long_name"=>"longitude", "units"=>"rad"},
|
193
|
+
"lon" )
|
194
|
+
vay = VArray.new( y,
|
195
|
+
{"long_name"=>"latitude", "units"=>"rad"},
|
196
|
+
"lat" )
|
197
|
+
vaz = VArray.new( z,
|
198
|
+
{"long_name"=>"altitude", "units"=>"m"},
|
199
|
+
"z" )
|
200
|
+
axx = Axis.new.set_pos(vax)
|
201
|
+
axy = Axis.new.set_pos(vay)
|
202
|
+
axz = Axis.new.set_pos(vaz)
|
203
|
+
data = VArray.new( f,
|
204
|
+
{"long_name"=>"temperature", "units"=>"K"},
|
205
|
+
"t" )
|
206
|
+
return GPhys.new( Grid.new(axx, axy, axz), data)
|
207
|
+
end
|
208
|
+
|
209
|
+
def show_attr(bef_deriv, aft_deriv)
|
210
|
+
fm = "%-15s%-15s%-10s%s"
|
211
|
+
printf(fm, "<attr-name>", "<before>", "<after>", "\n")
|
212
|
+
printf(fm, "name", bef_deriv.data.name, aft_deriv.data.name, "\n")
|
213
|
+
aft_deriv.data.att_names.each{|nm|
|
214
|
+
printf(fm, nm, bef_deriv.data.get_att(nm).to_s,
|
215
|
+
aft_deriv.data.get_att(nm).to_s, "\n")
|
216
|
+
}
|
217
|
+
end
|
218
|
+
##
|
219
|
+
# test
|
220
|
+
|
221
|
+
def test1(x1, dim_or_dimname)
|
222
|
+
f1 = sin(x1)
|
223
|
+
gp1 = make_gp1D(f1, x1)
|
224
|
+
deriv = GPhys::Derivative::cderiv(gp1, dim_or_dimname)
|
225
|
+
dfdx1 = deriv.data.val
|
226
|
+
dfdx2 = cos(x1)
|
227
|
+
p(dfdx1) if $VERBOSE
|
228
|
+
diff = (dfdx1 - dfdx2)[1..-2].abs
|
229
|
+
err = diff.mean
|
230
|
+
print "dfdx - kaiseki_kai (except boundary): "
|
231
|
+
print err, "\t", diff.max,"\n"
|
232
|
+
err
|
233
|
+
end
|
234
|
+
|
235
|
+
def test2(x2, dim_or_dimname)
|
236
|
+
f2 = sin(x2)
|
237
|
+
gp2 = make_gp1D(f2, x2)
|
238
|
+
deriv = GPhys::Derivative::threepoint_O2nd_deriv(gp2, dim_or_dimname)
|
239
|
+
dfdx1 = deriv.data.val
|
240
|
+
dfdx2 = cos(x2)
|
241
|
+
p(dfdx1) if $VERBOSE
|
242
|
+
diff = (dfdx1 - dfdx2)[1..-2].abs
|
243
|
+
err = diff.mean
|
244
|
+
print "dfdx - kaiseki_kai (except boundary): "
|
245
|
+
print err, "\t", diff.max,"\n"
|
246
|
+
err
|
247
|
+
end
|
248
|
+
|
249
|
+
def test3
|
250
|
+
x3 = gen_x(11)
|
251
|
+
f3 = sin(x3)
|
252
|
+
gp3 = make_gp1D(f3, x3)
|
253
|
+
deriv = GPhys::Derivative::cderiv(gp3, "lon")
|
254
|
+
dfdx1 = deriv.data.val
|
255
|
+
dfdx2 = cos(x3)
|
256
|
+
p(dfdx1) if $VERBOSE
|
257
|
+
show_attr(gp3, deriv)
|
258
|
+
end
|
259
|
+
|
260
|
+
def test4(dim)
|
261
|
+
nx = 10; ny = 5; nz = 5
|
262
|
+
x = gen_x(nx)
|
263
|
+
y = gen_y(ny)
|
264
|
+
z1 = gen_z1(nz)
|
265
|
+
f = sin(x).reshape(nx,1,1) * sin(y).reshape(1,ny,1) * sin(z1).reshape(1,1,nz)
|
266
|
+
gp = make_gp3D(f, x, y, z1)
|
267
|
+
print "**** equally spaced grid (2nd order) ****\n"
|
268
|
+
deriv = GPhys::Derivative::threepoint_O2nd_deriv(gp, dim)
|
269
|
+
dfdx1 = deriv.data.val
|
270
|
+
dfdx2 = sin(x).reshape(nx,1,1) * cos(y).reshape(1,ny,1) * sin(z1).reshape(1,1,nz)
|
271
|
+
p(dfdx1) if $VERBOSE
|
272
|
+
diff = (dfdx1 - dfdx2)[1..-2].abs
|
273
|
+
err = diff.mean
|
274
|
+
print "dfdx - kaiseki_kai (except boundary): "
|
275
|
+
print err, "\t", diff.max,"\n"
|
276
|
+
print "**** check attribute ****\n"
|
277
|
+
show_attr(gp, deriv)
|
278
|
+
end
|
279
|
+
|
280
|
+
## main routine of test ---------------------------------------------
|
281
|
+
|
282
|
+
[0, "lon"].each do |dim|
|
283
|
+
print "************** dim.type === #{dim.class} **************\n"
|
284
|
+
|
285
|
+
print "**** equally spaced grid ****\n"
|
286
|
+
er1 = test1( gen_x(11), dim )
|
287
|
+
er2 = test1( gen_x(21), dim )
|
288
|
+
print "error change from nx=11->21: ", er2/er1,"\n"
|
289
|
+
|
290
|
+
print "**** equally spaced grid (2nd order) ****\n"
|
291
|
+
er1 = test2( gen_x(11), dim )
|
292
|
+
er2 = test2( gen_x(21), dim )
|
293
|
+
print "error change from nx=11->21: ", er2/er1,"\n"
|
294
|
+
|
295
|
+
print "**** non-uniform grid ****\n"
|
296
|
+
p 'x(11):',gen_z2(11),'x(21):',gen_z2(21)
|
297
|
+
er1 = test1( gen_z2(11), dim )
|
298
|
+
er2 = test1( gen_z2(21), dim )
|
299
|
+
print "error change from nx=11->21: ", er2/er1,"\n"
|
300
|
+
|
301
|
+
print "**** non-uniform grid (2nd order) ****\n"
|
302
|
+
er1 = test2( gen_z2(11), dim )
|
303
|
+
er2 = test2( gen_z2(21), dim )
|
304
|
+
print "error change from nx=11->21: ", er2/er1,"\n"
|
305
|
+
|
306
|
+
end
|
307
|
+
|
308
|
+
print "************** multi-D *************\n"
|
309
|
+
print "******** dimname == 'lat' ********\n"
|
310
|
+
test4("lat")
|
311
|
+
print "******** dim == -1(z) ********\n"
|
312
|
+
test4(-1)
|
313
|
+
|
314
|
+
end
|