for dst in xrange(dst_size): srcs = src_address[dst,:] invmat = remap_matrix[dst,:,:] wfs = np.dot(invmat, src_f[srcs]) dst_f[dst] = fsum(wfs) #---------------------------------------------------------- # Standard errors #---------------------------------------------------------- ref_dst_f = np.zeros_like(dst_f) for i, (lat,lon) in enumerate(dst_obj.latlons): ref_dst_f[i] = testfunc(lat, lon) L1, L2, Linf = sem_1_2_inf(ref_dst_f, dst_f) print '' print 'L1= %e'%L1 print 'L2= %e'%L2 print 'Linf= %e'%Linf #---------------------------------------------------------- # Plot with vtk #---------------------------------------------------------- ''' print '' print 'Generate VTK file' vtk_dir = '/nas/scteam/VisIt_data/remap/'
def print_standard_errors(var1, var2): L1, L2, Linf = sem_1_2_inf(var1, var2) print '\tL1= %e'%L1 print '\tL2= %e'%L2 print '\tLinf= %e'%Linf