<div dir="ltr"><div class="gmail_default" style="font-size:small">I'm not sure what's going on. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">In the 6.3.0 version of "ESMG_regridding.ncl", the "Opt" variable is clearly defined on line 1563. The line number that the error message is pointing to is somewhere in the middle of the function where "Opt" has already been referenced multiple times, so why didn't those lines produce errors as well?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you have multiple versions of NCL on your system, you need to make sure that when you switch between the two versions, you are correctly resetting your NCARG_ROOT and PATH environment variables.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You can double-check this by typing:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">which ncl</div><div class="gmail_default" style="font-size:small">ncl -V</div><div class="gmail_default" style="font-size:small">env | grep NCARG</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 Thu, Jun 2, 2016 at 4:18 PM, Lynch, Cary D <span dir="ltr"><<a href="mailto:cary.lynch@pnnl.gov" target="_blank">cary.lynch@pnnl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>Hello,</div>
<div>I am having issues with regridding a cmip5 ocean variable. Using the function “ESMF_regrid” (with NCL version 6.3.0) my script is as follows:</div>
<div>
<div><br>
</div>
<div>;**************************************</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"</div>
<div>;**************************************</div>
<div>begin</div>
<div>;****************************************</div>
<div><br>
</div>
<div> diri = "/Volumes/theato/"</div>
<div><br>
</div>
<div> dp1 = addfile(diri+"theato_Omon_CESM1-BGC_rcp85_r1i1p1_200601-210012.nc","r")</div>
<div> tsi = dp1->theta</div>
<div> tsia = month_to_annual(tsi,1)</div>
<div><br>
</div>
<div> tsiax = tsia(0,:,:)</div>
<div> tsiax@lat2d = dp1->lat</div>
<div> tsiax@lon2d = dp1->lon</div>
<div><br>
</div>
<div> Opt = True</div>
<div> Opt@ForceOverwrite = True</div>
<div> Opt@SrcMask2D = where(.not.ismissing(tsiax),1,0)</div>
<div> Opt@DstGridType = "1deg"</div>
<div> Opt@SrcGridCornerLat = dp1->lat_vertices</div>
<div> Opt@SrcGridCornerLon = dp1->lon_vertices</div>
<div> Opt@DstLLCorner = (/-89.75d, 0.00d /)</div>
<div> Opt@DstURCorner = (/ 89.75d, 359.75d /)</div>
<div><br>
</div>
<div> rgtsi = ESMF_regrid(tsiax,Opt)</div>
<div><br>
</div>
<div> printVarSummary(rgtsi)</div>
</div>
<div><br>
</div>
<div>;**********************</div>
<div>End</div>
<div><br>
</div>
<div>The error message(s) I receive after running above script is as follows:</div>
<div><br>
</div>
<div>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>fatal:Variable (Opt) is undefined</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 1588 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
<span></span><br>
</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 3853 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;min-height:13px">
<span></span><br>
</p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo">
<span>fatal:["Execute.c":8575]:Execute: Error occurred at or near line 3983 in file $NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl</span></p>
</div>
<div><span><br>
</span></div>
<div><span><br>
</span></div>
<div><span>Is this a version issue because on a previous version (NCL 6.1.0) I did not run into this problem?</span></div>
<div><span>Any help will be appreciated.</span></div>
<div><span>Thank you.</span></div>
</div>
<div><span><br>
</span></div>
</div>
<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>
<br></blockquote></div><br></div>