Go to the documentation of this file.
3 int main(
int argc,
char *argv[])
27 float *
data, *xfr_arr;
28 int nlin = 181,
npix = 360, ilin, iret = 0, irc, ifld, nfld = 5;
30 char *met_fields[] = {
"z_wind",
"m_wind",
"press",
"p_water",
"rel_hum"};
31 char *qc_fields[] = {
"z_wind_QC",
"m_wind_QC",
"press_QC",
32 "p_water_QC",
"rel_hum_QC"};
36 if (
hio_open(argv[1], DFACC_RDWR, &hinfo) != 0) {
37 printf(
"%s: hio_open failure\n", __FILE__);
45 if ((xfr_arr = (
float *) malloc(
npix *
sizeof (
float))) ==
NULL)
47 if ((b_xfr = (
char *) malloc(
npix *
sizeof (
char))) ==
NULL)
51 if ((b_data = (
char *) malloc(
npix *
nlin *
sizeof (
char))) ==
NULL)
54 printf(
"%s: Transfer space allocation failed\n", __FILE__);
57 for (ifld = 0; ifld < nfld; ifld++) {
63 printf(
"%s: hio_r_sds failure\n", __FILE__);
70 for (ilin = 0; ilin <
nlin / 2; ilin++) {
71 memcpy((
void *) xfr_arr, (
void *) (
data + ilin *
npix),
72 npix *
sizeof (
float));
73 memcpy((
void *) (
data + ilin *
npix),
75 npix *
sizeof (
float));
77 (
void *) xfr_arr,
npix *
sizeof (
float));
84 printf(
"%s: hio_i_sds failure\n", __FILE__);
92 DFNT_INT8, (
void *) b_data) != 0) {
93 printf(
"%s: hio_r_sds failure\n", __FILE__);
98 for (ilin = 0; ilin <
nlin / 2; ilin++) {
99 memcpy((
void *) b_xfr, (
void *) (b_data + ilin *
npix),
100 npix *
sizeof (
char));
101 memcpy((
void *) (b_data + ilin *
npix),
102 (
void *) (b_data + (
nlin - 1 - ilin) *
npix),
103 npix *
sizeof (
char));
104 memcpy((
void *) (b_data + (
nlin - 1 - ilin) *
npix),
105 (
void *) b_xfr,
npix *
sizeof (
char));
109 DFNT_INT8, (
void *) b_data) != 0) {
110 printf(
"%s: hio_i_sds failure\n", __FILE__);
120 printf(
"%s: hio_close failure\n", __FILE__);
int32 hio_i_sds(hio_struct, char *, int32, void *)
int32 hio_close(hio_struct)
int main(int argc, char *argv[])
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
int32 hio_open(char *, int32, hio_struct *)
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT32
int32 hio_r_sds(hio_struct, char *, int32, void *)