Ghost layers for distributed arrays can be specified with zio_set_ghostlayers(distarray, ghstl, ghstr). It sets the numbers of ghost nodes of distributed array distarray. The ghost nodes preceding the real ones (LHS ghost nodes) must be provided as (ghstl(1), ghstl(2), ...), and the ghost nodes after the real ones (RHS ghost nodes) as (ghstr(1), ghstr(2), ...) for all array dimensions. Files contain the real node values only.
If the output index order is different from the distributed array's local index order, one can set the output order with zio_set_index_order(distarray,order). If order(:)=(3,1,2), it means that the local array t(i,j,k) will be stored in disk in (j,k,i) order; or that the data in disk stored in (j,k,i) order will be read into the local array as t(i,j,k).
Actually ghost layers and output index order can be specified at the same time when a new distributed array descriptor is created with zio_new_distarray. They can be also reset with calls to the above functions after a descriptor was created.
For arrays of a small number of dimensions, you may not want to go with parallel I/O. You can control serial vs. parallel I/O for a certain file by specifying the minimum number of array dimensions for parallel I/O. This is set with a call to zio_set_ndims_par(filedesc, ndims_par). For example, if you issue zio_set_ndims_par(filedesc, 3), 1- and 2-D arrays will be written or read using a single staging process, no matter how many I/O staging processes are currently assigned.