Skip to content

Loading 2d slice files unzipped vs zipped #6

@fgi21

Description

@fgi21

Hi,

Many thanks for developing this highly useful tool.

I've noticed a small issue that occurs if I attempt to load the fds results into python from an unzipped folder i.e
"address_results = r'\file\Usersf$\xxx\Home\Desktop\Level_Set_2D/'
grid, data, times = fds.readSLCF2Ddata('Level_Set_2D', address_results, 'TEMPERATURE')"

The code will run for a bit and then output the following error message:
"2-D slice: \file\Usersf$\xxx\Home\Desktop\Level_Set_2D\Level_Set_2D_10_37.sf
2-D slice: \file\Usersf$\xxx\Home\Desktop\Level_Set_2D\Level_Set_2D_10_25.sf
Traceback (most recent call last):

Cell In[17], line 3
grid, data, times = fds.readSLCF2Ddata('Level_Set_2D', address_results, 'TEMPERATURE') ## (File name (chid), file directory, Information request)

File C:\Program Files\Anaconda3\lib\site-packages\pyfdstools\extractPlot3Ddata.py:963 in readSLCF2Ddata
tInd = grids[list(grids.keys())[0]]['datas2D'][0].shape[3]

IndexError: list index out of range"

However, if I zip the file updating the directory '"address_results = r'\file\Usersf$\xxx\Home\Desktop\Level_Set_2D.zip' it runs without a single issue, loading the data.

Any idea why this happens? I can't see what is possibly causing this as the unzipped folder will have the the exact same contents as the zip file. Admittedly, this is a minor problem that I've come across. I only ask as I've noticed this error persists with much larger simulations in which the zipping of the folder can add alot of additional time.

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions