testLib.rb 289 Bytes
Newer Older
Ralf Mueller's avatar
Ralf Mueller committed
1
require './CdiLib'
Uwe Schulzweida's avatar
Uwe Schulzweida committed
2
3
4
5
6
7
8
9
10
11
include CdiLib
ifile = ARGV[0].nil? ? "../testdata/mulval.nc" : ARGV[0]
streamID = streamOpenRead(ifile)
vlistID  = streamInqVlist(streamID)
nvars    = vlistNvars(vlistID)
(0...nvars).each {|i|
  print vlistInqVarCode(vlistID, i).to_s + ' '
}
puts
streamClose(streamID)