Sha256: 7f5a3d1134852cdb63e0462a276c07a7b5fce08775240a1ac22555065b8d8500
Contents?: true
Size: 807 Bytes
Versions: 7
Compression:
Stored size: 807 Bytes
Contents
require "numru/gphys/gphys" require "numru/gphys/gphys_io" require "test/unit" include NumRu class GPhysTest < Test::Unit::TestCase def setup begin @T = GPhys::IO.open("testdata/T.jan.nc","T") # NetCDF data @Tgd = GPhys::IO.open("testdata/T.jan.ctl","T") # GrADS data rescue NetcdfSyserr @T = GPhys::IO.open("../testdata/T.jan.nc","T") # NetCDF data @Tgd = GPhys::IO.open("../testdata/T.jan.ctl","T") # GrADS data end end def test_cyclic_ext te = @T.cyclic_ext(0) assert_equal( te.shape[0], @T.shape[0]+1 ) # to make sure it is extened assert_equal( te.axis(0).pos.max.to_f, 360.0 ) # to make sure it is extened te = @Tgd.cyclic_ext(0) assert_equal( te.axis(0).pos.max.to_f, 360.0 ) # to make sure it is extened end end
Version data entries
7 entries across 7 versions & 1 rubygems