On success, S3L_write_array and S3L_write_sub_array return S3L_SUCCESS.
S3L_write_array and S3L_write_sub_array perform generic checking of the validity of the arrays they accept as arguments. If an array argument contains an invalid or corrupted value, the function terminates and an error code indicating which value of the array handle was invalid is returned. See Appendix A of this manual for a detailed list of these error codes.
In addition, the following conditions will cause the function to terminate and return the associated error code:
S3L_ERR_ARG_RANGE_INV - The given range of indices is invalid:
A lower bound is less that the the smallest index of the array.
An upper bound is greater than the largest index of an array along the given axis.
A lower bound is larger than the corresponding upper bound.
A stride is negative or zero.
S3L_ERR_FILE_OPEN - Failed to open the file with the file name provided.
S3L_ERR_IO_FORMAT - Format is not one of "ascii" or "binary".
S3L_ERR_IO_FILENAME - The file name is equal to the NULL string (C/C++) or to an empty string (F77/F90).