NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi all, I'm trying to simply open a netcdf by: NetcdfFile ncfile=NetcdfFile.open(filename); When I run the code I get the following error:Exception in thread "main" java.lang.IllegalArgumentException: Illegal Netcdf Object Name = 'pass_date\units', should be [a-zA-Z_][a-zA-Z0-9_@:\.\-\(\)\+]*
at ucar.nc2.Attribute.validate(Attribute.java:204) at ucar.nc2.Attribute.<init>(Attribute.java:199) at ucar.nc2.N3header.readAtts(N3header.java:293) at ucar.nc2.N3header.read(N3header.java:141) at ucar.nc2.N3iosp.open(N3iosp.java:121) at ucar.nc2.NetcdfFile.<init>(NetcdfFile.java:815) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:358) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:229) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:174) at ucar.nc2.NetcdfFile.open(NetcdfFile.java:158) at test.OpenTest.main(OpenTest.java:42)"pass_date\units" is a global attribute generated by our satellite software (Terascan) and we cannot modify it. I think that changing the attribute name by another like "pass_date-units" will resolve the problem. But how to modify it if we can't open the source netcdf?
Using NCO operators is an option but I'm wondering if it's possible to resolve it using only netcdf-java library.
Thanks in advance, Roger PS. My netcdf-java version is 2.2.16. -- Roger Olivella Pujol Institute of Marine Sciences (CMIMA-CSIC) Barcelona, Catalonia (Spain) (+34) 932 309 500 voice http://saidin.cmima.csic.es ============================================================================== To unsubscribe netcdf-java, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ==============================================================================
netcdf-java
archives: