1/* This is part of the netCDF package. Copyright 2005-2011, University
2   Corporation for Atmospheric Research/Unidata. See COPYRIGHT file
3   for conditions of use.
4
5   Test that NetCDF-4 can read a bunch of HDF4 files pulled in from
6   the FTP site.
7*/
8
9#include <config.h>
10#include <nc_tests.h>
11#include "err_macros.h"
12#include <mfhdf.h>
13
14#define FILE_NAME "tst_interops2.h4"
15
16int
17main(int argc, char **argv)
18{
19   printf("\n*** Testing HDF4/NetCDF-4 interoperability...\n");
20   printf("*** testing that all hdf4 files can be opened...");
21   {
22#define NUM_SAMPLE_FILES 5
23      int ncid;
24      int nvars_inndims_innatts_inunlimdim_in;
25      char file_name[NUM_SAMPLE_FILES][NC_MAX_NAME + 1] = {"AMSR_E_L2_Rain_V10_200905312326_A.hdf",
26    "AMSR_E_L3_DailyLand_V06_20020619.hdf",
27    "MOD29.A2000055.0005.005.2006267200024.hdf",
28    "MYD29.A2002185.0000.005.2007160150627.hdf",
29    "MYD29.A2009152.0000.005.2009153124331.hdf"};
30      size_t len_in;
31      int f;
32
33      for (f = 0; f < NUM_SAMPLE_FILESf++)
34      {
35  if (nc_open(file_name[f], NC_NOWRITE, &ncid)) ERR;
36  if (nc_inq(ncid, &ndims_in, &nvars_in, &natts_in, &unlimdim_in)) ERR;
37  if (nc_close(ncid)) ERR;
38      }
39   }
40   SUMMARIZE_ERR;
41   FINAL_RESULTS;
42}


HyperKWIC - Version 7.20DA executed at 11:37 on 27 Oct 2017 | Polyhedron Solutions - INTERNAL USE | COMMERCIAL (Any O/S) SN 4AKIed