Re: netCDF adding variable to an existing file [message #84130 is a reply to message #83958] |
Fri, 26 April 2013 11:08   |
armor.uah
Messages: 4 Registered: April 2013
|
Junior Member |
|
|
On Friday, April 26, 2013 12:58:58 PM UTC-5, David Fanning wrote:
> armor.uah@gmail.com writes:
>
>
>
>> I finally figured out what was going wrong and the ways to fix it.
>
>> What was going wrong: Even though the appending procedures would fail, some data was getting appended to the file. This is where the "already defined" errors came from. The way to fix this was to remove the netCDF file and replace the file with an unmodified file every time you run the program while troubleshooting.
>
>>
>
>> About getting dimension information to append to the file: I was not aware of the NCDF_DIMID call and it is required. Here is the correct code in case someone needs it in the future
>
>
>
> For people who prefer not to spend weeks figuring this out on their own,
>
> I just point out that the NCDF_File object in the Coyote Library shields
>
> you from knowing all the details of how this works, and gives (perhaps)
>
> much more informative and descriptive error messages to alert you to
>
> problems. :-)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Amen. Your code has convinced me to fly to Colorado and take your object oriented IDL course, whenever you offer it again.
|
|
|