<div dir="ltr">Hi all,<div><br></div><div>I am using NCL to access CFSR data through the Nomads OPeNDAP portal and have been getting some intriguing random, and not-so-random fatal calls.</div><div><br></div><div>First off, I am accessing and opening the 6hr CFSR files to concatenate and subset some variables within these files and then writing these into my own .nc files.</div><div><br></div><div>I've encountered two issues; the first is minor and I've created a work-around, but the second one has me stumped at this point.</div><div><br></div><div>Issue one is a failure to pass the url string through the interface, and is completely random on which file it fails to find. My work-around is a simple do loop which tries again if a file is not found to exist. In 100% of the cases I've checked in the NCL output, the second attempt to access the file works---hence the randomness. Here is the error and my print statements.</div><div><br></div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">syntax error, unexpected WORD_STRING, expecting WORD_WORD</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">context: Error { code = 404; message = "/tmp/%2Fmodeldata%2Fcmd_pgbh%2F1979%2F197907%2F19790726%2Fpgbh00.gdas.1979072600.grb2.gbx8 (No such file or directory)"^;};</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">ncopen: filename "<a href="http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cmd_pgbh/1979/197907/19790726/pgbh00.gdas.1979072600.grb2">http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cmd_pgbh/1979/197907/19790726/pgbh00.gdas.1979072600.grb2</a>": NetCDF: file not found</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">(0)<span class="" style="white-space:pre">        </span>OPeNDAP isfilepresent test unsuccessful:---Attempt 1 of 5</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">(0)<span class="" style="white-space:pre">        </span>FILE FOUND:-----Attempt 2 of 5</p><div><br></div><div>The second issues is causing me a little more frustration. In about the same position (early August) in the yearly loop (a total of 1460 6hr files), a CURL error occurs in which the host name cannot be resolved, which causes a fatal call. The pattern for this issue seems to be connected to the number of times the OPeNDAP interface is used, whereas if I restart the code in the middle of the year loop, the error is no longer encountered in early August. Here is the error for this issue.</div><div><br></div><div><br></div><div><p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">Cannot create cookie file</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">CURL Error: Couldn't resolve host name</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">curl error details: </p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">fatal:Could not open (<a href="http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cmd_pgbh/1981/198109/19810908/pgbh00.gdas.1981090818.grb2">http://nomads.ncdc.noaa.gov/thredds/dodsC/modeldata/cmd_pgbh/1981/198109/19810908/pgbh00.gdas.1981090818.grb2</a>)</p>
<p style="margin:0px;font-size:11px;font-family:Menlo;background-color:rgb(215,229,255)">fatal:file (f_in) isn't defined</p></div><div><br></div></div><div>In the short term, I've resorted to chopping the data-writing into monthly arrays so I can simply restart the code in the most recent month when the failure occurs. I am however curious if there is a more permanent solution I can implement that doesn't involve so much baby siting of NCL jobs.<br></div><div><br></div><div>Attached is my complete NCL script for reference.</div><div><br></div><div>Thanks for any help.</div><div>Jon</div></div>