def test_read_grid(self): FD = conv.read_grid(self.H, time_ret=0, nspec_ret=0) fdkeys = sorted([k for k in FD.keys() if type(k) is str]) assert fdkeys == ['grid_dates', 'options'] fdkeys_ = sorted(FD[(0, self.H.available_dates[0])].keys()) assert fdkeys_ == fd_keys
H = conv.Header(rf.datasets['Fwd1_V9.02']) print H.keys() print "Calling fill_backward():" H.fill_backward(nspec=(0,)) # H.C should be available by now print "H.C.keys():" print H.C[(0,2)].keys() # H.FD should be available by now print "H.FD.keys():" print H.FD[(0, '20070121220000')].keys() print "Calling read_grid():" FD = conv.read_grid(H, time_ret=0,nspec_ret=0) T = conv.read_trajectories(H) print "T.keys():" print T.keys() # Backward Runs # H = conv.Header(rf.datasets['Bwd1_V9.02']) print H.keys() print "Calling fill_backward():" H.fill_backward(nspec=(0,)) # H.C should be available by now print "H.C.keys():"
def test_read_grid(self): FD = conv.read_grid(self.H, time_ret=0, nspec_ret=0) fdkeys = sorted(FD.keys()) assert fdkeys == ['grid_dates', 'options', (0, '20070121100000')] fdkeys_ = sorted(FD[(0, '20070121100000')].keys()) assert fdkeys_ == fd_keys