PIO  2.5.4
Functions
Open a File

Open an existing netCDF file with PIO in C. More...

Functions

int PIOc_openfile (int iosysid, int *ncidp, int *iotype, const char *filename, int mode)
 Open an existing file using PIO library. More...
 
int PIOc_openfile2 (int iosysid, int *ncidp, int *iotype, const char *filename, int mode)
 Open an existing file using PIO library. More...
 
int PIOc_open (int iosysid, const char *path, int mode, int *ncidp)
 Open an existing file using PIO library. More...
 

Detailed Description

Open an existing netCDF file with PIO in C.

Function Documentation

◆ PIOc_open()

int PIOc_open ( int  iosysid,
const char *  path,
int  mode,
int *  ncidp 
)

Open an existing file using PIO library.

Input parameters are read on comp task 0 and ignored elsewhere.

Parameters
iosysidA defined pio system descriptor
pathThe filename to open
modeThe netcdf mode for the open operation
ncidppointer to int where ncid will go
Returns
0 for success, error code otherwise.
Author
Ed Hartnett

◆ PIOc_openfile()

int PIOc_openfile ( int  iosysid,
int *  ncidp,
int *  iotype,
const char *  filename,
int  mode 
)

Open an existing file using PIO library.

If the open fails, try again as netCDF serial before giving up. Input parameters are read on comp task 0 and ignored elsewhere.

Note that the file is opened with default fill mode, NOFILL for pnetcdf, and FILL for netCDF classic and netCDF-4 files.

Parameters
iosysid: A defined pio system descriptor (input)
ncidp: A pio file descriptor (output)
iotype: A pio output format (input)
filename: The filename to open
mode: The netcdf mode for the open operation
Returns
0 for success, error code otherwise.
Author
Jim Edwards, Ed Hartnett

◆ PIOc_openfile2()

int PIOc_openfile2 ( int  iosysid,
int *  ncidp,
int *  iotype,
const char *  filename,
int  mode 
)

Open an existing file using PIO library.

This is like PIOc_openfile(), but if the open fails, this function will not try to open again as netCDF serial before giving up. Input parameters are read on comp task 0 and ignored elsewhere.

Note that the file is opened with default fill mode, NOFILL for pnetcdf, and FILL for netCDF classic and netCDF-4 files.

Parameters
iosysid: A defined pio system descriptor (input)
ncidp: A pio file descriptor (output)
iotype: A pio output format (input)
filename: The filename to open
mode: The netcdf mode for the open operation
Returns
0 for success, error code otherwise.
Author
Ed Hartnett