You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a nc file that was converted from grib, which used the linear integer quantisation method:
##### Attributes #####
Variable Name Value
--------------------------------------------------------------------------------
global history 2020-12-04 14:31:15 GMT by grib_to_net..
global Conventions CF-1.6
latitude units degrees_north
latitude long_name latitude
time units hours since 1900-01-01 00:00:00.0
time calendar gregorian
time long_name time
longitude units degrees_east
longitude long_name longitude
no2 missing_value -32767
no2 units kg kg**-1
no2 add_offset 2.568999213205925e-7
no2 long_name Nitrogen dioxide
no2 scale_factor 7.840441656613366e-12
no2 _FillValue -32767
julia> no2
900×451×29 Array{Int16,3}:
[:, :, 1] =
-32766 -32766 -32766 -32766 -32766 … -32766 -32766 -32766 -32766
...
such that the Int16-values in this array are masked for -32767, and then scale linearly from add_offset in scale_factor steps to add_offset+(2^15-1)*scale_factor. I like the idea to be able to access the actually stored data in Int16 but maybe an automatic conversion to Float32/64 could be an option too?
The text was updated successfully, but these errors were encountered:
Indeed it's not being applied right now. I'll close this in favor of #39. There is also some more discussion here: JuliaGeo/NCDatasets.jl#57 (comment), about how to implement this in a type stable manner.
I have a nc file that was converted from grib, which used the linear integer quantisation method:
such that the Int16-values in this array are masked for -32767, and then scale linearly from
add_offset
inscale_factor
steps to add_offset+(2^15-1)*scale_factor. I like the idea to be able to access the actually stored data inInt16
but maybe an automatic conversion toFloat32/64
could be an option too?The text was updated successfully, but these errors were encountered: