A simple example of reading a netCDF file.
More...
#include <stdio.h>
#include <string.h>
#include <netcdf.h>
Go to the source code of this file.
|
#define | ERR(e) {printf("Error: %s\n", nc_strerror(e)); return 2;} |
|
#define | FILE_NAME "sfc_pres_temp.nc" |
|
#define | LAT_NAME "latitude" |
|
#define | LAT_UNITS "degrees_north" |
|
#define | LON_NAME "longitude" |
|
#define | LON_UNITS "degrees_east" |
|
#define | MAX_ATT_LEN 80 |
|
#define | NDIMS 2 |
|
#define | NLAT 6 |
|
#define | NLON 12 |
|
#define | PRES_NAME "pressure" |
|
#define | PRES_UNITS "hPa" |
|
#define | SAMPLE_PRESSURE 900 |
|
#define | SAMPLE_TEMP 9.0 |
|
#define | START_LAT 25.0 |
|
#define | START_LON -125.0 |
|
#define | TEMP_NAME "temperature" |
|
#define | TEMP_UNITS "celsius" |
|
#define | UNITS "units" |
|
A simple example of reading a netCDF file.
This is an example which reads some surface pressure and temperatures. The data file read by this program is produced by the companion program sfc_pres_temp_wr.c. It is intended to illustrate the use of the netCDF C API.
- Author
- Ed Hartnett
Definition in file sfc_pres_temp_rd.c.