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

feat(grb): add binary grid file reader, support grid file in fmi (WIP) #2153

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Jan 20, 2025

Introduce a GridFileReader module with ability to load variables from a binary grid file. Use this from fmi packages, if a new GWFGRID entry is provided in fmi package data, to facilitate an identical check to that introduced in #2149 for exchanges.

This module generalizes the approach in grb.f90 and replaces that module. The converter can use the new module.

The tentative idea is to make the grid file optional for fmi for some time, then begin to require it, in the interest of catching user errors. At which point the GridFileReader could be modified to load the entire discretization, and we can do a robust grid comparison as discussed in #2149. For now, the reader loads headers and builds an index of the file at init time, after which variables can be read as necessary.


Checklist of items for pull request

  • Replaced section above with description of pull request
  • Added new test or modified an existing test
  • Formatted new and modified Fortran source files with fprettify
  • Added doxygen comments to new and modified procedures
  • Updated meson files, makefiles, and Visual Studio project files for new source files
  • Updated definition files
  • Updated develop.tex with a plain-language description of the bug fix, change, feature; required for changes that may affect users
  • Updated input and output guide
  • Removed checklist items not relevant to this pull request

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