LOGICAL FUNCTION WRATT3( FNAME, VNAME, & ANAME, ATYPE, ASIZE, AVAL ) LOGICAL ENTRY WRATTC( FNAME, VNAME, ANAME, CVAL ) CHARACTER*(*), INTENT(IN ) :: FNAME ! logical file name CHARACTER*(*), INTENT(IN ) :: VNAME ! variable name, or ALLVARS3 CHARACTER*(*), INTENT(IN ) :: ANAME ! attribute name INTEGER , INTENT(IN ) :: ATYPE ! attribute type (M3CHAR, M3REAL, M3INT, M3INT8, M3DBLE) INTEGER , INTENT(IN ) :: ASIZE ! attribute size REAL , INTENT(IN ) :: AVAL( AMAX ) ! attribute value (numeric) CHARACTER*(*), INTENT(IN ) :: CVAL ! attribute value (character-string)
wratt3c()is a C wrapper calling the Fortran
integer wratt3c( const char * fname , const char * vname , const char * aname , int atype , int asize , void * aval )
WRATT3()writes the numeric (
INTEGER, REAL, or DOUBLEattribute named
ANAMEfor the variable
VNAMEto the file with logical name
FNAMEfrom the array
CHARACTERstring valued attribute
.TRUE. (or 1) if the operation succeeds,
.FALSE. (or 0) if it fails. For failure, writes
a log message indicating the nature of the failure.
For Fortran-90 declarations:
INCLUDE 'IODECL3.EXT'for Fortran, or
#include "fdesc3.h"for C.
I/O API must already be initialized by a call to
VNAME must have length
at most 16, exclusive of trailing blanks.
FNAME must be netCDF-based rather than
"buffered" or "virtual"; it must already have
been opened by
There is a significant performance penalty if the
WRATT*() routines are called after data has
been written to the file, since in that case the underlying
netCDF run-time will create a copy of the entire
existing file that contains the new attribute, and then
rename the copy to the original file name.
... USE M3UTILIO ... <under construction> ...
... #include "iodecl3.h" ... <under construction> ...
Up: I/O API: Public Routines
To: Models-3/EDSS I/O API: The Help Pages