NetCDF-Fortran  4.4.4
fort-v2compat.c File Reference
#include <config.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "netcdf.h"
#include "nfconfig.inc"
#include "ncfortran.h"
#include "fort-lib.h"
Include dependency graph for fort-v2compat.c:

Go to the source code of this file.

Macros

#define NCOPTS   FINT2CINT /* Input, netCDF options argument */
 
#define PNCOPTS   PCINT2FINT /* Output, netCDF options argument */
 
#define CLOBMODE   FINT2CINT /* Input, clobber-mode argument */
 
#define PRCODE   PCINT2FINT /* Output, return-code argument */
 
#define RWMODE   FINT2CINT /* Input, read-write mode argument */
 
#define DIMLEN   FINT2CINT /* Input, dimension-length argument */
 
#define PDIMLEN   PCINT2FINT /* Output, dimension-length argument */
 
#define LENSTR   FINT2CINT /* Input, string-length argument */
 
#define ATTLEN   FINT2CINT /* Input, attribute length argument */
 
#define PATTLEN   PCINT2FINT /* Output, attribute length argument */
 
#define FILLMODE   FINT2CINT /* Input, fill-mode argument */
 
#define V2IMAP_cfINT(N, A, B, X, Y, Z)   DOUBLE_cfINT(N,A,B,X,Y,Z)
 
#define V2IMAPVVVVVVV_cfTYPE   NF_INTEGER
 
#define V2IMAP_cfSTR(N, T, A, B, C, D, E)   _(CFARGS,N)(T,V2IMAP,A,B,C,D,E)
 
#define V2IMAP_cfH(S, U, B)
 
#define V2IMAP_cfQ(B)   ptrdiff_t B[MAX_NC_DIMS];
 
#define V2IMAP_cfT(M, I, A, B, D)   f2c_v2imap(*fncid, *fvarid-1, A, B)
 
#define V2IMAP_cfR(A, B, D)
 

Functions

static ptrdiff_t * f2c_v2imap (int ncid, int varid, const int *fimap, ptrdiff_t *cimap)
 Convert a Version 2 Fortran IMAP vector into a Version 3 C imap vector. More...
 
static size_t dimprod (const size_t *count, int rank)
 
static void c_ncpopt (int val)
 
 FCALLSCSUB1 (c_ncpopt, NCPOPT, ncpopt, NCOPTS)
 
 FCALLSCSUB1 (c_ncgopt, NCGOPT, ncgopt, PNCOPTS)
 
 FCALLSCFUN3 (NF_INT, c_nccre, NCCRE, nccre, STRING, CLOBMODE, PRCODE)
 
 FCALLSCFUN3 (NF_INT, c_ncopn, NCOPN, ncopn, STRING, RWMODE, PRCODE)
 
 FCALLSCFUN4 (NF_INT, c_ncddef, NCDDEF, ncddef, NCID, STRING, DIMLEN, PRCODE)
 
 FCALLSCFUN3 (NF_INT, c_ncdid, NCDID, ncdid, NCID, STRING, PRCODE)
 
 FCALLSCFUN6 (NF_INT, c_ncvdef, NCVDEF, ncvdef, NCID, STRING, TYPE, NDIMS, DIMIDS, PRCODE)
 
 FCALLSCFUN3 (NF_INT, c_ncvid, NCVID, ncvid, NCID, STRING, PRCODE)
 
 FCALLSCFUN2 (NF_INT, c_nctlen, NCTLEN, nctlen, TYPE, PRCODE)
 
 FCALLSCSUB2 (c_ncclos, NCCLOS, ncclos, NCID, PRCODE)
 
 FCALLSCSUB2 (c_ncredf, NCREDF, ncredf, NCID, PRCODE)
 
 FCALLSCSUB2 (c_ncendf, NCENDF, ncendf, NCID, PRCODE)
 
 FCALLSCSUB6 (c_ncinq, NCINQ, ncinq, NCID, PNDIMS, PNVARS, PNATTS, PDIMID, PRCODE)
 
 FCALLSCSUB2 (c_ncsnc, NCSNC, ncsnc, NCID, PRCODE)
 
 FCALLSCSUB2 (c_ncabor, NCABOR, ncabor, NCID, PRCODE)
 
 FCALLSCSUB5 (c_ncdinq, NCDINQ, ncdinq, NCID, DIMID, PSTRING, PDIMLEN, PRCODE)
 
 FCALLSCSUB4 (c_ncdren, NCDREN, ncdren, NCID, DIMID, STRING, PRCODE)
 
 FCALLSCSUB8 (c_ncvinq, NCVINQ, ncvinq, NCID, VARID, PSTRING, PTYPE, PNDIMS, PDIMIDS, PNATTS, PRCODE)
 
 FCALLSCSUB5 (c_ncvpt1, NCVPT1, ncvpt1, NCID, VARID, COORDS, PVOID, PRCODE)
 
 FCALLSCSUB5 (c_ncvp1c, NCVP1C, ncvp1c, NCID, VARID, COORDS, CBUF, PRCODE)
 
 FCALLSCSUB6 (c_ncvpt, NCVPT, ncvpt, NCID, VARID, COORDS, COUNTS, PVOID, PRCODE)
 
 FCALLSCSUB7 (c_ncvptc, NCVPTC, ncvptc, NCID, VARID, COORDS, COUNTS, CBUF, LENSTR, PRCODE)
 
 FCALLSCSUB8 (c_ncvptg, NCVPTG, ncvptg, NCID, VARID, COORDS, COUNTS, STRIDES, V2IMAP, PVOID, PRCODE)
 
 FCALLSCSUB8 (c_ncvpgc, NCVPGC, ncvpgc, NCID, VARID, COORDS, COUNTS, STRIDES, V2IMAP, CBUF, PRCODE)
 
 FCALLSCSUB5 (c_ncvgt1, NCVGT1, ncvgt1, NCID, VARID, COORDS, PVOID, PRCODE)
 
 FCALLSCSUB5 (c_ncvg1c, NCVG1C, ncvg1c, NCID, VARID, COORDS, CBUF, PRCODE)
 
 FCALLSCSUB6 (c_ncvgt, NCVGT, ncvgt, NCID, VARID, COORDS, COUNTS, PVOID, PRCODE)
 
 FCALLSCSUB7 (c_ncvgtc, NCVGTC, ncvgtc, NCID, VARID, COORDS, COUNTS, CBUF, LENSTR, PRCODE)
 
 FCALLSCSUB8 (c_ncvgtg, NCVGTG, ncvgtg, NCID, VARID, COORDS, COUNTS, STRIDES, V2IMAP, PVOID, PRCODE)
 
 FCALLSCSUB8 (c_ncvggc, NCVGGC, ncvggc, NCID, VARID, COORDS, COUNTS, STRIDES, V2IMAP, CBUF, PRCODE)
 
 FCALLSCSUB4 (c_ncvren, NCVREN, ncvren, NCID, VARID, STRING, PRCODE)
 
 FCALLSCSUB7 (c_ncapt, NCAPT, ncapt, NCID, VARID, STRING, TYPE, COUNT, PVOID, PRCODE)
 
 FCALLSCSUB7 (c_ncaptc, NCAPTC, ncaptc, NCID, VARID, STRING, TYPE, COUNT, CBUF, PRCODE)
 
 FCALLSCSUB6 (c_ncainq, NCAINQ, ncainq, NCID, VARID, STRING, PTYPE, PATTLEN, PRCODE)
 
 FCALLSCSUB5 (c_ncagt, NCAGT, ncagt, NCID, VARID, STRING, PVOID, PRCODE)
 
 FCALLSCSUB6 (c_ncagtc, NCAGTC, ncagtc, NCID, VARID, STRING, CBUF, ATTLEN, PRCODE)
 
 FCALLSCSUB6 (c_ncacpy, NCACPY, ncacpy, NCID1, VARID1, STRING, NCID2, VARID2, PRCODE)
 
 FCALLSCSUB5 (c_ncanam, NCANAM, ncanam, NCID, VARID, ATTID, PSTRING, PRCODE)
 
 FCALLSCSUB5 (c_ncaren, NCAREN, ncaren, NCID, VARID, STRING, STRING, PRCODE)
 
 FCALLSCSUB4 (c_ncadel, NCADEL, ncadel, NCID, VARID, STRING, PRCODE)
 

Macro Definition Documentation

◆ ATTLEN

#define ATTLEN   FINT2CINT /* Input, attribute length argument */

Definition at line 54 of file fort-v2compat.c.

◆ CLOBMODE

#define CLOBMODE   FINT2CINT /* Input, clobber-mode argument */

Definition at line 48 of file fort-v2compat.c.

◆ DIMLEN

#define DIMLEN   FINT2CINT /* Input, dimension-length argument */

Definition at line 51 of file fort-v2compat.c.

◆ FILLMODE

#define FILLMODE   FINT2CINT /* Input, fill-mode argument */

Definition at line 56 of file fort-v2compat.c.

◆ LENSTR

#define LENSTR   FINT2CINT /* Input, string-length argument */

Definition at line 53 of file fort-v2compat.c.

◆ NCOPTS

#define NCOPTS   FINT2CINT /* Input, netCDF options argument */

Definition at line 46 of file fort-v2compat.c.

◆ PATTLEN

#define PATTLEN   PCINT2FINT /* Output, attribute length argument */

Definition at line 55 of file fort-v2compat.c.

◆ PDIMLEN

#define PDIMLEN   PCINT2FINT /* Output, dimension-length argument */

Definition at line 52 of file fort-v2compat.c.

◆ PNCOPTS

#define PNCOPTS   PCINT2FINT /* Output, netCDF options argument */

Definition at line 47 of file fort-v2compat.c.

◆ PRCODE

#define PRCODE   PCINT2FINT /* Output, return-code argument */

Definition at line 49 of file fort-v2compat.c.

◆ RWMODE

#define RWMODE   FINT2CINT /* Input, read-write mode argument */

Definition at line 50 of file fort-v2compat.c.

◆ V2IMAP_cfH

#define V2IMAP_cfH (   S,
  U,
 
)

Definition at line 61 of file fort-v2compat.c.

◆ V2IMAP_cfINT

#define V2IMAP_cfINT (   N,
  A,
  B,
  X,
  Y,
 
)    DOUBLE_cfINT(N,A,B,X,Y,Z)

Definition at line 58 of file fort-v2compat.c.

◆ V2IMAP_cfQ

#define V2IMAP_cfQ (   B)    ptrdiff_t B[MAX_NC_DIMS];

Definition at line 62 of file fort-v2compat.c.

◆ V2IMAP_cfR

#define V2IMAP_cfR (   A,
  B,
 
)

Definition at line 64 of file fort-v2compat.c.

◆ V2IMAP_cfSTR

#define V2IMAP_cfSTR (   N,
  T,
  A,
  B,
  C,
  D,
 
)    _(CFARGS,N)(T,V2IMAP,A,B,C,D,E)

Definition at line 60 of file fort-v2compat.c.

◆ V2IMAP_cfT

#define V2IMAP_cfT (   M,
  I,
  A,
  B,
 
)    f2c_v2imap(*fncid, *fvarid-1, A, B)

Definition at line 63 of file fort-v2compat.c.

◆ V2IMAPVVVVVVV_cfTYPE

#define V2IMAPVVVVVVV_cfTYPE   NF_INTEGER

Definition at line 59 of file fort-v2compat.c.

Function Documentation

◆ c_ncpopt()

static void c_ncpopt ( int  val)
static

Definition at line 196 of file fort-v2compat.c.

◆ dimprod()

static size_t dimprod ( const size_t *  count,
int  rank 
)
static

Definition at line 180 of file fort-v2compat.c.

◆ f2c_v2imap()

static ptrdiff_t* f2c_v2imap ( int  ncid,
int  varid,
const int *  fimap,
ptrdiff_t *  cimap 
)
static

Convert a Version 2 Fortran IMAP vector into a Version 3 C imap vector.

Definition at line 71 of file fort-v2compat.c.

◆ FCALLSCFUN2()

FCALLSCFUN2 ( NF_INT  ,
c_nctlen  ,
NCTLEN  ,
nctlen  ,
TYPE  ,
PRCODE   
)

Definition at line 446 of file fort-v2compat.c.

◆ FCALLSCFUN3() [1/4]

FCALLSCFUN3 ( NF_INT  ,
c_nccre  ,
NCCRE  ,
nccre  ,
STRING  ,
CLOBMODE  ,
PRCODE   
)

Definition at line 256 of file fort-v2compat.c.

◆ FCALLSCFUN3() [2/4]

FCALLSCFUN3 ( NF_INT  ,
c_ncopn  ,
NCOPN  ,
ncopn  ,
STRING  ,
RWMODE  ,
PRCODE   
)

Definition at line 303 of file fort-v2compat.c.

◆ FCALLSCFUN3() [3/4]

FCALLSCFUN3 ( NF_INT  ,
c_ncdid  ,
NCDID  ,
ncdid  ,
NCID  ,
STRING  ,
PRCODE   
)

Definition at line 360 of file fort-v2compat.c.

◆ FCALLSCFUN3() [4/4]

FCALLSCFUN3 ( NF_INT  ,
c_ncvid  ,
NCVID  ,
ncvid  ,
NCID  ,
STRING  ,
PRCODE   
)

Definition at line 423 of file fort-v2compat.c.

◆ FCALLSCFUN4()

FCALLSCFUN4 ( NF_INT  ,
c_ncddef  ,
NCDDEF  ,
ncddef  ,
NCID  ,
STRING  ,
DIMLEN  ,
PRCODE   
)

Definition at line 332 of file fort-v2compat.c.

◆ FCALLSCFUN6()

FCALLSCFUN6 ( NF_INT  ,
c_ncvdef  ,
NCVDEF  ,
ncvdef  ,
NCID  ,
STRING  ,
TYPE  ,
NDIMS  ,
DIMIDS  ,
PRCODE   
)

Definition at line 395 of file fort-v2compat.c.

◆ FCALLSCSUB1() [1/2]

FCALLSCSUB1 ( c_ncpopt  ,
NCPOPT  ,
ncpopt  ,
NCOPTS   
)

Definition at line 204 of file fort-v2compat.c.

◆ FCALLSCSUB1() [2/2]

FCALLSCSUB1 ( c_ncgopt  ,
NCGOPT  ,
ncgopt  ,
PNCOPTS   
)

Definition at line 220 of file fort-v2compat.c.

◆ FCALLSCSUB2() [1/5]

FCALLSCSUB2 ( c_ncclos  ,
NCCLOS  ,
ncclos  ,
NCID  ,
PRCODE   
)

Definition at line 465 of file fort-v2compat.c.

◆ FCALLSCSUB2() [2/5]

FCALLSCSUB2 ( c_ncredf  ,
NCREDF  ,
ncredf  ,
NCID  ,
PRCODE   
)

Definition at line 484 of file fort-v2compat.c.

◆ FCALLSCSUB2() [3/5]

FCALLSCSUB2 ( c_ncendf  ,
NCENDF  ,
ncendf  ,
NCID  ,
PRCODE   
)

Definition at line 503 of file fort-v2compat.c.

◆ FCALLSCSUB2() [4/5]

FCALLSCSUB2 ( c_ncsnc  ,
NCSNC  ,
ncsnc  ,
NCID  ,
PRCODE   
)

Definition at line 546 of file fort-v2compat.c.

◆ FCALLSCSUB2() [5/5]

FCALLSCSUB2 ( c_ncabor  ,
NCABOR  ,
ncabor  ,
NCID  ,
PRCODE   
)

Definition at line 567 of file fort-v2compat.c.

◆ FCALLSCSUB4() [1/3]

FCALLSCSUB4 ( c_ncdren  ,
NCDREN  ,
ncdren  ,
NCID  ,
DIMID  ,
STRING  ,
PRCODE   
)

Definition at line 616 of file fort-v2compat.c.

◆ FCALLSCSUB4() [2/3]

FCALLSCSUB4 ( c_ncvren  ,
NCVREN  ,
ncvren  ,
NCID  ,
VARID  ,
STRING  ,
PRCODE   
)

Definition at line 1548 of file fort-v2compat.c.

◆ FCALLSCSUB4() [3/3]

FCALLSCSUB4 ( c_ncadel  ,
NCADEL  ,
ncadel  ,
NCID  ,
VARID  ,
STRING  ,
PRCODE   
)

Definition at line 1938 of file fort-v2compat.c.

Here is the call graph for this function:

◆ FCALLSCSUB5() [1/8]

FCALLSCSUB5 ( c_ncdinq  ,
NCDINQ  ,
ncdinq  ,
NCID  ,
DIMID  ,
PSTRING  ,
PDIMLEN  ,
PRCODE   
)

Definition at line 595 of file fort-v2compat.c.

◆ FCALLSCSUB5() [2/8]

FCALLSCSUB5 ( c_ncvpt1  ,
NCVPT1  ,
ncvpt1  ,
NCID  ,
VARID  ,
COORDS  ,
PVOID  ,
PRCODE   
)

Definition at line 735 of file fort-v2compat.c.

◆ FCALLSCSUB5() [3/8]

FCALLSCSUB5 ( c_ncvp1c  ,
NCVP1C  ,
ncvp1c  ,
NCID  ,
VARID  ,
COORDS  ,
CBUF  ,
PRCODE   
)

Definition at line 771 of file fort-v2compat.c.

◆ FCALLSCSUB5() [4/8]

FCALLSCSUB5 ( c_ncvgt1  ,
NCVGT1  ,
ncvgt1  ,
NCID  ,
VARID  ,
COORDS  ,
PVOID  ,
PRCODE   
)

Definition at line 1176 of file fort-v2compat.c.

◆ FCALLSCSUB5() [5/8]

FCALLSCSUB5 ( c_ncvg1c  ,
NCVG1C  ,
ncvg1c  ,
NCID  ,
VARID  ,
COORDS  ,
CBUF  ,
PRCODE   
)

Definition at line 1220 of file fort-v2compat.c.

◆ FCALLSCSUB5() [6/8]

FCALLSCSUB5 ( c_ncagt  ,
NCAGT  ,
ncagt  ,
NCID  ,
VARID  ,
STRING  ,
PVOID  ,
PRCODE   
)

Definition at line 1793 of file fort-v2compat.c.

◆ FCALLSCSUB5() [7/8]

FCALLSCSUB5 ( c_ncanam  ,
NCANAM  ,
ncanam  ,
NCID  ,
VARID  ,
ATTID  ,
PSTRING  ,
PRCODE   
)

Definition at line 1895 of file fort-v2compat.c.

◆ FCALLSCSUB5() [8/8]

FCALLSCSUB5 ( c_ncaren  ,
NCAREN  ,
ncaren  ,
NCID  ,
VARID  ,
STRING  ,
STRING  ,
PRCODE   
)

Definition at line 1917 of file fort-v2compat.c.

◆ FCALLSCSUB6() [1/6]

FCALLSCSUB6 ( c_ncinq  ,
NCINQ  ,
ncinq  ,
NCID  ,
PNDIMS  ,
PNVARS  ,
PNATTS  ,
PDIMID  ,
PRCODE   
)

Definition at line 526 of file fort-v2compat.c.

◆ FCALLSCSUB6() [2/6]

FCALLSCSUB6 ( c_ncvpt  ,
NCVPT  ,
ncvpt  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
PVOID  ,
PRCODE   
)

Definition at line 867 of file fort-v2compat.c.

Here is the call graph for this function:

◆ FCALLSCSUB6() [3/6]

FCALLSCSUB6 ( c_ncvgt  ,
NCVGT  ,
ncvgt  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
PVOID  ,
PRCODE   
)

Definition at line 1316 of file fort-v2compat.c.

Here is the call graph for this function:

◆ FCALLSCSUB6() [4/6]

FCALLSCSUB6 ( c_ncainq  ,
NCAINQ  ,
ncainq  ,
NCID  ,
VARID  ,
STRING  ,
PTYPE  ,
PATTLEN  ,
PRCODE   
)

Definition at line 1700 of file fort-v2compat.c.

◆ FCALLSCSUB6() [5/6]

FCALLSCSUB6 ( c_ncagtc  ,
NCAGTC  ,
ncagtc  ,
NCID  ,
VARID  ,
STRING  ,
CBUF  ,
ATTLEN  ,
PRCODE   
)

Definition at line 1848 of file fort-v2compat.c.

◆ FCALLSCSUB6() [6/6]

FCALLSCSUB6 ( c_ncacpy  ,
NCACPY  ,
ncacpy  ,
NCID1  ,
VARID1  ,
STRING  ,
NCID2  ,
VARID2  ,
PRCODE   
)

Definition at line 1872 of file fort-v2compat.c.

◆ FCALLSCSUB7() [1/4]

FCALLSCSUB7 ( c_ncvptc  ,
NCVPTC  ,
ncvptc  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
CBUF  ,
LENSTR  ,
PRCODE   
)

Definition at line 918 of file fort-v2compat.c.

◆ FCALLSCSUB7() [2/4]

FCALLSCSUB7 ( c_ncvgtc  ,
NCVGTC  ,
ncvgtc  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
CBUF  ,
LENSTR  ,
PRCODE   
)

Definition at line 1365 of file fort-v2compat.c.

◆ FCALLSCSUB7() [3/4]

FCALLSCSUB7 ( c_ncapt  ,
NCAPT  ,
ncapt  ,
NCID  ,
VARID  ,
STRING  ,
TYPE  ,
COUNT  ,
PVOID  ,
PRCODE   
)

Definition at line 1640 of file fort-v2compat.c.

◆ FCALLSCSUB7() [4/4]

FCALLSCSUB7 ( c_ncaptc  ,
NCAPTC  ,
ncaptc  ,
NCID  ,
VARID  ,
STRING  ,
TYPE  ,
COUNT  ,
CBUF  ,
PRCODE   
)

Definition at line 1675 of file fort-v2compat.c.

◆ FCALLSCSUB8() [1/5]

FCALLSCSUB8 ( c_ncvinq  ,
NCVINQ  ,
ncvinq  ,
NCID  ,
VARID  ,
PSTRING  ,
PTYPE  ,
PNDIMS  ,
PDIMIDS  ,
PNATTS  ,
PRCODE   
)

Definition at line 642 of file fort-v2compat.c.

◆ FCALLSCSUB8() [2/5]

FCALLSCSUB8 ( c_ncvptg  ,
NCVPTG  ,
ncvptg  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
STRIDES  ,
V2IMAP  ,
PVOID  ,
PRCODE   
)

Definition at line 1031 of file fort-v2compat.c.

◆ FCALLSCSUB8() [3/5]

FCALLSCSUB8 ( c_ncvpgc  ,
NCVPGC  ,
ncvpgc  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
STRIDES  ,
V2IMAP  ,
CBUF  ,
PRCODE   
)

Definition at line 1082 of file fort-v2compat.c.

◆ FCALLSCSUB8() [4/5]

FCALLSCSUB8 ( c_ncvgtg  ,
NCVGTG  ,
ncvgtg  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
STRIDES  ,
V2IMAP  ,
PVOID  ,
PRCODE   
)

Definition at line 1477 of file fort-v2compat.c.

◆ FCALLSCSUB8() [5/5]

FCALLSCSUB8 ( c_ncvggc  ,
NCVGGC  ,
ncvggc  ,
NCID  ,
VARID  ,
COORDS  ,
COUNTS  ,
STRIDES  ,
V2IMAP  ,
CBUF  ,
PRCODE   
)

Definition at line 1527 of file fort-v2compat.c.


Return to the Main Unidata NetCDF page.
Generated on Fri Aug 4 2017 17:20:58 for NetCDF-Fortran. NetCDF is a Unidata library.