fort-attio.c
Go to the documentation of this file.
#include <config.h>
#include <string.h>
#include <errno.h>
#include "netcdf.h"
#include "netcdf_f.h"
#include "nfconfig.inc"
#include "ncfortran.h"
/*
* Write an attribute from a FORTRAN CHARACTER*(*) variable.
*/
FCALLSCFUN5(NF_INT, nc_put_att_text, NF_PUT_ATT_TEXT, nf_put_att_text,
NCID, VARID, STRING, COUNT, CBUF)
/*
* Read an attribute into a FORTRAN CHARACTER*(*) variable.
*/
FCALLSCFUN4(NF_INT, nc_get_att_text, NF_GET_ATT_TEXT, nf_get_att_text,
NCID, VARID, STRING, CBUF)
/*
* Write an attribute from an INTEGER*1 array.
*/
#if NF_INT1_IS_C_SIGNED_CHAR
FCALLSCFUN6(NF_INT, nc_put_att_schar, NF_PUT_ATT_INT1, nf_put_att_int1,
NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
#elif NF_INT1_IS_C_SHORT
FCALLSCFUN6(NF_INT, nc_put_att_short, NF_PUT_ATT_INT1, nf_put_att_int1,
NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
#elif NF_INT1_IS_C_INT
FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT1, nf_put_att_int1,
NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
#elif NF_INT1_IS_C_LONG
FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT1, nf_put_att_int1,
NCID, VARID, STRING, TYPE, COUNT, INT1ATT)
#endif
/*
* Read an attribute into an INTEGER*1 array.
*/
#if NF_INT1_IS_C_SIGNED_CHAR
FCALLSCFUN4(NF_INT, nc_get_att_schar, NF_GET_ATT_INT1, nf_get_att_int1,
NCID, VARID, STRING, PINT1ATT)
#elif NF_INT1_IS_C_SHORT
FCALLSCFUN4(NF_INT, nc_get_att_short, NF_GET_ATT_INT1, nf_get_att_int1,
NCID, VARID, STRING, PINT1ATT)
#elif NF_INT1_IS_C_INT
FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT1, nf_get_att_int1,
NCID, VARID, STRING, PINT1ATT)
#elif NF_INT1_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT1, nf_get_att_int1,
NCID, VARID, STRING, PINT1ATT)
#endif
/*
* Write an attribute from an INTEGER*2 array.
*/
#if NF_INT2_IS_C_SHORT
FCALLSCFUN6(NF_INT, nc_put_att_short, NF_PUT_ATT_INT2, nf_put_att_int2,
NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
#elif NF_INT2_IS_C_INT
FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT2, nf_put_att_int2,
NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
#elif NF_INT2_IS_C_LONG
FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT2, nf_put_att_int2,
NCID, VARID, STRING, TYPE, COUNT, INT2ATT)
#endif
/*
* Read an attribute into an INTEGER*2 array.
*/
#if NF_INT2_IS_C_SHORT
FCALLSCFUN4(NF_INT, nc_get_att_short, NF_GET_ATT_INT2, nf_get_att_int2,
NCID, VARID, STRING, PINT2ATT)
#elif NF_INT2_IS_C_INT
FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT2, nf_get_att_int2,
NCID, VARID, STRING, PINT2ATT)
#elif NF_INT2_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT2, nf_get_att_int2,
NCID, VARID, STRING, PINT2ATT)
#endif
/*
* Write an attribute from an INTEGER array.
*/
#if NF_INT_IS_C_INT
FCALLSCFUN6(NF_INT, nc_put_att_int, NF_PUT_ATT_INT, nf_put_att_int,
NCID, VARID, STRING, TYPE, COUNT, INTATT)
#elif NF_INT_IS_C_LONG
FCALLSCFUN6(NF_INT, nc_put_att_long, NF_PUT_ATT_INT, nf_put_att_int,
NCID, VARID, STRING, TYPE, COUNT, INTATT)
#endif
/*
* Read an attribute into an INTEGER array.
*/
#if NF_INT_IS_C_INT
FCALLSCFUN4(NF_INT, nc_get_att_int, NF_GET_ATT_INT, nf_get_att_int,
NCID, VARID, STRING, PINTATT)
#elif NF_INT_IS_C_LONG
FCALLSCFUN4(NF_INT, nc_get_att_long, NF_GET_ATT_INT, nf_get_att_int,
NCID, VARID, STRING, PINTATT)
#endif
/*
* Write an attribute from a REAL array.
*/
#if NF_REAL_IS_C_DOUBLE
FCALLSCFUN6(NF_INT, nc_put_att_double, NF_PUT_ATT_REAL, nf_put_att_real,
NCID, VARID, STRING, TYPE, COUNT, DOUBLEATT)
#else
FCALLSCFUN6(NF_INT, nc_put_att_float, NF_PUT_ATT_REAL, nf_put_att_real,
NCID, VARID, STRING, TYPE, COUNT, REALATT)
#endif
/*
* Read an attribute into a REAL array.
*/
#if NF_REAL_IS_C_DOUBLE
FCALLSCFUN4(NF_INT, nc_get_att_double, NF_GET_ATT_REAL, nf_get_att_real,
NCID, VARID, STRING, PDOUBLEATT)
#else
FCALLSCFUN4(NF_INT, nc_get_att_float, NF_GET_ATT_REAL, nf_get_att_real,
NCID, VARID, STRING, PREALATT)
#endif
/*
* Write an attribute from a DOUBLEPRECISION array.
*/
FCALLSCFUN6(NF_INT, nc_put_att_double, NF_PUT_ATT_DOUBLE, nf_put_att_double,
NCID, VARID, STRING, TYPE, COUNT, DOUBLEATT)
/*
* Read an attribute into a DOUBLEPRECISION array.
*/
FCALLSCFUN4(NF_INT, nc_get_att_double, NF_GET_ATT_DOUBLE, nf_get_att_double,
NCID, VARID, STRING, PDOUBLEATT)
nf_put_att_double
function nf_put_att_double(ncid, varid, name, xtype, nlen, dvals)
Definition: nf_attio.F90:281
nf_put_att_real
function nf_put_att_real(ncid, varid, name, xtype, nlen, rvals)
Definition: nf_attio.F90:241
nf_get_att_real
integer function nf_get_att_real(ncid, varid, name, rvals)
Definition: nf_attio.F90:494
PDOUBLEATT
#define PDOUBLEATT
Definition: ncfortran.h:131
nf_get_att_double
integer function nf_get_att_double(ncid, varid, name, dvals)
Definition: nf_attio.F90:528
PINTATT
#define PINTATT
Definition: ncfortran.h:125
DOUBLEATT
#define DOUBLEATT
Definition: ncfortran.h:130
nf_get_att_int
integer function nf_get_att_int(ncid, varid, name, ivals)
Definition: nf_attio.F90:460
FCALLSCFUN4
FCALLSCFUN4(NF_INT, c_ncddef, NCDDEF, ncddef, NCID, STRING, DIMLEN, PRCODE)
Definition: fort-v2compat.c:332
FCALLSCFUN5
#define FCALLSCFUN5(T0, CN, UN, LN, T1, T2, T3, T4, T5)
Definition: cfortran.h:2423
nf_get_att_text
integer function nf_get_att_text(ncid, varid, name, text)
Definition: nf_attio.F90:312
nf_get_att_int1
integer function nf_get_att_int1(ncid, varid, name, i1vals)
Definition: nf_attio.F90:376
PREALATT
#define PREALATT
Definition: ncfortran.h:128
nf_put_att_int2
function nf_put_att_int2(ncid, varid, name, xtype, nlen, i2vals)
Definition: nf_attio.F90:155
NF_INT
#define NF_INT
Definition: ncfortran.h:19
nf_get_att_int2
integer function nf_get_att_int2(ncid, varid, name, i2vals)
Definition: nf_attio.F90:419
ncfortran.h
INT2ATT
#define INT2ATT
Definition: ncfortran.h:121
REALATT
#define REALATT
Definition: ncfortran.h:127
PINT1ATT
#define PINT1ATT
Definition: ncfortran.h:119
INTATT
#define INTATT
Definition: ncfortran.h:124
PINT2ATT
#define PINT2ATT
Definition: ncfortran.h:122
FCALLSCFUN6
FCALLSCFUN6(NF_INT, c_ncvdef, NCVDEF, ncvdef, NCID, STRING, TYPE, NDIMS, DIMIDS, PRCODE)
Definition: fort-v2compat.c:395
netcdf_f.h
nf_put_att_int
function nf_put_att_int(ncid, varid, name, xtype, nlen, ivals)
Definition: nf_attio.F90:201
nf_put_att_int1
function nf_put_att_int1(ncid, varid, name, xtype, nlen, i1vals)
Definition: nf_attio.F90:104
INT1ATT
#define INT1ATT
Definition: ncfortran.h:118
nf_put_att_text
integer function nf_put_att_text(ncid, varid, name, nlen, text)
Definition: nf_attio.F90:35

Return to the Main Unidata NetCDF page.