ExaGeoStat
ExaGeoStat is a parallel high performance unified framework for geostatistics on manycore systems.
nc_file.c File Reference

Go to the source code of this file.

Functions

int openFileNC (MLE_data *data, char *filename)
 Open the NetCDF file. More...
 
int countlinesNC (int ncid, char *dim1, char *dim2)
 Retrieve number of measurements. More...
 
void readLocsNC_1d (MLE_data *data, int ncid)
 Read 1D locations from a given. More...
 
void readLocsNC_2d (MLE_data *data, int ncid)
 Read 2D locations from a given. More...
 
void readVarNCs (MLE_data *data, int ncid, char *varname, double *data_in, char *dim1, char *dim2)
 Read Read observations from. More...
 
void closeFileNC (MLE_data *data, int ncid)
 Close the NetCDF file. More...
 

Detailed Description

Copyright (c) 2017-2018 King Abdullah University of Science and Technology All rights reserved.

ExaGeoStat is a software package provided by KAUST

Auxiliary functions that are used to read and process netCDF files.

Version
1.0.0
Author
Sameh Abdulah
Date
2018-11-11

Definition in file nc_file.c.

Function Documentation

int openFileNC ( MLE_data data,
char *  filename 
)

Open the NetCDF file.

returns ncid: netCDF file identifier.

Parameters
[in]dataMLE_data struct with different MLE inputs.
[in]filenamenetCDF location file.

Definition at line 22 of file nc_file.c.

int countlinesNC ( int  ncid,
char *  dim1,
char *  dim2 
)

Retrieve number of measurements.

Parameters
[in]ncidnetCDF file identifier.
[in]dim1size of dimension 1.
[in]dim2size of dimension 2.

Definition at line 41 of file nc_file.c.

void readLocsNC_1d ( MLE_data data,
int  ncid 
)

Read 1D locations from a given.

netCDF file Returns location struct inside the data struct.

Parameters
[in]dataMLE_data struct with different MLE inputs.
[in]ncidnetCDF file identifier.

Definition at line 70 of file nc_file.c.

void readLocsNC_2d ( MLE_data data,
int  ncid 
)

Read 2D locations from a given.

netCDF file Returns location struct.

Parameters
[in]dataMLE_data struct with different MLE inputs.
[in]ncidnetCDF file identifier.

Definition at line 134 of file nc_file.c.

void readVarNCs ( MLE_data data,
int  ncid,
char *  varname,
double *  data_in,
char *  dim1,
char *  dim2 
)

Read Read observations from.

a given NetCDF variable. Returns location struct.

Parameters
[in]dataMLE_data struct with different MLE inputs.
[in]ncidnetCDF file identifier.
[in]varnameNetCDF variable name.
[out]data_indata vector.
[in]dim1size of dimension 1.
[in]dim2size of dimension 2.

Definition at line 190 of file nc_file.c.

void closeFileNC ( MLE_data data,
int  ncid 
)

Close the NetCDF file.

Parameters
[in]ncidnetCDF file identifier.
[in]dataMLE_data struct with different MLE inputs.

Definition at line 242 of file nc_file.c.