iconPlot 0.0.1
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.
- data/contrib/nclsh +276 -0
- data/gemspec +19 -0
- data/lib/iconPlot.rb +68 -0
- data/lib/icon_plot.ncl +653 -0
- data/lib/icon_plot_lib.ncl +1687 -0
- data/test/test_iconPlot.rb +33 -0
- metadata +52 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),"..","lib")
|
2
|
+
require "test/unit"
|
3
|
+
require "iconPlot"
|
4
|
+
|
5
|
+
class TestIconPlot < Test::Unit::TestCase
|
6
|
+
|
7
|
+
CALLER = "/home/ram/src/git/icon/scripts/postprocessing/tools/contrib/nclsh"
|
8
|
+
PLOTTER= "/home/ram/src/git/icon/scripts/postprocessing/tools/icon_plot.ncl"
|
9
|
+
PLOTLIB = "/home/ram/src/git/icon/scripts/postprocessing/tools"
|
10
|
+
LS = 'ls -crtlh'
|
11
|
+
OCE_PLOT_TEST_FILE = ENV['HOME']+'/data/icon/oce.nc'
|
12
|
+
ATM_PLOT_TEST_FILE = ENV['HOME']+'/data/icon/atm.nc'
|
13
|
+
OCE_REGPLOT_TEST_FILE = ENV['HOME']+'/data/icon/regular_oce.nc' #remapnn,r180x90
|
14
|
+
ATM_REGPLOT_TEST_FILE = ENV['HOME']+'/data/icon/regular_atm.nc' #remapnn,n63 (no sections), r180x90 (with sections)
|
15
|
+
OFMT = 'png'
|
16
|
+
PLOT_CMD = 'sxiv'
|
17
|
+
CDO = ENV['CDO'].nil? ? 'cdo' : ENV['CDO']
|
18
|
+
if 'thingol' == `hostname`.chomp
|
19
|
+
def test_simple
|
20
|
+
ip = IconPlot.new(CALLER,PLOTTER,PLOTLIB,OFMT,PLOT_CMD,CDO,true)
|
21
|
+
ofile = 'test_icon_plot'
|
22
|
+
ip.show(ip.scalarPlot(OCE_PLOT_TEST_FILE,ofile,"T",:levIndex => 0))
|
23
|
+
ip.show(ip.scalarPlot(OCE_PLOT_TEST_FILE,ofile,"T",:levIndex => 2))
|
24
|
+
ip.show(ip.vectorPlot(OCE_PLOT_TEST_FILE,ofile,"u-veloc v-veloc",:levIndex => 2))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
def test_defaults
|
28
|
+
p = IconPlot.new
|
29
|
+
assert_includes(p.caller.split(File::SEPARATOR),'gems')
|
30
|
+
assert_includes(p.plotter.split(File::SEPARATOR),'gems')
|
31
|
+
assert_includes(p.libdir.split(File::SEPARATOR),'gems')
|
32
|
+
end
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: iconPlot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Ralf Mueller
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-05-22 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: ! 'Plot with ncl via Ruby: requires NCL 6.* and CDO 1.5.*'
|
15
|
+
email: stark.dreamdetective@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/iconPlot.rb
|
21
|
+
- gemspec
|
22
|
+
- contrib/nclsh
|
23
|
+
- lib/icon_plot_lib.ncl
|
24
|
+
- lib/icon_plot.ncl
|
25
|
+
- test/test_iconPlot.rb
|
26
|
+
homepage: https://github.com/Try2Code/iconPlot
|
27
|
+
licenses:
|
28
|
+
- GPLv2
|
29
|
+
post_install_message:
|
30
|
+
rdoc_options: []
|
31
|
+
require_paths:
|
32
|
+
- lib
|
33
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '1.8'
|
39
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ! '>='
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
requirements: []
|
46
|
+
rubyforge_project:
|
47
|
+
rubygems_version: 1.8.17
|
48
|
+
signing_key:
|
49
|
+
specification_version: 3
|
50
|
+
summary: Plot ICON output with ncl via Ruby
|
51
|
+
test_files:
|
52
|
+
- test/test_iconPlot.rb
|