<div dir="ltr"><div><div>Hi,<br><br></div>Are you getting the "Either file doesn't exist, or NCL does not have OPeNDAP capabilities on this system" message, or some other error -- I'm getting a SEGV out of the isfilepresent() function call. Ncl is optionally built with OpenDAP, and it may be that your version was built without it?<br><br></div>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 1, 2016 at 1:03 PM, Ugo Merlini <span dir="ltr"><<a href="mailto:umerlini@enet.it" target="_blank">umerlini@enet.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to to retrieve form ncep opendap server asubset of data<br>
limiting the usage of the internet band speed up all the script. In<br>
Grads and in NCO is possibile (but this last give me many reading error)<br>
is there a way to it in NCL?<br>
<br>
Regards<br>
Ugo<br>
<br>
here my script<br>
<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/calendar_decode2.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/ut_string.ncl"<br>
<br>
begin<br>
data_sistema =systemfunc("date -d '-1 day' +'%Y%m%d'")<br>
<br>
http1 = "<a href="http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs" rel="noreferrer" target="_blank">http://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs</a>"<br>
http2 = systemfunc("date -d '-1 day' +'%Y%m%d'")<br>
http3 = "gfs_0p25"<br>
<br>
<br>
filename = http1 + http2 + "/" + http3 + "_00z"<br>
data_run_temp = data_sistema + " 0000"<br>
data_run = systemfunc( "date -u -d '"+ data_run_temp +"' '+%s'" )<br>
run = "gfs_0p25_00"<br>
print(filename)<br>
<br>
<br>
<br>
exists = isfilepresent(filename)<br>
if(.not.exists) then<br>
print("OPeNDAP isfilepresent test unsuccessful.")<br>
print("Either file doesn't exist, or NCL does not have OPeNDAP<br>
capabilities on this system")<br>
else<br>
print("OPeNDAP isfilepresent test successful.")<br>
gfs = addfile(filename,"r")<br>
vars = getfilevarnames(gfs)<br>
end if<br>
<br>
end<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>