-
Notifications
You must be signed in to change notification settings - Fork 0
/
LoopGeophysicalModels.h
54 lines (47 loc) · 2.18 KB
/
LoopGeophysicalModels.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#ifndef __LOOPGEOPHYSICALMODELS_H
#define __LOOPGEOPHYSICALMODELS_H
#include "LoopProjectFileUtils.h"
#include "LoopExtents.h"
namespace LoopProjectFile {
namespace GeophysicalModels {
/*!
* \brief Checks the structure of the given netCDF root node for the
* geophysical models and checks that the dimensions within that structure match the project file
* extent attributes.
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param xyzGridSize - the size of each dimension for the data (x=easting, y=northing, z=depth)
* \param verbose - a flag to toggle verbose message printing
*
* \return A flag indicating whether the netCDF file is valid for geophysical structure and dimension sizes
*/
bool CheckGeophysicalModelsValid(netCDF::NcGroup* rootNode, std::vector<int> xyzGridSize, bool verbose=false);
/*!
* \brief Adds or overrides geophysical model data into the loop project file at a
* specific index location
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param data - the data to add
* \param dataShape - the dimensions of the data being added
* \param index - the index location for the data
* \param verbose - a flag to toggle verbose message printing
*
* \return Response with success/fail of data insert with error message if it failed
*/
LoopProjectFileResponse SetGeophysicalModel(netCDF::NcGroup* rootNode, std::vector<float> data, std::vector<int> dataShape, unsigned int index=0, bool verbose=false);
/*!
* \brief Retrieves geophysical model data from the loop project file at a
* specific index location
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param data - a reference to where the data is to be copied
* \param dataShape - the dimensions of the data being retrieved
* \param index - the index location for the data
* \param verbose - a flag to toggle verbose message printing
*
* \return Response with success/fail of data retrieval with error message if it failed
*/
LoopProjectFileResponse GetGeophysicalModel(netCDF::NcGroup* rootNode, std::vector<float>& data, std::vector<int>& dataShape, unsigned int index=0, bool verbose=false);
} // namespace GeophysicalModels
} // namespace LoopProjectFile
#endif