ncdf4a13/fortran/fort-attio.c

Go to the documentation of this file.
00001 #include <string.h>
00002 #include <errno.h>
00003 
00004 #include "netcdf.h"
00005 #include "nfconfig.inc"
00006 #include "ncfortran.h"
00007 
00008 
00009 /*
00010  * Write an attribute from a FORTRAN CHARACTER*(*) variable.
00011  */
00012 FCALLSCFUN5(NF_INT, nc_put_att_text, NF_PUT_ATT_TEXT, nf_put_att_text,
00013             NCID, VARID, STRING, COUNT, CBUF)
00014 
00015 
00016 /*
00017  * Read an attribute into a FORTRAN CHARACTER*(*) variable.
00018  */
00019 FCALLSCFUN4(NF_INT, nc_get_att_text, NF_GET_ATT_TEXT, nf_get_att_text,
00020             NCID, VARID, STRING, CBUF)
00021 
00022 
00023 /*
00024  * Write an attribute from an INTEGER*1 array.
00025  */
00026 #if NF_INT1_IS_C_SIGNED_CHAR
00027 FCALLSCFUN6(NF_INT, nc_put_att_schar, NF_PUT_ATT_INT1, nf_put_att_int1,
00028             NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
00029 #elif NF_INT1_IS_C_SHORT
00030 FCALLSCFUN6(NF_INT, nc_put_att_short, NF_PUT_ATT_INT1, nf_put_att_int1,
00031             NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
00032 #elif NF_INT1_IS_C_INT
00033 FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT1, nf_put_att_int1,
00034             NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
00035 #elif NF_INT1_IS_C_LONG
00036 FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT1, nf_put_att_int1,
00037             NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
00038 #endif
00039 
00040 
00041 /*
00042  * Read an attribute into an INTEGER*1 array.
00043  */
00044 #if NF_INT1_IS_C_SIGNED_CHAR
00045 FCALLSCFUN4(NF_INT, nc_get_att_schar, NF_GET_ATT_INT1, nf_get_att_int1,
00046             NCID, VARID, STRING, PINT1ATT)
00047 #elif NF_INT1_IS_C_SHORT
00048 FCALLSCFUN4(NF_INT, nc_get_att_short, NF_GET_ATT_INT1, nf_get_att_int1,
00049             NCID, VARID, STRING, PINT1ATT)
00050 #elif NF_INT1_IS_C_INT
00051 FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT1, nf_get_att_int1,
00052             NCID, VARID, STRING, PINT1ATT)
00053 #elif NF_INT1_IS_C_LONG
00054 FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT1, nf_get_att_int1,
00055             NCID, VARID, STRING, PINT1ATT)
00056 #endif
00057 
00058 
00059 /*
00060  * Write an attribute from an INTEGER*2 array.
00061  */
00062 #if NF_INT2_IS_C_SHORT
00063 FCALLSCFUN6(NF_INT, nc_put_att_short, NF_PUT_ATT_INT2, nf_put_att_int2,
00064             NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
00065 #elif NF_INT2_IS_C_INT
00066 FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT2, nf_put_att_int2,
00067             NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
00068 #elif NF_INT2_IS_C_LONG
00069 FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT2, nf_put_att_int2,
00070             NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
00071 #endif
00072 
00073 
00074 /*
00075  * Read an attribute into an INTEGER*2 array.
00076  */
00077 #if NF_INT2_IS_C_SHORT
00078 FCALLSCFUN4(NF_INT, nc_get_att_short, NF_GET_ATT_INT2, nf_get_att_int2,
00079             NCID, VARID, STRING, PINT2ATT)
00080 #elif NF_INT2_IS_C_INT
00081 FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT2, nf_get_att_int2,
00082             NCID, VARID, STRING, PINT2ATT)
00083 #elif NF_INT2_IS_C_LONG
00084 FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT2, nf_get_att_int2,
00085             NCID, VARID, STRING, PINT2ATT)
00086 #endif
00087 
00088 
00089 /*
00090  * Write an attribute from an INTEGER array.
00091  */
00092 #if NF_INT_IS_C_INT
00093 FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT, nf_put_att_int,
00094             NCID, VARID, STRING, TYPE, COUNT, INTATT)
00095 #elif NF_INT_IS_C_LONG
00096 FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT, nf_put_att_int,
00097             NCID, VARID, STRING, TYPE, COUNT, INTATT)
00098 #endif
00099 
00100 
00101 /*
00102  * Read an attribute into an INTEGER array.
00103  */
00104 #if NF_INT_IS_C_INT
00105 FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT, nf_get_att_int,
00106             NCID, VARID, STRING, PINTATT)
00107 #elif NF_INT_IS_C_LONG
00108 FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT, nf_get_att_int,
00109             NCID, VARID, STRING, PINTATT)
00110 #endif
00111 
00112 
00113 /*
00114  * Write an attribute from a REAL array.
00115  */
00116 #if NF_REAL_IS_C_DOUBLE
00117 FCALLSCFUN6(NF_INT, nc_put_att_double, NF_PUT_ATT_REAL, nf_put_att_real,
00118             NCID, VARID, STRING, TYPE, COUNT, DOUBLEATT)
00119 #else
00120 FCALLSCFUN6(NF_INT, nc_put_att_float, NF_PUT_ATT_REAL, nf_put_att_real,
00121             NCID, VARID, STRING, TYPE, COUNT, REALATT)
00122 #endif
00123 
00124 
00125 /*
00126  * Read an attribute into a REAL array.
00127  */
00128 #if NF_REAL_IS_C_DOUBLE
00129 FCALLSCFUN4(NF_INT, nc_get_att_double, NF_GET_ATT_REAL, nf_get_att_real,
00130             NCID, VARID, STRING, PDOUBLEATT)
00131 #else
00132 FCALLSCFUN4(NF_INT, nc_get_att_float, NF_GET_ATT_REAL, nf_get_att_real,
00133             NCID, VARID, STRING, PREALATT)
00134 #endif
00135 
00136 
00137 /*
00138  * Write an attribute from a DOUBLEPRECISION array.
00139  */
00140 FCALLSCFUN6(NF_INT, nc_put_att_double, NF_PUT_ATT_DOUBLE, nf_put_att_double,
00141             NCID, VARID, STRING, TYPE, COUNT, DOUBLEATT)
00142 
00143 
00144 /*
00145  * Read an attribute into a DOUBLEPRECISION array.
00146  */
00147 FCALLSCFUN4(NF_INT, nc_get_att_double, NF_GET_ATT_DOUBLE, nf_get_att_double,
00148             NCID, VARID, STRING, PDOUBLEATT)

Generated on Thu Mar 16 18:10:08 2006 for nco by  doxygen 1.4.4