[ncl-talk] Scale and offset not being applied to float type variables
Vimal Koul
koulvimal18 at gmail.com
Tue Feb 9 04:39:56 MST 2016
Sorry, There is a correction in my previous mail.
The offset and scale is being applied correctly but the units are not being
changed.
So the issue is with the units of the read variable not the value.
Thanks
Vimal
Regards,
Vimal Koul
On 9 February 2016 at 16:59, Vimal Koul <koulvimal18 at gmail.com> wrote:
> Dear all,
>
> I have a variable with the following description.
>
> float temperature ( time, depth, lat, lon )
> long_name : temperature
> standard_name : sea_water_potential_temperature
> units : kelvin
> _FillValue : -32768
> add_offset : 273.15
> scale_factor : 1
> valid_min : -5
> valid_max : 45
>
>
> When I read this variable in NCL, the values are in degrees Celsius and
> not in Kelvin even though a printVarSummary gives the units as "Kelvin".
>
> h = addfile("HadIProfile_201305_2.5deg.nc","r")
>
> heat = h->temperature(0,{0:305},:,:)
>
> printVarSummary(heat)
>
> Variable: heat
> Type: float
> Total Size: 787968 bytes
> 196992 values
> Number of Dimensions: 3
> Dimensions and sizes: [depth | 19] x [lat | 72] x [lon | 144]
> Coordinates:
> depth: [5.02159..270.5341]
> lat: [88.75..-88.75]
> lon: [1.25..358.75]
> Number Of Attributes: 8
> time : 77932.5
> standard_name : sea_water_potential_temperature
> long_name : temperature
> units : kelvin
> add_offset : 273.15
> scale_factor : 1
> _FillValue : -32768
> missing_value : -32768
>
>
> It seems NCL is not using the scale/add_offset for float-type variables
> like it does for short-type or did I miss something?
>
> Any suggestions would be helpful.
>
> Thanks,
> Vimal
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160209/65eba8cc/attachment.html
More information about the ncl-talk
mailing list