<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Rick,<div class=""><br class=""></div><div class="">Thanks for trying to help but it is frustrating! </div><div class=""><br class=""></div><div class="">The data is from CRU version 3.23 precipitation downloaded by subsetting for the region I am interested with from the Ceda Oge Web Services/Web Processing Service (<a href="http://wps-web1.ceda.ac.uk/" class="">http://wps-web1.ceda.ac.uk/</a><a href="http://wps-web1.ceda.ac.uk/jobviewer?status_url=http://wps-web1.ceda.ac.uk/status/00fec680f736dbd74b73af2425e3966e" class="">)</a>. As a second option I download the entire dataset (Global) from <a href="http://data.ceda.ac.uk/badc/cru/data/cru_ts/cru_ts_3.23/data/pre/" class="">http://data.ceda.ac.uk/badc/cru/data/cru_ts/cru_ts_3.23/data/pre/</a> and add to NCL and subset the section I am interested using coordinate subsetting command. My problem with this is the file is in zip format (cru_ts3.23.1901.2014.pre.dat.nc.gz) and I am wondering if it can be called to NCL as it is or need to be unzipped. If it should be unzipped, how to do it?</div><div class=""><br class=""></div><div class="">Do you have any advice how I should do this?</div><div class=""><br class=""></div><div class="">I would appreciate your help so much.</div><div class=""><br class=""></div><div class="">Dawit</div><div class=""> </div><div class=""><br class=""></div><div class="">On Apr 1, 2017, at 7:03 PM, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" class="">brownrig@ucar.edu</a>> wrote:<div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi Dawit,<br class=""><br class=""></div><div class="">First, I apologize -- I overlooked that you state in your original message that you are getting the error for *all* the files, not just the 199501 file?<br class=""><br class="">In any case, I was able to open that file just fine, which would echo what you were saying about opening a file with the singular "addfile()" command. I was also able to open just that one file with the multi "addfiles()" command as well. Whats a bit puzzling is that the error message does not contain the leading "./" on the filename as it should. If the files are in your current working directory, that should not matter. Nonetheless it might be useful to print several things before the addfiles() statement, just to make sure the values are what we think they should be:<br class=""><br class=""></div><div class="">print(diri)<br class=""></div><div class="">print(files)<br class=""></div><div class="">print(diri + files)<br class=""><br class=""></div><div class="">I'm not sure what else to tell you. BTW: I'm using NCL 6.4.0; what version are you using?<br class=""><br class=""></div><div class="">Wish I could be of more help...<br class=""></div><div class="">Rick<br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Apr 1, 2017 at 9:34 AM, Dawit Abebe <span dir="ltr" class=""><<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dear Rick,<div class=""><br class=""></div><div class="">I think uploaded the file</div><div class=""><br class=""></div><div class="">Thanks for your help</div><span class="HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Dawit</div></font></span><div class=""><div class="h5"><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Apr 1, 2017, at 6:09 PM, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank" class="">brownrig@ucar.edu</a>> wrote:</div><br class="m_-3709410322213034287Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Yes, put refers to the filename you want to send; the command:<br class=""><br class=""></div> put <a href="http://pre_199501_mondat.nc/" target="_blank" class="">pre_199501_mondat.nc</a><br class=""><br class=""></div>will upload the file to the ftp server.<br class=""><br class=""><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Apr 1, 2017 at 8:47 AM, Dawit Abebe <span dir="ltr" class=""><<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dear Rick,<div class=""><br class=""></div><div class="">Sorry I am bothering you, what is put…put…refers to, is it the files?</div><span class="m_-3709410322213034287HOEnZb"><font color="#888888" class=""><div class=""><br class=""></div><div class="">Dawit</div><div class=""><br class=""></div></font></span><div class=""><br class=""><div class=""><blockquote type="cite" class=""><span class=""><div class="">On Apr 1, 2017, at 5:13 PM, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank" class="">brownrig@ucar.edu</a>> wrote:</div><br class="m_-3709410322213034287m_-1755242649157655887Apple-interchange-newline"></span><div class=""><div class="m_-3709410322213034287h5"><div class=""><div dir="ltr" class=""><div class=""><div class="">Hi,<br class=""><br class=""></div>It sounds like that one file in particular, <span style="font-variant-ligatures:no-common-ligatures" class="">"<a href="http://pre_199501_mondat.nc/" target="_blank" class="">pre_199501_mondat.nc</a>", is corrupt. I note that it is not the same file as the single file instance that you cited, and I *think* NCL would have ingested all the files from 1901 up to the 199501 before throwing the error. Are you able to open the file with the ncl_filedump command, or any of the NCO/CDO operators? If you want to send it to our ftp site, I'll take a look at it (instructions below).<br class=""><br class=""></span></div><span style="font-variant-ligatures:no-common-ligatures" class="">Rick<br class=""></span><div class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><br class=""></span><br class=""><b class="">You can ftp larger datasets and files to:</b><div class="">
<br class="m_-3709410322213034287m_-1755242649157655887webkit-block-placeholder"></div><pre class="">ftp <a href="http://ftp.cgd.ucar.edu/" target="_blank" class="">ftp.cgd.ucar.edu</a>
anonymous
<use your email address for the password>
cd incoming
put ...
put ...
.
.
.
quit
</pre><p class="">
<font color="red" class="">Note that for security reasons, you cannot list the
contents of this directory, and neither can we. We need to know
the <i class="">exact</i> names of the files in order to retrieve them.</font>
</p></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Apr 1, 2017 at 7:40 AM, Dawit Abebe <span dir="ltr" class=""><<a href="mailto:dawit.kan@gmail.com" target="_blank" class="">dawit.kan@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dear NCL users,<div class=""><br class=""></div><div class="">I’m having a challenge to add multiple files to NCL. I’m intending to work on monthly files ranging from 1901 - 2014. I tried the command below but failed. </div><div class=""><br class=""></div><div class=""><font color="#0433ff" class="">Command used</font></div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""><span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span>diri = "./" </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 29> files = systemfunc("ls *.nc") </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 30> f = addfiles(diri+files, "r")</span></div></div><div class=""><br class=""></div><div class=""><font color="#0433ff" class="">Return message for all files</font></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">warning:_NclOpenFile: Can not open file <<a href="http://pre_199501_mondat.nc/" target="_blank" class="">pre_199501_mondat.nc</a>>; file format not supported or file is corrupted</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><font color="#0433ff" class="">The command and return for single file seems working as showed bellow</font>: </div><div class=""><br class=""></div><div class=""><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 10> diri = "./"</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 11> fili = "<a href="http://pre_201412_mondat.nc/" target="_blank" class="">pre_201412_mondat.nc</a>" </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 12> f = addfile(diri+fili, "r")</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 13> prc = f->pre </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">ncl 14> printVarSummary(prc)</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""></span><br class=""></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Variable: prc</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Type: double</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Total Size: 288 bytes</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> 36 values</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number of Dimensions: 3</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Dimensions and sizes:<span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 1] x [lat | 4] x [lon | 9]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Coordinates: </span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> time: [41987..41987]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lat: [3.75..5.25]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> lon: [36.75..40.75]</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class="">Number Of Attributes: 5</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> correlation_decay_distance :<span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span> 450</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> long_name :<span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span>precipitation</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> units :<span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span>mm/month</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> missing_value :<span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span>9.96920996839e+36</span></div><div style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo" class=""><span style="font-variant-ligatures:no-common-ligatures" class=""> _FillValue :<span class="m_-3709410322213034287m_-1755242649157655887m_-6484431340853010663Apple-tab-span" style="white-space:pre-wrap">        </span>9.96920996839e+36</span></div><div class=""><br class=""></div></div><div class=""><font color="#0433ff" class="">Where is my problem?</font></div><div class=""><font color="#0433ff" class=""><br class=""></font></div><div class=""><font color="#0433ff" class="">Thanks</font></div><span class="m_-3709410322213034287m_-1755242649157655887HOEnZb"><font color="#888888" class=""><div class=""><font color="#0433ff" class="">Dawit</font></div></font></span></div></div><br class="">______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/mailma<wbr class="">n/listinfo/ncl-talk</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>