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 Marta, I'm not sure what you mean by a "simple binary file". Do you want an unformatted Fortran binary file? In that case, the simplest thing to do would be to write a small Fortran program that opens the netCDF file, (using the nf90_open function for example), reads a variable a slice at a time (using the nf90_get_var function, for example) and writes the data to another file using a Fortran unformatted write statement. These functions are documented in the NetCDF Fortran 90 Interface Guide, available online from http://www.unidata.ucar.edu/software/netcdf/docs/ If you want to write a binary file that you will access from C, C++, Java, or some other scripting language, you may have to write a small program in that language that uses the appropriate netCDF language interface to read the data and write it out in the way you desire. If you just want to see data values for some variable in text form, you can use the ncdump utility that is part of the netCDF software. For example, to see just the variables "T" and "P" in the file wrfout.nc, you could run the program ncdump -v T,P wrfout.nc --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: FLF-123299 Department: Support netCDF Priority: Normal Status: Closed