<html><head></head><body><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div>Dear Karin</div><div>I think so, all files have the same dimensions and names.</div><div>I examined one by one files and all shows same output for following lines</div><div><font size="2"> prc2 = f->precipitationCal(lat | :, lon | :)<br> printVarSummary(prc2)</font><br><br>Output is:<br></div><div><br></div><div><font size="2">Type: float<br>Total Size: 28304 bytes<br> 7076 values<br>Number of Dimensions: 2<br>Dimensions and sizes: [lat | 61] x [lon | 116]<br>Coordinates:<br> lat: [34.25..40.25]<br> lon: [40.05..51.55]</font><br><br><br></div>
<div><br></div><div>However if it helps I could attach these files.</div><div><br></div><div>Sincerely</div><div>Ehsan<br></div>
<div id="yahoo_quoted_3205849993" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Thursday, December 7, 2017, 2:22:35 PM GMT, Karin Meier-Fleischer <meier-fleischer@dkrz.de> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv3037120654"><div>
Hi Ehsan,<br clear="none">
<br clear="none">
the syntax for multiple files is correct<br clear="none">
<br clear="none">
prc = f[:]->precipitationCal(lat|:,lon|:)<br clear="none">
<br clear="none">
Are you sure that all files have the same dimensions and names?<br clear="none">
<br clear="none">
-Karin<br clear="none">
<br clear="none">
<br clear="none">
<div class="yiv3037120654moz-cite-prefix">Am 07.12.17 um 14:53 schrieb Ehsan
Taghizadeh:<br clear="none">
</div>
<blockquote type="cite">
<div class="yiv3037120654yqt9654632813" id="yiv3037120654yqt29942"><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 clear="none">
</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 clear="none">
</span></div>
<div><br clear="none">
</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 rel="nofollow" shape="rect" class="yiv3037120654moz-txt-link-freetext" target="_blank" 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 clear="none">
</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 clear="none">
</div>
<span style="color:rgb(0, 0, 0);">In fact for one file, I don't have any
problem and following lines work correctly:</span><br clear="none">
</div>
<div><span style="color:rgb(0, 0, 0);">
</span><div style=""><font size="2"> f = addfile(filess,"r")</font></div>
<div style=""><font size="2"> prc =
f->precipitationCal(lat | :, lon | :)</font><br clear="none">
</div>
<div style="font-size:16px;"><br clear="none">
</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 size="2"> f = addfile(filess,"r")</font></div>
<div style="color:rgb(0, 0, 0);"><font size="2"> prc =
f->precipitationCal(lat | :, lon | :)</font></div>
for multiple files?</div>
<div style="font-size:16px;"><br clear="none">
</div>
<div style="font-size:16px;">Again I'll be thankful for any
help.</div>
<div style="font-size:16px;"><br clear="none">
</div>
<div style="font-size:16px;">Sincerely</div>
<div style="font-size:16px;">Ehsan</div>
<br clear="none">
</div>
<div class="yiv3037120654yahoo_quoted" id="yiv3037120654yahoo_quoted_3114448420">
<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 rel="nofollow" shape="rect" class="yiv3037120654moz-txt-link-rfc2396E" ymailto="mailto:meier-fleischer@dkrz.de" target="_blank" href="mailto:meier-fleischer@dkrz.de"><meier-fleischer@dkrz.de></a>
wrote: </div>
<div><br clear="none">
</div>
<div><br clear="none">
</div>
<div>
<div id="yiv3037120654">
<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="yiv3037120654moz-cite-prefix">Am 07.12.17
um 12:18 schrieb Ehsan Taghizadeh:<br clear="none">
</div>
<blockquote type="cite">
<div class="yiv3037120654yqt3443244067" id="yiv3037120654yqt54149">
<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 size="2" face="verdana, helvetica, sans-serif"><br clear="none">
</font></div>
<div><font size="2" face="verdana, helvetica, sans-serif"> diri = "path/" ; input
directory</font></div>
<div><font size="2" face="verdana, helvetica, sans-serif"> files = systemfunc("ls
"+diri+"3B-DAY-L.MS.MRG.3IMERG.201704*.nc")
; file paths</font></div>
<div><font size="2" face="verdana, helvetica, sans-serif"> 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 size="1" face="verdana, helvetica, sans-serif"><br clear="none">
</font><br clear="none">
</div>
<div>Sincerely</div>
<div>Ehsan</div>
</div>
</div>
<br clear="none">
<fieldset class="yiv3037120654mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
ncl-talk mailing list
<a rel="nofollow" shape="rect" class="yiv3037120654moz-txt-link-abbreviated" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a rel="nofollow" shape="rect" class="yiv3037120654moz-txt-link-freetext" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br clear="none">
</div>
</div>
<div class="yiv3037120654yqt3443244067" id="yiv3037120654yqt93428">_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none">
</div>
</div>
</div>
</div>
</div></div>
<br clear="none">
<fieldset class="yiv3037120654mimeAttachmentHeader"></fieldset>
<br clear="none">
<pre>_______________________________________________
ncl-talk mailing list
<a rel="nofollow" shape="rect" class="yiv3037120654moz-txt-link-abbreviated" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a rel="nofollow" shape="rect" class="yiv3037120654moz-txt-link-freetext" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br clear="none">
</div></div><div class="yqt9654632813" id="yqt69007">_______________________________________________<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">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">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br clear="none"></div></div>
</div>
</div></div></body></html>