NetCDF-Fortran  4.4.4
fort-varsio.c
Go to the documentation of this file.
1 /*
2 This file is part of the netCDF Fortran 77 API.
3 
4 This file handles the netCDF vars functions.
5 
6 Copyright 2006, University Corporation for Atmospheric Research. See
7 the COPYRIGHT file for copying and redistribution conditions.
8 
9 $Id: fort-varsio.c,v 1.10 2008/02/25 17:24:24 ed Exp $
10 */
11 
12 #include <config.h>
13 #include "netcdf.h"
14 #include "nfconfig.inc"
15 #include "ncfortran.h"
16 #include "fort-lib.h"
17 
18 
19 /*
20  * Write values from a FORTRAN CHARACTER*(*) variable.
21  */
22 FCALLSCFUN6(NF_INT, nc_put_vars_text, NF_PUT_VARS_TEXT, nf_put_vars_text,
23  NCID, VARID, COORDS, COUNTS, STRIDES, CBUF)
24 
25 
26 /*
27  * Read values into a FORTRAN CHARACTER*(*) variable.
28  */
29 FCALLSCFUN6(NF_INT, nc_get_vars_text, NF_GET_VARS_TEXT, nf_get_vars_text,
30  NCID, VARID, COORDS, COUNTS, STRIDES, CBUF)
31 
32 
33 /*
34  * Write values from a FORTRAN INTEGER*1 variable array.
35  */
36 #if NF_INT1_IS_C_SIGNED_CHAR
37 FCALLSCFUN6(NF_INT, nc_put_vars_schar, NF_PUT_VARS_INT1, nf_put_vars_int1,
38  NCID, VARID, COORDS, COUNTS, STRIDES, INT1VARV)
39 #elif NF_INT1_IS_C_SHORT
40 FCALLSCFUN6(NF_INT, nc_put_vars_short, NF_PUT_VARS_INT1, nf_put_vars_int1,
41  NCID, VARID, COORDS, COUNTS, STRIDES, INT1VARV)
42 #elif NF_INT1_IS_C_INT
43 FCALLSCFUN6(NF_INT, nc_put_vars_int, NF_PUT_VARS_INT1, nf_put_vars_int1,
44  NCID, VARID, COORDS, COUNTS, STRIDES, INT1VARV)
45 #elif NF_INT1_IS_C_LONG
46 FCALLSCFUN6(NF_INT, nc_put_vars_long, NF_PUT_VARS_INT1, nf_put_vars_int1,
47  NCID, VARID, COORDS, COUNTS, STRIDES, INT1VARV)
48 #endif
49 
50 
51 /*
52  * Read values into a FORTRAN INTEGER*1 variable array.
53  */
54 #if NF_INT1_IS_C_SIGNED_CHAR
55 FCALLSCFUN6(NF_INT, nc_get_vars_schar, NF_GET_VARS_INT1, nf_get_vars_int1,
56  NCID, VARID, COORDS, COUNTS, STRIDES, PINT1VARV)
57 #elif NF_INT1_IS_C_SHORT
58 FCALLSCFUN6(NF_INT, nc_get_vars_short, NF_GET_VARS_INT1, nf_get_vars_int1,
59  NCID, VARID, COORDS, COUNTS, STRIDES, PINT1VARV)
60 #elif NF_INT1_IS_C_INT
61 FCALLSCFUN6(NF_INT, nc_get_vars_int, NF_GET_VARS_INT1, nf_get_vars_int1,
62  NCID, VARID, COORDS, COUNTS, STRIDES, PINT1VARV)
63 #elif NF_INT1_IS_C_LONG
64 FCALLSCFUN6(NF_INT, nc_get_vars_long, NF_GET_VARS_INT1, nf_get_vars_int1,
65  NCID, VARID, COORDS, COUNTS, STRIDES, PINT1VARV)
66 #endif
67 
68 
69 /*
70  * Write values from a FORTRAN INTEGER*2 variable array.
71  */
72 #if NF_INT2_IS_C_SHORT
73 FCALLSCFUN6(NF_INT, nc_put_vars_short, NF_PUT_VARS_INT2, nf_put_vars_int2,
74  NCID, VARID, COORDS, COUNTS, STRIDES, INT2VARV)
75 #elif NF_INT2_IS_C_INT
76 FCALLSCFUN6(NF_INT, nc_put_vars_int, NF_PUT_VARS_INT2, nf_put_vars_int2,
77  NCID, VARID, COORDS, COUNTS, STRIDES, INT2VARV)
78 #elif NF_INT2_IS_C_LONG
79 FCALLSCFUN6(NF_INT, nc_put_vars_long, NF_PUT_VARS_INT2, nf_put_vars_int2,
80  NCID, VARID, COORDS, COUNTS, STRIDES, INT2VARV)
81 #endif
82 
83 
84 /*
85  * Read values into a FORTRAN INTEGER*2 variable array.
86  */
87 #if NF_INT2_IS_C_SHORT
88 FCALLSCFUN6(NF_INT, nc_get_vars_short, NF_GET_VARS_INT2, nf_get_vars_int2,
89  NCID, VARID, COORDS, COUNTS, STRIDES, PINT2VARV)
90 #elif NF_INT2_IS_C_INT
91 FCALLSCFUN6(NF_INT, nc_get_vars_int, NF_GET_VARS_INT2, nf_get_vars_int2,
92  NCID, VARID, COORDS, COUNTS, STRIDES, PINT2VARV)
93 #elif NF_INT2_IS_C_LONG
94 FCALLSCFUN6(NF_INT, nc_get_vars_long, NF_GET_VARS_INT2, nf_get_vars_int2,
95  NCID, VARID, COORDS, COUNTS, STRIDES, PINT2VARV)
96 #endif
97 
98 
99 /*
100  * Write values from a FORTRAN INTEGER variable array.
101  */
102 #if NF_INT_IS_C_INT
103 FCALLSCFUN6(NF_INT, nc_put_vars_int, NF_PUT_VARS_INT, nf_put_vars_int,
104  NCID, VARID, COORDS, COUNTS, STRIDES, INTVARV)
105 #elif NF_INT_IS_C_LONG
106 FCALLSCFUN6(NF_INT, nc_put_vars_long, NF_PUT_VARS_INT, nf_put_vars_int,
107  NCID, VARID, COORDS, COUNTS, STRIDES, INTVARV)
108 #endif
109 
110 
111 /*
112  * Read values into a FORTRAN INTEGER variable array.
113  */
114 #if NF_INT_IS_C_INT
115 FCALLSCFUN6(NF_INT, nc_get_vars_int, NF_GET_VARS_INT, nf_get_vars_int,
116  NCID, VARID, COORDS, COUNTS, STRIDES, PINTVARV)
117 #elif NF_INT_IS_C_LONG
118 FCALLSCFUN6(NF_INT, nc_get_vars_long, NF_GET_VARS_INT, nf_get_vars_int,
119  NCID, VARID, COORDS, COUNTS, STRIDES, PINTVARV)
120 #endif
121 
122 
123 /*
124  * Write values from a FORTRAN REAL variable array.
125  */
126 #if NF_REAL_IS_C_DOUBLE
127 FCALLSCFUN6(NF_INT, nc_put_vars_double, NF_PUT_VARS_REAL, nf_put_vars_real,
128  NCID, VARID, COORDS, COUNTS, STRIDES, DOUBLEVARV)
129 #else
130 FCALLSCFUN6(NF_INT, nc_put_vars_float, NF_PUT_VARS_REAL, nf_put_vars_real,
131  NCID, VARID, COORDS, COUNTS, STRIDES, REALVARV)
132 #endif
133 
134 
135 /*
136  * Read values into a FORTRAN REAL variable array.
137  */
138 #if NF_REAL_IS_C_DOUBLE
139 FCALLSCFUN6(NF_INT, nc_get_vars_double, NF_GET_VARS_REAL, nf_get_vars_real,
140  NCID, VARID, COORDS, COUNTS, STRIDES, PDOUBLEVARV)
141 #else
142 FCALLSCFUN6(NF_INT, nc_get_vars_float, NF_GET_VARS_REAL, nf_get_vars_real,
143  NCID, VARID, COORDS, COUNTS, STRIDES, PREALVARV)
144 #endif
145 
146 
147 /*
148  * Write values from a FORTRAN DOUBLEPRECISION variable array.
149  */
150 FCALLSCFUN6(NF_INT, nc_put_vars_double, NF_PUT_VARS_DOUBLE, nf_put_vars_double,
151  NCID, VARID, COORDS, COUNTS, STRIDES, DOUBLEVARV)
152 
153 
154 /*
155  * Read values into a FORTRAN DOUBLEPRECISION variable array.
156  */
157 FCALLSCFUN6(NF_INT, nc_get_vars_double, NF_GET_VARS_DOUBLE, nf_get_vars_double,
158  NCID, VARID, COORDS, COUNTS, STRIDES, PDOUBLEVARV)
159 
160 FCALLSCFUN6(NF_INT, nc_put_vars, NF_PUT_VARS, nf_put_vars,
161  NCID, VARID, COORDS, COUNTS, STRIDES, PVOID)
162 
163 FCALLSCFUN6(NF_INT, nc_get_vars, NF_GET_VARS, nf_get_vars,
164  NCID, VARID, COORDS, COUNTS, STRIDES, PVOID)
165 
166 
167 
function nf_put_vars_double(ncid, varid, start, counts, strides, dvals)
Definition: nf_varsio.F90:437
function nf_put_vars_text(ncid, varid, start, counts, strides, text)
Definition: nf_varsio.F90:44
function nf_get_vars_int1(ncid, varid, start, counts, strides, i1vals)
Definition: nf_varsio.F90:689
function nf_get_vars_real(ncid, varid, start, counts, strides, rvals)
Definition: nf_varsio.F90:909
#define INTVARV
Definition: ncfortran.h:367
function nf_put_vars_int(ncid, varid, start, counts, strides, ivals)
Definition: nf_varsio.F90:303
function nf_put_vars_real(ncid, varid, start, counts, strides, rvals)
Definition: nf_varsio.F90:370
function nf_get_vars_text(ncid, varid, start, counts, strides, text)
Definition: nf_varsio.F90:564
function nf_get_vars_double(ncid, varid, start, counts, strides, dvals)
Definition: nf_varsio.F90:976
#define PDOUBLEVARV
Definition: ncfortran.h:445
function nf_put_vars_int2(ncid, varid, start, counts, strides, i2vals)
Definition: nf_varsio.F90:228
function nf_get_vars(ncid, varid, start, counts, strides, values)
Definition: nf_varsio.F90:1040
#define REALVARV
Definition: ncfortran.h:407
#define NF_INT
Definition: ncfortran.h:19
#define PINT2VARV
Definition: ncfortran.h:341
function nf_put_vars(ncid, varid, start, counts, strides, values)
Definition: nf_varsio.F90:501
#define PREALVARV
Definition: ncfortran.h:413
#define INT1VARV
Definition: ncfortran.h:291
function nf_get_vars_int(ncid, varid, start, counts, strides, ivals)
Definition: nf_varsio.F90:842
FCALLSCFUN6(NF_INT, c_ncvdef, NCVDEF, ncvdef, NCID, STRING, TYPE, NDIMS, DIMIDS, PRCODE)
#define DOUBLEVARV
Definition: ncfortran.h:439
#define PINT1VARV
Definition: ncfortran.h:297
#define INT2VARV
Definition: ncfortran.h:335
#define PINTVARV
Definition: ncfortran.h:373
function nf_get_vars_int2(ncid, varid, start, counts, strides, i2vals)
Definition: nf_varsio.F90:767
function nf_put_vars_int1(ncid, varid, start, counts, strides, i1vals)
Definition: nf_varsio.F90:150

Return to the Main Unidata NetCDF page.
Generated on Tue Jul 17 2018 12:21:03 for NetCDF-Fortran. NetCDF is a Unidata library.