PIO  2.5.4
Functions/Subroutines
Create a File

Create a new netCDF file in Fortran. More...

Functions/Subroutines

integer function piolib_mod::createfile (iosystem, file, iotype, fname, amode_in)
 An integer parameter which controls the iotype. More...
 

Detailed Description

Create a new netCDF file in Fortran.

Function/Subroutine Documentation

◆ createfile()

integer function piolib_mod::createfile ( type (iosystem_desc_t), intent(inout), target  iosystem,
type (file_desc_t), intent(out)  file,
integer, intent(in)  iotype,
character(len=*), intent(in)  fname,
integer, intent(in), optional  amode_in 
)

An integer parameter which controls the iotype.

Create a NetCDF file using PIO. Input parameters are read on comp task 0 and ignored elsewhere.

Parameters
iosystemA defined PIO system descriptor created by a call to Initialize an IOSystem (see PIO_init)
fileThe returned file descriptor
iotype- PIO_iotype_pnetcdf : parallel read/write of pNetCDF files (netcdf3)
  • PIO_iotype_netcdf : serial read/write of NetCDF files using 'base_node' (netcdf3)
  • PIO_iotype_netcdf4c : parallel read/serial write of NetCDF4 (HDF5) files with data compression
  • PIO_iotype_netcdf4p : parallel read/write of NETCDF4 (HDF5) files
fnameThe name of the file to open
amode_inThe NetCDF creation mode flag - NC_NOWRITE for read-only access or NC_WRITE for read-write access.
Return values
ierrThe error return code (see Error Handling for Fortran).
Author
Jim Edwards