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 Fiona, There is no sure-fire way to convert the downloaded files from the form resulting from FTPing the files in ASCII mode instead of binary mode. In ASCII mode, line endings are converted to match the client operating system. For example, if you were downloading files from a Windows server to a Unix client, using ASCII mode just converts each CR-LF pair of bytes to a single LF byte. But there might have been some LF bytes in the binary data that were not the result of such a conversion, and there's no way for a program to know whether an LF byte should be left alone or converted to a CR-LF pair. Conversions in the other direction are similarly problematical. ASCII mode in FTP may also do some other conversions (such as EBCDIC to ASCII when downloading from an IBM mainframe), so I think your only safe fix is to download the files again in binary mode. Sorry about that ... --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ENL-488817 Department: Support netCDF Priority: Normal Status: Closed