MISR Toolkit  1.5.1
dfsd.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright by The HDF Group. *
3  * Copyright by the Board of Trustees of the University of Illinois. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF. The full HDF copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://support.hdfgroup.org/ftp/HDF/releases/. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 /* $Id$ */
15 
16 /*-----------------------------------------------------------------------------
17  * File: dfsd.h
18  * Purpose: header file for the Scientific Data set
19  * Invokes: dfrig.h
20  * Contents:
21  * Structure definitions: DFSsdg
22  * Constant definitions: DFS_MAXLEN
23  * Remarks: This is included with user programs which use SDG
24  * Currently defined to be 2-D. Will later be increased to
25  * multiple dimensions
26  *---------------------------------------------------------------------------*/
27 
28 #ifndef _DFSD_H /* avoid re-inclusion */
29 #define _DFSD_H
30 
31 #include "H4api_adpt.h"
32 
33 #include "hdf.h"
34 
35 /* include numbertype and aid for 3.2 S. Xu */
36 /* structure to hold SDG info */
37 typedef struct DFSsdg
38  {
39  DFdi data; /* tag/ref of data in file */
40  intn rank; /* number of dimensions */
41  int32 *dimsizes; /* dimensions of data */
42  char *coordsys;
43  char *dataluf[3]; /* label/unit/format of data */
44  char **dimluf[3]; /* label/unit/format for each dim */
45  uint8 **dimscales; /* scales for each dimension */
46  uint8 max_min[16]; /* max, min values of data, */
47  /* currently atmost 8 bytes each */
48  int32 numbertype; /* default is float32 */
49  uint8 filenumsubclass; /* number format in the file, default is IEEE */
50  int32 aid; /* access id */
51  int32 compression; /* 0 -- not compressed */
52  int32 isndg; /* 0 -- pure sdg, written by 3.1 else ndg */
53  float64 cal, cal_err; /* calibration multiplier stuff */
54  float64 ioff, ioff_err; /* calibration offset stuff */
55  int32 cal_type; /* number type of data after calibration */
56  uint8 fill_value[DFSD_MAXFILL_LEN]; /* fill value if any specified */
57  intn fill_fixed; /* whether ther fill value is a fixed value, or it can change */
58  }
59 DFSsdg;
60 
61 /* DFnsdgle is the internal structure which stores SDG or NDS and */
62 /* related SDG in an HDF file. */
63 /* It is a linked list. */
64 
65 typedef struct DFnsdgle
66  {
67  DFdi nsdg; /* NDG from 3.2 or SDG from 3.1 */
68  DFdi sdg; /* Only special NDF has values in this field */
69  struct DFnsdgle *next;
70  }
71 DFnsdgle;
72 
73 typedef struct DFnsdg_t_hdr
74  {
75  uint32 size;
76  DFnsdgle *nsdg_t;
77  }
79 
80 #if defined c_plusplus || defined __cplusplus
81 extern "C"
82 {
83 #endif /* c_plusplus || __cplusplus */
84 
85  HDFLIBAPI int32 DFSDIopen
86  (const char * filename, int acc_mode);
87 
89  (int32 file_id);
90 
92  (DFSsdg * sdg);
93 
95  (DFSsdg * sdg);
96 
98  (const char * filename, intn rank, int32 maxsizes[], VOIDP data,
99  int isfortran);
100 
102  (const char * filename, intn rank, int32 * dimsizes, VOIDP data,
103  int accmode, int isfortran);
104 
106  (const char * filename, int32 winst[], int32 windims[], VOIDP data,
107  int32 dims[], int isfortran);
108 
110  (int32 windims[], VOIDP data, int32 dims[], int isfortran);
111 
113  (int isfortran);
114 
116  (char * filename);
117 
119  (intn * isndg);
120 
122  (intn * rank);
123 
125  (intn * rank);
126 
128  (int dim, const char * label, const char * unit, const char * format);
129 
131  (const char * label, const char * unit, const char * format,
132  const char * coordsys);
133 
134 #if defined c_plusplus || defined __cplusplus
135 }
136 #endif /* c_plusplus || __cplusplus */
137 
138 #endif /* _DFSD_H */
HDFFCLIBAPI intf winst[]
HDFLIBAPI int DFSDIgetdata(const char *filename, intn rank, int32 maxsizes[], VOIDP data, int isfortran)
int32 numbertype
Definition: dfsd.h:49
HDFLIBAPI int DFSDIisndg(intn *isndg)
HDFLIBAPI int DFSDIgetslice(const char *filename, int32 winst[], int32 windims[], VOIDP data, int32 dims[], int isfortran)
float64 ioff_err
Definition: dfsd.h:55
HDFLIBAPI int DFSDIsetdimstrs(int dim, const char *label, const char *unit, const char *format)
uint8 max_min[16]
Definition: dfsd.h:47
HDFLIBAPI intn DFSDIrefresh(char *filename)
float64 cal
Definition: dfsd.h:54
char * filename
Definition: cdjpeg.h:133
HDFFCLIBAPI _fcd label
HDFLIBAPI int32 DFSDIopen(const char *filename, int acc_mode)
int32 cal_type
Definition: dfsd.h:56
Definition: hdf.h:24
HDFFCLIBAPI void intf dims[]
float64 ioff
Definition: dfsd.h:55
intn fill_fixed
Definition: dfsd.h:58
char ** dimluf[3]
Definition: dfsd.h:45
int32 aid
Definition: dfsd.h:51
HDFLIBAPI int DFSDIgetwrank(intn *rank)
HDFFCLIBAPI intf intf maxsizes[]
int32 compression
Definition: dfsd.h:52
DFdi data
Definition: dfsd.h:40
struct DFnsdgle * next
Definition: dfsd.h:70
HDFLIBAPI int DFSDIclearNT(DFSsdg *sdg)
HDFLIBAPI int DFSDIputslice(int32 windims[], VOIDP data, int32 dims[], int isfortran)
HDFLIBAPI int DFSDIsdginfo(int32 file_id)
HDFLIBAPI int DFSDIsetdatastrs(const char *label, const char *unit, const char *format, const char *coordsys)
struct DFSsdg DFSsdg
int32 * dimsizes
Definition: dfsd.h:42
#define DFSD_MAXFILL_LEN
Definition: hlimits.h:143
HDFFCLIBAPI _fcd _fcd _fcd intf * isfortran
HDFLIBAPI int DFSDIclear(DFSsdg *sdg)
int32 isndg
Definition: dfsd.h:53
Definition: dfsd.h:38
HDFFCLIBAPI intf * size
float64 cal_err
Definition: dfsd.h:54
char * coordsys
Definition: dfsd.h:43
Definition: dfsd.h:66
uint8 filenumsubclass
Definition: dfsd.h:50
HDFFCLIBAPI intf * acc_mode
struct DFnsdgle DFnsdgle
HDFLIBAPI int DFSDIputdata(const char *filename, intn rank, int32 *dimsizes, VOIDP data, int accmode, int isfortran)
HDFFCLIBAPI _fcd unit
#define HDFLIBAPI
Definition: H4api_adpt.h:195
HDFLIBAPI int DFSDIgetrrank(intn *rank)
HDFFCLIBAPI intf intf windims[]
struct DFnsdg_t_hdr DFnsdg_t_hdr
uint8 ** dimscales
Definition: dfsd.h:46
HDFFCLIBAPI _fcd _fcd format
uint8 fill_value[DFSD_MAXFILL_LEN]
Definition: dfsd.h:57
intn rank
Definition: dfsd.h:41
HDFLIBAPI int DFSDIendslice(int isfortran)
char * dataluf[3]
Definition: dfsd.h:44

MISR Toolkit - Copyright © 2005 - 2020 Jet Propulsion Laboratory
Generated on Fri Jun 19 2020 22:49:52