ETSF file format

ETSF file format

Synopsis

gboolean            nqOpen_netcdfFile                   (const char *filename,
                                                         int *netcdfId,
                                                         GError **error);
gboolean            nqClose_netcdfFile                  (int netcdfId);
gboolean            nqGetDim                            (int netcdfId,
                                                         GError **error,
                                                         char *name,
                                                         int *varId,
                                                         size_t *value);
gboolean            nqCheckVar                          (int netcdfId,
                                                         GError **error,
                                                         char *name,
                                                         int *varId,
                                                         nc_type ncType,
                                                         int nbDims,
                                                         size_t *nbEleDims);

RenderingFormatLoad* nqStructuralInit                   ();

void                nqDensityInit                       ();

Description

Details

nqOpen_netcdfFile ()

gboolean            nqOpen_netcdfFile                   (const char *filename,
                                                         int *netcdfId,
                                                         GError **error);

Open a file supposed to be a NETCDF file following the Nanoquanta specifications. The netcdfId argument will store the integer id used by netcdf in future calls if the given filename has a right header.

filename :

a path to the file to load ;

netcdfId :

a pointer to store the id returned by netcdf ;

error :

a pointer to store possible error.

Returns :

TRUE if the file is a valid NETCDF file, if FALSE, no file is opened.

nqClose_netcdfFile ()

gboolean            nqClose_netcdfFile                  (int netcdfId);

Close the file that is currently opened by Netcdf.

netcdfId :

a netcdf identifier ;

Returns :

TRUE if the file is succesfully closed.

nqGetDim ()

gboolean            nqGetDim                            (int netcdfId,
                                                         GError **error,
                                                         char *name,
                                                         int *varId,
                                                         size_t *value);

Inquire the given netcdfId file to read the value of the given dimension.

netcdfId :

a netcdf identifier ;

error :

a location to store an error (target should NULL on enter) ;

name :

the name of the dimension to get the value from ;

varId :

a location to store the id used to identify this dimension ;

value :

a location to store the returned value.

Returns :

TRUE if the dimension exists and the value is readable.

nqCheckVar ()

gboolean            nqCheckVar                          (int netcdfId,
                                                         GError **error,
                                                         char *name,
                                                         int *varId,
                                                         nc_type ncType,
                                                         int nbDims,
                                                         size_t *nbEleDims);

Inquire the given netcdfId file to read the variable definition and check that it matches with the given arguments.

netcdfId :

a netcdf identifier ;

error :

a location to store an error (target should NULL on enter) ;

name :

the name of the value to check the definition of ;

varId :

a location to store the id used to identify this variable ;

ncType :

the supposed type of the variable ;

nbDims :

the supposed number of dimenions of the variable ;

nbEleDims :

an array of size nbDims with the supposed size of each dimenion;

Returns :

TRUE if the variable exists and match the given definition.

nqStructuralInit ()

RenderingFormatLoad* nqStructuralInit                   ();

Routine used to create a new loading method for the ETSF file format.

Returns :

a newly created rendering method.

nqDensityInit ()

void                nqDensityInit                       ();

Routine used to declare the density file format to V_Sim.