readme and path

This commit is contained in:
robin 2024-04-18 13:42:31 +02:00
parent 2443d96733
commit 4c2dfa8e2b
2 changed files with 22 additions and 1 deletions

21
opening-hdf5/README.md Normal file
View File

@ -0,0 +1,21 @@
## Location of data
The data path is hardcoded such that the following tree structure is assumed:
```
data/
grid.h5
hydrodynamic_U.h5
hydrodynamic_V.h5
interactive-track-and-trace/
opening-hdf5/
...
```
## Compiling
Makes use of `mdspan` which is not supported by GCC libstdc++ at time of writing. See [compiler support](https://en.cppreference.com/w/cpp/compiler_support/23) for `mdspan`.
Let the current directory be the `src` directory. Run:
```shell
mkdir build
cd build
cmake ..
make
```

View File

@ -85,7 +85,7 @@ pair<vector<T>, std::dextents<std::size_t, 3>> get3DMat(NcVar var) {
}
int main () {
netCDF::NcFile data("../../../hdf5/hydrodynamic_U.h5", netCDF::NcFile::read);
netCDF::NcFile data("../../../../data/hydrodynamic_U.h5", netCDF::NcFile::read);
multimap< string, NcVar > vars = data.getVars();