FireDynamics / fdsreader

Python reader for FDS data
GNU General Public License v3.0
44 stars 18 forks source link

Slice Masking not working due to shape difference #57

Closed C-Rogge closed 1 year ago

C-Rogge commented 1 year ago

Another one:

When trying to mask a slice with _toglobal(masked=True, fill=np.nan) an error occurs which reads as follows:

ValueError: operands could not be broadcast together with shapes (901,41,41,1) (901,40,40,1) ()

...located in line 618 of slice.py (_slc_data = np.where(mask, slcdata, fill)).

I tried some other simulations with the same result (just differing dimensions, like (144,1,25,40) (144,1,24,39) or (601,79,35,1) (601,78,34,1)). In a 4th simulation it worked without problems, but i dont really know why. The three simulations i tested while throwing the error dont relate to each other in any way, but somehow the reader seems to get the obstruction mask messed up by one x- and y-cell (at least thats what i would read off that error).

Ideas?

lu-kas commented 1 year ago

Could you please create / provide a small FDS input file which leads to the differences? This will make debugging easier. Thanks!

r-wrobel commented 1 year ago

Could be the problem solved in #48 (Mask size not changed: cell centered vs. non cell centered slices).

C-Rogge commented 1 year ago

@r-wrobel It seems to be just that, thanks for the hint. @lu-kas For your interest: fdsreaderTestcase5.fds.txt shows the behavior described by @r-wrobel, although already mentioned in the issue linked above. I'll close this thread then.