X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 16 Oct 2014 06:04 AM by  anon
STRING keyword in NCDF_VARDEF
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
16 Oct 2014 06:04 AM
    Hi, I have been trying to create a NetCDF file (version 3) with a number of variables in a mix of types. However, when I try to include string variables, using the /STRING keyword, it produces an error (NC_ERROR=-45 : Unable to define variable). This only appears to happen when I try to define a string variable - it has no problem with Float, Double or Long. I am running IDL 8.3, and the string keyword was introduced in 8.1, so this should not be the issue. The issue happens with both arrays of strings and individual strings. Any help would be great!

    Deleted User



    New Member


    Posts:
    New Member


    --
    14 Nov 2014 03:47 PM
    It looks like there might have been a bug in IDL 8.3 that sometimes caused errors when trying to import string variables from NetCDF files. Could you please try upgrading to IDL 8.4 and then seeing if that helps with the issue.

    Deleted User



    New Member


    Posts:
    New Member


    --
    13 Feb 2015 03:56 PM
    Are you able to write the string with netCDF 4, or must it be done with version 3? If you want to try with version 4, you can set the NETCDF4_FORMAT keyword in your call to NCDF_CREATE. Then try your NCDF_VARDEF command and see if it works.
    You are not authorized to post a reply.