def to3dim_csv(): var = ncf.variables['H2O'] #e.g. data for 'H2O' values one,two,three = var.shape...(time,lat,lon) if crit is not None: bool1 = foo(dim1,crit,ncf) #boolean table: ("value important?...,TRUE,FALSE) bool2 = foo(dim2,crit,ncf) bool3 = foo(dim3,crit,ncf) writer.writerow([dim1,dim2,...three): if bool1[i] and bool2[k] and bool3[l]: writer.writerow([ ncf.variables...[dim1][i], ncf.variables[dim2][k], ncf.variables[dim3][