Real number¶
Definition¶
1<Output name="depth" caption="Depth">
2 <Definition valueType="real" position="node" />
3</Output>
Example code to output data¶
FORTRAN¶
1double precision, dimension(:), allocatable:: depth
2
3! Allocate memory
4allocate(depth(nodecount))
5! Write data to memory
6depth = 0
7! Output data
8call cg_iRIC_Write_Sol_Node_Real(fid, "depth", depth, ier)
C/C++¶
1std::vector<double> depth;
2
3! Allocate memory
4depth.assign(nodecount, 0);
5! Output data
6ier = cg_iRIC_Write_Sol_Node_Real(fid, "depth", depth.data())
Python¶
1import numpy
2
3# Allocate memory
4depth = numpy.zeros(shape=(nodecount,))
5# Output data
6cg_iRIC_Write_Sol_Node_Real(fid, "depth", depth)