NCL Website header
NCL Home> Application examples> File IO || Data files for some examples

Example pages containing: tips | resources | functions/procedures

Writing binary files

NCL has four main functions for writing data to binary files:

  1. fbinrecwrite : multiple unformatted sequential records
  2. fbindirwrite : specified direct record
  3. fbinwrite : single unformatted sequential record
  4. cbinwrite : mimics a C block IO write
write_bin_1.ncl: This example shows how to read data from a NetCDF file and write it to a fortran unformatted binary file using fbinrecwrite.
write_bin_2.ncl: This example shows how to use fbindirwrite to write three variables to the same file, and then fbindirread to read them back in.