fort-var1io.c
Go to the documentation of this file.
/*
This file is part of the netCDF Fortran 77 API.
This file handles the netCDF var1 functions.
Copyright 2006, University Corporation for Atmospheric Research. See
the COPYRIGHT file for copying and redistribution conditions.
$Id: fort-var1io.c,v 1.10 2008/02/25 17:24:24 ed Exp $
*/
#include <config.h>
#include "netcdf.h"
#include "nfconfig.inc"
#include "ncfortran.h"
#include "fort-lib.h"
/*
* Write a single value from a FORTRAN CHARACTER*(*) variable (the
* `single value' is the whole string).
*/
FCALLSCFUN4(NF_INT, nc_put_var1_text, NF_PUT_VAR1_TEXT, nf_put_var1_text,
NCID, VARID, COORDS, CBUF)
/*
* Read a single value into a FORTRAN CHARACTER*(*) variable (the
* `single value' is the whole string).
*/
FCALLSCFUN4(NF_INT, nc_get_var1_text, NF_GET_VAR1_TEXT, nf_get_var1_text,
NCID, VARID, COORDS, CBUF)
/*
* Write a single value from a FORTRAN INTEGER*1 variable.
*/
#if NF_INT1_IS_C_SIGNED_CHAR
FCALLSCFUN4(NF_INT, nc_put_var1_schar, NF_PUT_VAR1_INT1, nf_put_var1_int1,
NCID, VARID, COORDS, INT1VAR)
#elif NF_INT1_IS_C_SHORT
FCALLSCFUN4(NF_INT, nc_put_var1_short, NF_PUT_VAR1_INT1, nf_put_var1_int1,
NCID, VARID, COORDS, INT1VAR)
#elif NF_INT1_IS_C_INT
FCALLSCFUN4(NF_INT, nc_put_var1_int, NF_PUT_VAR1_INT1, nf_put_var1_int1,
NCID, VARID, COORDS, INT1VAR)
#elif NF_INT1_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_put_var1_long, NF_PUT_VAR1_INT1, nf_put_var1_int1,
NCID, VARID, COORDS, INT1VAR)
#endif
/*
* Read a single value into a FORTRAN INTEGER*1 variable.
*/
#if NF_INT1_IS_C_SIGNED_CHAR
FCALLSCFUN4(NF_INT, nc_get_var1_schar, NF_GET_VAR1_INT1, nf_get_var1_int1,
NCID, VARID, COORDS, PINT1VAR)
#elif NF_INT1_IS_C_SHORT
FCALLSCFUN4(NF_INT, nc_get_var1_short, NF_GET_VAR1_INT1, nf_get_var1_int1,
NCID, VARID, COORDS, PINT1VAR)
#elif NF_INT1_IS_C_INT
FCALLSCFUN4(NF_INT, nc_get_var1_int, NF_GET_VAR1_INT1, nf_get_var1_int1,
NCID, VARID, COORDS, PINT1VAR)
#elif NF_INT1_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_get_var1_long, NF_GET_VAR1_INT1, nf_get_var1_int1,
NCID, VARID, COORDS, PINT1VAR)
#endif
/*
* Write a single value from a FORTRAN INTEGER*2 variable.
*/
#if NF_INT2_IS_C_SHORT
FCALLSCFUN4(NF_INT, nc_put_var1_short, NF_PUT_VAR1_INT2, nf_put_var1_int2,
NCID, VARID, COORDS, INT2VAR)
#elif NF_INT2_IS_C_INT
FCALLSCFUN4(NF_INT, nc_put_var1_int, NF_PUT_VAR1_INT2, nf_put_var1_int2,
NCID, VARID, COORDS, INT2VAR)
#elif NF_INT2_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_put_var1_long, NF_PUT_VAR1_INT2, nf_put_var1_int2,
NCID, VARID, COORDS, INT2VAR)
#endif
/*
* Read a single value into a FORTRAN INTEGER*2 variable.
*/
#if NF_INT2_IS_C_SHORT
FCALLSCFUN4(NF_INT, nc_get_var1_short, NF_GET_VAR1_INT2, nf_get_var1_int2,
NCID, VARID, COORDS, PINT2VAR)
#elif NF_INT2_IS_C_INT
FCALLSCFUN4(NF_INT, nc_get_var1_int, NF_GET_VAR1_INT2, nf_get_var1_int2,
NCID, VARID, COORDS, PINT2VAR)
#elif NF_INT2_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_get_var1_long, NF_GET_VAR1_INT2, nf_get_var1_int2,
NCID, VARID, COORDS, PINT2VAR)
#endif
/*
* Write a single value from a FORTRAN INTEGER variable.
*/
#if NF_INT_IS_C_INT
FCALLSCFUN4(NF_INT, nc_put_var1_int, NF_PUT_VAR1_INT, nf_put_var1_int,
NCID, VARID, COORDS, INTVAR)
#elif NF_INT_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_put_var1_long, NF_PUT_VAR1_INT, nf_put_var1_int,
NCID, VARID, COORDS, INTVAR)
#endif
/*
* Read a single value into a FORTRAN INTEGER variable.
*/
#if NF_INT_IS_C_INT
FCALLSCFUN4(NF_INT, nc_get_var1_int, NF_GET_VAR1_INT, nf_get_var1_int,
NCID, VARID, COORDS, PINTVAR)
#elif NF_INT_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_get_var1_long, NF_GET_VAR1_INT, nf_get_var1_int,
NCID, VARID, COORDS, PINTVAR)
#endif
/*
* Write a single value from a FORTRAN REAL variable.
*/
#if NF_REAL_IS_C_DOUBLE
FCALLSCFUN4(NF_INT, nc_put_var1_double, NF_PUT_VAR1_REAL, nf_put_var1_real,
NCID, VARID, COORDS, DOUBLEVAR)
#else
FCALLSCFUN4(NF_INT, nc_put_var1_float, NF_PUT_VAR1_REAL, nf_put_var1_real,
NCID, VARID, COORDS, REALVAR)
#endif
/*
* Read a single value into a FORTRAN REAL variable.
*/
#if NF_REAL_IS_C_DOUBLE
FCALLSCFUN4(NF_INT, nc_get_var1_double, NF_GET_VAR1_REAL, nf_get_var1_real,
NCID, VARID, COORDS, PDOUBLEVAR)
#else
FCALLSCFUN4(NF_INT, nc_get_var1_float, NF_GET_VAR1_REAL, nf_get_var1_real,
NCID, VARID, COORDS, PREALVAR)
#endif
/*
* Write a single value from a FORTRAN DOUBLEPRECISION variable.
*/
FCALLSCFUN4(NF_INT, nc_put_var1_double, NF_PUT_VAR1_DOUBLE, nf_put_var1_double,
NCID, VARID, COORDS, DOUBLEVAR)
/*
* Read a single value into a FORTRAN DOUBLEPRECISION variable.
*/
FCALLSCFUN4(NF_INT, nc_get_var1_double, NF_GET_VAR1_DOUBLE, nf_get_var1_double,
NCID, VARID, COORDS, PDOUBLEVAR)
FCALLSCFUN4(NF_INT, nc_put_var1, NF_PUT_VAR1, nf_put_var1,
NCID, VARID, COORDS, PVOID)
FCALLSCFUN4(NF_INT, nc_get_var1, NF_GET_VAR1, nf_get_var1,
NCID, VARID, COORDS, PVOID)
nf_get_var1_double
integer function nf_get_var1_double(ncid, varid, ndex, dval)
Definition: nf_var1io.F90:686
nf_put_var1_int2
integer function nf_put_var1_int2(ncid, varid, ndex, ival)
Definition: nf_var1io.F90:145
nf_put_var1_double
integer function nf_put_var1_double(ncid, varid, ndex, dval)
Definition: nf_var1io.F90:309
nf_put_var1_int1
integer function nf_put_var1_int1(ncid, varid, ndex, ival)
Definition: nf_var1io.F90:83
FCALLSCFUN4
FCALLSCFUN4(NF_INT, c_ncddef, NCDDEF, ncddef, NCID, STRING, DIMLEN, PRCODE)
Definition: fort-v2compat.c:332
NF_INT
#define NF_INT
Definition: ncfortran.h:19
ncfortran.h
nf_get_var1_text
integer function nf_get_var1_text(ncid, varid, ndex, chval)
Definition: nf_var1io.F90:412
nf_get_var1_int
integer function nf_get_var1_int(ncid, varid, ndex, ival)
Definition: nf_var1io.F90:582
nf_put_var1_int
integer function nf_put_var1_int(ncid, varid, ndex, ival)
Definition: nf_var1io.F90:205
nf_put_var1_real
integer function nf_put_var1_real(ncid, varid, ndex, rval)
Definition: nf_var1io.F90:258
nf_get_var1_int2
integer function nf_get_var1_int2(ncid, varid, ndex, ival)
Definition: nf_var1io.F90:522
nf_get_var1
integer function nf_get_var1(ncid, varid, ndex, values)
Definition: nf_var1io.F90:733
nf_get_var1_int1
integer function nf_get_var1_int1(ncid, varid, ndex, ival)
Definition: nf_var1io.F90:460
nf_get_var1_real
integer function nf_get_var1_real(ncid, varid, ndex, rval)
Definition: nf_var1io.F90:635
nf_put_var1
integer function nf_put_var1(ncid, varid, ndex, values)
Definition: nf_var1io.F90:356
nf_put_var1_text
integer function nf_put_var1_text(ncid, varid, ndex, chval)
Definition: nf_var1io.F90:36
fort-lib.h

Return to the Main Unidata NetCDF page.