readme and path
This commit is contained in:
parent
2443d96733
commit
4c2dfa8e2b
|
|
@ -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
|
||||||
|
```
|
||||||
|
|
@ -85,7 +85,7 @@ pair<vector<T>, std::dextents<std::size_t, 3>> get3DMat(NcVar var) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main () {
|
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();
|
multimap< string, NcVar > vars = data.getVars();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue