WData format supports three data types:
- real
- complex
- vectors
Each of which can be saved with single (float in C notation) or double (double in C notation) precision. See example-write.c how one can create a variable:
wdata_variable vdensity_a = {"density_a", "real8", "none", "wdat"};
Here, real8
denotes the double-precision (default), if one wants to save a space and store variables in single-precision one should change it to real4
.
If there is a complex
number one wants to store then in order to add:
wdata_variable vdelta = {"delta", "complex8", "none", "wdat"};
here, complex8
denotes the double-precision (default).
Similar syntax is used in vector
s variable:
wdata_variable vcurrent_a = {"current_a", "vector8", "none", "wdat"};
here each element of a vector (number of elements depends on the datadim) is a double-precision, real8
number.