Real number¶
Definition¶
1<Item name="roughness" caption="Roughness">
2 <Definition valueType="real" position="cell" />
3</Item>
Display example¶
Example code to read data¶
FORTRAN¶
1integer:: ier, cellcount
2double precision, dimension(:), allocatable:: roughness
3
4! Read size
5call cg_iRIC_Read_Grid_CellCount(fid, cellcount, ier)
6! Allocate memory
7allocate(roughness(cellcount))
8! Load values into the allocated memory
9call cg_iRIC_Read_Grid_Real_Cell(fid, "roughness", roughness, ier)
C/C++¶
1int ier, cellcount;
2std::vector<double> roughness;
3
4// Read size
5ier = cg_iRIC_Read_Grid_CellCount(fid, &cellcount);
6// Allocate memory
7roughness.assign(cellcout, 0);
8// Load values into the allocated memory
9ier = cg_iRIC_Read_Grid_Real_Cell(fid, "roughness", roughness.data());
Python¶
1roughness = cg_iRIC_Read_Grid_Real_Cell(fid, "roughness")