<p>I am currently working on (or at least planning) a couple of projects that work with large amounts of repetitive data. The kind of data that works well in a spreadsheet or database, but is nasty in XML. :)</p>

<p>NetCDF seems like a great option for a file format. However, my work is in C# and there is no "official" NetCDF implementation available. There is an "official" Python version that I could potentially use with IronPython. Another option is the "NetCDF Library for .Net" on CodePlex but it seems pretty quiet (<a href="http://www.codeplex.com/netcdf" rel="noreferrer">http://www.codeplex.com/netcdf</a>).</p>

<p>Has anyone worked with either of these libraries? Can you provide any recommendations?</p>

[{'answer_id': 63753, 'author': 'dmazzoni', 'author_id': 7193, 'author_profile': 'https://Stackoverflow.com/users/7193', 'pm_score': 4, 'selected': True, 'text': '<p>First, are you sure that NetCDF is the right choice?  If you want to interact with other programs that need to read in large amounts of data and they already support NetCDF, then it\'s probably a great choice.  There aren\'t that many standard and well-supported file formats that support large multidimensional arrays.  But if you\'re only going to be reading and writing files from C#, it may not be such a good choice.</p>\n\n<p>I\'m a big fan of the "classic" NetCDF file format.  It\'s compact and extremely simple, but flexible enough to support lots of common kinds of multidimensional well-structured data.  It only took me one day to write a complete parser for classic NetCDF, and it only took an hour to write a program to output a well-formed special case of a classic NetCDF file.  You could implement a pure C# NetCDF library yourself and it wouldn\'t be much trouble.  You could easily start by implementing only the features you need.  <a href="http://www.unidata.ucar.edu/software/netcdf/docs/netcdf/NetCDF-Classic-Format.html" rel="noreferrer">Here\'s the specification.</a></p>\n\n<p>Unfortunately, NetCDF-4 chose to use HDF-5 as its data format.  It adds a lot of complexity and makes it much more difficult to write a complete NetCDF parser in another language.  HDF-5 is very general-purpose and in my opinion, it was overengineered - it tries to be too many things to too many people.  I would not recommend trying to work with it directly unless you plan to spend a month writing unit tests.  If you must use netCDF-4 / HDF-5 from C#, your only realistic option would be to wrap the C library using SWIG or something like that.</p>\n\n<p>Note that NetCDF for Python is just a wrapper around the C code, so it\'s not really all that helpful; if you\'re going to use a wrapped C library you may as well just write a C# wrapper rather than use Python as a middle layer.</p>\n'}, {'answer_id': 859880, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>In a project we are using the ucar netcdf implementation in c# using ikvm. IKVM can be used to \'convert\' java projects into .Net libraries without a use for java VM. I have not done any performance check but it is a simple way to get netcdf in c# :).</p>\n\n<p><a href="http://www.unidata.ucar.edu/downloads/netcdf/netcdf-java-4/index.jsp" rel="nofollow noreferrer">http://www.ikvm.net/stories.html</a></p>\n\n<p><a href="http://www.unidata.ucar.edu/downloads/netcdf/netcdf-java-4/index.jsp" rel="nofollow noreferrer">http://www.unidata.ucar.edu/downloads/netcdf/netcdf-java-4/index.jsp</a></p>\n'}, {'answer_id': 25615627, 'author': 'dylanT', 'author_id': 2632046, 'author_profile': 'https://Stackoverflow.com/users/2632046', 'pm_score': 4, 'selected': False, 'text': '<p>I\'m adding this now because this was the top answer when I Googled about this topic.</p>\n\n<hr>\n\n<p><strong>ETA</strong> Per the reply below, there is ANOTHER Microsoft NetCDF library now available:</p>\n\n<p><a href="https://www.nuget.org/packages/SDSLite" rel="noreferrer">https://www.nuget.org/packages/SDSLite</a></p>\n\n<p><strong>Scientific DataSet Lite 1.4.0</strong></p>\n\n<p>This is a cross platform library for manipulating netCDF, CSV and TSV files.</p>\n\n<hr>\n\n<p>Since this question was originally asked and answered, Microsoft has released a Scientific DataSet Library that has support for NetCDF</p>\n\n<p><a href="http://research.microsoft.com/en-us/downloads/ccf905f6-34c6-4845-892e-a5715a508fa3/" rel="noreferrer">http://research.microsoft.com/en-us/downloads/ccf905f6-34c6-4845-892e-a5715a508fa3/</a></p>\n\n<p><strong>Project Description</strong></p>\n\n<p>The SDS library makes it easy for .Net developers to read, write and share scalars, vectors, matrices and multidimensional grids which are very common in scientific modelling. It supports CSV, NetCDF and other file format</p>\n\n<p>Programs that use the library store related data and associated metadata in a compact self-describing package. \nLibraries come with a set of utilities and packages: sds command line utility, DataSet Viewer application and an add-in for Microsoft Excel 2007 (and later versions). See Release page for details.</p>\n'}, {'answer_id': 39133129, 'author': 'user15741', 'author_id': 1789006, 'author_profile': 'https://Stackoverflow.com/users/1789006', 'pm_score': 2, 'selected': False, 'text': '<p>And now Microsoft has released a newer library for netCDF, available via NuGet:</p>\n\n<p><a href="https://www.nuget.org/packages/SDSLite" rel="nofollow">https://www.nuget.org/packages/SDSLite</a></p>\n\n<p><strong>Scientific DataSet Lite 1.4.0</strong></p>\n\n<p>This is a cross platform library for manipulating netCDF, CSV and TSV files.</p>\n'}]
['https://Stackoverflow.com/questions/60039', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4589/']