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

Write a file demonstrating some of the features of netCDF-4. More...

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

Go to the source code of this file.

## Macros

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

## Functions

int | main ()

## Detailed Description

Write a file demonstrating some of the features of netCDF-4.

We create two shared dimensions, "x" and "y", in a parent group, and some netCDF variables in different subgroups. The variables will include a compound and an enum type, as well as some of the new atomic types, like the unsigned 64-bit integer.

This is part of the netCDF package. Full documentation of netCDF can be found at https://docs.unidata.ucar.edu/netcdf-c.

Author
  Edward Hartnett

Definition in file simple_nc4_wr.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 33 of file simple_nc4_wr.c.

## ERRCODE

#define ERRCODE 2

Definition at line 32 of file simple_nc4_wr.c.

## FILE_NAME

#define FILE_NAME "simple_nc4.nc"

Definition at line 23 of file simple_nc4_wr.c.

## NDIMS

#define NDIMS 2

Definition at line 26 of file simple_nc4_wr.c.

## NX

#define NX 6

Definition at line 27 of file simple_nc4_wr.c.

## NY

#define NY 12

Definition at line 28 of file simple_nc4_wr.c.

## Function Documentation

## main()

int main | ( |  | ) |

Definition at line 36 of file simple_nc4_wr.c.