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.
> > Ed: > > Thank you for the reply. I was trying to join a 'user' discussion list and thought that that was the way to get this answered.> Umm, why are you doing this? > I have wanted to open and process mass spec data files for about two years. Thinking my best hope of programming was with Python or Fortran, I eventually decided to utilize C/C++. Thus, a C/C++ interpreter would be the best environment in which to learn to program, using COMSPARI as my model. > > Why not Fortran, being 'English lilke'? The Fortran folder contains many .c files. If netCDF were from 1975, how many .c files would be in the Fortran folder? I just need to discover what is needed to compile a C/C++ interface. AstroROOT has done this for FITS files, there are support questions and software available that allows HDF5 files to be used in ROOT. The netCDF4 combination with HDF5 seems a natural evolution of what I am trying to do. > > That lead to either Ch, a C/C++ interpreter or ROOT, with cint. ROOT seemed to be the best choice. > > I want to use the ANDI interface to mass spec files in order to then extract TIC, etc. ANDI requires netCDF to which to link. > > With help from some ROOT users, I did get a netcdf.so built and loadable in ROOT on 11 NOV. Then trying to use ANDI, which is built on netCDF-2.3.2, I get the ncopts problem that is discussed in many support requests. > > It seems to me that there has to be the bare minimum of netCDF files needed. Using the CXX folder and copying and pasting the C folder in there, plus config.h from the first directory, I got it to work--but only once. Using that, originally built as a shared lib as the handmade make file explains, I could compile, link and pass the nctst program. I am not sure why it no longer works and working on trying to discover if it worked originally because I ran ./configure on my Linux before trying the ROOT integration. > > I have read enough to realize that the .m4 files are duplicated (ex. att.m4 would actually be the contents of att.c) and just need to generate a dictionary using rootcint and the required netCDF header files, then compile those G__.cxx and G__.h files. Then get the ANDI interface to work. > > The ANDI software was written in 1993, and included netCDF-2.3.2. The files, ms10io.c ms10aux.c ms10enum.c ms10.h ms10io.h CAN compile unchanged with g++. But the ROOT interpreter declares ncopts undeclared and will not load the .so. > > I hope to get this to work so that then I can open, process, and store mass spec data and base future grant proposals on it. > > I need some grant money, I need money. No one is going to hire me so I have to try to come up with something on my own. > > Thanking you for any info you might provide. > > Dennis > But why don't you just build the netCDF C++ library with the usual configure/make commands, and let the netCDF configure script figure out which files you need. The fortran API is in fact implemented with C. Sounds funny, but there it is. If you want to use fortran, it will work. If you run configure with --disable-f77 then both the Fortran 77 and Fortran 90 APIs will be skipped in the build. Just build netCDF in the usual way and you will get a netCDF C++ library: ./configure && make check Good luck, Ed Ticket Details =================== Ticket ID: SEZ-677429 Department: Support netCDF Priority: Normal Status: Closed