<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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:Gulim;
        panose-1:2 11 6 0 0 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:"\@Gulim";
        panose-1:2 11 6 0 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">You need to find the file number of the netcdf file you have open then issue the close statement
 on that number:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">‘sdfopen x.nc’<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">GrADS will return:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">SDF file x.nc is open as file X&nbsp; ----- where X is the next number in sequnce of the files you have
 open<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">So immediately after opening the file in your script you need to grab the file number with:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">‘line=sublin(result, 2)’<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">’fileno = subwrd(line, 8)’<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><br>
Issue all the other commands in your script then close with:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:8.0pt;line-height:106%"><span style="font-size:11.0pt;line-height:106%;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">‘close ‘fileno<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> gradsusr-bounces@gradsusr.org [mailto:gradsusr-bounces@gradsusr.org]
<b>On Behalf Of </b>???<br>
<b>Sent:</b> 03 June 2015 16:07<br>
<b>To:</b> GrADS Users Forum<br>
<b>Subject:</b> [gradsusr] Dear all<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">I want to close netcdf file which is opened by 'sdfopen' statement.<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">&nbsp;<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">I know close(filename) statement, but this command is only valid for binary files.<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">&nbsp;<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">How can I close netcdf file in grads?<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">&nbsp;<o:p></o:p></span></p>
<p><span style="font-size:10.0pt;font-family:&quot;Gulim&quot;,sans-serif">Thanks<o:p></o:p></span></p>
</div>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><span style="border:solid windowtext 1.0pt;padding:0cm"><img width="100" height="100" id="_x0000_i1025" src="cid:~WRD000.jpg" alt="Image removed by sender."></span><o:p></o:p></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>