source: XIOS/dev/branch_openmp/extern/src_netcdf4/ncdap3.h @ 1501

Last change on this file since 1501 was 409, checked in by ymipsl, 11 years ago

Add improved nectdf internal library src

YM

  • Property svn:eol-style set to native
File size: 4.6 KB
Line 
1/*********************************************************************
2  *   Copyright 1993, UCAR/Unidata
3  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
4  *   $Header: /upc/share/CVS/netcdf-3/libncdap3/ncdap3.h,v 1.40 2010/05/30 19:45:52 dmh Exp $
5  *********************************************************************/
6#ifndef NCDAP3_H
7#define NCDAP3_H 1
8
9#include "config.h"
10#include <stdlib.h>
11#include <unistd.h>
12#include <fcntl.h>
13#include <sys/stat.h>
14#include <string.h>
15#include <stdio.h>
16
17#include "ncbytes.h"
18#include "nclist.h"
19#include "nchashmap.h"
20#include "nclog.h"
21#include "nc_uri.h"
22#include "fbits.h"
23#include "dceconstraints.h"
24
25#include "oc.h"
26
27#include "nc.h"
28#include "netcdf.h"
29#include "ncdispatch.h"
30 /* netcdf overrides*/
31#include "dapnc.h"
32
33#include "dapdebug.h"
34#include "daputil.h"
35
36/**************************************************/
37/* sigh, do the forwards */
38struct NCprojection;
39struct NCselection;
40struct Getvara;
41struct NCcachenode;
42struct NCcache;
43struct NCslice;
44struct NCsegment;
45
46/**************************************************/
47
48#include "nccommon.h"
49#include "getvara.h"
50#include "constraints3.h"
51
52/**************************************************/
53
54#ifndef USE_NETCDF4
55#define NC_UBYTE        7       /* unsigned 1 byte int */
56#define NC_USHORT       8       /* unsigned 2-byte int */
57#define NC_UINT         9       /* unsigned 4-byte int */
58#define NC_INT64        10      /* signed 8-byte int */
59#define NC_UINT64       11      /* unsigned 8-byte int */
60#define NC_STRING       12      /* string */
61
62#define NC_MAX_BYTE 127
63#define NC_MIN_BYTE (-NC_MAX_BYTE-1)
64#define NC_MAX_CHAR 255
65#define NC_MAX_SHORT 32767
66#define NC_MIN_SHORT (-NC_MAX_SHORT - 1)
67#define NC_MAX_INT 2147483647
68#define NC_MIN_INT (-NC_MAX_INT - 1)
69#define NC_MAX_FLOAT 3.402823466e+38f
70#define NC_MIN_FLOAT (-NC_MAX_FLOAT)
71#define NC_MAX_DOUBLE 1.7976931348623157e+308
72#define NC_MIN_DOUBLE (-NC_MAX_DOUBLE)
73#define NC_MAX_UBYTE NC_MAX_CHAR
74#define NC_MAX_USHORT 65535U
75#define NC_MAX_UINT 4294967295U
76#define NC_MAX_INT64 (9223372036854775807LL)
77#define NC_MIN_INT64 (-9223372036854775807LL-1)
78#define NC_MAX_UINT64 (18446744073709551615ULL)
79#define X_INT64_MAX     (9223372036854775807LL)
80#define X_INT64_MIN     (-X_INT64_MAX - 1)
81#define X_UINT64_MAX    (18446744073709551615ULL)
82#endif /*USE_NETCDF4*/
83
84
85/**************************************************/
86
87extern struct NCTMODEL nctmodels[];
88
89/**************************************************/
90/* Import some internal procedures from libsrc*/
91
92/* Internal, but non-static procedures */
93extern NCerror computecdfvarnames3(NCDAPCOMMON*,CDFnode*,NClist*);
94extern NCerror computecdfnodesets3(NCDAPCOMMON* drno);
95extern NCerror computevarnodes3(NCDAPCOMMON*, NClist*, NClist*);
96extern NCerror collectvardefdims(NCDAPCOMMON* drno, CDFnode* var, NClist* dimset);
97extern NCerror fixgrids3(NCDAPCOMMON* drno);
98extern NCerror dapmerge3(NCDAPCOMMON* drno, CDFnode* node, OCobject dasroot);
99extern NCerror sequencecheck3(NCDAPCOMMON* drno);
100extern NCerror computecdfdimnames3(NCDAPCOMMON*);
101extern NCerror attachdatadds3(struct NCDAPCOMMON*);
102extern NCerror detachdatadds3(struct NCDAPCOMMON*);
103extern void dapdispatch3init(void);
104
105/*
106extern void dereference3(NCconstraint* constraint);
107extern NCerror rereference3(NCconstraint*, NClist*);
108*/
109
110extern NCerror buildvaraprojection3(struct Getvara*,
111                     const size_t* startp, const size_t* countp, const ptrdiff_t* stridep,
112                     struct DCEprojection** projectionlist);
113
114extern NCerror nc3d_getvarx(int ncid, int varid,
115            const size_t *startp,
116            const size_t *countp,
117            const ptrdiff_t *stridep,
118            void *data,
119            nc_type dsttype0);
120
121/**************************************************/
122
123/* From: ncdap3.c*/
124extern NCerror nc3d_open(const char* path, int mode, int* ncidp);
125extern int nc3d_close(int ncid);
126extern int nc3dinitialize(void);
127extern NCerror regrid3(CDFnode* ddsroot, CDFnode* template, NClist*);
128extern void setvisible(CDFnode* root, int visible);
129extern NCerror mapnodes3(CDFnode* dstroot, CDFnode* srcroot);
130extern void unmap3(CDFnode* root);
131
132/* From: ncdap3a.c*/
133extern NCerror fetchtemplatemetadata3(NCDAPCOMMON* nccomm);
134extern NCerror fetchconstrainedmetadata3(NCDAPCOMMON* nccomm);
135extern void applyclientparamcontrols3(NCDAPCOMMON*);
136extern NCerror suppressunusablevars3(NCDAPCOMMON*);
137extern NCerror addstringdims(NCDAPCOMMON* drno);
138extern NCerror defseqdims(NCDAPCOMMON* drno);
139extern NCerror fixzerodims3(NCDAPCOMMON*);
140extern void estimatevarsizes3(NCDAPCOMMON*);
141extern NCerror defrecorddim3(NCDAPCOMMON*);
142extern NCerror showprojection3(NCDAPCOMMON*, CDFnode* var);
143
144
145/* From: dapcvt.c*/
146extern NCerror dapconvert3(nc_type, nc_type, char*, char*, size_t);
147extern int dapcvtattrval3(nc_type, void*, NClist*);
148
149#endif /*NCDAP3_H*/
Note: See TracBrowser for help on using the repository browser.