Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Dfsu #657

Merged
merged 21 commits into from
Mar 1, 2024
Merged

Simplify Dfsu #657

merged 21 commits into from
Mar 1, 2024

Conversation

ecomodeller
Copy link
Member

@ecomodeller ecomodeller commented Feb 29, 2024

This remove

  • Dfsu.write
  • Dfsu.append

I.e. the ability to open a Dfsu file and then append data.

Suggested workflow for files larger than memory is:

  1. Use mikecore to append to an existing file, e.g:
  dfs = DfsFileFactory.DfsGenericOpenEdit(fp)
  n_items = len(dfs.ItemInfo)
  n_elements = dfs.ItemInfo[0].ElementCount

  for _ in range(nt):
      for _ in range(n_items):
          data = np.random.random(size=n_elements).astype(
              np.float32
          )  # Replace with actual data
          dfs.WriteItemTimeStepNext(0.0, data)
  dfs.Close()
  1. mikeio.generic.concat

@ecomodeller ecomodeller marked this pull request as ready for review March 1, 2024 07:39
@ecomodeller ecomodeller merged commit fca91b1 into main Mar 1, 2024
6 checks passed
@ecomodeller ecomodeller deleted the dfsu-oop branch March 1, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant