Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
cdo
Commits
7d9b69a0
Commit
7d9b69a0
authored
13 years ago
by
Ralf Mueller
Browse files
Options
Downloads
Patches
Plain Diff
cdo.{rb,py} release 1.0.3
parent
219587f8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
contrib/python/setup.py
+1
-1
1 addition, 1 deletion
contrib/python/setup.py
contrib/ruby/ChangeLog
+3
-1
3 additions, 1 deletion
contrib/ruby/ChangeLog
contrib/ruby/gemspec
+1
-1
1 addition, 1 deletion
contrib/ruby/gemspec
contrib/ruby/lib/cdo.rb
+9
-4
9 additions, 4 deletions
contrib/ruby/lib/cdo.rb
with
14 additions
and
7 deletions
contrib/python/setup.py
+
1
−
1
View file @
7d9b69a0
...
...
@@ -2,7 +2,7 @@
from
setuptools
import
setup
setup
(
name
=
'
cdo
'
,
version
=
'
1.0.
2
'
,
version
=
'
1.0.
3
'
,
author
=
"
Ralf Mueller
"
,
author_email
=
"
stark.dreamdetective@gmail.com
"
,
license
=
"
GPLv2
"
,
...
...
This diff is collapsed.
Click to expand it.
contrib/ruby/ChangeLog
+
3
−
1
View file @
7d9b69a0
1.0.0 2011-12-14: initial version
1.0.1 2011-12-15: bugix release
1.0.2 2012-01-11: return NetCDF/NArray (optional)
1.0.3
: bugfix for NArray return values
1.0.3
2012-01-17
: bugfix for NArray return values
remove chainCall method - can be replaced by setting :in
speed up by reuse operator list instead of computing it
every time
This diff is collapsed.
Click to expand it.
contrib/ruby/gemspec
+
1
−
1
View file @
7d9b69a0
...
...
@@ -2,7 +2,7 @@ require 'rubygems'
spec
=
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
"cdo"
s
.
version
=
'1.0.
2
'
s
.
version
=
'1.0.
3
'
s
.
platform
=
Gem
::
Platform
::
RUBY
s
.
files
=
[
"lib/cdo.rb"
]
+
[
"gemspec"
,
"COPYING"
,
"README.rdoc"
,
"ChangeLog"
]
s
.
test_file
=
"test/test_cdo.rb"
...
...
This diff is collapsed.
Click to expand it.
contrib/ruby/lib/cdo.rb
+
9
−
4
View file @
7d9b69a0
...
...
@@ -16,8 +16,9 @@ require 'pp'
# CDO calling mechnism
module
Cdo
State
=
{
:debug
=>
false
,
:returnArray
=>
false
:debug
=>
false
,
:returnArray
=>
false
,
:operators
=>
[]
}
@@CDO
=
ENV
[
'CDO'
].
nil?
?
'/usr/bin/cdo'
:
ENV
[
'CDO'
]
...
...
@@ -117,9 +118,13 @@ module Cdo
def
Cdo
.
setCdo
(
cdo
)
puts
"Will use
#{
cdo
}
instead of
#@@CDO
"
if
Cdo
.
debug
@@CDO
=
cdo
Cdo
.
getOperators
(
true
)
end
def
Cdo
.
getOperators
def
Cdo
.
getOperators
(
force
=
false
)
# Do NOT compute anything, if it is not required
return
State
[
:operators
]
unless
(
State
[
:operators
].
empty?
or
force
)
cmd
=
@@CDO
+
' 2>&1'
help
=
IO
.
popen
(
cmd
).
readlines
.
map
{
|
l
|
l
.
chomp
.
lstrip
}
if
5
>=
help
.
size
...
...
@@ -127,7 +132,7 @@ module Cdo
pp
help
if
Cdo
.
debug
exit
end
(
help
[
help
.
index
(
"Operators:"
)
+
1
].
split
+
@@undocumentedOperators
).
uniq
State
[
:operators
]
=
(
help
[
help
.
index
(
"Operators:"
)
+
1
].
split
+
@@undocumentedOperators
).
uniq
end
def
Cdo
.
method_missing
(
sym
,
*
args
,
&
block
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment