Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hi all I'm having this problem: I'm trying to write a string data, so I tried what appears in this example: http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg02393.html Basically: I create an ArrayChar and then write it with nc.writeStringData, but I get an exception: Must be of type String if (values.getElementType() != String.class) throw new IllegalArgumentException("Must be ArrayObject of String "); I took a look into the code and ArrayChar returns char: The code for getElementType() is: /** Return the element class type */ public Class getElementType() { return char.class; } So, I tried to use ArrayObject ... java.lang.IllegalArgumentException: variable INSI is not type CHAR this is because of this: if (v2.getDataType() != DataType.CHAR) throw new IllegalArgumentException("variable " + varName + " is not type CHAR"); Ok, I had the var created with dataType.String, So I changed it to Char My question is: is this ok? should I create a var of type char then create an ArrayObject of Strings and then write that using writeStringData?
netcdf-java
archives: