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 Jonathan, > If you do not deal with this type of query, could be please forward this > to someone who may know. > > I have a question abouit file format conversion. > > I have a set of data files. They are .txt files. I am using Fortran 90. I > saw it is possible to convert cdl file into netcdf .nc files using the ncgen > command. > > Is it possible to convert a .txt file to a .cdl file? Is there a special > command? Or do we need to write a script to do this. There is no general-purpose program or command to convert data in a .txt file to CDL, becasue of the great variety of ways to represent data in a .txt file. In general, you need a program or script to do this. > If a script is required, could you give me an outline of the steps that > would need to be taken, mentioning the various commands that would need ton > be used. How you do this depends on whether your data is multidimensional, how much metadata you want to include, whether you want to include a coordinate system, what netCDF conventions you choose to follow (for example CF Conventions), etc. It might be easier to get your data into a form with comma-separated values, because that's what CDL uses. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: BFT-838875 Department: Support netCDF Priority: Normal Status: Closed