[ncl-talk] decimalPlaces
Dennis Shea
shea at ucar.edu
Thu Apr 8 09:55:58 MDT 2021
*sprintf*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/sprintf.shtml>
Hopefully, that will work for you.
On Thu, Apr 8, 2021 at 4:11 AM Buzan, Jonathan via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:
> Hi NCL-Talk,
>
> I am attempting to print a variable on a plot, and I am using the
> decimalPlaces function. However, the results are not applied the same way.
> Am I doing something wrong?
>
> Cheers,
> -Jonathan
>
>
> Code snippet:
> EU_R = decimalPlaces(EU_17(0),2,False)
> EU_R2 = decimalPlaces(EU_17(1),2,False)
> EU_B = decimalPlaces(EU_17(2),2,False)
> EU_M = decimalPlaces(EU_17(3),2,False)
> print(EU_R)
> print(EU_R2)
> print(EU_B)
> print(EU_M)
> print(EU_17(3))
>
> Results:
> Variable: EU_R
> Type: double
> Total Size: 8 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.969209968386869e+36
> (0) 0.8100000000000001
>
>
> Variable: EU_R2
> Type: double
> Total Size: 8 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.969209968386869e+36
> (0) 0.67
>
>
> Variable: EU_B
> Type: double
> Total Size: 8 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.969209968386869e+36
> (0) 111.46
>
>
> Variable: EU_M
> Type: double
> Total Size: 8 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.969209968386869e+36
> (0) 0.6899999999999999
>
>
> Variable: EU_17 (subsection)
> Type: double
> Total Size: 8 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.969209968386869e+36
> (0) 0.6903772429834589
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210408/41afe076/attachment.html>
More information about the ncl-talk
mailing list