Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Unsigned types in NcML #1373

Open
mlandiech opened this issue Sep 9, 2021 · 0 comments
Open

Unsigned types in NcML #1373

mlandiech opened this issue Sep 9, 2021 · 0 comments

Comments

@mlandiech
Copy link

Hello,

We are facing an issue with the use of NcMLReader.readNcML method.
If the NcML used in input of the function is using isUnsigned="true" in the NCML attribute, the isUnsigned flag is not taken into account in the returned NetcdfDataset.

For example, if we have a defined variable as bellow:

<ncml:variable name="wn" type="short" shape="n_wn"> 
    <ncml:attribute name="valid_min" type="short" isUnsigned="true" value="0"/> 
    <ncml:attribute name="valid_max" type="short" isUnsigned="true" value="65534"/> 
    <ncml:attribute name="_FillValue" type="short" isUnsigned="true" value="65535"/> 
    <ncml:attribute name="missing_value" type="short" isUnsigned="true" value="65535"/> 
    <ncml:attribute name="_Unsigned" value="true"/> 
</ncml:variable> 

The generated Netcdf will have for these attributs:

short wn(n_wn=16921); 
  :units = "cm-1"; 
  :long_name = "Wavenumber base"; 
  :scale_factor = 0.032273322f; // float 
  :add_offset = 645.0f; // float 
  :valid_min = 0S; // short 
  :valid_max = -2S; // short 
  :_FillValue = -1S; // short 
  :missing_value = -1S; // short 
  :_Unsigned = "true"; 
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant