ParallelIO
Functions
pio_get_nc.c File Reference

PIO functions to get data (excluding varm functions). More...

#include <config.h>
#include <pio.h>
#include <pio_internal.h>

Functions

int PIOc_get_vars_tc (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, nc_type xtype, void *buf)
 Internal PIO function which provides a type-neutral interface to nc_get_vars. More...
 
int PIOc_get_vars_text (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, char *buf)
 
int PIOc_get_vars_uchar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned char *buf)
 
int PIOc_get_vars_schar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, signed char *buf)
 
int PIOc_get_vars_ushort (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned short *buf)
 
int PIOc_get_vars_short (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, short *buf)
 
int PIOc_get_vars_uint (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned int *buf)
 
int PIOc_get_vars_int (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, int *buf)
 
int PIOc_get_vars_long (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, long *buf)
 
int PIOc_get_vars_float (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, float *buf)
 
int PIOc_get_vars_double (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, double *buf)
 
int PIOc_get_vars_ulonglong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, unsigned long long *buf)
 
int PIOc_get_vars_longlong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, long long *buf)
 
int PIOc_get_vara_text (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, char *buf)
 
int PIOc_get_vara_uchar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned char *buf)
 
int PIOc_get_vara_schar (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, signed char *buf)
 
int PIOc_get_vara_ushort (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned short *buf)
 
int PIOc_get_vara_short (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, short *buf)
 
int PIOc_get_vara_long (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, long *buf)
 
int PIOc_get_vara_uint (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned int *buf)
 
int PIOc_get_vara_int (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, int *buf)
 
int PIOc_get_vara_float (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, float *buf)
 
int PIOc_get_vara_double (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, double *buf)
 
int PIOc_get_vara_ulonglong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, unsigned long long *buf)
 
int PIOc_get_vara_longlong (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, long long *buf)
 
int PIOc_get_var_text (int ncid, int varid, char *buf)
 
int PIOc_get_var_uchar (int ncid, int varid, unsigned char *buf)
 
int PIOc_get_var_schar (int ncid, int varid, signed char *buf)
 
int PIOc_get_var_ushort (int ncid, int varid, unsigned short *buf)
 
int PIOc_get_var_short (int ncid, int varid, short *buf)
 
int PIOc_get_var_uint (int ncid, int varid, unsigned int *buf)
 
int PIOc_get_var_int (int ncid, int varid, int *buf)
 
int PIOc_get_var_long (int ncid, int varid, long *buf)
 
int PIOc_get_var_float (int ncid, int varid, float *buf)
 
int PIOc_get_var_double (int ncid, int varid, double *buf)
 
int PIOc_get_var_ulonglong (int ncid, int varid, unsigned long long *buf)
 
int PIOc_get_var_longlong (int ncid, int varid, long long *buf)
 
int PIOc_get_var1_tc (int ncid, int varid, const PIO_Offset *index, nc_type xtype, void *buf)
 
int PIOc_get_var1_text (int ncid, int varid, const PIO_Offset *index, char *buf)
 
int PIOc_get_var1_uchar (int ncid, int varid, const PIO_Offset *index, unsigned char *buf)
 
int PIOc_get_var1_schar (int ncid, int varid, const PIO_Offset *index, signed char *buf)
 
int PIOc_get_var1_ushort (int ncid, int varid, const PIO_Offset *index, unsigned short *buf)
 
int PIOc_get_var1_short (int ncid, int varid, const PIO_Offset *index, short *buf)
 
int PIOc_get_var1_uint (int ncid, int varid, const PIO_Offset *index, unsigned int *buf)
 
int PIOc_get_var1_long (int ncid, int varid, const PIO_Offset *index, long *buf)
 
int PIOc_get_var1_int (int ncid, int varid, const PIO_Offset *index, int *buf)
 
int PIOc_get_var1_float (int ncid, int varid, const PIO_Offset *index, float *buf)
 
int PIOc_get_var1_double (int ncid, int varid, const PIO_Offset *index, double *buf)
 
int PIOc_get_var1_ulonglong (int ncid, int varid, const PIO_Offset *index, unsigned long long *buf)
 
int PIOc_get_var1_longlong (int ncid, int varid, const PIO_Offset *index, long long *buf)
 
int PIOc_get_var (int ncid, int varid, void *buf, PIO_Offset bufcount, MPI_Datatype buftype)
 
int PIOc_get_var1 (int ncid, int varid, const PIO_Offset *index, void *buf, PIO_Offset bufcount, MPI_Datatype buftype)
 
int PIOc_get_vara (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, void *buf, PIO_Offset bufcount, MPI_Datatype buftype)
 
int PIOc_get_vars (int ncid, int varid, const PIO_Offset *start, const PIO_Offset *count, const PIO_Offset *stride, void *buf, PIO_Offset bufcount, MPI_Datatype buftype)
 

Detailed Description

PIO functions to get data (excluding varm functions).

Author
Ed Hartnett
Date
2016
See also
http://code.google.com/p/parallelio/

Function Documentation

§ PIOc_get_vars_tc()

int PIOc_get_vars_tc ( int  ncid,
int  varid,
const PIO_Offset *  start,
const PIO_Offset *  count,
const PIO_Offset *  stride,
nc_type  xtype,
void *  buf 
)

Internal PIO function which provides a type-neutral interface to nc_get_vars.

Users should not call this function directly. Instead, call one of the derived functions, depending on the type of data you are reading: PIOc_get_vars_text(), PIOc_get_vars_uchar(), PIOc_get_vars_schar(), PIOc_get_vars_ushort(), PIOc_get_vars_short(), PIOc_get_vars_uint(), PIOc_get_vars_int(), PIOc_get_vars_long(), PIOc_get_vars_float(), PIOc_get_vars_double(), PIOc_get_vars_ulonglong(), PIOc_get_vars_longlong()

This routine is called collectively by all tasks in the communicator ios.union_comm.

Parameters
ncididentifies the netCDF file
varidthe variable ID number
startan array of start indicies (must have same number of entries as variable has dimensions). If NULL, indices of 0 will be used.
countan array of counts (must have same number of entries as variable has dimensions). If NULL, counts matching the size of the variable will be used.
stridean array of strides (must have same number of entries as variable has dimensions). If NULL, strides of 1 will be used.
xtypethe netCDF type of the data being passed in buf. Data will be automatically covnerted from the type of the variable being read from to this type.
bufpointer to the data to be written.
Returns
PIO_NOERR on success, error code otherwise.