[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFJava #WWW-347958]: Problem with attributes of type CHAR



No it is not obvious because of where we put our snapshots.
Anyway, I think this is correct. Look at 
https://artifacts.unidata.ucar.edu/#browse/browse:unidata-snapshots:edu%2Fucar%2FnetcdfAll%2F5.0.0-20181017.203038-305



> 
> I'm sorry if the question is obvious but, how can we use the library with 
> this modification? Do we have to compile the code ourselves? When is planned 
> to release a new version including this fix?
> 
> Thank you very much for your help.
> 
> Best regards,

> 
> El 16/10/18 a las 21:23, Unidata netCDF Java Support escribió:
> 
> I think I have fixed this problem.
> The fix is described in this
> github pull request https://github.com/Unidata/thredds/pull/1160
> 
> 
> 
> 
> 
> Dear Dennis,
> 
> I'm not sure what you mention is the problem.
> 
> We want to add a 'char' type attribute (named _FillValue) to a variable of 
> type 'char'. However the Attribute constructor methods only support two 
> options, and none of them are complete:
> 
> 1. Creating a 'char' attribute. But then, no option to set the value.
> 
> Attribute<https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20ucar.ma2.DataType%29><https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20ucar.ma2.DataType%29>(java.lang.String
>  name, 
> DataType<https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/ma2/DataType.html><https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/ma2/DataType.html>
>  dataType)
> 
> 2. Creating an attribute with the value. But then, no option to set the 
> correct type because the value only can be a number or a String (but not a 
> 'char')
> 
> Attribute<https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.lang.Number%29><https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.lang.Number%29>(java.lang.String
>  name, java.lang.Number val)
> 
> Attribute<https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.lang.String%29><https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.lang.String%29>(java.lang.String
>  name, java.lang.String val)
> 
> We need a new constructor method 
> Attribute<https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.lang.String%29><https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#Attribute%28java.lang.String,%20java.lang.String%29>(java.lang.String
>  name, char val)
> Or a new method 
> setValue<https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#setValues%28ucar.ma2.Array%29><https://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/Attribute.html#setValues%28ucar.ma2.Array%29>(char
>  val)
> 
> Best regards,
> .
> 
> 
> El 12/10/18 a las 21:14, Unidata netCDF Java Support escribió:
> 
> The actual problem is caused by this bit of code in Attribute.java
> about line 556, where it says
> if (arr.getElementType() == char.class) { // turn CHAR into STRING
> I do not know the history behind this, so I am reluctant
> to change it. I am going to experiment to see what happens if I
> remove this block of code.
> 
> 
> 
> 
> 
> 
> Sorry for the delay.
> 
> For this discussion, I will assume you have a char valued
> variable like this:
> char v(d1,d2);
> where d1 and d2 are some named dimensions.
> So, what happens if you declare the fill value attribute like this:
> char v:_FillValue = " ";
> 
> 
> 
> 
> 
> Any news about this ticket? We are involved in an important project and the 
> due date is near. When do you expect to have an answer? In our opinion the 
> solution is quite simple. Otherwise I regret we'd have to change the whole 
> operative to use a different library...
> 
> Thank you for your help and sorry for my insistence.
> 
> 
> 
> 
> 
> 
> ________________________________________
> 
> 
> 
> 
> 
> Your Ticket has been received, and a Unidata staff member will review it and 
> reply accordingly. Listed below are details of this new Ticket. Please make 
> sure the Ticket ID remains in the Subject: line on all correspondence related 
> to this Ticket.
> 
> NOTE: All email exchanges with Unidata User Support are recorded in the 
> Unidata inquiry tracking system and then made publicly available through the 
> web.  If you do not want to have your interactions made available in this 
> way, you must let us know in each email you send to us.
> 
> Ticket ID: WWW-347958
> Subject: Problem with attributes of type CHAR
> Department: Support netCDF Java
> Priority: Normal
> Status: Open
> 
> 
> 
> NOTE: All email exchanges with Unidata User Support are recorded in the 
> Unidata inquiry tracking system and then made publicly available through the 
> web.  If you do not want to have your interactions made available in this 
> way, you must let us know in each email you send to us.
> 
> Please let us know how we can assist you further.
> 
> Unidata User Support
> 
> AVISO SOBRE CONFIDENCIALIDAD: Este mensaje y en su caso, sus anexos, se 
> dirige exclusivamente a su destinatario y puede contener información 
> privilegiada o confidencial. Si no es Vd. el destinatario indicado, queda 
> notificado de que la utilización, divulgación y/o copia sin autorización está 
> prohibida en virtud de la legislación vigente. Si ha recibido este mensaje 
> por error, le rogamos que nos lo comunique inmediatamente por esta misma vía 
> y proceda a su destrucción.
> 
> 
> 
> 
> =Dennis Heimbigner
> Unidata
> 
> 
> Ticket Details
> ===================
> Ticket ID: WWW-347958
> Department: Support netCDF Java
> Priority: Emergency
> Status: Open
> ===================
> NOTE: All email exchanges with Unidata User Support are recorded in the 
> Unidata inquiry tracking system and then made publicly available through the 
> web.  If you do not want to have your interactions made available in this 
> way, you must let us know in each email you send to us.
> 
> 
> 
> 
> 
> 
> 
> 
> [cid:part7.40EF4C9C.FB44F45A@puertos.es]
> 
> [cid:part8.0115D5FF.4C6BE58F@puertos.es]
> AVISO SOBRE CONFIDENCIALIDAD: Este mensaje y en su caso, sus anexos, se 
> dirige exclusivamente a su destinatario y puede contener información 
> privilegiada o confidencial. Si no es Vd. el destinatario indicado, queda 
> notificado de que la utilización, divulgación y/o copia sin autorización está 
> prohibida en virtud de la legislación vigente. Si ha recibido este mensaje 
> por error, le rogamos que nos lo comunique inmediatamente por esta misma vía 
> y proceda a su destrucción.
> 
> 
> 
> 
> 
> =Dennis Heimbigner
> Unidata
> 
> 
> Ticket Details
> ===================
> Ticket ID: WWW-347958
> Department: Support netCDF Java
> Priority: Emergency
> Status: Open
> ===================
> NOTE: All email exchanges with Unidata User Support are recorded in the 
> Unidata inquiry tracking system and then made publicly available through the 
> web.  If you do not want to have your interactions made available in this 
> way, you must let us know in each email you send to us.
> 
> 
> .
> 
> 
> 
> 
> --
> 
> 
> 
> [cid:part2.761819AE.0B9136EB@puertos.es]
> AVISO SOBRE CONFIDENCIALIDAD: Este mensaje y en su caso, sus anexos, se 
> dirige exclusivamente a su destinatario y puede contener información 
> privilegiada o confidencial. Si no es Vd. el destinatario indicado, queda 
> notificado de que la utilización, divulgación y/o copia sin autorización está 
> prohibida en virtud de la legislación vigente. Si ha recibido este mensaje 
> por error, le rogamos que nos lo comunique inmediatamente por esta misma vía 
> y proceda a su destrucción.
> 
> 

=Dennis Heimbigner
  Unidata


Ticket Details
===================
Ticket ID: WWW-347958
Department: Support netCDF Java
Priority: Emergency
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.