<html><head></head><body><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
            <div>Dear Dennis</div><div>    You are right; I should include output from 'ncdump -h'. Although I'd attached some files themselves, but including output from 'ncdump -h' was necessary.</div><div>    About the name of files, "<font color="#5b8828">L.MS</font>" is correct, as it could be seen in attachments of my first email.</div><div><br></div><div>Finally your comment about</div><div><pre style="white-space: pre-wrap;"><font size="2" style="background-color: rgb(221, 144, 47);">  prc <b style="">:=</b> prc(ncl_join|:, lat|:, lon|:)</font></pre>was really helpful and removed error. It helped me a lot. Thanks for your guidance.</div><div><br></div><div>Sincerely</div><div>Ehsan</div><div><br></div>
            
            <div id="yahoo_quoted_3022829927" class="yahoo_quoted">
                <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                    
                    <div>
                        On Friday, December 8, 2017, 5:19:51 AM GMT+3:30, Dennis Shea <shea@ucar.edu> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                    <div><div id="yiv8470986482"><div><div dir="ltr"><div><div><div><div><div>If you are having 'file problems', <b>always </b>include (attach) the output from 'ncdump -h' or, equivalently, 'ncl_filedump'<br clear="none">----<br clear="none"><br clear="none">I think you have a 'typo':<br clear="none">   <font size="2" face="verdana, helvetica, sans-serif">"3B-DAY-<b><a rel="nofollow" shape="rect" target="_blank" href="http://L.MS">L.MS</a></b>.MRG. 3IMERG.201704*.nc"  <br clear="none"><br clear="none"></font></div><font size="2" face="verdana, helvetica, sans-serif">'<b><a rel="nofollow" shape="rect" target="_blank" href="http://L.MS">L.MS</a></b>' should be '<b>LMS</b>"    <br clear="none"><br clear="none">This should be:<br clear="none"><br clear="none">   </font><font size="2" face="verdana, helvetica, sans-serif">"3B-DAY-<b>LMS</b>.MRG. 3IMERG.201704*.nc"<br clear="none"><br clear="none">====<br clear="none"></font></div><font size="2" face="verdana, helvetica, sans-serif">If there is no <b>time</b> dimension (ie: <b>record</b> dimension)<br clear="none"><br clear="none"></font></div><font size="2" face="verdana, helvetica, sans-serif">Then, I think you should read the documentation for <br clear="none"><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml</a><br clear="none"></font></div><div><font size="2" face="verdana, helvetica, sans-serif">(In particulare, the Examples)<br clear="none"></font></div><font size="2" face="verdana, helvetica, sans-serif">and <br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml">https://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml</a><br clear="none">====<br clear="none"></font></div><font size="2" face="verdana, helvetica, sans-serif">I suggest *not* reordering when importing the data. This is very inefficient.,<br clear="none"></font><br clear="none"><div><div><br clear="none"><font size="2" face="verdana, helvetica, sans-serif"><font size="2" face="verdana, helvetica, sans-serif">   diri  = "path/"   ; input directory</font></font><div><font size="2" face="verdana, helvetica, sans-serif">   files = <b>systemfunc</b>("cd "+diri+"; ls 3B-DAY-LMS.MRG. 3IMERG.201704*.nc") ; file paths<br clear="none"></font><br clear="none"></div><div><font size="2" face="verdana, helvetica, sans-serif">   f      = <b>addfiles</b>(diri+files,"r")</font><br clear="none"><font size="2" face="verdana, helvetica, sans-serif"><strong>   ListSetType</strong> (f, "join")  <br clear="none"></font></div><div><font size="2" face="verdana, helvetica, sans-serif">   prc = f[:]-></font><span style="font-size:small;font-family:verdana, helvetica, sans-serif;">precipitationCal<br clear="none"></span></div><div><span style="font-size:small;font-family:verdana, helvetica, sans-serif;">   <b>printVarSummary</b>(prc)<br clear="none"><br clear="none"></span></div><div><span style="font-size:small;font-family:verdana, helvetica, sans-serif;">Likely, you will have something like: </span><span style="font-size:small;font-family:verdana, helvetica, sans-serif;"><br clear="none">  </span><br clear="none"><pre>[<b>ncl_join</b> | ?] x [lon | 3480] x [lat | 61]<br clear="none"><br clear="none"></pre><pre>Now reorder, use the  <b>:=</b> 'overwrite' syntax<br clear="none"><br clear="none"></pre><pre>  prc <b>:=</b> prc(ncl_join|:, lat|:, lon|:)<br clear="none"></pre><pre>  printVarSummary(prc)<br clear="none"><br clear="none"></pre><pre>If there is no 'time' within the file, then you will have to parse the 'files' variable to extract the yyyymm... information<br clear="none"></pre><pre>str_get_cols or str_get_field<br clear="none"><br clear="none"></pre><pre>Good luck<br clear="none"></pre><pre><br clear="none"></pre><pre><br clear="none">   <br clear="none"></pre><span style="font-size:small;font-family:verdana, helvetica, sans-serif;"></span></div><div><span style="font-size:small;font-family:verdana, helvetica, sans-serif;"><br clear="none"><br clear="none"></span></div><div><span style="font-size:small;font-family:verdana, helvetica, sans-serif;"><br clear="none">   <br clear="none"></span></div></div></div></div><div class="yiv8470986482gmail_extra"><br clear="none"><div class="yiv8470986482gmail_quote">On Thu, Dec 7, 2017 at 5:56 PM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv8470986482gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv8470986482yqt7423197310" id="yiv8470986482yqt39627"><div><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 clear="none">  printVarSummary(prc2)</font><br clear="none"><br clear="none">Output is:<br clear="none"></div><div><br clear="none"></div><div><font size="2">Type: float<br clear="none">Total Size: 28304 bytes<br clear="none">            7076 values<br clear="none">Number of Dimensions: 2<br clear="none">Dimensions and sizes:   [lat | 61] x [lon | 116]<br clear="none">Coordinates:<br clear="none">            lat: [34.25..40.25]<br clear="none">            lon: [40.05..51.55]</font><br clear="none"><br clear="none"><br clear="none"></div>
            <div><br clear="none"></div><div>However if it helps I could attach these files.</div><div><br clear="none"></div><div>Sincerely</div><span class="yiv8470986482HOEnZb"><font color="#888888"></font></span><div>Ehsan<br clear="none"></div><div><div class="yiv8470986482h5">
            
            <div class="yiv8470986482m_2171383976535622848yahoo_quoted" id="yiv8470986482m_2171383976535622848yahoo_quoted_3205849993">
                <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 <<a rel="nofollow" shape="rect" 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="yiv8470986482m_2171383976535622848yiv3037120654"><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="yiv8470986482m_2171383976535622848yiv3037120654moz-cite-prefix">Am 07.12.17 um 14:53 schrieb Ehsan
      Taghizadeh:<br clear="none">
    </div>
    <blockquote type="cite">
      <div class="yiv8470986482m_2171383976535622848yiv3037120654yqt9654632813" id="yiv8470986482m_2171383976535622848yiv3037120654yqt29942"><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="yiv8470986482m_2171383976535622848yiv3037120654moz-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><font size="2">  f = addfile(filess,"r")</font></div>
            <div><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>
              <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="yiv8470986482m_2171383976535622848yiv3037120654yahoo_quoted" id="yiv8470986482m_2171383976535622848yiv3037120654yahoo_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="yiv8470986482m_2171383976535622848yiv3037120654moz-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="yiv8470986482m_2171383976535622848yiv3037120654">
                <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="yiv8470986482m_2171383976535622848yiv3037120654moz-cite-prefix">Am 07.12.17
                    um 12:18 schrieb Ehsan Taghizadeh:<br clear="none">
                  </div>
                  <blockquote type="cite">
                    <div class="yiv8470986482m_2171383976535622848yiv3037120654yqt3443244067" id="yiv8470986482m_2171383976535622848yiv3037120654yqt54149">
                      <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="yiv8470986482m_2171383976535622848yiv3037120654mimeAttachmentHeader"></fieldset>
                    <br clear="none">
                    <pre>______________________________ _________________
ncl-talk mailing list
<a rel="nofollow" shape="rect" class="yiv8470986482m_2171383976535622848yiv3037120654moz-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="yiv8470986482m_2171383976535622848yiv3037120654moz-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="yiv8470986482m_2171383976535622848yiv3037120654yqt3443244067" id="yiv8470986482m_2171383976535622848yiv3037120654yqt93428">______________________________ _________________<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="yiv8470986482m_2171383976535622848yiv3037120654mimeAttachmentHeader"></fieldset>
      <br clear="none">
      <pre>______________________________ _________________
ncl-talk mailing list
<a rel="nofollow" shape="rect" class="yiv8470986482m_2171383976535622848yiv3037120654moz-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="yiv8470986482m_2171383976535622848yiv3037120654moz-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="yiv8470986482m_2171383976535622848yqt9654632813" id="yiv8470986482m_2171383976535622848yqt69007">______________________________ _________________<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></div></div></div><br clear="none">______________________________ _________________<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">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div>
                </div>
            </div></div></body></html>