<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Peter,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing good details about the problem and the files. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I'm running your script right now with 6.4.0, but haven't seen the problem yet. The script is taking awhile to run, so I'll post back here when it's done. So far, it has printed this output:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default">(0)<span style="white-space:pre"> </span>get_src_grid_info: source lat dims = (6667,6667)</div><div class="gmail_default">(0)<span style="white-space:pre"> </span>get_src_grid_info: source lon dims = (6667,6667)</div><div class="gmail_default">(0)<span style="white-space:pre"> </span>get_src_grid_info: source grid type is 'curvilinear'</div><div class="gmail_default">(0)<span style="white-space:pre"> </span>curvilinear_to_SCRIP: calculating grid corners...</div><div class="gmail_default">(0)<span style="white-space:pre"> </span>curvilinear_to_SCRIP: one or more lat values are at the</div><div class="gmail_default">(0)<span style="white-space:pre"> </span> poles, so calculating grid corners using</div><div class="gmail_default">(0)<span style="white-space:pre"> </span> calc_SCRIP_corners_boundaries...</div><div class="gmail_default">(0)<span style="white-space:pre"> </span>calc_SCRIP_corners_boundaries</div><div class="gmail_default">(0)<span style="white-space:pre"> </span> min/max original lat: -90/-48.4644</div><div class="gmail_default">(0)<span style="white-space:pre"> </span> min/max original lon: -179.983/180</div><div class="gmail_default"><br></div><div class="gmail_default">When you run the script, do you see the error message before this output or after?</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></div><div class="gmail_default" style="font-size:small">We've seen this problem before with other users and are completely mystified about where it's happening. You are correct that it appears to be coming from ESMF_regridding.ncl, although we've looked at the code multiple times and don't see the source of the issue. This has actually happened with earlier versions of NCL (up to 2 years ago), but it doesn't happen consistently. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">What I did for another user that had this problem was to take the "curvilinear_to_SCRIP" procedure that's in ESMF_regridding.ncl, put it in it's own xxxx.ncl script, and then changed all the "Opt" references to something else, like "cts_opt", just to see if the problem persists.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Since I can't reproduce your problem yet, maybe you can try this yourself. Save the attached curv_to_scrip.ncl file, and then load it from the make_topogrid_debug.ncl script as follows:</div><div class="gmail_default" style=""><font face="monospace, monospace" style=""><br></font></div><div class="gmail_default" style="">
<font face="monospace, monospace" style=""><span></span>
</font><p class="gmail-p1" style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:normal;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><font face="monospace, monospace">load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"</font></span></p>
<font face="monospace, monospace" style="">load "./curv_to_scrip.ncl"</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">What will happen is that the "curvilinear_to_SCRIP" in the second NCL script will override the one in ESMF_regridding.ncl, because I made sure there was an "undef" command before it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[As I've been typing this email and trying things out, your script is still running without any errors.]</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Let ncl-talk know if you still see the problem with the new script.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 13, 2018 at 8:20 AM, Kuipers Munneke, P. (Peter) <span dir="ltr"><<a href="mailto:P.KuipersMunneke@uu.nl" target="_blank">P.KuipersMunneke@uu.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="m_-8061480147703025820BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="m_-8061480147703025820PlainText">Dear all,<br>
<br>
As a regular NCL user, I stumbled upon an issue with the ESMF regridding software, which I have just started to use. I suspect that the Attached you find the cleanest version of the code that reproduces the error, in make_topogrid_debug.ncl. The structure of
the code is an exact replica of <a href="https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_16.ncl" target="_blank">
https://www.ncl.ucar.edu/<wbr>Applications/Scripts/ESMF_<wbr>regrid_16.ncl</a>.<br>
<br>
The undefined variable “opt” is not the “opt” in the make_topogrid_debug.ncl file. If I rename it to something else, the error message continues to mention the “Opt” variable instead of the renamed one. This makes me suspect that the error is generated in ESMF_regridding.ncl
itself.<br>
<br>
I would be very grateful for your help.<br>
<br>
With best regards,<br>
Peter<br>
<br>
============</div>
</span></font></div>
<div class="m_-8061480147703025820BodyFragment"><font size="2"><span style="font-size:10pt">
<div class="m_-8061480147703025820PlainText"><br>
<br>
- NCL version 6.4.0<br>
<br>
- Data files are available at <a href="http://www.staff.science.uu.nl/~kuipe117/ncl_debug" target="_blank">
http://www.staff.science.uu.<wbr>nl/~kuipe117/ncl_debug</a><br>
<br>
- The exact error message is<br>
<br>
fatal:Variable (Opt) is undefined<br>
fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 1613 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/esmf/ESMF_<wbr>regridding.ncl<br>
<br>
fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 3912 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/esmf/ESMF_<wbr>regridding.ncl<br>
<br>
fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 4042 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/esmf/ESMF_<wbr>regridding.ncl<br>
<br>
fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 51 in file make_topogrid_debug.ncl<br>
<br>
- The system is Mac OS High Sierra 10.13.3<br>
<br>
uname -a gives:<br>
<br>
Darwin <a href="http://mbpkuipsmunneke.soliscom.uu.nl" target="_blank">mbpkuipsmunneke.soliscom.uu.nl</a> 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_<wbr>X86_64 x86_64<br>
<br>
gcc —version gives:<br>
<br>
Configured with: --prefix=/Library/Developer/<wbr>CommandLineTools/usr --with-gxx-include-dir=/usr/<wbr>include/c++/4.2.1<br>
Apple LLVM version 9.0.0 (clang-900.0.39.2)<br>
Target: x86_64-apple-darwin17.4.0<br>
Thread model: posix<br>
InstalledDir: /Library/Developer/<wbr>CommandLineTools/usr/bin</div>
</span></font></div>
</div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>