Data
Tools
Community
Downloads
Support
Projects
About Us
My Account
advanced
Example netCDF programs
Below we provide links to some sample netCDF programs.
Write a two-dimensional array of sample data that looks like
simple_xy.cdl
:
C:
simple_xy_wr.c
Fortran 77:
simple_xy_wr.f
Fortran 90:
simple_xy_wr.f90
C++:
simple_xy_wr.cpp
Java:
Simple_xy_wr.java
Contributed:
Python:
simple_xy_wr.py
, MATLAB:
simple_xy_wr.m
, Perl:
simple_xy_wr.pl
, IDL:
simple_xy_wr.pro
Read data from the simple file written above:
C:
simple_xy_rd.c
Fortran 77:
simple_xy_rd.f
Fortran 90:
simple_xy_rd.f90
C++:
simple_xy_rd.cpp
Java:
Simple_xy_rd.java
Contributed:
Python:
simple_xy_rd.py
, MATLAB:
simple_xy_rd.m
, Perl:
simple_xy_rd.pl
, IDL:
simple_xy_rd.pro
Write some variables with units attributes and coordinate dimensions that will look like
sfc_pres_temp.cdl
:
C:
sfc_pres_temp_wr.c
Fortran 77:
sfc_pres_temp_wr.f
Fortran 90:
sfc_pres_temp_wr.f90
C++:
sfc_pres_temp_wr.cpp
Java:
Sfc_pres_temp_wr.java
Contributed:
Python:
sfc_pres_temp_wr.py
, MATLAB:
sfc_pres_temp_wr.m
, Perl:
sfc_pres_temp_wr.pl
, IDL:
sfc_pres_temp_wr.pro
Read data variables and attributes from the file written above:
C:
sfc_pres_temp_rd.c
Fortran 77:
sfc_pres_temp_rd.f
Fortran 90:
sfc_pres_temp_rd.f90
C++:
sfc_pres_temp_rd.cpp
Java:
Sfc_pres_temp_rd.java
Contributed:
Python:
sfc_pres_temp_rd.py
, MATLAB:
sfc_pres_temp_rd.m
, Perl:
sfc_pres_temp_rd.pl
, IDL:
sfc_pres_temp_rd.pro
Write some four-dimensional variables using a record dimension in a file that will look like
pres_temp_4D.cdl
:
C:
pres_temp_4D_wr.c
Fortran 77:
pres_temp_4D_wr.f
Fortran 90:
pres_temp_4D_wr.f90
C++:
pres_temp_4D_wr.cpp
Java:
Pres_temp_4D_wr.java
Contributed:
Python:
pres_temp_4D_wr.py
, MATLAB:
pres_temp_4D_wr.m
, Perl:
pres_temp_4D_wr.pl
, IDL:
pres_temp_4D_wr.pro
Read from the variables in the file written above:
C:
pres_temp_4D_rd.c
Fortran 77:
pres_temp_4D_rd.f
Fortran 90:
pres_temp_4D_rd.f90
C++:
pres_temp_4D_rd.cpp
Java:
Pres_temp_4D_rd.java
Contributed:
Python:
pres_temp_4D_rd.py
, MATLAB:
pres_temp_4D_rd.m
, Perl:
pres_temp_4D_rd.pl
, IDL:
pres_temp_4D_rd.pro
Last modified: Thu Feb 15 14:14:19 MST 2007