<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Jianghua,<br>
<br>
which NCL version are you running? Using version 6.6.2 works quite
well:<br>
<br>
<font color="#3333ff"><tt>> ncl</tt><tt><br>
</tt><tt> Copyright (C) 1995-2019 - All Rights Reserved</tt><tt><br>
</tt><tt> University Corporation for Atmospheric Research</tt><tt><br>
</tt><tt> NCAR Command Language Version 6.6.2</tt><tt><br>
</tt><tt> The use of this software is governed by a License
Agreement.</tt><tt><br>
</tt><tt> See <a class="moz-txt-link-freetext" href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.</tt><tt><br>
</tt><tt>ncl 0> a=new((/2,2/),float,-999.)</tt><tt><br>
</tt><tt>ncl 1> a=0.1</tt><tt><br>
</tt><tt>ncl 2> a(0,0)=-0.1</tt><tt><br>
</tt><tt>ncl 3> write_matrix(a,"2f5.2",True)</tt><tt><br>
</tt><tt> </tt><tt><br>
</tt><tt>-0.10 0.10</tt><tt><br>
</tt><tt> 0.10 0.10</tt><tt><br>
</tt><tt> </tt><tt><br>
</tt><tt>ncl 4> quit</tt></font><br>
<br>
-Karin<br>
<br>
<div class="moz-cite-prefix">Am 12.09.19 um 10:32 schrieb Wan
Jianghua via ncl-talk:<br>
</div>
<blockquote type="cite"
cite="mid:009701d56944$a5888d60$f099a820$@mail.iap.ac.cn">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
/* Page Definitions */
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1700200976;
mso-list-type:hybrid;
mso-list-template-ids:777394840 -1505721286 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:-;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:28.5pt;
text-indent:-18.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-font-family:SimSun;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:52.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F075;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:73.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F06C;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:94.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:115.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F075;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:136.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F06C;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:157.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:\F06E;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:178.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F075;
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:199.5pt;
text-indent:-21.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">Hi
all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">I
try to print a nicely formatted text file with
“write_matrix” function, but the result is not satisfactory.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">When
the absolute value of the number is less than 1, the zero
before the decimal point is omitted. Is there any possible
way to print it out? Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">My
test script:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">a=new((/2,2/),float,-999.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">a=0.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">a(0,0)=-0.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">write_matrix(a,"2f5.2",True)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">the
result:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:18.0pt"><span
style="font-size:12.0pt" lang="EN-US">-.10 .10<o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:18.0pt"><span
style="font-size:12.0pt" lang="EN-US">.10 .10<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US"><img
id="_x56fe__x7247__x0020_1"
src="cid:part1.FF9D0A54.4D962E0B@dkrz.de" class=""
width="128" height="70"></span><span
style="font-size:12.0pt" lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">Sincerely,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt" lang="EN-US">Jianghua<o:p></o:p></span></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></pre>
</blockquote>
<br>
</body>
</html>