NASA Logo
Ocean Color Science Software

ocssw V2022
anc.h
Go to the documentation of this file.
1 #ifndef ANC_H /* avoid re-inclusion */
2 #define ANC_H
3 
4 #include <stdint.h>
5 #include <stdio.h>
6 #include <math.h>
7 #include <string.h>
8 #include <ctype.h>
9 
10 #define LAT 721
11 #define LON 1441
12 
13 #define MAXVAL 255
14 #define null '\0'
15 
16 #define WIND_U 0
17 #define WIND_V 1
18 #define PRESSURE 2
19 #define HUMIDITY 3
20 #define OZONE 4
21 #define TAUAER 6
22 #define ANGSTROM 7
23 #define TAUCLD 8
24 #define CFCLD 9
25 
26 #define CORNERS 4
27 #define NPARMS 6
28 #define NFILE 2
29 #define F1 0
30 #define F2 1
31 
32 /* Time Conversion Constants */
33 #define MSECHOUR 3600000
34 #define MSECMIN 60000
35 #define MSECSEC 1000
36 
37 #define BS_INCR 0 /* increasing order */
38 #define BS_DECR 1 /* decreasing order */
39 
40 #define SPATIAL 110
41 #define SPATIAL_TEMPORAL 112
42 
43 #define GEOMETRY_VDATA "Equal-Angle SDS"
44 
45 #define WIND_U_LABEL "Zonal Wind"
46 #define WIND_V_LABEL "Meridional Wind"
47 #define PRESSURE_LABEL "Atmospheric Pressure"
48 #define HUMIDITY_LABEL "Relative Humidity"
49 #define OZONE_LABEL "Total Ozone"
50 
51 #define CLIM_DATA "Average"
52 
53 #define QC_LABEL "QC flag"
54 #define PARM_LABEL "Observations"
55 
56 #define SYEAR "Start Year"
57 #define SDAY "Start Day"
58 #define SMSEC "Start Millisec"
59 #define EYEAR "End Year"
60 #define EDAY "End Day"
61 #define EMSEC "End Millisec"
62 
63 #define VSIZE "Latitude Step"
64 #define HSIZE "Longitude Step"
65 #define MAXNORTH "Northernmost Latitude"
66 #define MAXSOUTH "Southernmost Latitude"
67 #define MAXWEST "Westernmost Longitude"
68 #define MAXEAST "Easternmost Longitude"
69 #define SWPT_LAT "SW Point Latitude"
70 #define SWPT_LON "SW Point Longitude"
71 
72 extern char ERR_MSG[1024];
73 
74 #ifndef DATANAMES
75 #define DATANAMES
76 static const char * const data_sdsnames[NPARMS] = {
77  "z_wind",
78  "m_wind",
79  "press",
80  "p_water",
81  "ozone",
82  "rel_hum"
83 };
84 
85 static const char * const QC_sdsnames[NPARMS] = {
86  "z_wind_QC",
87  "m_wind_QC",
88  "press_QC",
89  "p_water_QC",
90  "ozone_QC",
91  "rel_hum_QC"
92 };
93 
94 static const char * const clim_vgps[12] = {
95  "January",
96  "February",
97  "March",
98  "April",
99  "May",
100  "June",
101  "July",
102  "August",
103  "September",
104  "October",
105  "November",
106  "December"
107 };
108 
109 static const char * const clim_datasets[NPARMS] = {
110  "z_wind_mean",
111  "m_wind_mean",
112  "press_mean",
113  "p_water_mean",
114  "ozone_mean",
115  "rel_hum_mean"
116 };
117 #endif /* DATANAMES */
118 /*
119 #ifndef FILESTRUCT
120 #define FILESTRUCT
121 
122 #define FLIMIT 12
123 struct file_time {
124  char *fn;
125  float64 sdate;
126  float64 stime;
127  float64 edate;
128  float64 etime;
129  } ftime[FLIMIT];
130 #endif */ /* FILESTRUCT */
131 
132 
133 /**** fortran prototypes */
134 
135 void dataintp_(float* in_latlon, float* lat_list, float* lon_list,
136  float* data_list1, double* DT1, float* data_list2, double* DT2,
137  int32_t* ipt, int32_t* nband, float(*) [2], float* def,
138  int32_t* intporder, float* dummy, float* dataout, float* unc,
139  int32_t* int_bad, int32_t* row, int32_t* col);
140 
141 
142 int dataintp(float in_latlon[2], float* lat_list, float* lon_list,
143  float* data_list1, double* DT1, float* data_list2, double* DT2,
144  int32_t* ipt, int32_t* nband, float rng[2], float* def,
145  int32_t* intporder, float* dummy, float* dataout, float* unc,
146  int32_t* int_bad, int32_t* row, int32_t* col);
147 
148 void julian_(double* dtin, double* d_jd);
149 
150 
151 
152 /**** internal c prototypes */
153 
154 int32_t rdancattr(int32_t sdfid, char *attr_name, void *buf);
155 
156 
157 
158 #endif /* ANC_H */
int dataintp(float in_latlon[2], float *lat_list, float *lon_list, float *data_list1, double *DT1, float *data_list2, double *DT2, int32_t *ipt, int32_t *nband, float rng[2], float *def, int32_t *intporder, float *dummy, float *dataout, float *unc, int32_t *int_bad, int32_t *row, int32_t *col)
Definition: dataintp.c:148
void julian_(double *dtin, double *d_jd)
void dataintp_(float *in_latlon, float *lat_list, float *lon_list, float *data_list1, double *DT1, float *data_list2, double *DT2, int32_t *ipt, int32_t *nband, float(*)[2], float *def, int32_t *intporder, float *dummy, float *dataout, float *unc, int32_t *int_bad, int32_t *row, int32_t *col)
int32_t rdancattr(int32_t sdfid, char *attr_name, void *buf)
Definition: HDFroutines.c:121
#define NPARMS
Definition: anc.h:27
int32_t nband
char ERR_MSG[1024]
Definition: extract_sub.c:119