Loading...
Searching...
No Matches
simple_xy_rd.c File Reference

Read a simple 2D netCDF file. More...

`#include <stdlib.h>`
`#include <stdio.h>`
`#include <netcdf.h>`
Include dependency graph for simple_xy_rd.c:

Go to the source code of this file.

## Macros

#define | ERR(e)
#define | ERRCODE 2
#define | FILE_NAME "simple_xy.nc"
#define | NX 6
#define | NY 12

## Functions

int | main ()

## Detailed Description

Read a simple 2D netCDF file.

This is a simple example which reads a small dummy array, which was written by simple_xy_wr.c. This is intended to illustrate the use of the netCDF C API.

Full documentation for netCDF can be found at: https://docs.unidata.ucar.edu/netcdf-c.

Author
  Edward Hartnett

Definition in file simple_xy_rd.c.

## Macro Definition Documentation

## ERR

#define ERR | ( |  | e | ) |

Value:
{printf("Error: %s\n", nc_strerror(e)); exit(ERRCODE);}
nc_strerror
EXTERNL const char * nc_strerror(int ncerr)
Given an error number, return an error message.
Definition derror.c:87

Definition at line 30 of file simple_xy_rd.c.

## ERRCODE

#define ERRCODE 2

Definition at line 29 of file simple_xy_rd.c.

## FILE_NAME

#define FILE_NAME "simple_xy.nc"

Definition at line 21 of file simple_xy_rd.c.

## NX

#define NX 6

Definition at line 24 of file simple_xy_rd.c.

## NY

#define NY 12

Definition at line 25 of file simple_xy_rd.c.

## Function Documentation

## main()

int main | ( |  | ) |

Definition at line 33 of file simple_xy_rd.c.