Skip to content

Commit a6838e6

Browse files
committed
Add test for Paulines input data
1 parent daba3f0 commit a6838e6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

python/test/test_cdo.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,18 @@ def test_input_chain(self):
10471047
input = "-setname,tmax -setctomiss,-999.99 -input,{} tmax.nc < ".format(gridfile),
10481048
output = inputfile)
10491049

1050+
def test_pauline(self):
1051+
ifile='/home/ram/local/data/cdo/pauline.nc'
1052+
cdo = Cdo()
1053+
(var,) = cdo.showname(input=ifile)
1054+
x = cdo.selyear('1985/2100', input=ifile, returnXArray=var)
1055+
print(x)
1056+
self.assertEqual((4018, 7, 5),x[:,:,:].shape)
1057+
y = cdo.yearsum(input=x, returnXArray=var)
1058+
print(y)
1059+
self.assertEqual((11, 7, 5),y[:,:,:].shape)
1060+
1061+
10501062
#===============================================================================
10511063
if __name__ == '__main__':
10521064
suite = testLoader.loadTestsFromTestCase(CdoTest)

0 commit comments

Comments
 (0)