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 Prabhakar, > I have been using this code to convert binary files into netcdf format. > The code works well while using 3 dimensional variables. But, when I > add one more dimension, the code compiles but it fails to run. > > Could you please kindly help where I am making a mistake. When you say the code "fails to run", what is the symptom you see of the code not running? Is there an error message produced by the first call to nf_put_vara_real, and if so, what does it say? I can't see anything obvious wrong with the code, but I can't run it here to reproduce the problem, because it calls functions and uses data we don't have. It might be helpful to check the status of each call to nf_put_vara_real rather than making a bunch of calls to that function and just checking the status of the last call. The way the code is written, the first few function calls could fail but if the last one succeeded, you would not be informed of the problem. It might also be helpful to send the output of "ncdump -c create.nc" after running the program, just to make sure everything was created as you intended ... --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: WYI-343499 Department: Support netCDF Priority: Normal Status: Closed