NuSDaS Interface Reference Manual

NUSDAS_IOCNTL

SYNOPSIS

/* C */
    int
nusdas_iocntl(param, value)

! Fortran
SUBROUTINE NUSDAS_IOCNTL(param, value, iostat)
symbolFortranC
param(should be symbol in header)(should be macro in header)
value(should be symbol in header)(should be macro in header)
iostatINTEGER, INTENT(OUT)(not used)

ARGUMENTS

param

Should be one of following symbols defined in header file.

N_IO_MARK_END

If value is N_ON, the END record is written to data file for each call of NUSDAS_WRITE functions. That is the default; it is safer, but slower. If value is N_OFF, the END record is written only when the data file is closed. Though it makes NUSDAS_WRITE faster, files may be corrupt and unreadable if writing program exits without closing the file. Note that N_ON is assumed when parameter N_IO_W_FCLOSE is set to N_ON.

N_IO_W_FCLOSE

If value is N_ON, data file opened for write is closed for each call of NUSDAS_WRITE functions. That is the default; it is safer, but slower. If value is N_OFF, such data files will be closed only when either NUSDAS_ONEFILE_CLOSE or NUSDAS_ALLFILE_CLOSE is called explicitly. Though it makes NUSDAS_WRITE faster, files may be corrupt and unreadable if writing program exits without closing the file. And you will also have to care about shortage of file handle resource: if too many files are opened simultaneously, further open may fail.

N_IO_R_FCLOSE

If value is N_ON, data file opened for read is closed for each call of NUSDAS_WRITE functions. That is the default; it is safer, but slower. If value is N_OFF, such data files will be closed only when either NUSDAS_ONEFILE_CLOSE or NUSDAS_ALLFILE_CLOSE is called explicitly. You will have to care about shortage of file handle resource.

N_IO_WARNING_OUT

If value is N_ON, subroutines in the NuSDaS interface output messages on waring/error to the standard error handle. That is the default. If value is N_OFF, such messages are suppressed.

value

Should be N_ON or N_OFF defined in header file.

iostat

see following section, RETURN VALUE.

RETURN VALUE

0Succeeded.
-1Error: invalid argument.