[ncl-talk] problem with output ascii
Dennis Shea
shea at ucar.edu
Thu Apr 14 08:28:03 MDT 2016
x = (/ (/ .9, 1.0, -.8, .6/) \
, (/-999.9, -999.9, -999.9, -999.9/) \
, (/ .7 , .8, -.7 , .6/) \
, (/ 1.4 , 1.4 , -1.4, .5 /) \
, (/2.3 , 2.3 , -2.3 , .5 /) \
, (/-999.9, -999.9, -999.9, -999.9/) /)
printVarSummary(x)
write_matrix (x, "4f7.1", False)
============
Variable: x
Type: float
Total Size: 96 bytes
24 values
Number of Dimensions: 2
Dimensions and sizes: [6] x [4]
Coordinates:
0.9 1.0 -0.8 0.6
-999.9 -999.9 -999.9 -999.9
0.7 0.8 -0.7 0.6
1.4 1.4 -1.4 0.5
2.3 2.3 -2.3 0.5
-999.9 -999.9 -999.9 -999.9
====
(The above output is lined up perfectly on my screen.)
write_matrix, for historical reasons, is a fortran subroutine. Hence the
*fmtf - *Format to be used, specified via Fortran style.
===
My guess is that it is dependent of the fortran compiler used for you
version of NCL.
You mention AIX ...
Maybe others can help.
On Thu, Apr 14, 2016 at 1:16 AM, wen <wenguanhuan at 163.com> wrote:
> Hi all,
> I use ncl (version 6.2.1) on aix unix platform to write data into file
> using function write_matrix. I found that the zero is missing before
> decimal point when the value is between 1 and -1. The value in the file is
> shown bellow. However I have not found this problem in redhat linux
> platform. Do anyone known how to keep the zero on aix platform? Please
> tell me. Thank you!
>
> .9 1.0 -.8 .6
> -999.9 -999.9 -999.9 -999.9
> .7 .8 -.7 .6
> 1.4 1.4 -1.4 .5
> 2.3 2.3 -2.3 .5
> -999.9 -999.9 -999.9 -999.9
>
>
>
>
>
> --
> Best regards,
> Guanhuan WEN
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160414/ec567ee5/attachment.html
More information about the ncl-talk
mailing list