This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi, There are two utility programs that come with netCDF, ncdump and ncgen, that can be used to convert between ASCII and netCDF. The ASCII form of the data is called "CDL", and it represents the structure and metadata as well as the data. For a description and examples, see: http://www.unidata.ucar.edu/software/netcdf/docs/netcdf.html#NetCDF-Utilities You use ncgen to convert from the CDL form to netCDF and ncdump to convert netCDF to CDL. To get from the ASCII form you have to the CDL ASCII form, you may have to use some editing or text-processing tools. You can also use "ncgen -f" to generate the Fortran code needed to create a netCDF file from CDL. This is often the easiest way to get started creating a Fortran program for netCDF data. To see more example CDL files as well as example programs that create netCDF files, you can also look at this examples page: http://www.unidata.ucar.edu/software/netcdf/examples/programs/ --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: YTQ-675016 Department: Support netCDF Priority: Normal Status: Closed