DfsIO
Typedefs | Enumerations | Functions
dfsio.h File Reference

DFS file routines, C API. More...

#include <windows.h>
#include "mztypes.h"
#include "ufs.h"
#include "ufscommon.h"
#include "m0dll.h"

Go to the source code of this file.

Typedefs

typedef ufsErrors FioErrors
 
typedef ufsSimpleType SimpleType
 
typedef LONG(m0CABA * FErrorHandlerT) (void *headptr, void *fileptr, void *vectorptr, FioErrors ioError, LPCTSTR src_file, int line)
 

Enumerations

enum  FileType {
  F_UNDEFINED_FILE_TYPE = 0 , F_EQTIME_FIXEDSPACE_ALLITEMS = 0x1 , F_EQTIME_TVARSPACE_ALLITEMS = 0x2 , F_NEQTIME_FIXEDSPACE_ALLITEMS = 0x4 ,
  F_NEQTIME_FIXEDSPACE_VARITEMS = 0x8 , F_NEQTIME_TVARSPACE_VARITEMS = 0x10
}
 
enum  StatType { F_UNDEFINED_STAT_TYPE = 0 , F_NO_STAT , F_REGULAR_STAT , F_LARGEVAL_STAT }
 Statistical values types.
 
enum  DataValueType {
  F_INSTANTANEOUS = 0 , F_ACCUMULATED , F_STEP_ACCUMULATED , F_MEAN_STEP_ACCUMULATED ,
  F_REV_MEAN_STEP_ACCUMULATED
}
 Type of data value to specify how each value is to be interpreted between two time step values.. More...
 
enum  TimeAxisType {
  F_UNDEFINED_TAXIS = 0 , F_TM_EQ_AXIS , F_TM_NEQ_AXIS , F_CAL_EQ_AXIS ,
  F_CAL_NEQ_AXIS
}
 Defines the regularity of the time axis used for the time series data. When the data is uniformly distributed in time, the axis is equidistant, otherwise non-equidistant. It also considers whether the time axis is related to a calendar reference, or an absolute zero reference. More...
 
enum  SpaceAxisType {
  F_UNDEFINED_SAXIS = 0 , F_EQ_AXIS_D0 , F_EQ_AXIS_D1 , F_NEQ_AXIS_D1 ,
  F_TVAR_AXIS_D1 , F_EQ_AXIS_D2 , F_NEQ_AXIS_D2 , F_TVAR_AXIS_D2 ,
  F_EQ_AXIS_D3 , F_NEQ_AXIS_D3 , F_TVAR_AXIS_D3 , F_EQ_AXIS_D4 ,
  F_CURVE_LINEAR_AXIS_D2 , F_CURVE_LINEAR_AXIS_D3
}
 Defines the regularity of the space axis used for the time series data. When the data is uniformly distributed in space, the axis is equidistant, otherwise non-equidistant. This applies to either 1-2-3 or 4 dimensional time series data. More...
 
enum  GeoInfoType { F_UNDEFINED_GEOINFO = 0 , F_UTM_PROJECTION }
 Defines whether the geographical projection is defined as a UTM projection type, or in other case, as undefined projection. More...
 

Functions

m0LINK void m0IMEX dfsDebugOn (BOOL On)
 Switches on/off the possibility for online debugging. More...
 
m0LINK void m0IMEX dfsInitSystem ()
 Initializes the entire dfs system. More...
 
m0LINK void m0IMEX dfsAddErrorHandler (FioErrors ioError, FErrorHandlerT dfsErrorHandler)
 Adds an error handler for specific types of errors. More...
 
m0LINK void m0IMEX dfsAddCommonErrorHandler (FErrorHandlerT dfsErrorHandler)
 Adds a common error handler for all types of errors. More...
 
m0LINK LONG m0IMEX dfsHeaderCreate (FileType file_type, LPCTSTR title, LPCTSTR apptitle, LONG appverno, LONG no_of_items, StatType stat_type, LPHEAD *pdfs_rtn)
 Creates the appropriate data structures for the header associated with a file. More...
 
m0LINK LONG m0IMEX dfsHeaderDestroy (LPHEAD *pdfs_rtn)
 Frees the appropriate data structures for the header associated with a file. More...
 
m0LINK LONG m0IMEX dfsSetEncodeKey (LPHEAD pdfs, int *xkey, int *ykey, int *zkey, int nRecordSize)
 Sets the encoding key for compressing the dfs file. More...
 
m0LINK LONG m0IMEX dfsGetEncodeKey (LPHEAD pdfs, int *xkey, int *ykey, int *zkey)
 Gets the compression encoding key. More...
 
m0LINK LONG m0IMEX dfsGetEncodeKeySize (LPHEAD pdfs)
 Gets the compression encoding key size. More...
 
m0LINK LONG m0IMEX dfsIsFileCompressed (LPHEAD pdfs)
 Returns flag indicating if file is compressed. More...
 
m0LINK LONG m0IMEX dfsFileRead (LPCTSTR pathname, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
 Opens the file specified by pathname for reading, automatically reads the static header information and then returns a pointer to the header information pdfs_rtn and a pointer to the file fp_rtn. More...
 
m0LINK LONG m0IMEX dfsStreamRead (unsigned char *buffer, size_t bufferSize, FillBufferCallback callback, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
 Use buffer for reading data, and when read to end-of-buffer, the callback is used to fill the buffer with new data. More...
 
m0LINK LONG m0IMEX dfsFileCreate (LPCTSTR pathname, LPHEAD pdfs, LPFILE *fp_rtn)
 Creates a file specified by pathname for writing, automatically writes the static header information pointed to by pdfs and then returns a pointer to the file fp_rtn. More...
 
m0LINK LONG m0IMEX dfsFileCreateEx (LPCTSTR pathname, LPHEAD pdfs, LPFILE *fp_rtn, BOOL canRead)
 Creates a file specified by pathname for writing, automatically writes the static header information pointed to by pdfs and then returns a pointer to the file fp_rtn. More...
 
m0LINK LONG m0IMEX dfsStreamCreate (unsigned char *buffer, size_t bufferSize, WriteBufferCallback callback, LPHEAD pdfs, LPFILE *fp_rtn)
 Creates a file and writes it to stream. More...
 
m0LINK LONG m0IMEX dfsFileAppend (LPCTSTR pathname, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
 Opens the file specified by pathname for appending, automatically reads the static header information and then returns a pointer to the file fp_rtn and a pointer to the header information pdfs_rtn. More...
 
m0LINK LONG m0IMEX dfsFileEdit (LPCTSTR pathname, LPHEAD *pdfs_rtn, LPFILE *fp_rtn)
 Opens the file specified by pathname for editing, automatically reads the static header information and then returns a pointer to the file fp_rtn and a pointer to the header information pdfs_rtn. More...
 
m0LINK LONG m0IMEX dfsFileFlush (LPHEAD pdfs, LPFILE fp)
 Flushes the file specified by fp and updates the header information pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsFileFlushTimeStep (LPHEAD pdfs, LPFILE fp)
 Flushes the file specified by fp and updates the time step information in the header information pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsFileClose (LPHEAD pdfs, LPFILE *fp_rtn)
 Closes the file specified by fp_rtn and updates the header specified by pdfs. More...
 
m0LINK LONG m0IMEX dfsFileDelete (LPCTSTR pathname)
 Deletes the file, if it exists. More...
 
m0LINK LONG m0IMEX dfsEnablePlugin (const LPHEAD pdfs, const LPFILE fp)
 Enables the load of a plugin-dll and initializes it, if it's available. More...
 
m0LINK LONG m0IMEX dfsUnloadPlugin (LPHEAD pdfs)
 Unloads a DFS plugin. More...
 
m0LINK LONG m0IMEX dfsParamModifyTimes (LPHEAD pdfs, BOOL doModify)
 Sets the parameter deciding whether times stored in the dfs should be modified. Default is true. More...
 
m0LINK LONG m0IMEX dfsWriteStartBlockDynamic (LPHEAD pdfs, LPFILE fp)
 Writes a "start-of-dynamic-block" tag to the file, effectively ending the header part and the static part of the dfs file. More...
 
m0LINK LPCTSTR m0IMEX dfsGetAppTitle (LPHEAD pdfs)
 Retrieves the application title string of the data from the header structure. More...
 
m0LINK LONG m0IMEX dfsSetAppTitle (LPHEAD pdfs, LPCTSTR apptitle)
 Copies the string from the apptitle-text string to a corresponding field in the header structure pointed to by pdfs. dfsSetAppTitle automatically allocates sufficiently memory for storing strings of any length. More...
 
m0LINK LONG m0IMEX dfsGetAppVersionNo (LPHEAD pdfs)
 Retrieves the version number of the application from the header structure. More...
 
m0LINK LONG m0IMEX dfsSetAppVersionNo (LPHEAD pdfs, LONG appverno)
 Copies the application version number from the appverno to a corresponding field in the header structure pointed to by pdfs. More...
 
m0LINK LPCTSTR m0IMEX dfsGetFileTitle (LPHEAD pdfs)
 Retrieves the title string of the data from the header structure. More...
 
m0LINK LONG m0IMEX dfsSetFileTitle (LPHEAD pdfs, LPCTSTR title)
 Copies the string from the title-text string to a corresponding field in the header structure pointed to by pdfs. dfsSetFileTitle automatically allocates sufficiently memory for storing strings of any length. More...
 
m0LINK FileType m0IMEX dfsGetFileType (LPHEAD pdfs)
 Retrieves the file type of the file pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetVersionCurrent ()
 Retrieves the version number of the ufs-library that is currently being used. More...
 
m0LINK LONG m0IMEX dfsGetDataType (LPHEAD pdfs)
 Retrieves the tag-variable defining the type of data. More...
 
m0LINK LONG m0IMEX dfsSetDataType (LPHEAD pdfs, LONG data_type)
 Sets the tag-variable defining the type of data pointed to by pdfs.. More...
 
m0LINK char m0IMEX dfsGetDeleteValByte (LPHEAD pdfs)
 Retrieves the char-type delete value from the header structure pointed to by pdfs. More...
 
m0LINK double m0IMEX dfsGetDeleteValDouble (LPHEAD pdfs)
 Retrieves the double-type delete value from the header structure pointed to by pdfs. More...
 
m0LINK float m0IMEX dfsGetDeleteValFloat (LPHEAD pdfs)
 Retrieves the float-type delete value from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetDeleteValInt (LPHEAD pdfs)
 Retrieves the int-type delete value from the header structure pointed to by pdfs. More...
 
m0LINK ULONG m0IMEX dfsGetDeleteValUnsignedInt (LPHEAD pdfs)
 Retrieves the ULONG (unsigned int)-type delete value from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetDeleteValByte (LPHEAD pdfs, char cdel)
 Copies the char-delete value from cdel to a corresponding field in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetDeleteValDouble (LPHEAD pdfs, double ddel)
 Copies the double-delete value from ddel to a corresponding field in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetDeleteValFloat (LPHEAD pdfs, float fdel)
 Copies the float-delete value from fdel to a corresponding field in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetDeleteValInt (LPHEAD pdfs, LONG idel)
 Copies the LONG-delete value from idel to a corresponding field in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetDeleteValUnsignedInt (LPHEAD pdfs, ULONG udel)
 Copies the ULONG-delete value from udel to a corresponding field in the header structure pointed to by pdfs. More...
 
m0LINK GeoInfoType m0IMEX dfsGetGeoInfoType (LPHEAD pdfs)
 Retrieves the type of geographical information from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetGeoInfoUTMProj (LPHEAD pdfs, LPCTSTR *projection_id_rtn, double *lon0_rtn, double *lat0_rtn, double *orientation_rtn)
 Retrieves the geographical information for an UTM-projection. The longitude, latitude and orientation are all given in decimal degrees. More...
 
m0LINK LONG m0IMEX dfsSetGeoInfoUTMProj (LPHEAD pdfs, LPCTSTR projection_id, double lon0, double lat0, double orientation)
 Sets the type of projection to be UTM-projection, sets the zone and sets the longitude, latitude and orientation of the reference coordinate system. More...
 
m0LINK LONG m0IMEX dfsUpdateGeoInfoUTMProj (LPHEAD pdfs, LPCTSTR projection_id, double lon0, double lat0, double orientation)
 Updates the GeoInfo projection, sets the zone and sets the longitude, latitude and orientation of the reference coordinate system for an existing file. The existing file must have a projection. More...
 
m0LINK LONG m0IMEX dfsSetGeoInfoUndefined (LPHEAD pdfs)
 Sets the type of projection to be undefined. If no geographical information is available or the projection type is unknown, this call should be used. More...
 
m0LINK TimeAxisType m0IMEX dfsGetTimeAxisType (LPHEAD pdfs)
 Retrieves the time axis type of the data set from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetNumberOfTimeSteps (LPHEAD pdfs, LONG n_number_of_time_steps)
 Sets explicitly the number of time steps in the header. More...
 
m0LINK LONG m0IMEX dfsSetTimeStartEnd (LPHEAD pdfs, double startTimeOffset, double timeSpan)
 Sets explicitly the time of the first data set and the time span of the data set in the header. More...
 
m0LINK LONG m0IMEX dfsGetEqTimeAxis (LPHEAD pdfs, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tstep_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
 Retrieves the description of an equidistant time axis from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetNeqTimeAxis (LPHEAD pdfs, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tspan_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
 Retrieves the description of a non equidistant time axis from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetEqTimeAxis (LPHEAD pdfs, LONG n_eum_unit, double tstart, double tstep, LONG tindex)
 Copies the description of an equidistant time axis to the corresponding fields in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetNeqTimeAxis (LPHEAD pdfs, LONG n_eum_unit, double tstart, LONG tindex)
 Copies the description of a non equidistant time axis to the corresponding fields in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetEqCalendarAxis (LPHEAD pdfs, LPCTSTR *start_date_rtn, LPCTSTR *start_time_rtn, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tstep_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
 Retrieves the description of an equidistant calendar axis from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetNeqCalendarAxis (LPHEAD pdfs, LPCTSTR *start_date_rtn, LPCTSTR *start_time_rtn, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, double *tstart_rtn, double *tspan_rtn, LONG *tnum_rtn, LONG *tindex_rtn)
 Retrieves the description of a non equidistant time axis from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetEqCalendarAxis (LPHEAD pdfs, LPCTSTR start_date, LPCTSTR start_time, LONG n_eum_unit, double tstart, double tstep, LONG tindex)
 Copies the description of an equidistant calendar axis to the corresponding fields in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsSetNeqCalendarAxis (LPHEAD pdfs, LPCTSTR start_date, LPCTSTR start_time, LONG n_eum_unit, double tstart, LONG tindex)
 Copies the description of a non equidistant calendar axis to the corresponding fields in the header structure pointed to by pdfs. More...
 
m0LINK LPITEM m0IMEX dfsItemD (LPHEAD pdfs, LONG item_no)
 Maps the item number item_no for the header structure pointed to by pdfs to a direct reference to the geometrical description of a dynamic item. More...
 
m0LINK LPITEM m0IMEX dfsItemS (LPVECTOR pvec)
 Maps a static vector to a direct reference to the geometrical description of the item (static and dynamic items have common germetrical description). More...
 
m0LINK LONG m0IMEX dfsGetNoOfItems (LPHEAD pdfs)
 Returns the number of dynamic items defined in the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsGetItemInfo_ (LPITEM item, LONG *item_type_rtn, LPCTSTR *name_rtn, LPCTSTR *unit_rtn, SimpleType *data_type_rtn)
 
m0LINK LONG m0IMEX dfsSetItemInfo_ (LPHEAD pdfs, LPITEM item, LONG item_type, LPCTSTR name, LPCTSTR unit, SimpleType data_type)
 
m0LINK LONG m0IMEX dfsSetItemUnitConversion (LPITEM item, UnitConvType nConvType, LONG nUnit)
 Sets the unit conversion for a specific item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisUnitConversion (LPITEM item, UnitConvType nConvType, LONG nUnit)
 Sets the unit conversion for the axis of a specific item. More...
 
m0LINK LONG m0IMEX dfsGetItemUnitConversion (LPITEM item, UnitConvType *nConvType_rtn, LONG *nUnit_rtn)
 Gets the unit conversion for a specific item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisUnitConversion (LPITEM item, UnitConvType *nConvType_rtn, LONG *nUnit_rtn)
 Gets the unit conversion for the axis of a specific item. More...
 
m0LINK LONG m0IMEX dfsGetItemValueType (LPITEM item, DataValueType *value_type)
 Gets the Data value type of the specified item. More...
 
m0LINK LONG m0IMEX dfsSetItemValueType (LPITEM item, DataValueType value_type)
 Sets the data value type for the specified item. More...
 
m0LINK LONG m0IMEX dfsGetItemInfo (LPITEM item, LONG *n_eum_item_type_rtn, LPCTSTR *t_eum_item_type_rtn, LPCTSTR *name_rtn, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, SimpleType *data_type_rtn)
 Retrieves the item information that are common for all items both dynamic and static and 0- to 3-dimensional as well as static and curvelinear items pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemInfo (LPHEAD pdfs, LPITEM item, LONG n_eum_item_type, LPCTSTR name, LONG n_eum_unit, SimpleType data_type)
 Copies the common item information to the item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsUpdateItemInfo (LPHEAD pdfs, LPITEM item, LONG n_eum_item_type, LPCTSTR name, LONG n_eum_unit)
 Updates the common item information of an item of an existing file. Item is pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsRqItemUnit_ (LPITEM item, LONG unit)
 
m0LINK LONG m0IMEX dfsGetAssocStatic (LPHEAD pdfs, LONG item_no, LONG staSeqNo, LONG *staItNo_rtn)
 Retrieves the index number of a static item associated with the dynamic item specified by item_no. More...
 
m0LINK LONG m0IMEX dfsSetAssocStatic (LPHEAD pdfs, LONG item_no, LONG staItNo)
 Associates a static item specified by staItNo with a dynamic item specified by item_no (establishes a link between the items). More...
 
m0LINK ULONG m0IMEX dfsGetNoAssocStatic (LPHEAD pdfs, LONG item_no)
 Retrieves the number of static items associated with the dynamic item specified by item_no. More...
 
m0LINK ULONG m0IMEX dfsGetItemElements (LPITEM item)
 Retrieves the number of elements for an item pointed to by It. More...
 
m0LINK ULONG m0IMEX dfsGetUsedItemElements (LPITEM item)
 Retrieves the number of actually used elements for an item pointed to by Item. More...
 
m0LINK ULONG m0IMEX dfsGetItemXYZSize (LPITEM item)
 Retrieves the number of actually used elements for an item pointed to by Item, in rectangular grids of 0, 1, 2, 3, and 4 dimensions. More...
 
m0LINK ULONG m0IMEX dfsGetItemXYSize (LPITEM item)
 Retrieves the number of horisontal elements, ie. in the plane X-Y for an item pointed to by Item, in rectangular grids of 0, 1, 2, 3, and 4 dimensions. More...
 
m0LINK ULONG m0IMEX dfsGetItemXSize (LPITEM item)
 Retrieves the number of elements in the X axis, for an item pointed to by Item, in rectangular grids of 0, 1, 2, 3, and 4 dimensions. More...
 
m0LINK ULONG m0IMEX dfsGetItemBytes (LPITEM item)
 Retrieves the number of bytes for an item pointed to by It. More...
 
m0LINK ULONG m0IMEX dfsGetUsedItemBytes (LPITEM item)
 Retrieves the number of packed bytes for an item pointed to by It. More...
 
m0LINK LONG m0IMEX dfsGetItemRefCoords (LPITEM item, float *x_rtn, float *y_rtn, float *z_rtn)
 Retrieves the origin of the reference coordinate system of a n-dimensional item pointed to by Item, static as well as dynamic, where 0 <= n <= 3. More...
 
m0LINK LONG m0IMEX dfsSetItemRefCoords (LPITEM item, float x, float y, float z)
 Sets the origin of the reference coordinate system of a n-dimensional item pointed to by Item, either static or dynamic, where 0 <= n <= 3. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisOrientation (LPITEM item, float *alpha_rtn, float *phi_rtn, float *theta_rtn)
 Retrieves the orientation of the reference coordinate system of a n-dimensional item pointed to by Item, static as well as dynamic, where 0 <= n <= 3. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisOrientation (LPITEM item, float alpha, float phi, float theta)
 Sets the orientation of the reference coordinate system of a n-dimensional item pointed to by Item, static as well as dynamic, where 0 <= n <= 3. More...
 
m0LINK LONG m0IMEX dfsGetItemStatsGlobal (LPITEM item, double *min_rtn, double *max_rtn, LONG *no_of_del_values_rtn)
 Retrieves the global statistical values of an individually selected item pointed to by Item. More...
 
m0LINK SpaceAxisType m0IMEX dfsGetItemAxisType (LPITEM item)
 Retrieves the spatial axis type of an individually selected item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemDim (LPITEM item)
 Retrieves the dimension of the spatial axis of an individually selected item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemGeometryType (LPITEM item)
 Retrieves the type of geometry type, according to the dimension of the spatial axis of an individually selected item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemGeometryUnit (LPITEM item)
 Retrieves the unit type of the spatial dimension of an individually selected item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisEqD0 (LPITEM item, LONG n_eum_unit)
 Sets the relative axis description of an individually selected 0-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisEqD0 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn)
 Retrieves the relative axis description of an individually selected 0-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisEqD1 (LPITEM item, LONG n_eum_unit, LONG j, float x0, float dx)
 Sets the relative axis description of an individually selected 1-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisEqD1 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, float *x0_rtn, float *dx_rtn)
 Retrieves the relative axis description of an individually selected 1-dimensional equidistant item pointed to by item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisEqD2 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, float x0, float y0, float dx, float dy)
 Sets the relative axis description of an individually selected 2-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisEqD2 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, float *x0_rtn, float *y0_rtn, float *dx_rtn, float *dy_rtn)
 Retrieves the relative axis description of an individually selected 2-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisEqD3 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, float x0, float y0, float z0, float dx, float dy, float dz)
 Sets the relative axis description of an individually selected 3-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisEqD3 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, float *x0_rtn, float *y0_rtn, float *z0_rtn, float *dx_rtn, float *dy_rtn, float *dz_rtn)
 Retrieves the relative axis description of an individually selected 3-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisEqD4 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, LONG m, float x0, float y0, float z0, float f0, float dx, float dy, float dz, float df)
 Sets the relative axis description of an individually selected 4-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisEqD4 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, LONG *m_rtn, float *x0_rtn, float *y0_rtn, float *z0_rtn, float *f0_rtn, float *dx_rtn, float *dy_rtn, float *dz_rtn, float *df_rtn)
 Retrieves the relative axis description of an individually selected 4-dimensional equidistant item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisNeqD1 (LPITEM item, LONG n_eum_unit, LONG j, Coords *coords, BOOL coords_copy)
 Sets the relative axis description of an individually selected 1-dimensional curvelinear item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisNeqD1 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, Coords **coords_rtn)
 Retrieves the relative axis description of an individually selected 1-dimensional curvelinear item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisNeqD2 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, double *xcoords, double *ycoords, BOOL coords_copy)
 Sets the relative axis description of an individually selected 2-dimensional non equidistant but orthogonal item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisNeqD2 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, double **xcoords_rtn, double **ycoords_rtn)
 Retrieves the relative axis description of an individually selected 2-dimensional non equidistant but orthogonal item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisNeqD3 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, double *xcoords, double *ycoords, double *zcoords, BOOL coords_copy)
 Sets the relative axis description of an individually selected 3-dimensional non equidistant but orthogonal item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisNeqD3 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, double **xcoords_rtn, double **ycoords_rtn, double **zcoords_rtn)
 Retrieves the relative axis description of an individually selected 3-dimensional non equidistant but orthogonal item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisCurveLinearD2 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, double *xcoords, double *ycoords, BOOL coords_copy)
 Sets the relative axis description of an individually selected 2-dimensional curvelinear item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisCurveLinearD2 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, double **xcoords_rtn, double **ycoords_rtn)
 Retrieves the relative axis description of an individually selected 2-dimensional curvelinear item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsSetItemAxisCurveLinearD3 (LPITEM item, LONG n_eum_unit, LONG j, LONG k, LONG l, double *xcoords, double *ycoords, double *zcoords, BOOL coords_copy)
 Sets the relative axis description of an individually selected 3-dimensional curvelinear item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsGetItemAxisCurveLinearD3 (LPITEM item, LONG *n_eum_unit_rtn, LPCTSTR *t_eum_unit_rtn, LONG *j_rtn, LONG *k_rtn, LONG *l_rtn, double **xcoords_rtn, double **ycoords_rtn, double **zcoords_rtn)
 Retrieves the relative axis description of an individually selected 3-dimensional curvelinear item pointed to by Item. More...
 
m0LINK LONG m0IMEX dfsIsItemCompressed (LPITEM item, LONG *n_rec_size_rtn)
 Determines whether the selected item is compressed in a MIKE 3 or a MIKE 21 compressed file. Item. More...
 
m0LINK void m0IMEX dfsItemEnableCompression (LPHEAD pdfs)
 Flags the header information structure of a file to enable compression of the file. More...
 
m0LINK StatType m0IMEX dfsGetItemStatsType (LPHEAD pdfs)
 retrieves the type of statistical values stored in the header part of the file pointed to by pdfs More...
 
m0LINK LONG m0IMEX dfsGetItemStats (LPHEAD pdfs, LONG item_no, LONG cOff, double *min_rtn, double *max_rtn, double *mean_rtn, double *st_dev_rtn, double *auto_corr_rtn, LONG *no_of_values_rtn, LONG *no_of_del_values_rtn, LONG *no_of_pairs_rtn)
 Retrieves the statistical description of an individually selected gridpoint of an individually selected n-dimensional item specified by item_no from the header structure pointed to by pdfs. More...
 
m0LINK LONG m0IMEX dfsAddCustomBlock (LPHEAD pdfs, SimpleType data_type, LPCTSTR name, LONG n_elements, void *data_ptr)
 adds a custom defined block of data to the file in form of an array. More...
 
m0LINK LONG m0IMEX dfsGetCustomBlockRef (LPHEAD pdfs, LPBLOCK *pBlock_rtn)
 retrieves a reference to the first custom defined block in a file if any blocks are found. More...
 
m0LINK LONG m0IMEX dfsGetCustomBlock (LPBLOCK pblock, SimpleType *data_type_rtn, LPCTSTR *name_rtn, LONG *n_elements_rtn, void **data_ptr_rtn, LPBLOCK *pNextBlock_rtn)
 retrieves the data of a custom defined block when a reference pblock is given. More...
 
m0LINK LPVECTOR m0IMEX dfsStaticRead (LPFILE fp, LONG *fioError)
 Reads a static vector from the file pointed to by fp. dfsStaticRead allocates the memory necessary to contain a complete description of a static vector. More...
 
m0LINK LONG m0IMEX dfsStaticSetHeader (LPHEAD pdfs, LPITEM item)
 Connects the header to the static item. This is required if the static item needs to be updated. More...
 
m0LINK LONG m0IMEX dfsStaticWrite (LPVECTOR pvec, LPFILE fp, void *data)
 Writes the static vector pointed to by pvec to the file pointed to by fp. More...
 
m0LINK LONG m0IMEX dfsStaticCreate (LPVECTOR *pvec_rtn)
 Creates the appropriate data structures for a new static vector. More...
 
m0LINK LONG m0IMEX dfsStaticDestroy (LPVECTOR *pvec_rtn)
 Frees the appropriate data structures for the static vector specified by pvec_rtn. The function is complementary to dfsStaticCreate. More...
 
m0LINK LONG m0IMEX dfsStaticGetData (LPVECTOR pvec, void *data)
 Retrieves the actual data from the static vector pointed to by pvec and copies them to the array specified by data. More...
 
m0LINK LONG m0IMEX dfsStaticSkip (LPFILE fp)
 Skips a static item and jumps to the next one. More...
 
m0LINK LONG m0IMEX dfsFindBlockStatic (LPHEAD pdfs, LPFILE fp)
 Sets the position of the file pointer fp to the beginning of the static vector (topography) block. More...
 
m0LINK LONG m0IMEX dfsFindBlockDynamic (LPHEAD pdfs, LPFILE fp)
 Sets the position of the file pointer fp to the beginning of the dynamic block, that is at the beginning of the first timestep. The function can be called any time when reading, writing or editing the file, provided that the static block is written completely. More...
 
m0LINK LONG m0IMEX dfsSkipItem (LPHEAD pdfs, LPFILE fp)
 Skips the time step of the next item in the file. More...
 
m0LINK LONG m0IMEX dfsSkipTimeStep (LPHEAD pdfs, LPFILE fp)
 Skips the entire time step containing all items stored consecutively in the time step. More...
 
m0LINK LONG m0IMEX dfsReadItemTimeStep (LPHEAD pdfs, LPFILE fp, double *time_rtn, void *dataptr_rtn)
 Reads the time step of the next item in the file. More...
 
m0LINK LONG m0IMEX dfsWriteItemTimeStep (LPHEAD pdfs, LPFILE fp, double time, void *dataptr)
 Writes the time step of the next item in the file. More...
 
m0LINK LONG m0IMEX dfsTruncateItemTimeStep (LPHEAD pdfs, LONG item_no, LONG ndigit, void *dataptr)
 Truncate the item data of a dfs file to a given number of digits. More...
 
m0LINK LONG m0IMEX dfsFindItemDynamic (LPHEAD pdfs, LPFILE fp, LONG tstep_no, LONG item_no)
 Positions the file pointer at the location in the file where the specified item at the specified time step starts. More...
 
m0LINK LONG m0IMEX dfsFindTimeStep (LPHEAD pdfs, LPFILE fp, LONG tstep_no)
 Positions the file pointer at the location in the file where the the specified time step starts. More...
 
m0LINK LONG m0IMEX dfsFindItemStatic (LPHEAD pdfs, LPFILE fp, LONG item_no)
 Positions the file pointer at the location in the file where the specified static item starts. More...
 
m0LINK LONG m0IMEX _dfsGetTimeAxisSpan (LPHEAD pdfs, LPFILE fp, double *tspan_rtn)
 

Detailed Description

DFS file routines, C API.

:

The DFS (Data File System) is used extensively within the MIKE Powered by DHI software. It is a binary data file format and it provides a general file format for handling spatially distributed and time dependent data. For details on the DFS file system, see http://docs.mikepoweredbydhi.com/core_libraries/dfs/dfs-file-system/

The API in this library allow the user to Open, create and edit all dfs type files: dfs0, dfs1, dfs2, dfs3, dfsu files. It allows creation and modification of static and dynamic items, temporal and spatial axes, their discretizations and corresponding units.

The API is a exported such that it is accessible from C/C++, Pascal/Delphi, Python and any other technology that can consume a C API.

Definition in file dfsio.h.

Typedef Documentation

◆ FErrorHandlerT

FErrorHandlerT

Callback function definition for a error handler callback, used in dfsAddCommonErrorHandler

Parameters
headptrDFS header
fileptrUFS file
vectorptrstatic vector
ioErrorError code to handle
src_fileSource file name
lineSource line no

Definition at line 96 of file dfsio.h.

◆ FioErrors

DFS error enum values:

Enumerator value description
F_NO_ERROR 0 No error,
F_END_OF_FILE 1 End of file was reached,
F_FAIL_DATA 1000 Failed reading/writing data from/to the file. File is corrupt, not a DFS file or handled incorrectly, or data is invalid
F_FAIL_ILLEGEAL_TSTEP 1001 The time step number is out of range
F_FAIL_ILLEGEAL_ITEM 1002 The item number is out of range
F_ERR_MALLOC 2000 Error allocating memory
F_ERR_READ 2001 Error reading file. Common reasons: File has zero size, file is open in write-only mode, disc is corrupt
F_ERR_WRITE 2002 Error writing data to disc. Common reasons: Disc is full, filename is invalid, not enough available memory (for write buffers)
F_ERR_OPEN 2003 Error opening file. Filename is invalid, or header could not be read (corrupt, or not a DFS file)
F_ERR_CLOSE 2004 Error closing file
F_ERR_FLUSH 2005 Error flushing data to disc. Disc/quota may be full
F_ERR_SEEK 2006 Error seeking in file. File has been truncated or disc is corrupt
F_ERR_ITEMNO 2007 An item number is out of range
F_ERR_INDEX 2008 An index number is out of range
F_ERR_DTYPE 2009 A data type does not match (internal error). File is most likely corrupt
F_ERR_DATA 2010 Error in file data, file is most likely corrupt
F_ERR_DATE_FORMAT 2011 Date format is invalid. Must be YYYY-MM-dd
F_ERR_TIME_FORMAT 2012 Time format is invalid. Must be hh:mm:ss
F_ERR_SIZE 2013 A size does not match (internal error). File is most likely corrupt
F_ERR_TAG 2014 Error reading DHI DFS tag (DHI_). Most likely file is not a DFS file
F_ERR_READONLY 2015 Trying to write to a file in read-only mode
F_ERR_SKIP 2016 Error skipping a logical block (internal error). Most likely file is corrupt
F_ERR_APPTAG 2017 Error reading DHI DFS API tag (DFS_). Most likely file is not a DFS file
F_ERR_AXIS 2018 Wrong axis type number (internal error). Most likely the file is corrupt
F_ERR_CTYPE 2019 Error reading logical block type (internal error). Most likely the file is corrupt
F_ERR_EUM 2010 EUM unit and type does not match
F_ERR_NOT_DTX 2021 File is not a dtx file, though loaded as such
F_ERR_PLUGIN 2022 Plugin extension error

Definition at line 65 of file dfsio.h.

◆ SimpleType

DFS SimpleType enum values:

Enumerator value description
UFS_FLOAT 1 Single precision float (4 byte)
UFS_DOUBLE 2 Double precision float (8 byte)
UFS_CHAR 3 Char/Byte (1 byte)
UFS_INT 4 Signed integer (4 bytes)
UFS_UNSIGNED 5 Unsigned integer (4 bytes)
UFS_SHORT 6 Signed short integer (2 bytes)
UFS_USHORT 7 Unsigned short integer (2 bytes)

Definition at line 80 of file dfsio.h.

Enumeration Type Documentation

◆ DataValueType

Type of data value to specify how each value is to be interpreted between two time step values..

Enumerator
F_INSTANTANEOUS 

Value at current point in time, current time step.

F_ACCUMULATED 

Value accumulated from start of time series to current time step.

F_STEP_ACCUMULATED 

Value accumulated since last time step to current time step.

F_MEAN_STEP_ACCUMULATED 

Mean value from previous to current time step. Also called: MeanStepBackwards.

F_REV_MEAN_STEP_ACCUMULATED 

Mean value from current to next time step. Also called: MeanStepForward.

Definition at line 137 of file dfsio.h.

◆ FileType

enum FileType

Type of file also specifies the type of data in the file

Enumerator
F_EQTIME_FIXEDSPACE_ALLITEMS 

File with: Equidistant time (spatial axis fixed in time, all items in every time step).

F_EQTIME_TVARSPACE_ALLITEMS 

No longer in use.

F_NEQTIME_FIXEDSPACE_ALLITEMS 

File with: Non-equidistant time (spatial axis fixed in time, all items in every time step).

F_NEQTIME_FIXEDSPACE_VARITEMS 

No longer in use.

F_NEQTIME_TVARSPACE_VARITEMS 

No longer in use.

Definition at line 114 of file dfsio.h.

◆ GeoInfoType

Defines whether the geographical projection is defined as a UTM projection type, or in other case, as undefined projection.

Enumerator
F_UNDEFINED_GEOINFO 

No projection defined in file. Only very old DFS files has this set.

F_UTM_PROJECTION 

A projection is defined in file. It need not be an UTM projection, even though the name indicates that.

Definition at line 191 of file dfsio.h.

◆ SpaceAxisType

Defines the regularity of the space axis used for the time series data. When the data is uniformly distributed in space, the axis is equidistant, otherwise non-equidistant. This applies to either 1-2-3 or 4 dimensional time series data.

Enumerator
F_EQ_AXIS_D0 

Zero dimensional axis - dfs0 files.

F_EQ_AXIS_D1 

Equidistant 1 dimensional axis - dfs1 files.

F_NEQ_AXIS_D1 

Non-Equidistant 1 dimensional axis - dfs1 files.

F_TVAR_AXIS_D1 

No longer used.

F_EQ_AXIS_D2 

Equidistant 2 dimensional axis - the standard dfs2 files.

F_NEQ_AXIS_D2 

Non-equidistant 2 dimensional orthogonal axis.

F_TVAR_AXIS_D2 

No longer used.

F_EQ_AXIS_D3 

Equidistant 3 dimensional axis - dfs3 files.

F_NEQ_AXIS_D3 

Non-equidistant 3 dimensional orthogonal axis. Not used currently.

F_TVAR_AXIS_D3 

No longer used.

F_EQ_AXIS_D4 

Equidistant 4 dimensional axis.

F_CURVE_LINEAR_AXIS_D2 

Curve-linear 2 dimensional axis - dfs2 files.

F_CURVE_LINEAR_AXIS_D3 

Curve-linear 3 dimensional axis - dfs3 files.

Definition at line 168 of file dfsio.h.

◆ TimeAxisType

Defines the regularity of the time axis used for the time series data. When the data is uniformly distributed in time, the axis is equidistant, otherwise non-equidistant. It also considers whether the time axis is related to a calendar reference, or an absolute zero reference.

Enumerator
F_TM_EQ_AXIS 

Equidistant time axis.

F_TM_NEQ_AXIS 

Non-equidistant time axis.

F_CAL_EQ_AXIS 

Equidistant calendar axis.

F_CAL_NEQ_AXIS 

Non-equidistant calendar axis.

Definition at line 153 of file dfsio.h.

Function Documentation

◆ dfsAddCommonErrorHandler()

m0LINK void m0IMEX dfsAddCommonErrorHandler ( FErrorHandlerT  dfsErrorHandler)

Adds a common error handler for all types of errors.

It adds the FioErrors - specified errors. dfsErrorHandler is called whenever one of these errors occurs.

Parameters
[in]dfsErrorHandlerSpecifies a reference to the error handler, that is the user-defined function that should be called when the specified error occurs.
Remarks
The idea behind this function is to let the application programmer write a separate function that is called e.g. when the disk is full (F_ERR_WRITE) and let this function close the file, post a nice error message to the user, saying that the file is closed properly and the data is saved and that the program is about to terminate. Note that the function dfsInitSystem has to called before dfsAddCommonErrorHandler is called.
See also
dfsAddErrorHandler, dfsInitSystem

◆ dfsAddCustomBlock()

m0LINK LONG m0IMEX dfsAddCustomBlock ( LPHEAD  pdfs,
SimpleType  data_type,
LPCTSTR  name,
LONG  n_elements,
void *  data_ptr 
)

adds a custom defined block of data to the file in form of an array.

dfsAddCustomBlock accepts arrays of floats, doubles, chars, integers and unsigned integers of any size. dfsAddCustomBlock can be called freely any number of times.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]data_typeSpecifies the simple data type of the data block. Accepted values are
  • UFS_FLOAT - indicating that the data of the item is stored in float format,
  • UFS_DOUBLE - indicating that the data of the item is stored in double format,
  • UFS_CHAR - indicating that the data of the item is stored in char format,
  • UFS_INT - indicating that the data of the item is stored in int format,
  • UFS_UNSIGNED - indicating that the data of the item is stored in unsigned int format.
[in]nameSpecifies a pointer to the text string containing the label of the data.
[in]n_elementsSpecifies the number of elements in the array.
[in]data_ptrSpecifies a pointer to the array containing the elements.
Remarks
Note that dfsAddCustomBlock should only be called before the header is written, that is before dfsFileCreate is called for the same file. dfsAddCustomBlock will have no effect if it's called after or if it's called when an existing file is being edited.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetCustomBlockRef, dfsGetCustomBlock, dfsHeaderCreate

◆ dfsAddErrorHandler()

m0LINK void m0IMEX dfsAddErrorHandler ( FioErrors  ioError,
FErrorHandlerT  dfsErrorHandler 
)

Adds an error handler for specific types of errors.

It adds the specified errors. dfsErrorHandler is a user-defined function that is called whenever errors of the specified type occurs.

Parameters
[in]ioErrorSpecifies the type of error Valid values are the FioErrors - specified errors, that is:

F_FAIL_DATA, F_ERR_MALLOC, F_ERR_READ, F_ERR_WRITE, F_ERR_OPEN, F_ERR_CLOSE, F_ERR_FLUSH, F_ERR_SEEK, F_ERR_ITEMNO, F_ERR_INDEX, F_ERR_DTYPE, F_ERR_DATA, F_ERR_DATE_FORMAT, F_ERR_TIME_FORMAT, F_ERR_SIZE, F_ERR_TAG, F_ERR_READONLY, F_ERR_SKIP, F_ERR_APPTAG, F_ERR_AXIS, F_ERR_CTYPE,

Parameters
[in]dfsErrorHandlerSpecifies a reference to the error handler, that is the user-defined function that should be called when the specified error occurs.
Remarks
The idea behind this function is to let the application programmer write a separate function that is called e.g. when the disk is full (F_ERR_WRITE) and let this function close the file, post a nice error message to the user, saying that the file is closed properly and the data is saved and that the program is about to terminate. Note that the function dfsInitSystem has to called before dfsAddErrorHandler is called.
See also
dfsAddCommonErrorHandler, dfsInitSystem, FioErrors, dfsErrorHandler

◆ dfsDebugOn()

m0LINK void m0IMEX dfsDebugOn ( BOOL  On)

Switches on/off the possibility for online debugging.

When the debug is switched on, the debugging is done using prints to stdout and stderr.

Parameters
[in]OnSpecifies whether the application should be running in debug mode, with respect to the dfs-library routines.
Remarks
Note that this debugging facility is only useful in console applications.

◆ dfsEnablePlugin()

m0LINK LONG m0IMEX dfsEnablePlugin ( const LPHEAD  pdfs,
const LPFILE  fp 
)

Enables the load of a plugin-dll and initializes it, if it's available.

The plugin then becomes a part of the DFS header. The plugin computes derived items, if it makes sense. Enabling the plugin can always be done. It will only effect the items in special cases.

Parameters
[in]pdfsSpecifies a pointer to the header information structure.
[in]fpSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsUnloadPlugin

◆ dfsFileAppend()

m0LINK LONG m0IMEX dfsFileAppend ( LPCTSTR  pathname,
LPHEAD *  pdfs_rtn,
LPFILE *  fp_rtn 
)

Opens the file specified by pathname for appending, automatically reads the static header information and then returns a pointer to the file fp_rtn and a pointer to the header information pdfs_rtn.

The file pointer is left at the end of the file. dfsFileAppend allocates the memory necessary to contain the complete header description found in the file.

Parameters
[in]pathnameSpecifies a pointer to the filename.
[out]pdfs_rtnReturns a reference to the header upon successful execution. If a NULL-pointer is specified the parameter is ignored.
[out]fp_rtnReturns a reference to the file upon successful execution. If a NULL-pointer param is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for freeing the storage associated with the pointer to the header structure by calling dfsHeaderDestroy and for closing the file by calling dfsFileClose.
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileCreate, dfsFileEdit, dfsFileFlush, dfsFileClose

◆ dfsFileClose()

m0LINK LONG m0IMEX dfsFileClose ( LPHEAD  pdfs,
LPFILE *  fp_rtn 
)

Closes the file specified by fp_rtn and updates the header specified by pdfs.

Parameters
[in]pdfsSpecifies a pointer to the header information structure.
[out]fp_rtnSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileCreate, dfsFileAppend, dfsFileEdit, dfsFileFlush

◆ dfsFileCreate()

m0LINK LONG m0IMEX dfsFileCreate ( LPCTSTR  pathname,
LPHEAD  pdfs,
LPFILE *  fp_rtn 
)

Creates a file specified by pathname for writing, automatically writes the static header information pointed to by pdfs and then returns a pointer to the file fp_rtn.

The file pointer is left at the position following the header part of the file which corresponds to the end of the file.

Parameters
[in]pathnameSpecifies a pointer to the filename.
[in]pdfsSpecifies a pointer to the header structure.
[out]fp_rtnReturns a reference to the file upon successful execution of dfsFileCreate. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for closing the file by calling dfsFileClose.
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileAppend, dfsFileEdit, dfsFileFlush, dfsFileClose

◆ dfsFileCreateEx()

m0LINK LONG m0IMEX dfsFileCreateEx ( LPCTSTR  pathname,
LPHEAD  pdfs,
LPFILE *  fp_rtn,
BOOL  canRead 
)

Creates a file specified by pathname for writing, automatically writes the static header information pointed to by pdfs and then returns a pointer to the file fp_rtn.

The file pointer is left at the position following the header part of the file which corresponds to the end of the file. The dfsFileCreateEx differs from the dfsFileCreate by a canRead flag that must be set when reading/modifying operations on the file is required. Performance measurements have shown that in some cases use of the canRead flag can slow down write performance.

Parameters
[in]pathnameSpecifies a pointer to the filename.
[in]pdfsSpecifies a pointer to the header structure.
[out]fp_rtnReturns a reference to the file upon successful execution of dfsFileCreate. If a NULL-pointer is specified the parameter is ignored.
[in]canReadflag specifying whether read/modify operations are allowed
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for closing the file by calling dfsFileClose.
See also
dfsFileCreate, dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileAppend, dfsFileEdit, dfsFileFlush, dfsFileClose

◆ dfsFileDelete()

m0LINK LONG m0IMEX dfsFileDelete ( LPCTSTR  pathname)

Deletes the file, if it exists.

Parameters
[in]pathnameSpecifies a pointer to the filename.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
Any file can be deleted using this call
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileCreate, dfsFileAppend, dfsFileEdit, dfsFileFlush, dfsFileClose

◆ dfsFileEdit()

m0LINK LONG m0IMEX dfsFileEdit ( LPCTSTR  pathname,
LPHEAD *  pdfs_rtn,
LPFILE *  fp_rtn 
)

Opens the file specified by pathname for editing, automatically reads the static header information and then returns a pointer to the file fp_rtn and a pointer to the header information pdfs_rtn.

The file pointer is left at the position following the header part of the file. dfsFileEdit allocates the memory necessary to contain the complete header description found in the file.

Parameters
[in]pathnameSpecifies a pointer to the filename.
[out]pdfs_rtnReturns a reference to the header upon successful execution of dfsFileEdit. If a NULL-pointer is specified the parameter is ignored.
[out]fp_rtnReturns a reference to the file upon successful execution of dfsFileEdit. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for freeing the storage associated with the pointer to the header structure by calling dfsHeaderDestroy and for closing the file by calling dfsFileClose.
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileCreate, dfsFileAppend, dfsFileFlush,
dfsFileClose

◆ dfsFileFlush()

m0LINK LONG m0IMEX dfsFileFlush ( LPHEAD  pdfs,
LPFILE  fp 
)

Flushes the file specified by fp and updates the header information pointed to by pdfs.

Parameters
[in]pdfsSpecifies a pointer to the header information structure.
[in]fpSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFileFlushTimeStep, dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileCreate, dfsFileAppend, dfsFileEdit, dfsFileClose

◆ dfsFileFlushTimeStep()

m0LINK LONG m0IMEX dfsFileFlushTimeStep ( LPHEAD  pdfs,
LPFILE  fp 
)

Flushes the file specified by fp and updates the time step information in the header information pointed to by pdfs.

Compared to dfsFileFlush, this method only updates the time step information in the header, and not the statistics and other information

Parameters
[in]pdfsSpecifies a pointer to the header information structure.
[in]fpSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFileFlush, dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileCreate, dfsFileAppend, dfsFileEdit, dfsFileClose

◆ dfsFileRead()

m0LINK LONG m0IMEX dfsFileRead ( LPCTSTR  pathname,
LPHEAD *  pdfs_rtn,
LPFILE *  fp_rtn 
)

Opens the file specified by pathname for reading, automatically reads the static header information and then returns a pointer to the header information pdfs_rtn and a pointer to the file fp_rtn.

The file pointer is left at the position following the header part of the file. dfsFileRead allocates the memory necessary to contain the complete header description found in the file.

Parameters
[in]pathnameSpecifies a pointer to the filename.
[out]pdfs_rtnReturns a reference to the header upon successful execution of dfsFileRead. If a NULL-pointer is specified the parameter is ignored.
[out]fp_rtnReturns a reference to the file upon successful execution of dfsFileRead. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for freeing the storage associated with the pointer to the header structure by calling dfsHeaderDestroy and for closing the file by calling dfsFileClose
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileCreate, dfsFileAppend, dfsFileEdit, dfsFileFlush, dfsFileClose

◆ dfsFindBlockDynamic()

m0LINK LONG m0IMEX dfsFindBlockDynamic ( LPHEAD  pdfs,
LPFILE  fp 
)

Sets the position of the file pointer fp to the beginning of the dynamic block, that is at the beginning of the first timestep. The function can be called any time when reading, writing or editing the file, provided that the static block is written completely.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a pointer to the file.
Remarks
Note that the block with the static vectors has to be written completely, before the function must be called.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFindBlockStatic

◆ dfsFindBlockStatic()

m0LINK LONG m0IMEX dfsFindBlockStatic ( LPHEAD  pdfs,
LPFILE  fp 
)

Sets the position of the file pointer fp to the beginning of the static vector (topography) block.

The function can be called any time when reading, writing or editing the file.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFindBlockDynamic

◆ dfsFindItemDynamic()

m0LINK LONG m0IMEX dfsFindItemDynamic ( LPHEAD  pdfs,
LPFILE  fp,
LONG  tstep_no,
LONG  item_no 
)

Positions the file pointer at the location in the file where the specified item at the specified time step starts.

The function call only succeeds if the storage type of the file is F_EQTIME_FIXEDSPACE_ALLITEMS, F_EQTIME_TVARSPACE_ALLITEMS or F_NEQTIME_FIXEDSPACE_ALLITEMS that is a file where each time step includes all items defined in the file.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a reference to the file.
[in]tstep_noSpecifies the number of the selected time step.
[in]item_noSpecifies the number of the selected dynamic item.
Remarks
Note that the tstep_no is a 0-based index and item_no is a 1-based index. Thus the valid range for tstep_no is [0, no_of_time_steps - 1] and the valid range for item_no is [1, no_of_items].
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFindTimeStep, dfsFindItemStatic, dfsSkipItem, dfsSkipTimeStep

◆ dfsFindItemStatic()

m0LINK LONG m0IMEX dfsFindItemStatic ( LPHEAD  pdfs,
LPFILE  fp,
LONG  item_no 
)

Positions the file pointer at the location in the file where the specified static item starts.

The function call succeeds if the specified static item exists.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a reference to the file.
[in]item_noSpecifies the number of the selected static item.
Remarks
Note that the item_no is a 1-based index and the valid range for item_no is [1, no_of_static_items]. Note also that all static items up til item_no is read every time this method is called.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFindTimeStep, dfsFindItemDynamic, dfsSkipItem, dfsSkipTimeStep

◆ dfsFindTimeStep()

m0LINK LONG m0IMEX dfsFindTimeStep ( LPHEAD  pdfs,
LPFILE  fp,
LONG  tstep_no 
)

Positions the file pointer at the location in the file where the the specified time step starts.

The function call only succeeds if the storage type of the file is F_EQTIME_FIXEDSPACE_ALLITEMS, F_EQTIME_TVARSPACE_ALLITEMS or F_NEQTIME_FIXEDSPACE_ALLITEMS that is a file where each time step includes all items defined in the file.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a reference to the file.
[in]tstep_noSpecifies the number of the selected time step.
Remarks
Note that the tstep_no is a 0-based index and thus the valid range for tstep_no is [0, no_of_time_steps - 1].
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsFindItemDynamic, dfsFindItemStatic, dfsSkipItem, dfsSkipTimeStep

◆ dfsGetAppTitle()

m0LINK LPCTSTR m0IMEX dfsGetAppTitle ( LPHEAD  pdfs)

Retrieves the application title string of the data from the header structure.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns a pointer to the application title string of the data or an empty string if pdfs is NULL.
Remarks
The return value will be an empty string ("") if pdfs is either NULL or initialized by the call dfsHeaderCreate.
See also
dfsSetAppTitle, dfsHeaderCreate

◆ dfsGetAppVersionNo()

m0LINK LONG m0IMEX dfsGetAppVersionNo ( LPHEAD  pdfs)

Retrieves the version number of the application from the header structure.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the version number of the application or -1 if pdfs is NULL.
See also
dfsSetAppVersionNo, dfsHeaderCreate

◆ dfsGetAssocStatic()

m0LINK LONG m0IMEX dfsGetAssocStatic ( LPHEAD  pdfs,
LONG  item_no,
LONG  staSeqNo,
LONG *  staItNo_rtn 
)

Retrieves the index number of a static item associated with the dynamic item specified by item_no.

Since more static items can be associated with a specific dynamic item, a sequence number specifying the exact number of static item has to be given too.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]item_noSpecifies the number of the dynamic item.
[in]staSeqNoSpecifies the sequence number of the static item associated with the dynamic item.
[out]staItNo_rtnReturns the number of the static item. If a NULL-pointer is specified the parameter is ignored.
Remarks
Note that the indeces are item_no, staSeqNo and the retuen value staItNo_rtn 1-based.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetNoAssocStatic, dfsSetAssocStatic

◆ dfsGetCustomBlock()

m0LINK LONG m0IMEX dfsGetCustomBlock ( LPBLOCK  pblock,
SimpleType data_type_rtn,
LPCTSTR *  name_rtn,
LONG *  n_elements_rtn,
void **  data_ptr_rtn,
LPBLOCK *  pNextBlock_rtn 
)

retrieves the data of a custom defined block when a reference pblock is given.

dfsGetCustomBlock also returns a reference to the next custom defined block if any is found.

Parameters
[in]pblockSpecifies a reference to the header information structure.
[out]data_type_rtnReturns the simple data type of the custom block. Possible return values are
  • UFS_FLOAT - indicating that the data of the item is stored in float format,
  • UFS_DOUBLE - indicating that the data of the item is stored in double format,
  • UFS_CHAR - indicating that the data of the item is stored in char format,
  • UFS_INT - indicating that the data of the item is stored in int format,
  • UFS_UNSIGNED - indicating that the data of the item is stored in unsigned int format.

If a NULL-pointer is specified the parameter is ignored.

Parameters
[out]name_rtnReturns a pointer to the text string containing the label of the data. If a NULL-pointer is specified the parameter is ignored.
[out]n_elements_rtnReturns the number of elements in the array. If a NULL-pointer is specified the parameter is ignored.
[out]data_ptr_rtnReturns a pointer to the array containing the elements. If a NULL-pointer is specified the parameter is ignored.
[out]pNextBlock_rtnReturns a pointer to the next custom defined block in the file. If no custom defined block is found NULL is returned. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsAddCustomBlock, dfsGetCustomBlockRef, dfsHeaderCreate

◆ dfsGetCustomBlockRef()

m0LINK LONG m0IMEX dfsGetCustomBlockRef ( LPHEAD  pdfs,
LPBLOCK *  pBlock_rtn 
)

retrieves a reference to the first custom defined block in a file if any blocks are found.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]pBlock_rtnReturns a pointer to the first custom defined block in the file. If no custom defined block is found NULL is returned. If a NULL-pointer is specified the parameter is ignored.
Remarks
dfsGetCustomBlockRef can only be used for retrieving a reference to the first custom defined block in a file. Use dfsGetCustomBlock for further iteration.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsAddCustomBlock, dfsGetCustomBlock, dfsHeaderCreate

◆ dfsGetDataType()

m0LINK LONG m0IMEX dfsGetDataType ( LPHEAD  pdfs)

Retrieves the tag-variable defining the type of data.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the tag-variable defining the type of data or 0 if pdfs is NULL.
Remarks
Note that there exists no global system for maintaining these tag-variables. The tag-variables should only be interpreted locally within one model-complex e.g. MIKE 21. The application programmer can tag bathymetries, result files, input files freely.
See also
dfsSetDataType, dfsHeaderCreate

◆ dfsGetDeleteValByte()

m0LINK char m0IMEX dfsGetDeleteValByte ( LPHEAD  pdfs)

Retrieves the char-type delete value from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the char-type delete value or '\0' if pdfs is NULL.
Remarks
When pdfs has been initialized by the call dfsHeaderCreate, dfsGetDeleteValByte will return the value Dfs_CHAR_DEL.
See also
dfsSetDeleteValByte, dfsGetDeleteValDouble, dfsGetDeleteValFloat, dfsGetDeleteValInt, dfsGetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsGetDeleteValDouble()

m0LINK double m0IMEX dfsGetDeleteValDouble ( LPHEAD  pdfs)

Retrieves the double-type delete value from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the double-type delete value or 0.0 if pdfs is NULL.
Remarks
When pdfs has been initialized by the call dfsHeaderCreate, dfsGetDeleteValDouble will return the value Dfs_DOUBLE_DEL.
See also
dfsSetDeleteValDouble, dfsGetDeleteValByte, dfsGetDeleteValFloat, dfsGetDeleteValInt, dfsGetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsGetDeleteValFloat()

m0LINK float m0IMEX dfsGetDeleteValFloat ( LPHEAD  pdfs)

Retrieves the float-type delete value from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the float-type delete value or 0.0F if pdfs is NULL.
Remarks
When pdfs has been initialized by the call dfsHeaderCreate, dfsGetDeleteValFloat will return the value Dfs_FLOAT_DEL.
See also
dfsSetDeleteValFloat, dfsGetDeleteValByte, dfsGetDeleteValDouble, dfsGetDeleteValInt, dfsGetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsGetDeleteValInt()

m0LINK LONG m0IMEX dfsGetDeleteValInt ( LPHEAD  pdfs)

Retrieves the int-type delete value from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the int-type delete value or 0 if pdfs is NULL.
Remarks
When pdfs has been initialized by the call dfsHeaderCreate, dfsGetDeleteValInt will return the value Dfs_INT_DEL.
See also
dfsSetDeleteValInt, dfsGetDeleteValByte, dfsGetDeleteValDouble, dfsGetDeleteValFloat, dfsGetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsGetDeleteValUnsignedInt()

m0LINK ULONG m0IMEX dfsGetDeleteValUnsignedInt ( LPHEAD  pdfs)

Retrieves the ULONG (unsigned int)-type delete value from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the ULONG (unsigned int)-type delete value or 0 if pdfs is NULL.
Remarks
When pdfs has been initialized by the call dfsHeaderCreate, dfsGetDeleteValUnsignedInt will return the value Dfs_UINT_DEL.
See also
dfsSetDeleteValUnsignedInt, dfsGetDeleteValByte, dfsGetDeleteValDouble, dfsGetDeleteValFloat, dfsGetDeleteValInt, dfsHeaderCreate

◆ dfsGetEncodeKey()

m0LINK LONG m0IMEX dfsGetEncodeKey ( LPHEAD  pdfs,
int *  xkey,
int *  ykey,
int *  zkey 
)

Gets the compression encoding key.

When a file is compressed, all dynamic items are compressed with the same encoding key, and hence also all dynamic items have the same spatial axis.

When a file is compressed, the encoding key defines for each value stored in the file the indices [xi, yi, zy] in the data matrix where the value belongs. Hence, the i'th data value belongs in the data matrix on

Data[ xKey[i], yKey[i], zKey[i]],

or using linear indexing:

Data[xKey[i] + yKey[i]*xCount + zKey[i]*xCount*yCount].

For a 2D axis all zKey values are zero. For a 1D axis all yKey and zKey values are zero.

When reading data from or writing data to dynamic items, data is automatically compressed/uncompressed, hence the encoding keys are only for information. Some files also compresses static items, and compresses these also, however using a dummy axis of the size of the encoding key, and manual decoding needs to take place,

Data outside the encoding key gets the delete value. For a file with 2D data all zi's are zero, and for a 1D file, zi's and yi's are zero.

It is only valid to call this function if dfsIsFileCompressed returns true.

Compression is only supported when all dynamic items are of type float.

Parameters
[in]pdfsSpecifies a pointer to the header structure.
[in,out]xkeyx-index of encoding key. Array must be pre-allocated, size matching dfsGetEncodeKeySize
[in,out]ykeyy-index of encoding key. Array must be pre-allocated, size matching dfsGetEncodeKeySize
[in,out]zkeyz-index of encoding key. Array must be pre-allocated, size matching dfsGetEncodeKeySize
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.

◆ dfsGetEncodeKeySize()

m0LINK LONG m0IMEX dfsGetEncodeKeySize ( LPHEAD  pdfs)

Gets the compression encoding key size.

See dfsGetEncodeKey for the definition of the encode key values

Parameters
[in]pdfsSpecifies a pointer to the header structure.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.

◆ dfsGetEqCalendarAxis()

m0LINK LONG m0IMEX dfsGetEqCalendarAxis ( LPHEAD  pdfs,
LPCTSTR *  start_date_rtn,
LPCTSTR *  start_time_rtn,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
double *  tstart_rtn,
double *  tstep_rtn,
LONG *  tnum_rtn,
LONG *  tindex_rtn 
)

Retrieves the description of an equidistant calendar axis from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]start_date_rtnReturns the date for the first time step. The string is 10 characters long in the following format YYYY-MM-DD. If a NULL-pointer is specified the parameter is ignored.
[out]start_time_rtnReturns the time for the first time step. The string is 8 characters long in the following format HH:MM:SS. If a NULL-pointer is specified the parameter is ignored.
[out]n_eum_unit_rtnReturns the eum-tag representing the time unit, e.g eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the time unit, e.g "second" corresponds to eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]tstart_rtnReturns the starting time of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tstep_rtnReturns the time step of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tnum_rtnReturns the number of time steps of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tindex_rtnReturns the index (record number) of the first time step. If a NULL-pointer is specified the parameter is ignored.
Remarks
Note that the format of the date string is YYYY-MM-DD and the format of the time string is HH:MM:SS regardless of the localization.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsGetEqTimeAxis()

m0LINK LONG m0IMEX dfsGetEqTimeAxis ( LPHEAD  pdfs,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
double *  tstart_rtn,
double *  tstep_rtn,
LONG *  tnum_rtn,
LONG *  tindex_rtn 
)

Retrieves the description of an equidistant time axis from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]n_eum_unit_rtnReturns the eum-tag representing the time unit, e.g eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the time unit, e.g "second" corresponds to eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]tstart_rtnReturns the starting time of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tstep_rtnReturns the time step of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tnum_rtnReturns the number of time steps of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tindex_rtnReturns the index (record number) of the first time step. If a NULL-pointer is specified the parameter is ignored.
Remarks
The intented use of tindex is e.g. when a time serie represents a subset of a larger time serie tindex could hold the position of the first time step in the original time serie.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsGetFileTitle()

m0LINK LPCTSTR m0IMEX dfsGetFileTitle ( LPHEAD  pdfs)

Retrieves the title string of the data from the header structure.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns a pointer to the title string related to the data of the data or an empty string if pdfs is NULL.
Remarks
The return value will be an empty string ("") if pdfs is either NULL or initialized by the call dfsHeaderCreate.
See also
dfsSetFileTitle, dfsHeaderCreate

◆ dfsGetFileType()

m0LINK FileType m0IMEX dfsGetFileType ( LPHEAD  pdfs)

Retrieves the file type of the file pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the type of the file. Possible return values are from FileType.
See also
dfsHeaderCreate

◆ dfsGetGeoInfoType()

m0LINK GeoInfoType m0IMEX dfsGetGeoInfoType ( LPHEAD  pdfs)

Retrieves the type of geographical information from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the geographical information type. Possible return values are F_UTM_PROJECTION - specifying the use of a projection (not just UTM), F_UNDEFINED_PROJECTION
  • specifying the absence of a projection and corresponding geographical information.
See also
dfsGetGeoInfoUTMProj, dfsSetGeoInfoUTMProj, dfsHeaderCreate

◆ dfsGetGeoInfoUTMProj()

m0LINK LONG m0IMEX dfsGetGeoInfoUTMProj ( LPHEAD  pdfs,
LPCTSTR *  projection_id_rtn,
double *  lon0_rtn,
double *  lat0_rtn,
double *  orientation_rtn 
)

Retrieves the geographical information for an UTM-projection. The longitude, latitude and orientation are all given in decimal degrees.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]projection_id_rtnReturns the id-string of the projection which refers to the UTM zone (standard or specialized) that was used originally to create the data-set. Examples of this value are "UTM-32" and "BTM" for a special Bangladesh custom made UTM-zone. If a NULL-pointer is specified the parameter is ignored.
[out]lon0_rtnReturns the longitude of the origin in the reference coordinate system in decimal degrees. If a NULL-pointer is specified the parameter is ignored.
[out]lat0_rtnReturns the latitude of the origin in the reference coordinate system in decimal degrees. If a NULL-pointer is specified the parameter is ignored.
[out]orientation_rtnReturns the orientation of the reference coordinate system in decimal degrees. If a NULL-pointer is specified the parameter is ignored.
Remarks
Note that the origin returned by dfsGetGeoInfoUTMProj is given in latitude/longitude, Since the projection of the data is either a standard or a customized UTM-zone it would be more logical to store the origin in native UTM-coordinates:(easting, northing). This is NOT done because the compatibility with the old dtX-filesystem is maintained.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetGeoInfoType, dfsSetGeoInfoUTMProj, dfsHeaderCreate

◆ dfsGetItemAxisCurveLinearD2()

m0LINK LONG m0IMEX dfsGetItemAxisCurveLinearD2 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
double **  xcoords_rtn,
double **  ycoords_rtn 
)

Retrieves the relative axis description of an individually selected 2-dimensional curvelinear item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]xcoords_rtnReturns the array containing (j + 1)*(k + 1) x-coordinates for the gridpoints. If a NULL-pointer is specified the parameter is ignored.
[out]ycoords_rtnReturns the array containing (j + 1)*(k + 1) y-coordinates for the gridpoints. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisNeqD2, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisNeqD1, dfsGetItemAxisNeqD3, dfsGetItemAxisEqD2, dfsGetItemAxisTvarD2, dfsItemS, dfsItemD

◆ dfsGetItemAxisCurveLinearD3()

m0LINK LONG m0IMEX dfsGetItemAxisCurveLinearD3 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
LONG *  l_rtn,
double **  xcoords_rtn,
double **  ycoords_rtn,
double **  zcoords_rtn 
)

Retrieves the relative axis description of an individually selected 3-dimensional curvelinear item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]l_rtnReturns the number of gridpoints in the z-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]xcoords_rtnReturns the array containing (j + 1)*(k + 1)*(l + 1) x-coordinates for the gridpoints. If a NULL-pointer is specified the parameter is ignored.
[out]ycoords_rtnReturns the array containing (j + 1)*(k + 1)*(l + 1) y-coordinates for the gridpoints. If a NULL-pointer is specified the parameter is ignored.
[out]zcoords_rtnReturns the array containing (j + 1)*(k + 1)*(l + 1) z-coordinates for the gridpoints. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisNeqD3, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisNeqD1, dfsGetItemAxisNeqD2, dfsGetItemAxisEqD3, dfsGetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsGetItemAxisEqD0()

m0LINK LONG m0IMEX dfsGetItemAxisEqD0 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn 
)

Retrieves the relative axis description of an individually selected 0-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisEqD0, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisEqD1, dfsGetItemAxisEqD2, dfsGetItemAxisEqD3, dfsItemS, dfsItemD

◆ dfsGetItemAxisEqD1()

m0LINK LONG m0IMEX dfsGetItemAxisEqD1 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
float *  x0_rtn,
float *  dx_rtn 
)

Retrieves the relative axis description of an individually selected 1-dimensional equidistant item pointed to by item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints for the item. If a NULL-pointer is specified the parameter is ignored.
[out]x0_rtnReturns the relative offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]dx_rtnReturns the spacing between each set of neighboring gridpoints. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisEqD1, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisEqD0, dfsGetItemAxisEqD2, dfsGetItemAxisEqD3, dfsGetItemAxisNeqD1, dfsGetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsGetItemAxisEqD2()

m0LINK LONG m0IMEX dfsGetItemAxisEqD2 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
float *  x0_rtn,
float *  y0_rtn,
float *  dx_rtn,
float *  dy_rtn 
)

Retrieves the relative axis description of an individually selected 2-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]x0_rtnReturns the relative x-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]y0_rtnReturns the relative y-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]dx_rtnReturns the spacing between each set of neighboring gridpoints in the x-direction. If a NULL-pointer is specified the parameter is ignored.
[out]dy_rtnReturns the spacing between each set of neighboring gridpoints in the y-direction. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisEqD2, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisEqD0, dfsGetItemAxisEqD1, dfsGetItemAxisEqD3, dfsGetItemAxisNeqD2, dfsGetItemAxisTvarD2, dfsItemS, dfsItemD

◆ dfsGetItemAxisEqD3()

m0LINK LONG m0IMEX dfsGetItemAxisEqD3 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
LONG *  l_rtn,
float *  x0_rtn,
float *  y0_rtn,
float *  z0_rtn,
float *  dx_rtn,
float *  dy_rtn,
float *  dz_rtn 
)

Retrieves the relative axis description of an individually selected 3-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]l_rtnReturns the number of gridpoints in the z-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]x0_rtnReturns the relative x-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]y0_rtnReturns the relative y-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]z0_rtnReturns the relative z-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]dx_rtnReturns the spacing between each set of neighboring gridpoints in the x-direction. If a NULL-pointer is specified the parameter is ignored.
[out]dy_rtnReturns the spacing between each set of neighboring gridpoints in the y-direction. If a NULL-pointer is specified the parameter is ignored.
[out]dz_rtnReturns the spacing between each set of neighboring gridpoints in the z-direction. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisEqD3, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisEqD0, dfsGetItemAxisEqD1, dfsGetItemAxisEqD2, dfsGetItemAxisNeqD3, dfsGetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsGetItemAxisEqD4()

m0LINK LONG m0IMEX dfsGetItemAxisEqD4 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
LONG *  l_rtn,
LONG *  m_rtn,
float *  x0_rtn,
float *  y0_rtn,
float *  z0_rtn,
float *  f0_rtn,
float *  dx_rtn,
float *  dy_rtn,
float *  dz_rtn,
float *  df_rtn 
)

Retrieves the relative axis description of an individually selected 4-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]l_rtnReturns the number of gridpoints in the z-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]m_rtnReturns the number of gridpoints in the f-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]x0_rtnReturns the relative x-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]y0_rtnReturns the relative y-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]z0_rtnReturns the relative z-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]f0_rtnReturns the relative f-offset to the origin. If a NULL-pointer is specified the parameter is ignored.
[out]dx_rtnReturns the spacing between each set of neighboring gridpoints in the x-direction. If a NULL-pointer is specified the parameter is ignored.
[out]dy_rtnReturns the spacing between each set of neighboring gridpoints in the y-direction. If a NULL-pointer is specified the parameter is ignored.
[out]dz_rtnReturns the spacing between each set of neighboring gridpoints in the z-direction. If a NULL-pointer is specified the parameter is ignored.
[out]df_rtnReturns the spacing between each set of neighboring gridpoints in the f-direction. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisEqD4, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisEqD0, dfsGetItemAxisEqD1, dfsGetItemAxisEqD2, dfsGetItemAxisNeqD3, dfsGetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsGetItemAxisNeqD1()

m0LINK LONG m0IMEX dfsGetItemAxisNeqD1 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
Coords **  coords_rtn 
)

Retrieves the relative axis description of an individually selected 1-dimensional curvelinear item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints for the item. If a NULL-pointer is specified the parameter is ignored.
[out]coords_rtnReturns the array containing the coordinates (x, y, z) for each gridpoint. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisNeqD1, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisNeqD2, dfsGetItemAxisNeqD3, dfsGetItemAxisEqD1, dfsGetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsGetItemAxisNeqD2()

m0LINK LONG m0IMEX dfsGetItemAxisNeqD2 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
double **  xcoords_rtn,
double **  ycoords_rtn 
)

Retrieves the relative axis description of an individually selected 2-dimensional non equidistant but orthogonal item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]xcoords_rtnReturns the array containing (j + 1) x-coordinates for the gridpoints along the x-axis. If a NULL-pointer is specified the parameter is ignored.
[out]ycoords_rtnReturns the array containing (k + 1) y-coordinates for the gridpoints along the y-axis. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisNeqD2, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisNeqD1, dfsGetItemAxisNeqD3, dfsGetItemAxisEqD2, dfsGetItemAxisTvarD2, dfsItemS, dfsItemD

◆ dfsGetItemAxisNeqD3()

m0LINK LONG m0IMEX dfsGetItemAxisNeqD3 ( LPITEM  item,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
LONG *  j_rtn,
LONG *  k_rtn,
LONG *  l_rtn,
double **  xcoords_rtn,
double **  ycoords_rtn,
double **  zcoords_rtn 
)

Retrieves the relative axis description of an individually selected 3-dimensional non equidistant but orthogonal item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_unit_rtnReturns the eum tag variable for the spatial axis unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the axis unit, e.g. the corresponding text for eumUmeter is "meter". If a NULL-pointer is specified the parameter is ignored.
[out]j_rtnReturns the number of gridpoints in the x-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]k_rtnReturns the number of gridpoints in the y-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]l_rtnReturns the number of gridpoints in the z-direction for the item. If a NULL-pointer is specified the parameter is ignored.
[out]xcoords_rtnReturns the array containing (j + 1) x-coordinates for the gridpoints along the x-axis. If a NULL-pointer is specified the parameter is ignored.
[out]ycoords_rtnReturns the array containing (k + 1) y-coordinates for the gridpoints along the y-axis. If a NULL-pointer is specified the parameter is ignored.
[out]zcoords_rtnReturns the array containing (l + 1) z-coordinates for the gridpoints along the z-axis. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemAxisNeqD3, dfsGetItemInfo, dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemAxisNeqD1, dfsGetItemAxisNeqD2, dfsGetItemAxisEqD3, dfsGetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsGetItemAxisOrientation()

m0LINK LONG m0IMEX dfsGetItemAxisOrientation ( LPITEM  item,
float *  alpha_rtn,
float *  phi_rtn,
float *  theta_rtn 
)

Retrieves the orientation of the reference coordinate system of a n-dimensional item pointed to by Item, static as well as dynamic, where 0 <= n <= 3.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]alpha_rtnReturns the horizontal rotation of the item relative to the geographical reference coordinate system. If a NULL-pointer is specified the parameter is ignored.
[out]phi_rtnReturns the vertical rotation of the item relative to the geographical reference coordinate system. If a NULL-pointer is specified the parameter is ignored.
[out]theta_rtnReturns the tilted rotation of the item relative to the geographical reference coordinate system. If a NULL-pointer is specified the parameter is ignored.
Remarks
Note that alpha, phi and theta are obsolete for 0-dimensional equidistant items and theta is obsolete for 1-dimensional equidistant items. alpha, phi and theta are obsolete for both fixed and time- varying curvelinear items regardless of the dimension.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemRefCoords, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemAxisType()

m0LINK SpaceAxisType m0IMEX dfsGetItemAxisType ( LPITEM  item)

Retrieves the spatial axis type of an individually selected item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
Returns
Returns the spatial axis type of the topography. Possible return values are
  • F_EQ_AXIS_D0 - indicating an equidistant 0-dimensional item,
  • F_EQ_AXIS_D1 - indicating an equidistant 1-dimensional item,
  • F_NEQ_AXIS_D1 - indicating a non equidistant 1-dimensional item,
  • F_TVAR_AXIS_D1 - indicating a timevarying curvelinear 1-dimensional item,
  • F_EQ_AXIS_D2 - indicating an equidistant 2-dimensional item,
  • F_NEQ_AXIS_D2 - indicating a non equidistant but orthogonal 2-dimensional item,
  • F_CURVE_LINEAR_AXIS_D2 - indication a curvelinear 2-dimensional item,
  • F_TVAR_AXIS_D2 - indicating a timevarying curvelinear 2-dimensional item,
  • F_EQ_AXIS_D3 - indicating an equidistant 3-dimensional item,
  • F_NEQ_AXIS_D3 - indicating a non equidistant but orthogonal 3-dimensional item,
  • F_CURVE_LINEAR_AXIS_D3 - indicating a curvelinear 3-dimensional item,
  • F_TVAR_AXIS_D3 - indicating a timevarying curvelinear 3-dimensional item,
  • F_EQ_AXIS_D4 - indicating a 4-dimensional equidistant item,
  • F_UNDEFINED_SAXIS - indicating the absence of well defined axis for the item.
See also
dfsGetItemDim, dfsSetItemAxisEqD1, dfsGetItemAxisEqD1, dfsSetItemAxisNeqD1, dfsGetItemAxisNeqD1, dfsGetItemAxisTvarD1, dfsSetItemAxisTvarD1, dfsSetItemAxisEqD2, dfsGetItemAxisEqD2, dfsSetItemAxisNeqD2, dfsGetItemAxisNeqD2, dfsSetItemAxisCurveLinearD2, dfsGetItemAxisCurveLinearD2, dfsGetItemAxisTvarD2, dfsSetItemAxisTvarD2, dfsSetItemAxisEqD3, dfsGetItemAxisEqD3, dfsSetItemAxisNeqD3, dfsGetItemAxisNeqD3, dfsSetItemAxisCurveLinearD3, dfsGetItemAxisCurveLinearD3, dfsGetItemAxisTvarD3, dfsSetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsGetItemAxisUnitConversion()

m0LINK LONG m0IMEX dfsGetItemAxisUnitConversion ( LPITEM  item,
UnitConvType *  nConvType_rtn,
LONG *  nUnit_rtn 
)

Gets the unit conversion for the axis of a specific item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]nConvType_rtnUnit conversion type specifications for the given item
[out]nUnit_rtnpointer to the eum unit code of the given item
Returns
F_NO_ERROR in case of no errors, otherwise an error code.
Remarks
Possible return values of nConvType_rtn are F_NO_CONVERSION, F_UBG_CONVERSION, F_FREE_CONVERSION and F_1ST_REGISTERED_UNIT_CONVERSION. In case of either F_NO_CONVERSION, F_UBG_CONVERSION or F_1ST_REGISTERED_UNIT_CONVERSION nUnit_rtn should be ignored.
See also
dfsItemS, dfsItemD, dfsSetItemAxisUnitConversion, dfsGetItemUnitConversion

◆ dfsGetItemBytes()

m0LINK ULONG m0IMEX dfsGetItemBytes ( LPITEM  item)

Retrieves the number of bytes for an item pointed to by It.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
Note that the an item holds the number of bytes equal to the number of elements multiplied by the size of the basic type used to store the elements.
Returns
Returns the number of bytes for an item, static as well as dynamic. If the call fails 0 is returned.
See also
dfsGetItemElements, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemDim()

m0LINK LONG m0IMEX dfsGetItemDim ( LPITEM  item)

Retrieves the dimension of the spatial axis of an individually selected item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
Returns
Returns the dimension of the spatial axis of an individually selected item. The valid dimensions are 0 - 3. -1 is returned if the call fails.
See also
dfsGetItemAxisType, dfsSetItemAxisEqD1, dfsGetItemAxisEqD1, dfsSetItemAxisNeqD1, dfsGetItemAxisNeqD1, dfsGetItemAxisTvarD1, dfsSetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsGetItemElements()

m0LINK ULONG m0IMEX dfsGetItemElements ( LPITEM  item)

Retrieves the number of elements for an item pointed to by It.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
A zero-dimensional item has 1 element.
Returns
Returns the number of elements for an item, static as well as dynamic. If the call fails 0 is returned.
See also
dfsGetItemBytes, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemGeometryType()

m0LINK LONG m0IMEX dfsGetItemGeometryType ( LPITEM  item)

Retrieves the type of geometry type, according to the dimension of the spatial axis of an individually selected item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
Returns
Returns the type of geometry, according to the dimension of the spatial axis of an individually selected item. The valid outputs are eumIItemGeometryXXXD, with XXX = 0 - 4 (enum type)
See also
dfsGetItemAxisType, dfsSetItemAxisEqD1, dfsGetItemAxisEqD1, dfsSetItemAxisNeqD1, dfsGetItemAxisNeqD1, dfsGetItemAxisTvarD1, dfsSetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsGetItemGeometryUnit()

m0LINK LONG m0IMEX dfsGetItemGeometryUnit ( LPITEM  item)

Retrieves the unit type of the spatial dimension of an individually selected item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
Returns
Returns the eum unit type of the spatial extension of the item of an individually selected item. The valid outputs are any eum unit type.
See also
dfsGetItemAxisType, dfsSetItemAxisEqD1, dfsGetItemAxisEqD1, dfsSetItemAxisNeqD1, dfsGetItemAxisNeqD1, dfsGetItemAxisTvarD1, dfsSetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsGetItemInfo()

m0LINK LONG m0IMEX dfsGetItemInfo ( LPITEM  item,
LONG *  n_eum_item_type_rtn,
LPCTSTR *  t_eum_item_type_rtn,
LPCTSTR *  name_rtn,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
SimpleType data_type_rtn 
)

Retrieves the item information that are common for all items both dynamic and static and 0- to 3-dimensional as well as static and curvelinear items pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_eum_item_type_rtnReturns the eum item-tag, e.g. eumIWaterLevel. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_item_type_rtnReturns the corresponding textual description of the eum-item, e.g "Water level" corresponds to eumIWaterLevel. If a NULL-pointer is specified the parameter is ignored.
[out]name_rtnReturns a pointer to the text string containing the name of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]n_eum_unit_rtnReturns the eum-tag representing the item unit, e.g. eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the item unit, e.g "meter" corresponds to eumUmeter. If a NULL-pointer is specified the parameter is ignored.
[out]data_type_rtnReturns the simple data type of the item. Possible return values are UFS_FLOAT - indicating that the data of the item is stored in float format, UFS_DOUBLE - indicating that the data of the item is stored in double format, UFS_CHAR - indicating that the data of the item is stored in char format, UFS_INT - indicating that the data of the item is stored in int format, UFS_UNSIGNED
  • indicating that the data of the item is stored in unsigned int format. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetNoOfItems, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemRefCoords()

m0LINK LONG m0IMEX dfsGetItemRefCoords ( LPITEM  item,
float *  x_rtn,
float *  y_rtn,
float *  z_rtn 
)

Retrieves the origin of the reference coordinate system of a n-dimensional item pointed to by Item, static as well as dynamic, where 0 <= n <= 3.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]x_rtnReturns the x-coordinate in the geographical reference coordinate system. If a NULL-pointer is specified the parameter is ignored.
[out]y_rtnReturns the y-coordinate in the geographical reference coordinate system. If a NULL-pointer is specified the parameter is ignored.
[out]z_rtnReturns the z-coordinate in the geographical reference coordinate system. If a NULL-pointer is specified the parameter is ignored.
Remarks
If an error occurs during the execution of the call the three coordinates are all set to Dfs_FLOAT_DEL
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemRefCoords, dfsGetItemAxisOrientation, dfsSetItemAxisOrientation, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemStats()

m0LINK LONG m0IMEX dfsGetItemStats ( LPHEAD  pdfs,
LONG  item_no,
LONG  cOff,
double *  min_rtn,
double *  max_rtn,
double *  mean_rtn,
double *  st_dev_rtn,
double *  auto_corr_rtn,
LONG *  no_of_values_rtn,
LONG *  no_of_del_values_rtn,
LONG *  no_of_pairs_rtn 
)

Retrieves the statistical description of an individually selected gridpoint of an individually selected n-dimensional item specified by item_no from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]item_noSpecifies the number of the selected dynamic item.
[in]cOffSpecifies the 1-dimensional index of the selected gridpoint. For a 0-dimensional item, cOff must be 0. For a 1-dimensional item the limits are 0 <= cOff < j, for a 2-dimensional item the limits are 0 <= cOff < j*k and for a 3-dimensional item the limits are 0 <= cOff < j*k*l.
[out]min_rtnReturns the minimum value of the selected gridpoint of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]max_rtnReturns the maximum value of the selected gridpoint of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]mean_rtnReturns the mean value of the selected gridpoint of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]st_dev_rtnReturns the standard deviation of the selected gridpoint of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]auto_corr_rtnReturns the auto correlation of the selected gridpoint of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]no_of_values_rtnReturns the accumulated number of non delete values. If a NULL-pointer is specified the parameter is ignored.
[out]no_of_del_values_rtnReturns the accumulated number of delete values. If a NULL-pointer is specified the parameter is ignored.
[out]no_of_pairs_rtnReturns the accumulated number of pairs of non delete values, that is two adjacent non delete values. If a NULL-pointer is specified the parameter is ignored.
Remarks
The 1-dimensional indexation of the selected gridpoint will be replaced with an index-function that matches the dimension of the item, thereby enabling the use of e.g. a x- and a y-grid coordinate for a 2-dimensional item.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemStatsType, dfsGetItemStatsGlobal

◆ dfsGetItemStatsGlobal()

m0LINK LONG m0IMEX dfsGetItemStatsGlobal ( LPITEM  item,
double *  min_rtn,
double *  max_rtn,
LONG *  no_of_del_values_rtn 
)

Retrieves the global statistical values of an individually selected item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]min_rtnReturns the global minimum value of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]max_rtnReturns the global maximum value of the selected item. If a NULL-pointer is specified the parameter is ignored.
[out]no_of_del_values_rtnReturns the accumulated number of delete values. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemStatsType, dfsGetItemStats, dfsItemS, dfsItemD

◆ dfsGetItemStatsType()

m0LINK StatType m0IMEX dfsGetItemStatsType ( LPHEAD  pdfs)

retrieves the type of statistical values stored in the header part of the file pointed to by pdfs

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
dfsGetItemStatsType returns the type statistical values stored in the file. Possible return values are
  • F_NO_STAT - indicating the disabling of the use of statistical values in the file,
  • F_REGULAR_STAT - indicating the use of the regular formulas for calculating mean, standard deviation and autocorrelation, F_LARGEVAL_STAT - indicating the use of formulas with increased accuracy for calcuating the statistical values when dealing with large value dataset, or
  • F_UNDEFINED_STAT_TYPE - indicating a file stored in a non valid format.
See also
dfsGetItemStats, dfsGetItemStatsGlobal

◆ dfsGetItemUnitConversion()

m0LINK LONG m0IMEX dfsGetItemUnitConversion ( LPITEM  item,
UnitConvType *  nConvType_rtn,
LONG *  nUnit_rtn 
)

Gets the unit conversion for a specific item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]nConvType_rtnUnit conversion type specifications for the given item
[out]nUnit_rtnpointer to the eum unit code of the given item
Returns
F_NO_ERROR in case of no errors, otherwise an error code.
Remarks
Possible return values of nConvType_rtn are F_NO_CONVERSION, F_UBG_CONVERSION, F_FREE_CONVERSION and F_1ST_REGISTERED_UNIT_CONVERSION. In case of either F_NO_CONVERSION, F_UBG_CONVERSION and F_1ST_REGISTERED_UNIT_CONVERSION nUnit_rtn should be ignored.
See also
dfsItemS, dfsItemD, dfsSetItemUnitConversion, dfsGetItemAxisUnitConversion

◆ dfsGetItemValueType()

m0LINK LONG m0IMEX dfsGetItemValueType ( LPITEM  item,
DataValueType value_type 
)

Gets the Data value type of the specified item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]value_typepointer to the time series value type of the referred item.
Returns
F_NO_ERROR in case of no errors, otherwise an error code.
Remarks
Possible data value types are F_INSTANTANEOUS, F_ACCUMULATED, F_STEP_ACCUMULATED or F_MEAN_STEP_ACCUMULATED
See also
dfsSetValueType

◆ dfsGetItemXSize()

m0LINK ULONG m0IMEX dfsGetItemXSize ( LPITEM  item)

Retrieves the number of elements in the X axis, for an item pointed to by Item, in rectangular grids of 0, 1, 2, 3, and 4 dimensions.

The idea is that the function retrieves the number of stored grid points e.g. wetpoints in the X axis only.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
A zero-dimensional item has 1 element.
See also
dfsGetItemElements, dfsGetItemBytes, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemXYSize()

m0LINK ULONG m0IMEX dfsGetItemXYSize ( LPITEM  item)

Retrieves the number of horisontal elements, ie. in the plane X-Y for an item pointed to by Item, in rectangular grids of 0, 1, 2, 3, and 4 dimensions.

The idea is that the function retrieves the number of stored grid points e.g. wetpoints in the horisontal plane.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
A zero-dimensional item has 1 element.
See also
dfsGetItemElements, dfsGetItemBytes, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetItemXYZSize()

m0LINK ULONG m0IMEX dfsGetItemXYZSize ( LPITEM  item)

Retrieves the number of actually used elements for an item pointed to by Item, in rectangular grids of 0, 1, 2, 3, and 4 dimensions.

The idea is that the function retrieves the number of stored grid points e.g. wetpoints.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
A zero-dimensional item has 1 element.
See also
dfsGetItemElements, dfsGetItemBytes, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetNeqCalendarAxis()

m0LINK LONG m0IMEX dfsGetNeqCalendarAxis ( LPHEAD  pdfs,
LPCTSTR *  start_date_rtn,
LPCTSTR *  start_time_rtn,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
double *  tstart_rtn,
double *  tspan_rtn,
LONG *  tnum_rtn,
LONG *  tindex_rtn 
)

Retrieves the description of a non equidistant time axis from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]start_date_rtnReturns the date for the first time step. The string is 10 characters long in the following format YYYY-MM-DD. If a NULL-pointer is specified the parameter is ignored.
[out]start_time_rtnReturns the time for the first time step. The string is 8 characters long in the following format HH:MM:SS. If a NULL-pointer is specified the parameter is ignored.
[out]n_eum_unit_rtnReturns the eum-tag representing the time unit, e.g eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the time unit, e.g "second" corresponds to eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]tstart_rtnReturns the starting time of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tspan_rtnReturns the time span (tend - tstart) of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tnum_rtnReturns the number of time steps of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tindex_rtnReturns the index (record number) of the first time step. If a NULL-pointer is specified the parameter is ignored.
Remarks
Note that the format of the date string is YYYY-MM-DD and the format of the time string is HH:MM:SS regardless of the localization.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsGetNeqTimeAxis()

m0LINK LONG m0IMEX dfsGetNeqTimeAxis ( LPHEAD  pdfs,
LONG *  n_eum_unit_rtn,
LPCTSTR *  t_eum_unit_rtn,
double *  tstart_rtn,
double *  tspan_rtn,
LONG *  tnum_rtn,
LONG *  tindex_rtn 
)

Retrieves the description of a non equidistant time axis from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]n_eum_unit_rtnReturns the eum-tag representing the time unit, e.g eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]t_eum_unit_rtnReturns the corresponding textual description of the time unit, e.g "second" corresponds to eumUsec. If a NULL-pointer is specified the parameter is ignored.
[out]tstart_rtnReturns the starting time of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tspan_rtnReturns the time span (tend - tstart) of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tnum_rtnReturns the number of time steps of the data set. If a NULL-pointer is specified the parameter is ignored.
[out]tindex_rtnReturns the index (record number) of the first time step. If a NULL-pointer is specified the parameter is ignored.
Remarks
The intented use of tindex is e.g. when a time serie represents a subset of a larger time serie tindex could hold the position of the first time step in the original time serie.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsGetNoAssocStatic()

m0LINK ULONG m0IMEX dfsGetNoAssocStatic ( LPHEAD  pdfs,
LONG  item_no 
)

Retrieves the number of static items associated with the dynamic item specified by item_no.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]item_noSpecifies the dynamic item number
Returns
Returns the number of associated static items. If dfsGetNoAssocStatic e.g. returns 3, the static items have to be indexed 1, 2, and 3 using the call dfsGetAssocStatic.
See also
dfsGetAssocStatic, dfsSetAssocStatic

◆ dfsGetNoOfItems()

m0LINK LONG m0IMEX dfsGetNoOfItems ( LPHEAD  pdfs)

Returns the number of dynamic items defined in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns the number of dynamic items. In the call fails or no dynamic items are defined 0 is returned.
See also
dfsGetItemInfo, dfsSetItemInfo

◆ dfsGetTimeAxisType()

m0LINK TimeAxisType m0IMEX dfsGetTimeAxisType ( LPHEAD  pdfs)

Retrieves the time axis type of the data set from the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Remarks
The return value of F_UNDEFINED_TAXIS indicates an illegal written file.
Returns
Returns the TimeAxisType of the data set.
See also
dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsGetUsedItemBytes()

m0LINK ULONG m0IMEX dfsGetUsedItemBytes ( LPITEM  item)

Retrieves the number of packed bytes for an item pointed to by It.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
Note that the an item holds the number of bytes equal to the number of stored elements multiplied by the size of the basic type used to store the elements.
Returns
Returns the number packed of bytes for an item, static as well as dynamic. If the call fails 0 is returned.
See also
dfsGetItemBytes, dfsGetUsedItemElements, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetUsedItemElements()

m0LINK ULONG m0IMEX dfsGetUsedItemElements ( LPITEM  item)

Retrieves the number of actually used elements for an item pointed to by Item.

The idea is that the function retrieves the number of stored grid points e.g. wetpoints.

Parameters
[in]itemSpecifies a reference to the item geometry.
Remarks
A zero-dimensional item has 1 element.
Returns
Returns the number of actual elements for an item, static as well as dynamic. If the call fails 0 is returned. For wetpoint compressed items only wetpoints are returned.
See also
dfsGetItemElements, dfsGetItemBytes, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsGetVersionCurrent()

m0LINK LONG m0IMEX dfsGetVersionCurrent ( )

Retrieves the version number of the ufs-library that is currently being used.

Retrieves the corresponding version number of the ufs-library that was used to originally create the a file.

Returns
Returns an integer specifying the version number of the ufs-library currently being used.
See also
dfsHeaderCreate

◆ dfsHeaderCreate()

m0LINK LONG m0IMEX dfsHeaderCreate ( FileType  file_type,
LPCTSTR  title,
LPCTSTR  apptitle,
LONG  appverno,
LONG  no_of_items,
StatType  stat_type,
LPHEAD *  pdfs_rtn 
)

Creates the appropriate data structures for the header associated with a file.

This includes dynamic allocation of the memory needed for storing the text strings and the specified number of items.

Parameters
[in]file_typeSpecifies the storage type for the axis, when the file is saved. file_type can only be set calling dfsHeaderCreate. The valid values are:
  • F_EQTIME_FIXEDSPACE_ALLITEMS specifying fixed (either equidistant or curvelinear) spatial axis for each item, equidistant time axis and all items stored in each time step.
  • F_NEQTIME_FIXEDSPACE_ALLITEMS specifying fixed (either equidistant or curvelinear) spatial item axis, non equidistant time axis and all items stored in each time step.
[in]titleSpecifies a pointer to the title text string.
[in]apptitleSpecifies a pointer to the application title text string.
[in]appvernoSpecifies the version number of the application. The version number is a signed integer.
[in]no_of_itemsSpecifies the number of items.
[in]stat_typeSpecifies the type af statistical value description used in the system. One of
See also
StatType
Parameters
[in]pdfs_rtnReturns a reference LPHEAD to the header information of the file. If an error occurs during execution of the function a NULL-reference is returned. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for freeing the storage associated with the reference LPHEAD to the header structure by calling dfsHeaderDestroy.
See also
dfsHeaderDestroy

◆ dfsHeaderDestroy()

m0LINK LONG m0IMEX dfsHeaderDestroy ( LPHEAD *  pdfs_rtn)

Frees the appropriate data structures for the header associated with a file.

The function is complementary to IdfsHeaderCreate.

Parameters
[in,out]pdfs_rtnSpecifies a pointer to the reference to the header structure. After freeing the pointer is set to NULL.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsHeaderCreate

◆ dfsInitSystem()

m0LINK void m0IMEX dfsInitSystem ( )

Initializes the entire dfs system.

It should in general be called before any other dfs-function is called.

◆ dfsIsFileCompressed()

m0LINK LONG m0IMEX dfsIsFileCompressed ( LPHEAD  pdfs)

Returns flag indicating if file is compressed.

See dfsGetEncodeKey for the definition of compression and the encode key values

Parameters
[in]pdfsSpecifies a pointer to the header structure.

◆ dfsIsItemCompressed()

m0LINK LONG m0IMEX dfsIsItemCompressed ( LPITEM  item,
LONG *  n_rec_size_rtn 
)

Determines whether the selected item is compressed in a MIKE 3 or a MIKE 21 compressed file. Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[out]n_rec_size_rtnpointer to the LONG value specifying the type of compression of the item.
See also
dfsItemEnableCompression

◆ dfsItemD()

m0LINK LPITEM m0IMEX dfsItemD ( LPHEAD  pdfs,
LONG  item_no 
)

Maps the item number item_no for the header structure pointed to by pdfs to a direct reference to the geometrical description of a dynamic item.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]item_noSpecifies the item number. Note that item_no = 1 for the first item.
Returns
Returns a pointer to the requested item specified by item_no. If the item number is invalid or the call otherwise fails dfsItemD returns NULL.
Remarks
Note that dfsItemD only works on dynamic items. EXAMPLE:
See also
dfsItemS, dfsGetItemInfo, dfsSetItemInfo

◆ dfsItemEnableCompression()

m0LINK void m0IMEX dfsItemEnableCompression ( LPHEAD  pdfs)

Flags the header information structure of a file to enable compression of the file.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
See also
dfsIsItemCompressed

◆ dfsItemS()

m0LINK LPITEM m0IMEX dfsItemS ( LPVECTOR  pvec)

Maps a static vector to a direct reference to the geometrical description of the item (static and dynamic items have common germetrical description).

Parameters
[in]pvecSpecifies a reference to the structure of a static vector.
Remarks
Note that dfsItemS only works on static items.
Returns
Returns a pointer to the static item specified by pvec. If the call fails dfsItemS returns NULL.
See also
dfsItemD, dfsGetItemInfo, dfsSetItemInfo

◆ dfsParamModifyTimes()

m0LINK LONG m0IMEX dfsParamModifyTimes ( LPHEAD  pdfs,
BOOL  doModify 
)

Sets the parameter deciding whether times stored in the dfs should be modified. Default is true.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]doModifyflag telling whether to modify or not.
Returns
It returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
Modifying times means that the tstart value will be transferred to the start date and time for the calendar axis, and the time returned by/set by the read/write functions will have the tstart subtracted/added.

◆ dfsReadItemTimeStep()

m0LINK LONG m0IMEX dfsReadItemTimeStep ( LPHEAD  pdfs,
LPFILE  fp,
double *  time_rtn,
void *  dataptr_rtn 
)

Reads the time step of the next item in the file.

If the time axis is non equidistant, the actual time label is read as well and returned in time_rtn, otherwise the time step number is returned. The function call only succeeds if the storage type of the file is F_EQTIME_FIXEDSPACE_ALLITEMS or F_NEQTIME_FIXEDSPACE_ALLITEMS.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a reference to the file.
[out]time_rtnReturns the actual time label of the time step if the file is stored with non equidistant time axis,otherwise the time step number is returned. If a NULL-pointer is specified the parameter is ignored.
[in,out]dataptr_rtnArray containing the time step values of the item. Must be pre-allocated.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSkipItem, dfsSkipTimeStep, dfsWriteItemTimeStep

◆ dfsSetAppTitle()

m0LINK LONG m0IMEX dfsSetAppTitle ( LPHEAD  pdfs,
LPCTSTR  apptitle 
)

Copies the string from the apptitle-text string to a corresponding field in the header structure pointed to by pdfs. dfsSetAppTitle automatically allocates sufficiently memory for storing strings of any length.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]apptitlestring that specifies the title of the application
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetAppTitle, dfsHeaderCreate

◆ dfsSetAppVersionNo()

m0LINK LONG m0IMEX dfsSetAppVersionNo ( LPHEAD  pdfs,
LONG  appverno 
)

Copies the application version number from the appverno to a corresponding field in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]appvernoSpecifies the application version number.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetAppVersionNo, dfsHeaderCreate

◆ dfsSetAssocStatic()

m0LINK LONG m0IMEX dfsSetAssocStatic ( LPHEAD  pdfs,
LONG  item_no,
LONG  staItNo 
)

Associates a static item specified by staItNo with a dynamic item specified by item_no (establishes a link between the items).

It is only possible to set associated static items to a new file. For an existing file it is invalid to call this method.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]item_noSpecifies the number of the dynamic item.
[in]staItNoSpecifies the number of the static item.
Remarks
Note that dfsSetAssocStatic actually adds an associated static item to the dynamic item rather than setting an existing reference.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetNoAssocStatic, dfsGetAssocStatic

◆ dfsSetDataType()

m0LINK LONG m0IMEX dfsSetDataType ( LPHEAD  pdfs,
LONG  data_type 
)

Sets the tag-variable defining the type of data pointed to by pdfs..

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]data_typeSpecifies the tag-variable defining the type of data.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0),
  • indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
Note that there exists no global system for maintaining these tag-variables. The tag-variables should only be interpreted locally within one model-complex e.g. MIKE 21. The application programmer can tag bathymetries, result files, input files freely.
See also
dfsGetDataType, dfsHeaderCreate

◆ dfsSetDeleteValByte()

m0LINK LONG m0IMEX dfsSetDeleteValByte ( LPHEAD  pdfs,
char  cdel 
)

Copies the char-delete value from cdel to a corresponding field in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]cdelSpecifies the char-delete value.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0),
  • indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetDeleteValByte, dfsSetDeleteValDouble, dfsSetDeleteValFloat, dfsSetDeleteValInt, dfsSetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsSetDeleteValDouble()

m0LINK LONG m0IMEX dfsSetDeleteValDouble ( LPHEAD  pdfs,
double  ddel 
)

Copies the double-delete value from ddel to a corresponding field in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]ddelSpecifies the double-delete value.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0),
  • indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetDeleteValDouble, dfsSetDeleteValByte, dfsSetDeleteValFloat, dfsSetDeleteValInt, dfsSetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsSetDeleteValFloat()

m0LINK LONG m0IMEX dfsSetDeleteValFloat ( LPHEAD  pdfs,
float  fdel 
)

Copies the float-delete value from fdel to a corresponding field in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fdelSpecifies the float-delete value.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetDeleteValFloat, dfsSetDeleteValByte, dfsSetDeleteValDouble, dfsSetDeleteValInt, dfsSetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsSetDeleteValInt()

m0LINK LONG m0IMEX dfsSetDeleteValInt ( LPHEAD  pdfs,
LONG  idel 
)

Copies the LONG-delete value from idel to a corresponding field in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]idelSpecifies the LONG-delete value.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetDeleteValInt, dfsSetDeleteValByte, dfsSetDeleteValDouble, dfsSetDeleteValFloat, dfsSetDeleteValUnsignedInt, dfsHeaderCreate

◆ dfsSetDeleteValUnsignedInt()

m0LINK LONG m0IMEX dfsSetDeleteValUnsignedInt ( LPHEAD  pdfs,
ULONG  udel 
)

Copies the ULONG-delete value from udel to a corresponding field in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]udelSpecifies the ULONG-delete value.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetDeleteValUnsignedInt, dfsSetDeleteValByte, dfsSetDeleteValDouble, dfsSetDeleteValFloat, dfsSetDeleteValInt, dfsHeaderCreate

◆ dfsSetEncodeKey()

m0LINK LONG m0IMEX dfsSetEncodeKey ( LPHEAD  pdfs,
int *  xkey,
int *  ykey,
int *  zkey,
int  nRecordSize 
)

Sets the encoding key for compressing the dfs file.

See dfsGetEncodeKey for the definition of the encode key values

Compression is only supported when all dynamic items are of type float.

All dynamic items must have a size that is compatible with the encode key values, i.e.,

xKey[i] &lt; xCount &amp;&amp; yKey[y] &lt; yCount &amp;&amp; zKey[i] &lt; zCount
Parameters
[in]pdfsSpecifies a pointer to the header structure.
[in]xkeyx-index of encoding key
[in]ykeyy-index of encoding key
[in]zkeyz-index of encoding key
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.

◆ dfsSetEqCalendarAxis()

m0LINK LONG m0IMEX dfsSetEqCalendarAxis ( LPHEAD  pdfs,
LPCTSTR  start_date,
LPCTSTR  start_time,
LONG  n_eum_unit,
double  tstart,
double  tstep,
LONG  tindex 
)

Copies the description of an equidistant calendar axis to the corresponding fields in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]start_dateSpecifies the date for the first time step. The string must be 10 characters long in the following format YYYY-MM-DD
[in]start_timeSpecifies the time for the first time step. The string must be 8 characters long in the following format HH:MM:SS
[in]n_eum_unitSpecifies the eum-tag representing a time unit, e.g eumUhour.
[in]tstartSpecifies the starting time of the data set.
[in]tstepSpecifies the time step of the data set.
[in]tindexSpecifies the index (record number) of the first time step.
Remarks
Note that the format of the date string is YYYY-MM-DD and the format of the time string is HH:MM:SS regardless of the localization.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsSetEqTimeAxis()

m0LINK LONG m0IMEX dfsSetEqTimeAxis ( LPHEAD  pdfs,
LONG  n_eum_unit,
double  tstart,
double  tstep,
LONG  tindex 
)

Copies the description of an equidistant time axis to the corresponding fields in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]n_eum_unitSpecifies the eum-tag representing a time unit, e.g eumUhour.
[in]tstartSpecifies the starting time of the data set.
[in]tstepSpecifies the time step of the data set.
[in]tindexSpecifies the index (record number) of the first time step.
Remarks
The intented use of tindex is e.g. when a time serie represents a subset of a larger time serie tindex could hold the position of the first time step in the original time serie.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsSetFileTitle()

m0LINK LONG m0IMEX dfsSetFileTitle ( LPHEAD  pdfs,
LPCTSTR  title 
)

Copies the string from the title-text string to a corresponding field in the header structure pointed to by pdfs. dfsSetFileTitle automatically allocates sufficiently memory for storing strings of any length.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]titlestring that specifies title of the application
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetFileTitle, dfsHeaderCreate

◆ dfsSetGeoInfoUndefined()

m0LINK LONG m0IMEX dfsSetGeoInfoUndefined ( LPHEAD  pdfs)

Sets the type of projection to be undefined. If no geographical information is available or the projection type is unknown, this call should be used.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetGeoInfoType, dfsSetGeoInfoUTMProj, dfsHeaderCreate

◆ dfsSetGeoInfoUTMProj()

m0LINK LONG m0IMEX dfsSetGeoInfoUTMProj ( LPHEAD  pdfs,
LPCTSTR  projection_id,
double  lon0,
double  lat0,
double  orientation 
)

Sets the type of projection to be UTM-projection, sets the zone and sets the longitude, latitude and orientation of the reference coordinate system.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]projection_idSpecifies the id-string of the projection which refers to the UTM zone (standard or specialized) that was used originally to create the data-set. Examples of this value are "UTM-32" and "BTM" for a special Bangladesh custom made UTM-zone.
[in]lon0Specifies the longitude of the origin in the reference coordinate system in decimal degrees.
[in]lat0Specifies the latitude of the origin in the reference coordinate system in decimal degrees.
[in]orientationSpecifies the orientation of the reference coordinate system in decimal degrees.
Remarks
Note that the origin returned by dfsGetGeoInfoUTMProj is given in latitude/longitude, Since the projection of the data is either a standard or a customized UTM-zone it would be more logical to store the origin in native UTM-coordinates:(easting, northing). This is NOT done because the compatibility with the old dtX-filesystem is maintained.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetGeoInfoType, dfsGetGeoInfoUTMProj, dfsSetGeoInfoUndefined, dfsHeaderCreate

◆ dfsSetItemAxisCurveLinearD2()

m0LINK LONG m0IMEX dfsSetItemAxisCurveLinearD2 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
double *  xcoords,
double *  ycoords,
BOOL  coords_copy 
)

Sets the relative axis description of an individually selected 2-dimensional curvelinear item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]xcoordsSpecifies the array containing (j + 1)*(k + 1) x-coordinates for the gridpoints.
[in]ycoordsSpecifies the array containing (j + 1)*(k + 1) y-coordinates for the gridpoints.
[in]coords_copySpecifies whether the xcoords-array and the ycoords-array should be copied to system allocated arrays or used directly by just copying the pointer. If coords_copy is FALSE (0) only the pointer will be copied, otherwise (TRUE) the entire xcoords-array and ycoords-array will be copied to system allocated arrays.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisNeqD2, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisNeqD1, dfsSetItemAxisNeqD3, dfsSetItemAxisEqD2, dfsSetItemAxisTvarD2, dfsItemS, dfsItemD

◆ dfsSetItemAxisCurveLinearD3()

m0LINK LONG m0IMEX dfsSetItemAxisCurveLinearD3 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
LONG  l,
double *  xcoords,
double *  ycoords,
double *  zcoords,
BOOL  coords_copy 
)

Sets the relative axis description of an individually selected 3-dimensional curvelinear item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]lSpecifies the number of gridpoints in the z-direction for the item.
[in]xcoordsSpecifies the array containing (j + 1)*(k + 1)*(l + 1) x-coordinates for the gridpoints.
[in]ycoordsSpecifies the array containing (j + 1)*(k + 1)*(l + 1) y-coordinates for the gridpoints.
[in]zcoordsSpecifies the array containing (j + 1)*(k + 1)*(l + 1) z-coordinates for the gridpoints.
[in]coords_copySpecifies whether the xcoords-array, the ycoords-array and the the zcoords-array should be copied to system allocated arrays or used directly by just copying the pointer. If coords_copy is FALSE (0) only the pointer will be copied, otherwise (TRUE) the entire xcoords-array, ycoords-array and zcoords-array will be copied to system allocated arrays.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisNeqD3, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisNeqD1, dfsSetItemAxisNeqD2, dfsSetItemAxisEqD3, dfsSetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsSetItemAxisEqD0()

m0LINK LONG m0IMEX dfsSetItemAxisEqD0 ( LPITEM  item,
LONG  n_eum_unit 
)

Sets the relative axis description of an individually selected 0-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisEqD0, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisEqD1, dfsSetItemAxisEqD2, dfsSetItemAxisEqD3, dfsItemS, dfsItemD

◆ dfsSetItemAxisEqD1()

m0LINK LONG m0IMEX dfsSetItemAxisEqD1 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
float  x0,
float  dx 
)

Sets the relative axis description of an individually selected 1-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints for the item.
[in]x0Specifies the relative offset to the origin.
[in]dxSpecifies the spacing between each set of neighboring gridpoints.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisEqD1, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisEqD0, dfsSetItemAxisEqD2, dfsSetItemAxisEqD3, dfsSetItemAxisNeqD1, dfsSetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsSetItemAxisEqD2()

m0LINK LONG m0IMEX dfsSetItemAxisEqD2 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
float  x0,
float  y0,
float  dx,
float  dy 
)

Sets the relative axis description of an individually selected 2-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]x0Specifies the relative x-offset to the origin.
[in]y0Specifies the relative y-offset to the origin.
[in]dxSpecifies the spacing between each set of neighboring gridpoints in the x-direction.
[in]dySpecifies the spacing between each set of neighboring gridpoints in the y-direction.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisEqD2, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisEqD0, dfsSetItemAxisEqD1, dfsSetItemAxisEqD3, dfsSetItemAxisNeqD2, dfsSetItemAxisTvarD2, dfsItemS, dfsItemD

◆ dfsSetItemAxisEqD3()

m0LINK LONG m0IMEX dfsSetItemAxisEqD3 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
LONG  l,
float  x0,
float  y0,
float  z0,
float  dx,
float  dy,
float  dz 
)

Sets the relative axis description of an individually selected 3-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]lSpecifies the number of gridpoints in the z-direction for the item.
[in]x0Specifies the relative x-offset to the origin.
[in]y0Specifies the relative y-offset to the origin.
[in]z0Specifies the relative z-offset to the origin.
[in]dxSpecifies the spacing between each set of neighboring gridpoints in the x-direction.
[in]dySpecifies the spacing between each set of neighboring gridpoints in the y-direction.
[in]dzSpecifies the spacing between each set of neighboring gridpoints in the z-direction.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisEqD3, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisEqD0, dfsSetItemAxisEqD1, dfsSetItemAxisEqD2, dfsSetItemAxisNeqD3, dfsSetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsSetItemAxisEqD4()

m0LINK LONG m0IMEX dfsSetItemAxisEqD4 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
LONG  l,
LONG  m,
float  x0,
float  y0,
float  z0,
float  f0,
float  dx,
float  dy,
float  dz,
float  df 
)

Sets the relative axis description of an individually selected 4-dimensional equidistant item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]lSpecifies the number of gridpoints in the z-direction for the item.
[in]mSpecifies the number of gridpoints in the f-direction for the item.
[in]x0Specifies the relative x-offset to the origin.
[in]y0Specifies the relative y-offset to the origin.
[in]z0Specifies the relative z-offset to the origin.
[in]f0Specifies the relative f-offset to the origin.
[in]dxSpecifies the spacing between each set of neighboring gridpoints in the x-direction.
[in]dySpecifies the spacing between each set of neighboring gridpoints in the y-direction.
[in]dzSpecifies the spacing between each set of neighboring gridpoints in the z-direction.
[in]dfSpecifies the spacing between each set of neighboring gridpoints in the f-direction.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisEqD4, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisEqD0, dfsSetItemAxisEqD1, dfsSetItemAxisEqD2, dfsSetItemAxisNeqD3, dfsSetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsSetItemAxisNeqD1()

m0LINK LONG m0IMEX dfsSetItemAxisNeqD1 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
Coords *  coords,
BOOL  coords_copy 
)

Sets the relative axis description of an individually selected 1-dimensional curvelinear item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints for the item.
[in]coordsSpecifies the array containing the coordinates (x, y, z) for each gridpoint.
[in]coords_copySpecifies whether the coords-array should be copied to a system allocated array or used directly by just copying the pointer. If coords_copy is FALSE (0) only the pointer will be copied, otherwise (TRUE) the entire coords-array will be copied to a system allocated array.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisNeqD1, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisNeqD2, dfsSetItemAxisNeqD3, dfsSetItemAxisEqD1, dfsSetItemAxisTvarD1, dfsItemS, dfsItemD

◆ dfsSetItemAxisNeqD2()

m0LINK LONG m0IMEX dfsSetItemAxisNeqD2 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
double *  xcoords,
double *  ycoords,
BOOL  coords_copy 
)

Sets the relative axis description of an individually selected 2-dimensional non equidistant but orthogonal item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]xcoordsSpecifies the array containing (j + 1) x-coordinates for the gridpoints along the x-axis.
[in]ycoordsSpecifies the array containing (k + 1) y-coordinates for the gridpoints along the y-axis.
[in]coords_copySpecifies whether the xcoords-array and the ycoords-array should be copied to system allocated arrays or used directly by just copying the pointer. If coords_copy is FALSE (0) only the pointer will be copied, otherwise (TRUE) the entire xcoords-array and ycoords-array will be copied to system allocated arrays.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisNeqD2, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisNeqD1, dfsSetItemAxisNeqD3, dfsSetItemAxisEqD2, dfsSetItemAxisTvarD2, dfsItemS, dfsItemD

◆ dfsSetItemAxisNeqD3()

m0LINK LONG m0IMEX dfsSetItemAxisNeqD3 ( LPITEM  item,
LONG  n_eum_unit,
LONG  j,
LONG  k,
LONG  l,
double *  xcoords,
double *  ycoords,
double *  zcoords,
BOOL  coords_copy 
)

Sets the relative axis description of an individually selected 3-dimensional non equidistant but orthogonal item pointed to by Item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_unitSpecifies the eum tag variable for the spatial axis unit, e.g. eumUmeter.
[in]jSpecifies the number of gridpoints in the x-direction for the item.
[in]kSpecifies the number of gridpoints in the y-direction for the item.
[in]lSpecifies the number of gridpoints in the z-direction for the item.
[in]xcoordsSpecifies the array containing (j + 1) x-coordinates for the gridpoints along the x-axis.
[in]ycoordsSpecifies the array containing (k + 1) y-coordinates for the gridpoints along the y-axis.
[in]zcoordsSpecifies the array containing (l + 1) z-coordinates for the gridpoints along the z-axis.
[in]coords_copySpecifies whether the xcoords-array, the ycoords-array and the the zcoords-array should be copied to system allocated arrays or used directly by just copying the pointer. If coords_copy is FALSE (0) only the pointer will be copied, otherwise (TRUE) the entire xcoords-array, ycoords-array and zcoords-array will be copied to system allocated arrays.
Remarks
If the item is dynamic and the size of the item is changed, the statistical housekeeping is reset.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemAxisNeqD3, dfsSetItemInfo, dfsSetItemRefCoords, dfsSetItemAxisOrientation, dfsSetItemAxisNeqD1, dfsSetItemAxisNeqD2, dfsSetItemAxisEqD3, dfsSetItemAxisTvarD3, dfsItemS, dfsItemD

◆ dfsSetItemAxisOrientation()

m0LINK LONG m0IMEX dfsSetItemAxisOrientation ( LPITEM  item,
float  alpha,
float  phi,
float  theta 
)

Sets the orientation of the reference coordinate system of a n-dimensional item pointed to by Item, static as well as dynamic, where 0 <= n <= 3.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]alphaSpecifies the horizontal rotation of the item relative to the geographical reference coordinate system.
[in]phiSpecifies the vertical rotation of the item relative to the geographical reference coordinate system.
[in]thetaSpecifies the tilted rotation of the item relative to the geographical reference coordinate system.
Remarks
Note that the use of a reference coordinate system and therefore the call dfsSetItemAxisOrientation is optional. Besides this alpha, phi and theta are obsolete for 0-dimensional equidistant items and theta is obsolete for 1-dimensional equidistant items. alpha, phi and theta are obsolete for both fixed and timevarying curvelinear items regardless of the dimension.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemRefCoords, dfsSetItemRefCoords, dfsGetItemAxisOrientation, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsSetItemAxisUnitConversion()

m0LINK LONG m0IMEX dfsSetItemAxisUnitConversion ( LPITEM  item,
UnitConvType  nConvType,
LONG  nUnit 
)

Sets the unit conversion for the axis of a specific item.

The default option for an item is that no conversion is performed. If it's set to anything else automatic conversion is performed.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]nConvTypeUnit conversion type specifications for the given item
[in]nUniteum unit code of the given item
Returns
F_NO_ERROR in case of no errors, otherwise an error code.
Remarks
Possible value of nConvType are F_NO_CONVERSION, F_UBG_CONVERSION, F_FREE_CONVERSION and F_1ST_REGISTERED_UNIT_CONVERSION. In case of either F_NO_CONVERSION, F_UBG_CONVERSION and F_1ST_REGISTERED_UNIT_CONVERSION nUnit is ignored.
See also
dfsItemS, dfsItemD, dfsGetItemAxisUnitConversion, dfsSetItemUnitConversion

◆ dfsSetItemInfo()

m0LINK LONG m0IMEX dfsSetItemInfo ( LPHEAD  pdfs,
LPITEM  item,
LONG  n_eum_item_type,
LPCTSTR  name,
LONG  n_eum_unit,
SimpleType  data_type 
)

Copies the common item information to the item pointed to by Item.

This must be called as the first method when configuring a new item in a new file, i.e. before setting spatial axis. To update the information of an item in an existing file, see dfsUpdateItemInfo

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[out]itemSpecifies a reference to the item geometry.
[out]n_eum_item_typeSpecifies the eum tag variable defining the type of item, e.g. eumIWaterLevel.
[out]nameSpecifies a pointer to the text string containing the name of the selected item.
[out]n_eum_unitSpecifies the eum-tag representing the item unit, e.g. for eumIWaterLevel it could be eumUmeter.
[out]data_typeSpecifies the simple data type of the item. Accepted values are UFS_FLOAT - indicating that the data of the item is stored in float format, UFS_DOUBLE - indicating that the data of the item is stored in double format, UFS_CHAR - indicating that the data of the item is stored in char format, UFS_INT - indicating that the data of the item is stored in int format, UFS_UNSIGNED
  • indicating that the data of the item is stored in unsigned int format.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsUpdateItemInfo, dfsGetNoOfItems, dfsGetItemInfo, dfsItemS, dfsItemD

◆ dfsSetItemRefCoords()

m0LINK LONG m0IMEX dfsSetItemRefCoords ( LPITEM  item,
float  x,
float  y,
float  z 
)

Sets the origin of the reference coordinate system of a n-dimensional item pointed to by Item, either static or dynamic, where 0 <= n <= 3.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]xSpecifies the x-coordinate in the geographical reference coordinate system.
[in]ySpecifies the y-coordinate in the geographical reference coordinate system.
[in]zSpecifies the z-coordinate in the geographical reference coordinate system.
Remarks
Note that the use of a reference coordinate system and therefore the call dfsSetItemRefCoords is optional.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetItemRefCoords, dfsGetItemAxisOrientation, dfsSetItemAxisOrientation, dfsGetItemInfo, dfsSetItemInfo, dfsItemS, dfsItemD

◆ dfsSetItemUnitConversion()

m0LINK LONG m0IMEX dfsSetItemUnitConversion ( LPITEM  item,
UnitConvType  nConvType,
LONG  nUnit 
)

Sets the unit conversion for a specific item.

The default option for an item is that no conversion is performed. If it's set to anything else automatic conversion is performed.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]nConvTypeUnit conversion type specifications for the given item
[in]nUniteum unit code of the given item
Returns
F_NO_ERROR in case of no errors, otherwise an error code.
Remarks
Possible value of nConvType are F_NO_CONVERSION, F_UBG_CONVERSION, F_FREE_CONVERSION and F_1ST_REGISTERED_UNIT_CONVERSION. In case of either F_NO_CONVERSION, F_UBG_CONVERSION or F_1ST_REGISTERED_UNIT_CONVERSION nUnit is ignored.
See also
dfsItemS, dfsItemD, dfsGetItemUnitConversion, dfsSetItemAxisUnitConversion

◆ dfsSetItemValueType()

m0LINK LONG m0IMEX dfsSetItemValueType ( LPITEM  item,
DataValueType  value_type 
)

Sets the data value type for the specified item.

Parameters
[in]itemSpecifies a reference to the item geometry.
[in]value_typepointer to the time series value type of the referred item.
Returns
F_NO_ERROR in case of no errors, otherwise an error code.
Remarks
Possible data value types are F_INSTANTANEOUS, F_ACCUMULATED, F_STEP_ACCUMULATED or F_MEAN_STEP_ACCUMULATED
See also
dfsGetValueType

◆ dfsSetNeqCalendarAxis()

m0LINK LONG m0IMEX dfsSetNeqCalendarAxis ( LPHEAD  pdfs,
LPCTSTR  start_date,
LPCTSTR  start_time,
LONG  n_eum_unit,
double  tstart,
LONG  tindex 
)

Copies the description of a non equidistant calendar axis to the corresponding fields in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]start_dateSpecifies the date for the first time step. The string must be 10 characters long in the following format YYYY-MM-DD
[in]start_timeSpecifies the time for the first time step. The string must be 8 characters long in the following format HH:MM:SS
[in]n_eum_unitSpecifies the eum-tag representing a time unit, e.g eumUhour.
[in]tstartSpecifies the starting time of the data set. Currently ignored.
[in]tindexSpecifies the index (record number) of the first time step.
Remarks
Note that the format of the date string is YYYY-MM-DD and the format of the time string is HH:MM:SS regardless of the localization. The tstart is set by the time of the first item-time-step, hence the parameter is ignored here.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis

◆ dfsSetNeqTimeAxis()

m0LINK LONG m0IMEX dfsSetNeqTimeAxis ( LPHEAD  pdfs,
LONG  n_eum_unit,
double  tstart,
LONG  tindex 
)

Copies the description of a non equidistant time axis to the corresponding fields in the header structure pointed to by pdfs.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]n_eum_unitSpecifies the eum-tag representing a time unit, e.g eumUhour.
[in]tstartSpecifies the starting time of the data set. Currently ignored
[in]tindexSpecifies the index (record number) of the first time step.
Remarks
The intented use of tindex is e.g. when a time serie represents a subset of a larger time serie tindex could hold the position of the first time step in the original time serie. The tstart is set by the time of the first item-time-step, hence the parameter is ignored here.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetEqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsSetNumberOfTimeSteps()

m0LINK LONG m0IMEX dfsSetNumberOfTimeSteps ( LPHEAD  pdfs,
LONG  n_number_of_time_steps 
)

Sets explicitly the number of time steps in the header.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]n_number_of_time_stepsSpecifies the number of time steps
Remarks
The intented use of this method is in a streaming context where the number of timesteps is known before writing the file, but it is not possible to update the header when closing the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsSetTimeStartEnd()

m0LINK LONG m0IMEX dfsSetTimeStartEnd ( LPHEAD  pdfs,
double  startTimeOffset,
double  timeSpan 
)

Sets explicitly the time of the first data set and the time span of the data set in the header.

Parameters
[in]pdfsSpecifies a pointer to the header structure
[in]startTimeOffsetSpecifies the time of the first data set in the file. This is usually zero.
[in]timeSpanSpecifies the timespan of data in the file
Remarks
The intented use of this method is in a streaming context where the number of timesteps is known before writing the file, but it is not possible to update the header when closing the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsGetTimeAxisType, dfsGetEqTimeAxis, dfsGetNeqTimeAxis, dfsSetNeqTimeAxis, dfsGetEqCalendarAxis, dfsGetNeqCalendarAxis, dfsSetEqCalendarAxis, dfsSetNeqCalendarAxis

◆ dfsSkipItem()

m0LINK LONG m0IMEX dfsSkipItem ( LPHEAD  pdfs,
LPFILE  fp 
)

Skips the time step of the next item in the file.

If the time axis is non equidistant, the actual time label is skipped as well. If the file contains timevarying curvelinear items, the time label, the axis definition and the actual data for the item is skipped. The file pointer fp is placed at the beginning of the next item time step in the file by directly jumping in the file without reading the data. The function call succeeds for any type of file.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSkipTimeStep, dfsReadItemTimeStep, dfsQueryFreeItemTimeStep, dfsReadFreeItemTimeStep, dfsReadItemTvarTimeStep, dfsQueryFreeItemTvarTimeStep, dfsReadFreeItemTvarTimeStep

◆ dfsSkipTimeStep()

m0LINK LONG m0IMEX dfsSkipTimeStep ( LPHEAD  pdfs,
LPFILE  fp 
)

Skips the entire time step containing all items stored consecutively in the time step.

If the time axis is non equidistant, the actual time label is skipped as well. The file pointer fp is placed at the beginning of the first item in the next time step in the file by directly jumping in the file without reading the data. The function call only succeeds if the storage type of the file is F_EQTIME_FIXEDSPACE_ALLITEMS, F_EQTIME_TVARSPACE_ALLITEMS or F_NEQTIME_FIXEDSPACE_ALLITEMS that is a file where each time step includes all items defined in the file.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a pointer to the file.
Remarks
Note that dfsSkipTimeStep fails if the file type is one of the two F_NEQTIME_FIXEDSPACE_VARITEMS or F_NEQTIME_TVARSPACE_VARITEMS since each set of data for an item at a given time (called an item time step) has it's own time label, so there is no common time step for all items.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error. see dfsSkipItem, dfsReadItemTimeStep, dfsQueryFreeItemTimeStep, dfsReadFreeItemTimeStep, dfsReadItemTvarTimeStep, dfsQueryFreeItemTvarTimeStep, dfsReadFreeItemTvarTimeStep

◆ dfsStaticCreate()

m0LINK LONG m0IMEX dfsStaticCreate ( LPVECTOR *  pvec_rtn)

Creates the appropriate data structures for a new static vector.

This includes dynamic allocation of the memory needed for storing the text strings and the specified axis data.

Parameters
[out]pvec_rtnReturns a pointer to the vector structure. If a NULL-pointer is specified the parameter is ignored.
Remarks
The application is responsible for freeing the storage associated with the pointer to the vector by calling dfsStaticDestroy. Besides this note that by defining the spatial axis' memory is NOT allocated for the actual data itself. The data has to be kept in an external array until written to the file using the call dfsStaticWrite.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsStaticRead, dfsStaticWrite, dfsStaticDestroy, dfsStaticGetData, dfsFileCreate, dfsSetItemAxisEqD1

◆ dfsStaticDestroy()

m0LINK LONG m0IMEX dfsStaticDestroy ( LPVECTOR *  pvec_rtn)

Frees the appropriate data structures for the static vector specified by pvec_rtn. The function is complementary to dfsStaticCreate.

Parameters
[out]pvec_rtnSpecifies a pointer to the vector structure and returns a NULL-pointer.
Remarks
Note that the pvec_rtn is actually a double pointer and must be valid before the call.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsStaticRead, dfsStaticWrite, dfsStaticCreate, dfsStaticGetData, dfsFileRead, dfsSetItemAxisEqD1

◆ dfsStaticGetData()

m0LINK LONG m0IMEX dfsStaticGetData ( LPVECTOR  pvec,
void *  data 
)

Retrieves the actual data from the static vector pointed to by pvec and copies them to the array specified by data.

Parameters
[in]pvecSpecifies a pointer to the vector structure.
[in,out]dataSpecifies a preallocated data array, that the data is copied to. Note that the array must have a size corresponding to the axis description and the type used for storing the data.
Remarks
Note that dfsStaticGetData only can be used successfully if the vector specified by pvec has been created through the use of the call dfsStaticRead.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsStaticRead, dfsStaticWrite, dfsStaticCreate, dfsStaticDestroy, dfsFileRead, dfsSetItemAxisEqD1

◆ dfsStaticRead()

m0LINK LPVECTOR m0IMEX dfsStaticRead ( LPFILE  fp,
LONG *  fioError 
)

Reads a static vector from the file pointed to by fp. dfsStaticRead allocates the memory necessary to contain a complete description of a static vector.

This includes both geometry and the data itself. If other data (dynamic data) has been read from the file, it is required to reposition the file pointer to the start of the static data by calling dfsFindBlockStatic before calling this.

Parameters
[in]fpSpecifies a pointer to the file.
[out]fioErrorReturns a LONG that indicates possible errors that occurred during the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error. If a NULL-pointer is specified the parameter is ignored.
Remarks
The application is responsible for freeing the storage associated with the pointer to the vector by calling dfsStaticDestroy.
Returns
Returns a reference LPVECTOR to the next static vector in the file. If an error occurs during execution of the function a NULL-reference is returned.
See also
dfsStaticWrite, dfsStaticCreate, dfsStaticDestroy, dfsStaticGetData, dfsFileRead

◆ dfsStaticSetHeader()

m0LINK LONG m0IMEX dfsStaticSetHeader ( LPHEAD  pdfs,
LPITEM  item 
)

Connects the header to the static item. This is required if the static item needs to be updated.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]itemSpecifies a reference to the item.
Remarks
This is not required if only reading static data.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsStaticRead

◆ dfsStaticSkip()

m0LINK LONG m0IMEX dfsStaticSkip ( LPFILE  fp)

Skips a static item and jumps to the next one.

Parameters
[in]fpSpecifies a pointer to the file.
Remarks
Note that dfsStaticSkip only can be used successfully when positioned somewhere in the static item block.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsStaticRead, dfsStaticWrite, dfsStaticCreate, dfsStaticDestroy

◆ dfsStaticWrite()

m0LINK LONG m0IMEX dfsStaticWrite ( LPVECTOR  pvec,
LPFILE  fp,
void *  data 
)

Writes the static vector pointed to by pvec to the file pointed to by fp.

Parameters
[in]pvecSpecifies a pointer to the vector structure.
[in]fpSpecifies a pointer to the file.
[in]dataSpecifies a pointer to the array containing the actual data. Make sure that the dimension of the array matches the axis description given using e.g. the call dfsSetItemAxisEqD1 or a related call.
Remarks
Note that the pointer to the actual data is not a part of the vector structure, when writing the file. The data array is included in the vector structure LPVECTOR when a static vector is read from a file using the call dfsStaticRead and can be accessed using the call dfsStaticGetData.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsStaticRead, dfsStaticCreate, dfsStaticDestroy, dfsStaticGetData, dfsFileCreate, dfsSetItemAxisEqD1

◆ dfsStreamCreate()

m0LINK LONG m0IMEX dfsStreamCreate ( unsigned char *  buffer,
size_t  bufferSize,
WriteBufferCallback  callback,
LPHEAD  pdfs,
LPFILE *  fp_rtn 
)

Creates a file and writes it to stream.

It automatically writes the static header information pointed to by pdfs and then returns a pointer to the file fp_rtn. The file pointer is left at the position following the header part of the file which corresponds to the end of the file.

Parameters
[in]bufferPointer to buffer of a given size.
[in]bufferSizeSize of buffer, in bytes
[in]callbackCallback to write content of buffer to stream. Callback must return number of bytes written. If number of bytes written is less than expected, there is some error with the stream.
[in]pdfsSpecifies a pointer to the header structure.
[out]fp_rtnReturns a reference to the file upon successful execution of dfsFileCreate. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for closing the file by calling dfsFileClose.
See also
dfsFileCreate, dfsHeaderCreate, dfsHeaderDestroy, dfsFileRead, dfsFileAppend, dfsFileEdit, dfsFileFlush, dfsFileClose

◆ dfsStreamRead()

m0LINK LONG m0IMEX dfsStreamRead ( unsigned char *  buffer,
size_t  bufferSize,
FillBufferCallback  callback,
LPHEAD *  pdfs_rtn,
LPFILE *  fp_rtn 
)

Use buffer for reading data, and when read to end-of-buffer, the callback is used to fill the buffer with new data.

Using this buffer and callback it automatically reads the static header information and then returns a pointer to the header information pdfs_rtn and a pointer to the file fp_rtn. The file pointer is left at the position following the header part of the file. dfsStreamRead allocates the memory necessary to contain the complete header description found in the file. It is not possible to jump backwards in a stream, only forward reading is supported

Parameters
[in]bufferPointer to buffer of a given size.
[in]bufferSizeSize of buffer, in bytes
[in]callbackCallback to fill up buffer. Callback must return number of bytes read and copied to the buffer. If number of bytes read is less than buffer-size, end-of-stream has been found.
[out]pdfs_rtnReturns a reference to the header upon successful execution of dfsFileRead. If a NULL-pointer is specified the parameter is ignored.
[out]fp_rtnReturns a reference to the file upon successful execution of dfsFileRead. If a NULL-pointer is specified the parameter is ignored.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
Remarks
The application is responsible for freeing the storage associated with the pointer to the header structure by calling dfsHeaderDestroy and for closing the file by calling dfsFileClose
See also
dfsHeaderCreate, dfsHeaderDestroy, dfsFileCreate, dfsFileAppend, dfsFileEdit, dfsFileFlush, dfsStreamClose

◆ dfsTruncateItemTimeStep()

m0LINK LONG m0IMEX dfsTruncateItemTimeStep ( LPHEAD  pdfs,
LONG  item_no,
LONG  ndigit,
void *  dataptr 
)

Truncate the item data of a dfs file to a given number of digits.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]item_noSpecifies the number of the selected item.
[in]ndigitNumber of digit to include in the item, after applying the truncation.
[in,out]dataptrarray of data to be truncated.

◆ dfsUnloadPlugin()

m0LINK LONG m0IMEX dfsUnloadPlugin ( LPHEAD  pdfs)

Unloads a DFS plugin.

Parameters
[in]pdfsSpecifies a pointer to the header information structure.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsEnablePlugin

◆ dfsUpdateGeoInfoUTMProj()

m0LINK LONG m0IMEX dfsUpdateGeoInfoUTMProj ( LPHEAD  pdfs,
LPCTSTR  projection_id,
double  lon0,
double  lat0,
double  orientation 
)

Updates the GeoInfo projection, sets the zone and sets the longitude, latitude and orientation of the reference coordinate system for an existing file. The existing file must have a projection.

If the new projection_id string is longer than the existing one, the update will fail. If the projection_id string is shorter, the projection string in the file will be padded with spaces.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]projection_idSpecifies the id-string as a WKT string of the projection which was used originally to create the data-set. Examples of this value are "UTM-32" and "BTM" for a special Bangladesh custom made UTM-zone.
[in]lon0Specifies the longitude of the origin in the reference coordinate system in decimal degrees.
[in]lat0Specifies the latitude of the origin in the reference coordinate system in decimal degrees.
[in]orientationSpecifies the orientation of the reference coordinate system in decimal degrees.
Remarks
Note that the origin set by dfsUpdateGeoInfoUTMProj is given in latitude/longitude. Since the projection of the data is either a standard or a customized projection it would be more logical to store the origin in native projection-coordinates:(easting, northing). This is NOT done because the compatibility with the old dtX-filesystem is maintained.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetGeoInfoType, dfsGetGeoInfoType, dfsGetGeoInfoUTMProj, dfsSetGeoInfoUndefined, dfsHeaderCreate

◆ dfsUpdateItemInfo()

m0LINK LONG m0IMEX dfsUpdateItemInfo ( LPHEAD  pdfs,
LPITEM  item,
LONG  n_eum_item_type,
LPCTSTR  name,
LONG  n_eum_unit 
)

Updates the common item information of an item of an existing file. Item is pointed to by Item.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]itemSpecifies a reference to the item geometry.
[in]n_eum_item_typeSpecifies the eum tag variable defining the type of item, e.g. eumIWaterLevel.
[in]nameSpecifies a pointer to the text string containing the name of the selected item. The text string stored in the item will have the same length as the original string i.e., the input string is either truncated or padded with zeros.
[in]n_eum_unitSpecifies the eum-tag representing the item unit, e.g. for eumIWaterLevel it could be eumUmeter
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSetItemInfo

◆ dfsWriteItemTimeStep()

m0LINK LONG m0IMEX dfsWriteItemTimeStep ( LPHEAD  pdfs,
LPFILE  fp,
double  time,
void *  dataptr 
)

Writes the time step of the next item in the file.

If the time axis is non equidistant, the actual time label time is written as well, otherwise ignored. The function call only succeeds if the storage type of the file is F_EQTIME_FIXEDSPACE_ALLITEMS or F_NEQTIME_FIXEDSPACE_ALLITEMS.

Parameters
[in]pdfsSpecifies a reference to the header information structure.
[in]fpSpecifies a reference to the file.
[in]timeSpecifies the actual time label of the time step if the file is stored with non equidistant time axis, otherwise ignored.
[in]dataptrSpecifies the array containing the time step values of the item.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsSkipItem, dfsSkipTimeStep, dfsReadItemTimeStep

◆ dfsWriteStartBlockDynamic()

m0LINK LONG m0IMEX dfsWriteStartBlockDynamic ( LPHEAD  pdfs,
LPFILE  fp 
)

Writes a "start-of-dynamic-block" tag to the file, effectively ending the header part and the static part of the dfs file.

The method can be called only when creating new files, and only after the header has been created and (optionally) static items has been written to the file. Calling it at any other point is invalid and can corrupt the file. The "start-of-dynamic-block" tag is also written by dfsWriteItemTimeStep first time it is called for a newly created file, in case this method has not explicitly been called beforehand. In such cases this method is redundant. This method is required in order to support closing a file that has no dynamic data written to it (yet). It is recommended that this is called explicitly after creation of the header and writing of the static data and before any dfsWriteItemTimeStep call, in order to support closing down a file gracefully in case of an error between the creation of the file and the first call to dfsWriteItemTimeStep.

Parameters
[in]pdfsSpecifies a pointer to the header information structure.
[in]fpSpecifies a pointer to the file.
Returns
Returns a LONG that indicates possible errors that occurred during or before the execution of the function call. Possible return values are F_NO_ERROR ( = 0), indicating successful execution or a nonzero value ( != 0) of type FioErrors specifying the exact type of error.
See also
dfsReadItemTimeStep, dfsWriteItemTimeStep