<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Ehsan,<br>
<br>
the syntax for multiple files is correct<br>
<br>
prc = f[:]->precipitationCal(lat|:,lon|:)<br>
<br>
Are you sure that all files have the same dimensions and names?<br>
<br>
-Karin<br>
<br>
<br>
<div class="moz-cite-prefix">Am 07.12.17 um 14:53 schrieb Ehsan
Taghizadeh:<br>
</div>
<blockquote type="cite"
cite="mid:360446108.321330.1512654787864@mail.yahoo.com">
<div style="font-family:bookman old style, new york, times,
serif;font-size:16px;">
<div>Dear Karin</div>
<div>Thank you so much for your nice reply. However for</div>
<div><span style="font-family: verdana, helvetica, sans-serif;
font-size: small;"> prc = f[:]->precipitationCal</span><br>
</div>
<div><span style="font-family: verdana, helvetica, sans-serif;
font-size: small;"><span style="font-family: verdana,
helvetica, sans-serif; font-size: small;">
printVarSummary(prc)</span><br>
</span></div>
<div><br>
</div>
<div>I got:</div>
<div>
<div> <font size="2">Copyright (C) 1995-2017 - All Rights
Reserved</font></div>
<div><font size="2"> University Corporation for Atmospheric
Research</font></div>
<div><font size="2"> NCAR Command Language Version 6.4.0</font></div>
<div><font size="2"> The use of this software is governed by a
License Agreement.</font></div>
<div><font size="2"> See <a class="moz-txt-link-freetext" href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more
details.</font></div>
<div><font size="2">warning:Aggregated dimension coordinate
values are non-monotonic; check aggregated file ordering</font></div>
<div><font size="2"><br>
</font></div>
<div><font size="2">Variable: prc</font></div>
<div><font size="2">Type: float</font></div>
<div><font size="2">Total Size: 849120 bytes</font></div>
<div><font size="2"> 212280 values</font></div>
<div><font size="2">Number of Dimensions: 2</font></div>
<div><font size="2">Dimensions and sizes: [lon | 3480] x
[lat | 61]</font></div>
<div><font size="2">Coordinates:</font></div>
<div><font size="2"> lon: [40.05..51.55]</font></div>
<div><font size="2"> lat: [34.25..40.25]</font></div>
<div><font size="2">Number Of Attributes: 6</font></div>
<div><font size="2"> units : mm</font></div>
<div><font size="2"> long_name : Daily accumulated
precipitation (combined microwave-IR) estimate</font></div>
<div><font size="2"> coordinates : lat lon</font></div>
<div><font size="2"> _FillValue : -9999.9</font></div>
<div><font size="2"> origname : precipitationCal</font></div>
<div><font size="2"> fullnamepath : /precipitationCal</font></div>
<div><br>
</div>
<span style="color: rgb(0, 0, 0); font-family: "bookman
old style", "new york", times, serif;
font-size: 16px;">In fact for one file, I don't have any
problem and following lines work correctly:</span><br>
</div>
<div><span style="color: rgb(0, 0, 0); font-family:
"bookman old style", "new york", times,
serif;">
<div style=""><font size="2"> f = addfile(filess,"r")</font></div>
<div style=""><font size="2"> prc =
f->precipitationCal(lat | :, lon | :)</font><br>
</div>
<div style="font-size: 16px;"><br>
</div>
<div style="font-size: 16px;">however for multiple files I
counter problem. I attached 3 files which I want to open.</div>
<div style="font-size: 16px;">As Karin mentioned the problem
is related to "Dimenstions and sizes". So how could I
point to a variable and simultaneous reorder (lat, lon)
dimension in case of multiple files?</div>
<div style="font-size: 16px;">I mean what is the form of</div>
<div style="">
<div style="color: rgb(0, 0, 0); font-family:
"bookman old style", "new york",
times, serif;"><font size="2"> f = addfile(filess,"r")</font></div>
<div style="color: rgb(0, 0, 0); font-family:
"bookman old style", "new york",
times, serif;"><font size="2"> prc =
f->precipitationCal(lat | :, lon | :)</font></div>
for multiple files?</div>
<div style="font-size: 16px;"><br>
</div>
<div style="font-size: 16px;">Again I'll be thankful for any
help.</div>
<div style="font-size: 16px;"><br>
</div>
<div style="font-size: 16px;">Sincerely</div>
<div style="font-size: 16px;">Ehsan</div>
<br>
</span></div>
<div id="yahoo_quoted_3114448420" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial,
sans-serif;font-size:13px;color:#26282a;">
<div> On Thursday, December 7, 2017, 4:51:40 PM GMT+3:30,
Karin Meier-Fleischer <a class="moz-txt-link-rfc2396E" href="mailto:meier-fleischer@dkrz.de"><meier-fleischer@dkrz.de></a>
wrote: </div>
<div><br>
</div>
<div><br>
</div>
<div>
<div id="yiv1802979807">
<div> Hi Ehsan,<br clear="none">
<br clear="none">
please, have a look at your data first. Do<br
clear="none">
<br clear="none">
<span style="font-size:small;font-family:verdana,
helvetica, sans-serif;"> prc =
f[:]->precipitationCal<br clear="none">
printVarSummary(prc)<br clear="none">
</span><span
style="font-size:small;font-family:verdana,
helvetica, sans-serif;"><br clear="none">
</span>to see what dimension names precipitationCal
has.<br clear="none">
<br clear="none">
-Karin<br clear="none">
<br clear="none">
<div class="yiv1802979807moz-cite-prefix">Am 07.12.17
um 12:18 schrieb Ehsan Taghizadeh:<br clear="none">
</div>
<blockquote type="cite">
<div class="yiv1802979807yqt3443244067"
id="yiv1802979807yqt54149">
<div style="font-family:bookman old style, new
york, times, serif;font-size:16px;">
<div><font face="verdana, helvetica, sans-serif"><font
size="2">Hi, I want to open multiple
netcdf files. Also I had to change
dimesion of variable (</font><span
style="color:rgb(0, 0,
0);font-family:verdana, helvetica,
sans-serif;"><font size="1">precipitationCal(lat
| :, lon | :)</font></span><font
size="2">), but I got an error
(fatal:(lat) is not a dimension name in
variable (lon), could not determine
dimension number). What should I do?</font></font></div>
<div><font face="verdana, helvetica, sans-serif"><font
size="2">Following lines are simple code.</font></font></div>
<div><font face="verdana, helvetica, sans-serif"
size="2"><br clear="none">
</font></div>
<div><font face="verdana, helvetica, sans-serif"
size="2"> diri = "path/" ; input
directory</font></div>
<div><font face="verdana, helvetica, sans-serif"
size="2"> files = systemfunc("ls
"+diri+"3B-DAY-L.MS.MRG.3IMERG.201704*.nc")
; file paths</font></div>
<div><font face="verdana, helvetica, sans-serif"
size="2"> f = addfiles(files,"r")</font></div>
<div><span
style="font-size:small;font-family:verdana,
helvetica, sans-serif;"> prc =
f[:]->precipitationCal(lat | :, lon | :)
; read precipitation from all files</span><br
clear="none">
</div>
<div><font face="verdana, helvetica, sans-serif"
size="1"><br clear="none">
</font><br clear="none">
</div>
<div>Sincerely</div>
<div>Ehsan</div>
</div>
</div>
<br clear="none">
<fieldset class="yiv1802979807mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
ncl-talk mailing list
<a rel="nofollow" shape="rect" class="yiv1802979807moz-txt-link-abbreviated" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu" moz-do-not-send="true">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a rel="nofollow" shape="rect" class="yiv1802979807moz-txt-link-freetext" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" moz-do-not-send="true">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br clear="none">
</div>
</div>
<div class="yqt3443244067" id="yqt93428">_______________________________________________<br
clear="none">
ncl-talk mailing list<br clear="none">
<a shape="rect" ymailto="mailto:ncl-talk@ucar.edu"
href="mailto:ncl-talk@ucar.edu" moz-do-not-send="true">ncl-talk@ucar.edu</a><br
clear="none">
List instructions, subscriber options, unsubscribe:<br
clear="none">
<a shape="rect"
href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
target="_blank" moz-do-not-send="true">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br
clear="none">
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<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>