NetCDF-Fortran  4.4.4
 All Classes Files Functions Variables Typedefs Macros Pages
fort-attio.c
Go to the documentation of this file.
1 #include <config.h>
2 #include <string.h>
3 #include <errno.h>
4 
5 #include "netcdf.h"
6 #include "netcdf_f.h"
7 #include "nfconfig.inc"
8 #include "ncfortran.h"
9 
10 
11 /*
12  * Write an attribute from a FORTRAN CHARACTER*(*) variable.
13  */
14 FCALLSCFUN5(NF_INT, nc_put_att_text, NF_PUT_ATT_TEXT, nf_put_att_text,
15  NCID, VARID, STRING, COUNT, CBUF)
16 
17 
18 /*
19  * Read an attribute into a FORTRAN CHARACTER*(*) variable.
20  */
21 FCALLSCFUN4(NF_INT, nc_get_att_text, NF_GET_ATT_TEXT, nf_get_att_text,
22  NCID, VARID, STRING, CBUF)
23 
24 
25 /*
26  * Write an attribute from an INTEGER*1 array.
27  */
28 #if NF_INT1_IS_C_SIGNED_CHAR
29 FCALLSCFUN6(NF_INT, nc_put_att_schar, NF_PUT_ATT_INT1, nf_put_att_int1,
30  NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
31 #elif NF_INT1_IS_C_SHORT
32 FCALLSCFUN6(NF_INT, nc_put_att_short, NF_PUT_ATT_INT1, nf_put_att_int1,
33  NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
34 #elif NF_INT1_IS_C_INT
35 FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT1, nf_put_att_int1,
36  NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
37 #elif NF_INT1_IS_C_LONG
38 FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT1, nf_put_att_int1,
39  NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
40 #endif
41 
42 
43 /*
44  * Read an attribute into an INTEGER*1 array.
45  */
46 #if NF_INT1_IS_C_SIGNED_CHAR
47 FCALLSCFUN4(NF_INT, nc_get_att_schar, NF_GET_ATT_INT1, nf_get_att_int1,
48  NCID, VARID, STRING, PINT1ATT)
49 #elif NF_INT1_IS_C_SHORT
50 FCALLSCFUN4(NF_INT, nc_get_att_short, NF_GET_ATT_INT1, nf_get_att_int1,
51  NCID, VARID, STRING, PINT1ATT)
52 #elif NF_INT1_IS_C_INT
53 FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT1, nf_get_att_int1,
54  NCID, VARID, STRING, PINT1ATT)
55 #elif NF_INT1_IS_C_LONG
56 FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT1, nf_get_att_int1,
57  NCID, VARID, STRING, PINT1ATT)
58 #endif
59 
60 
61 /*
62  * Write an attribute from an INTEGER*2 array.
63  */
64 #if NF_INT2_IS_C_SHORT
65 FCALLSCFUN6(NF_INT, nc_put_att_short, NF_PUT_ATT_INT2, nf_put_att_int2,
66  NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
67 #elif NF_INT2_IS_C_INT
68 FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT2, nf_put_att_int2,
69  NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
70 #elif NF_INT2_IS_C_LONG
71 FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT2, nf_put_att_int2,
72  NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
73 #endif
74 
75 
76 /*
77  * Read an attribute into an INTEGER*2 array.
78  */
79 #if NF_INT2_IS_C_SHORT
80 FCALLSCFUN4(NF_INT, nc_get_att_short, NF_GET_ATT_INT2, nf_get_att_int2,
81  NCID, VARID, STRING, PINT2ATT)
82 #elif NF_INT2_IS_C_INT
83 FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT2, nf_get_att_int2,
84  NCID, VARID, STRING, PINT2ATT)
85 #elif NF_INT2_IS_C_LONG
86 FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT2, nf_get_att_int2,
87  NCID, VARID, STRING, PINT2ATT)
88 #endif
89 
90 
91 /*
92  * Write an attribute from an INTEGER array.
93  */
94 #if NF_INT_IS_C_INT
95 FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT, nf_put_att_int,
96  NCID, VARID, STRING, TYPE, COUNT, INTATT)
97 #elif NF_INT_IS_C_LONG
98 FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT, nf_put_att_int,
99  NCID, VARID, STRING, TYPE, COUNT, INTATT)
100 #endif
101 
102 
103 /*
104  * Read an attribute into an INTEGER array.
105  */
106 #if NF_INT_IS_C_INT
107 FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT, nf_get_att_int,
108  NCID, VARID, STRING, PINTATT)
109 #elif NF_INT_IS_C_LONG
110 FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT, nf_get_att_int,
111  NCID, VARID, STRING, PINTATT)
112 #endif
113 
114 
115 /*
116  * Write an attribute from a REAL array.
117  */
118 #if NF_REAL_IS_C_DOUBLE
119 FCALLSCFUN6(NF_INT, nc_put_att_double, NF_PUT_ATT_REAL, nf_put_att_real,
120  NCID, VARID, STRING, TYPE, COUNT, DOUBLEATT)
121 #else
122 FCALLSCFUN6(NF_INT, nc_put_att_float, NF_PUT_ATT_REAL, nf_put_att_real,
123  NCID, VARID, STRING, TYPE, COUNT, REALATT)
124 #endif
125 
126 
127 /*
128  * Read an attribute into a REAL array.
129  */
130 #if NF_REAL_IS_C_DOUBLE
131 FCALLSCFUN4(NF_INT, nc_get_att_double, NF_GET_ATT_REAL, nf_get_att_real,
132  NCID, VARID, STRING, PDOUBLEATT)
133 #else
134 FCALLSCFUN4(NF_INT, nc_get_att_float, NF_GET_ATT_REAL, nf_get_att_real,
135  NCID, VARID, STRING, PREALATT)
136 #endif
137 
138 
139 /*
140  * Write an attribute from a DOUBLEPRECISION array.
141  */
142 FCALLSCFUN6(NF_INT, nc_put_att_double, NF_PUT_ATT_DOUBLE, nf_put_att_double,
143  NCID, VARID, STRING, TYPE, COUNT, DOUBLEATT)
144 
145 
146 /*
147  * Read an attribute into a DOUBLEPRECISION array.
148  */
149 FCALLSCFUN4(NF_INT, nc_get_att_double, NF_GET_ATT_DOUBLE, nf_get_att_double,
150  NCID, VARID, STRING, PDOUBLEATT)
function nf_put_att_double(ncid, varid, name, xtype, nlen, dvals)
Definition: nf_attio.F90:275
function nf_put_att_real(ncid, varid, name, xtype, nlen, rvals)
Definition: nf_attio.F90:235
integer function nf_get_att_real(ncid, varid, name, rvals)
Definition: nf_attio.F90:493
#define PDOUBLEATT
Definition: ncfortran.h:131
integer function nf_get_att_double(ncid, varid, name, dvals)
Definition: nf_attio.F90:527
#define PINTATT
Definition: ncfortran.h:125
#define DOUBLEATT
Definition: ncfortran.h:130
integer function nf_get_att_int(ncid, varid, name, ivals)
Definition: nf_attio.F90:459
FCALLSCFUN4(NF_INT, c_ncddef, NCDDEF, ncddef, NCID, STRING, DIMLEN, PRCODE)
#define FCALLSCFUN5(T0, CN, UN, LN, T1, T2, T3, T4, T5)
Definition: cfortran.h:2423
integer function nf_get_att_text(ncid, varid, name, text)
Definition: nf_attio.F90:311
integer function nf_get_att_int1(ncid, varid, name, i1vals)
Definition: nf_attio.F90:375
#define PREALATT
Definition: ncfortran.h:128
function nf_put_att_int2(ncid, varid, name, xtype, nlen, i2vals)
Definition: nf_attio.F90:149
#define NF_INT
Definition: ncfortran.h:19
integer function nf_get_att_int2(ncid, varid, name, i2vals)
Definition: nf_attio.F90:418
#define INT2ATT
Definition: ncfortran.h:121
#define REALATT
Definition: ncfortran.h:127
#define PINT1ATT
Definition: ncfortran.h:119
#define INTATT
Definition: ncfortran.h:124
#define PINT2ATT
Definition: ncfortran.h:122
FCALLSCFUN6(NF_INT, c_ncvdef, NCVDEF, ncvdef, NCID, STRING, TYPE, NDIMS, DIMIDS, PRCODE)
function nf_put_att_int(ncid, varid, name, xtype, nlen, ivals)
Definition: nf_attio.F90:195
function nf_put_att_int1(ncid, varid, name, xtype, nlen, i1vals)
Definition: nf_attio.F90:98
#define INT1ATT
Definition: ncfortran.h:118
integer function nf_put_att_text(ncid, varid, name, nlen, text)
Definition: nf_attio.F90:34

Return to the Main Unidata NetCDF page.
Generated on Mon Dec 19 2016 16:43:42 for NetCDF-Fortran. NetCDF is a Unidata library.