flopy icon indicating copy to clipboard operation
flopy copied to clipboard

VTU scallars are distorted

Open oscarfasanchez opened this issue 3 years ago • 1 comments

Hello, I'm exporting a VTU file of heads using the following code

    vtkobj = vtk.Vtk(gwf, xml=True, pvd=True, vertical_exageration=1, point_scalars=True)
    vtkobj.add_heads(hds, kstpkper=kstpkper, masked_values=masked_values)
    vtkobj.write(os.path.join(pv_folder, "heads_output_test", "heads_scal.vtu"))

but I noticed that the data was distorted in the boundaries, I think scalars were interpolated with nan values(assuming nan as zeros I guess)

cells image

scallars points image

oscarfasanchez avatar Jul 25 '22 16:07 oscarfasanchez

@oscarfasanchez

I'll take a look at this issue.

jlarsen-usgs avatar Jul 26 '22 16:07 jlarsen-usgs

@oscarfasanchez

Just opened a pull request that fixes errant interpolation for point scalars. The issue was with checking cellids to assure that they are 1) in the active domain and 2) not a user supplied masked_value

jlarsen-usgs avatar Oct 20 '22 22:10 jlarsen-usgs