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.
>From: "S. Rocky Durrans" <address@hidden> >Organization: ? >Keywords: 200204021841.g32Ifda11049 netCDF Win32 ncdumps ncgens Rocky, Since the Unidata support person who could best answer your query is not in today, I will attempt to jump in and help out. >We are working on trying to obtain VEMAP2 data for use in a climate change >modeling project. Those data are distributed in netcdf format. > >We have obtained the pre-built versions of the netcdf executables >(ncgens.exe and ncdumps.exe) from your website, but get syntax errors when >we try to run them. What is the proper syntax required for use of these >programs? (we haven't been able to find it anywhere) ncgens.exe and ncdumps.exe are statically linked versions of the netCDF utility applications ncgen.exe and ncdump.exe, respectively. The 's' denotes that the utilities are statically linked. The manner in which the statically linked utilities are run is identical to the way the non-statically linked utilities are run. The documentation for how to use ncgen and ncdump is available online: Unidata HomePage http://www.unidata.ucar.edu Software http://www.unidata.ucar.edu/Software.html netCDF HomePage http://www.unidata.ucar.edu/packages/netcdf NetCDF Documentation http://www.unidata.ucar.edu/packages/netcdf/docs.html online HTML http://www.unidata.ucar.edu/packages/netcdf/guidec/ NetCDF User's Guide for C http://www.unidata.ucar.edu/packages/netcdf/guidec/guidec-3.html#HEADING3-0 10 - NetCDF Utilities 10.4 - ncgen 10.5 - ncdump The last links above document the Unix syntax for running ncgen and ncdump respectively. The question I can't answer off of the top of my head is whether or not the syntax for the various flags (ncgen: '-b', '-o', '-c', '-f', '-n'; ncdump: '-c', '-h', '-v', '-f', '-l', '-p', '-n')) change for Win32. A quick way to test this is to use one form and if it doesn't work, use the other. For instance, if you had a netCDF file named vemap2.nc, first try: ncdump -h vemap2.nc If this gives you syntax errors, try: ncdump /h vemap2.nc I just performed this test (on Windows 2000) on the netCDF file 'FSL2all_20.nc' that can be found in the pub/idd/ldmstats/all_ directory of anonymous FTP on our FTP server, ftp.unidata.ucar.edu: ncdumps -h FSL2all_20.nc and it worked with no problems. This tells me that the syntax of the flags for ncdump/ncgen are the same for Win32 as they are for Unix, so you can use the online documentation for ncgen and ncdump as is. >Given the problems with the pre-built executables, Try the test above and see if it doesn't work for you. >we also tried building >them ourselves using the instructions in the win32_readme file. When doing >that, we encountered a fatal error using the command nmake /f msofts.mak > >What are we doing wrong? As far as building the netCDF under Windows goes, in order to see what you may be doing wrong we will need more information on the exact commands you ran and the error message(s) you got when running those commands. >This should not be so difficult. Please let us know if the 'ncdumps -h' test works on your system with your netCDF file. Tom Yoksas >From address@hidden Tue Apr 2 13:53:33 2002 >Subject: RE: 20020402: help running ncdumps and ncgens on Win32 Tom - Thanks for your quick and informative reply. No sooner did I send the message to you earlier, my student figured out where we were going wrong. We're successfully obtaining our data now. I apologize for any inconvenience this may have caused. - Rocky