fort-varmio.c
Go to the documentation of this file.
/*
This file is part of the netCDF Fortran 77 API.
This file handles the netCDF varm functions.
Copyright 2006, University Corporation for Atmospheric Research. See
the COPYRIGHT file for copying and redistribution conditions.
$Id: fort-varmio.c,v 1.9 2006/08/16 03:55:12 ed Exp $
*/
#include <config.h>
#include "netcdf.h"
#include "nfconfig.inc"
#include "ncfortran.h"
#include "fort-lib.h"
/*
* Write values from a FORTRAN CHARACTER*(*) variable.
*/
FCALLSCFUN7(NF_INT, nc_put_varm_text, NF_PUT_VARM_TEXT, nf_put_varm_text,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, CBUF)
/*
* Read values into a FORTRAN CHARACTER*(*) variable.
*/
FCALLSCFUN7(NF_INT, nc_get_varm_text, NF_GET_VARM_TEXT, nf_get_varm_text,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, CBUF)
/*
* Write values from a FORTRAN INTEGER*1 variable array.
*/
#if NF_INT1_IS_C_SIGNED_CHAR
FCALLSCFUN7(NF_INT, nc_put_varm_schar, NF_PUT_VARM_INT1, nf_put_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT1VARV)
#elif NF_INT1_IS_C_SHORT
FCALLSCFUN7(NF_INT, nc_put_varm_short, NF_PUT_VARM_INT1, nf_put_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT1VARV)
#elif NF_INT1_IS_C_INT
FCALLSCFUN7(NF_INT, nc_put_varm_int, NF_PUT_VARM_INT1, nf_put_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT1VARV)
#elif NF_INT1_IS_C_LONG
FCALLSCFUN7(NF_INT, nc_put_varm_long, NF_PUT_VARM_INT1, nf_put_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT1VARV)
#endif
/*
* Read values into a FORTRAN INTEGER*1 variable array.
*/
#if NF_INT1_IS_C_SIGNED_CHAR
FCALLSCFUN7(NF_INT, nc_get_varm_schar, NF_GET_VARM_INT1, nf_get_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT1VARV)
#elif NF_INT1_IS_C_SHORT
FCALLSCFUN7(NF_INT, nc_get_varm_short, NF_GET_VARM_INT1, nf_get_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT1VARV)
#elif NF_INT1_IS_C_INT
FCALLSCFUN7(NF_INT, nc_get_varm_int, NF_GET_VARM_INT1, nf_get_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT1VARV)
#elif NF_INT1_IS_C_LONG
FCALLSCFUN7(NF_INT, nc_get_varm_long, NF_GET_VARM_INT1, nf_get_varm_int1,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT1VARV)
#endif
/*
* Write values from a FORTRAN INTEGER*2 variable array.
*/
#if NF_INT2_IS_C_SHORT
FCALLSCFUN7(NF_INT, nc_put_varm_short, NF_PUT_VARM_INT2, nf_put_varm_int2,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT2VARV)
#elif NF_INT2_IS_C_INT
FCALLSCFUN7(NF_INT, nc_put_varm_int, NF_PUT_VARM_INT2, nf_put_varm_int2,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT2VARV)
#elif NF_INT2_IS_C_LONG
FCALLSCFUN7(NF_INT, nc_put_varm_long, NF_PUT_VARM_INT2, nf_put_varm_int2,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INT2VARV)
#endif
/*
* Read values into a FORTRAN INTEGER*2 variable array.
*/
#if NF_INT2_IS_C_SHORT
FCALLSCFUN7(NF_INT, nc_get_varm_short, NF_GET_VARM_INT2, nf_get_varm_int2,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT2VARV)
#elif NF_INT2_IS_C_INT
FCALLSCFUN7(NF_INT, nc_get_varm_int, NF_GET_VARM_INT2, nf_get_varm_int2,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT2VARV)
#elif NF_INT2_IS_C_LONG
FCALLSCFUN7(NF_INT, nc_get_varm_long, NF_GET_VARM_INT2, nf_get_varm_int2,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINT2VARV)
#endif
/*
* Write values from a FORTRAN INTEGER variable array.
*/
#if NF_INT_IS_C_INT
FCALLSCFUN7(NF_INT, nc_put_varm_int, NF_PUT_VARM_INT, nf_put_varm_int,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INTVARV)
#elif NF_INT_IS_C_LONG
FCALLSCFUN7(NF_INT, nc_put_varm_long, NF_PUT_VARM_INT, nf_put_varm_int,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, INTVARV)
#endif
/*
* Read values into a FORTRAN INTEGER variable array.
*/
#if NF_INT_IS_C_INT
FCALLSCFUN7(NF_INT, nc_get_varm_int, NF_GET_VARM_INT, nf_get_varm_int,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINTVARV)
#elif NF_INT_IS_C_LONG
FCALLSCFUN7(NF_INT, nc_get_varm_long, NF_GET_VARM_INT, nf_get_varm_int,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PINTVARV)
#endif
/*
* Write values from a FORTRAN REAL variable array.
*/
#if NF_REAL_IS_C_DOUBLE
FCALLSCFUN7(NF_INT, nc_put_varm_double, NF_PUT_VARM_REAL, nf_put_varm_real,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, DOUBLEVARV)
#else
FCALLSCFUN7(NF_INT, nc_put_varm_float, NF_PUT_VARM_REAL, nf_put_varm_real,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, REALVARV)
#endif
/*
* Read values into a FORTRAN REAL variable array.
*/
#if NF_REAL_IS_C_DOUBLE
FCALLSCFUN7(NF_INT, nc_get_varm_double, NF_GET_VARM_REAL, nf_get_varm_real,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PDOUBLEVARV)
#else
FCALLSCFUN7(NF_INT, nc_get_varm_float, NF_GET_VARM_REAL, nf_get_varm_real,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PREALVARV)
#endif
/*
* Write values from a FORTRAN DOUBLEPRECISION variable array.
*/
FCALLSCFUN7(NF_INT, nc_put_varm_double, NF_PUT_VARM_DOUBLE, nf_put_varm_double,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, DOUBLEVARV)
/*
* Read values into a FORTRAN DOUBLEPRECISION variable array.
*/
FCALLSCFUN7(NF_INT, nc_get_varm_double, NF_GET_VARM_DOUBLE, nf_get_varm_double,
NCID, VARID, COORDS, COUNTS, STRIDES, MAPS, PDOUBLEVARV)
nf_put_varm_text
integer function nf_put_varm_text(ncid, varid, start, counts, strides, maps, text)
Definition: nf_varmio.F90:40
nf_put_varm_int2
integer function nf_put_varm_int2(ncid, varid, start, counts, strides, maps, i2vals)
Definition: nf_varmio.F90:260
INTVARV
#define INTVARV
Definition: ncfortran.h:367
nf_get_varm_int1
integer function nf_get_varm_int1(ncid, varid, start, counts, strides, maps, i1vals)
Definition: nf_varmio.F90:692
nf_get_varm_text
integer function nf_get_varm_text(ncid, varid, start, counts, strides, maps, text)
Definition: nf_varmio.F90:555
nf_get_varm_real
integer function nf_get_varm_real(ncid, varid, start, counts, strides, maps, rvals)
Definition: nf_varmio.F90:930
nf_put_varm_int1
integer function nf_put_varm_int1(ncid, varid, start, counts, strides, maps, i1vals)
Definition: nf_varmio.F90:176
FCALLSCFUN7
#define FCALLSCFUN7(T0, CN, UN, LN, T1, T2, T3, T4, T5, T6, T7)
Definition: cfortran.h:2427
PDOUBLEVARV
#define PDOUBLEVARV
Definition: ncfortran.h:445
REALVARV
#define REALVARV
Definition: ncfortran.h:407
NF_INT
#define NF_INT
Definition: ncfortran.h:19
ncfortran.h
PINT2VARV
#define PINT2VARV
Definition: ncfortran.h:341
PREALVARV
#define PREALVARV
Definition: ncfortran.h:413
nf_get_varm_int
integer function nf_get_varm_int(ncid, varid, start, counts, strides, maps, ivals)
Definition: nf_varmio.F90:857
INT1VARV
#define INT1VARV
Definition: ncfortran.h:291
nf_put_varm_double
integer function nf_put_varm_double(ncid, varid, start, counts, strides, maps, dvals)
Definition: nf_varmio.F90:487
DOUBLEVARV
#define DOUBLEVARV
Definition: ncfortran.h:439
nf_get_varm_int2
integer function nf_get_varm_int2(ncid, varid, start, counts, strides, maps, i2vals)
Definition: nf_varmio.F90:776
nf_put_varm_real
integer function nf_put_varm_real(ncid, varid, start, counts, strides, maps, rvals)
Definition: nf_varmio.F90:414
fort-lib.h
PINT1VARV
#define PINT1VARV
Definition: ncfortran.h:297
INT2VARV
#define INT2VARV
Definition: ncfortran.h:335
PINTVARV
#define PINTVARV
Definition: ncfortran.h:373
nf_put_varm_int
integer function nf_put_varm_int(ncid, varid, start, counts, strides, maps, ivals)
Definition: nf_varmio.F90:341
nf_get_varm_double
integer function nf_get_varm_double(ncid, varid, start, counts, strides, maps, dvals)
Definition: nf_varmio.F90:1003

Return to the Main Unidata NetCDF page.