Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.
This repository was archived by the owner on May 20, 2024. It is now read-only.

File name with relative path and new test (writeFile + distFile) #6

@grapp1

Description

@grapp1

I've had issues with running the following excerpt of code, which was due to providing a relative path instead of the absolute path for file_to_write. We thought that this may be a useful test for calling writeFile and distFile consecutively.

import numpy as np
from parflowio.pyParflowio import PFData

file_to_write = './Flow_Barrier_X.pfb'

p = 1
q = 1
r = 1

FBx_data = np.full((20, 20, 20), 1.0)

for i in range(20):
    for j in range(20):
        FBx_data[i, j, 9] = 0.001

FBx_data_pfb = PFData(FBx_data)
FBx_data_pfb.writeFile(file_to_write)
FBx_data_pfb.close()
pfb_data = PFData(file_to_write)
pfb_data.distFile(p, q, r, file_to_write)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions