[ncl-talk] ESMF regridding error? "Variable (opt) is undefined in line 1613 of ESMF-regridding.ncl

Mary Haley haley at ucar.edu
Tue Feb 13 16:22:34 MST 2018


Hi Peter,

Thanks for providing good details about the problem and the files.

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:

(0) get_src_grid_info: source lat dims = (6667,6667)
(0) get_src_grid_info: source lon dims = (6667,6667)
(0) get_src_grid_info: source grid type is 'curvilinear'
(0) curvilinear_to_SCRIP: calculating grid corners...
(0) curvilinear_to_SCRIP: one or more lat values are at the
(0)        poles, so calculating grid corners using
(0)        calc_SCRIP_corners_boundaries...
(0) calc_SCRIP_corners_boundaries
(0)      min/max original lat: -90/-48.4644
(0)      min/max original lon: -179.983/180

When you run the script, do you see the error message before this output or
after?


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.

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.

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:

load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"
load "./curv_to_scrip.ncl"

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.

[As I've been typing this email and trying things out, your script is still
running without any errors.]

Let ncl-talk know if you still see the problem with the new script.

Thanks,

--Mary



On Tue, Feb 13, 2018 at 8:20 AM, Kuipers Munneke, P. (Peter) <
P.KuipersMunneke at uu.nl> wrote:

> Dear all,
>
> 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
> https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_16.ncl.
>
> 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.
>
> I would be very grateful for your help.
>
> With best regards,
> Peter
>
> ============
>
>
> - NCL version 6.4.0
>
> - Data files are available at http://www.staff.science.uu.
> nl/~kuipe117/ncl_debug
>
> - The exact error message is
>
> fatal:Variable (Opt) is undefined
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 1613 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 3912 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 4042 in
> file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl
>
> fatal:["Execute.c":8640]:Execute: Error occurred at or near line 51 in
> file make_topogrid_debug.ncl
>
> - The system is Mac OS High Sierra 10.13.3
>
> uname -a gives:
>
> Darwin mbpkuipsmunneke.soliscom.uu.nl 17.4.0 Darwin Kernel Version
> 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64
> x86_64
>
> gcc —version gives:
>
> Configured with: --prefix=/Library/Developer/CommandLineTools/usr
> --with-gxx-include-dir=/usr/include/c++/4.2.1
> Apple LLVM version 9.0.0 (clang-900.0.39.2)
> Target: x86_64-apple-darwin17.4.0
> Thread model: posix
> InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180213/0ba099f9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: curv_to_scrip.ncl
Type: application/octet-stream
Size: 9288 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180213/0ba099f9/attachment.obj>


More information about the ncl-talk mailing list