<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">This is a path setup problem.  Look inside ESMF_regridding.ncl, lines 2739-2754.  There are two different ways to access the executable ESMF_RegridWeightGen.  Either that must be in a directory included in your normal PATH variable, or else the optional shell variable ESMFBINDIR can be used to specify the directory containing ESMF_RegridWeightGen.</div><div dir="ltr"><br>ESMFBINDIR takes priority.  If this variable is set incorrectly, then NCL will not look in your regular PATH, and you will get that error.</div></div><div dir="ltr"><br></div>For most installations, I recommend including the path to ESMF in your regular PATH variable, and make sure that ESMFBINDIR is <b>NOT SET</b>.  But use ESMFBINDIR if you need to keep ESMF out of your normal PATH for some reason.</div><div dir="ltr"><br></div><div>Since NCL uses subshells, it may be helpful to diagnose this problem using subshells while NCL is actually running.  Use these commands from the NCL command prompt, to examine your current NCL environment.  The "which" command uses your PATH and is not aware of ESMFBINDIR.<br><br>    system ("echo $PATH")<br>    system ("echo $ESMFBINDIR")<br></div>    system ("which ESMF_RegridWeightGen")<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021 at 10:12 AM Laura Fowler via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="font-size:small">Hi Jiali:</div><div style="font-size:small"><br></div><div>I ran your script regrid_36.ncl without any issue at all (see attached the output file regrid_36.out) and all the nc files were properly built. The only thing that I can think of is that the ESMF library is not available, or not properly built, or not properly accessed on the machine that you are using. To see that it is indeed the case, you should try running<font face="arial, sans-serif" style="background-color:rgb(255,255,255)" color="#000000"> <span style="font-variant-ligatures:no-common-ligatures">ESMF_RegridWeightGen from the command line of your terminal window:</span></font></div><div style="font-size:small"><font face="arial, sans-serif" style="background-color:rgb(255,255,255)" color="#000000"><span style="font-variant-ligatures:no-common-ligatures;font-size:14px"><br></span></font></div><div style="font-size:small">





<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Courier"><span style="font-variant-ligatures:no-common-ligatures;background-color:rgb(255,255,255)"><font color="#000000">ESMF_RegridWeightGen --ignore_degenerate<span>  </span>--source EDGAR_SCRIP.nc --destination WRF_SCRIP.nc --weight EDGAR_to_WRF_conserve.nc --method conserve --src_regional --dst_regional -i --norm_type fracarea</font></span></p></div><div style="font-size:small"><font face="arial, sans-serif" style="background-color:rgb(255,255,255)" color="#000000"><span style="font-variant-ligatures:no-common-ligatures;font-size:14px"><br></span></font></div><div><font face="arial, sans-serif" style="background-color:rgb(255,255,255)" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">That will give you more information as to why you cannot find ESMF_RegridWeightGen?</span></font></div><div><font face="arial, sans-serif" style="background-color:rgb(255,255,255)" color="#000000"><span style="font-variant-ligatures:no-common-ligatures"><br></span></font></div><div><font face="arial, sans-serif" style="background-color:rgb(255,255,255)" color="#000000"><span style="font-variant-ligatures:no-common-ligatures">Laura</span></font></div><div><br></div>





</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 18, 2021 at 9:53 AM Wang, Jiali <<a href="mailto:jialiwang@anl.gov" target="_blank">jialiwang@anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div>
<p class="MsoNormal">Thank you Laura.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have loaded <span style="font-size:12pt">ESMF_regridding.ncl in my ncl script, this means the ncl function ESMF_regrid_with_weights is there, and this function will call ESMF_RegridWeightGen.<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The problem is when it’s trying to call <span style="font-size:12pt">
ESMF_RegridWeightGen, it couldn’t find the executable, but I can see the executable is in the same path as ncl.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
<p class="MsoNormal">I am attaching my ncl script and the data I am using. Can you please take a look and advise?<span style="font-size:12pt"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks again!<u></u><u></u></p>
<p class="MsoNormal">Jiali <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">"<a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a>" <<a href="mailto:laura@ucar.edu" target="_blank">laura@ucar.edu</a>><br>
<b>Date: </b>Thursday, March 18, 2021 at 10:18 AM<br><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Hi Jiali:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">The function ESMF_RegridWeightGen executable is part of the ESMF library and is not a ncl function: that is the reason why you did not find it in the ncl source code itself. It is the ncl function ESMF_regrid_with_weights
 that calls the ESMF_RegridWeightGen (that ncl function is in the large ncl script ESMF_regridding.ncl.) So your ncl script should call ESMF_regrid_with_weights, not ESMF_RegridWeightGen.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Hope this helps,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">Laura<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt"><u></u> </span></p></div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Mar 18, 2021 at 6:17 AM Wang, Jiali via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I have been trying on different suercomputers, and all of them look fine (ncl and the excutable are at the same place), but it still says can’t find ESMF_RegridWeightGen executable.
 I am doing exactly the same thing as this. <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><a href="https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_36.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_36.ncl</a><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Can anyone advise please?<u></u><u></u></p>
<p class="MsoNormal">Thanks<u></u><u></u></p>
<p class="MsoNormal">Jiali
<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(181,196,223);padding:3pt 0in 0in">
<p class="MsoNormal"><b><span style="color:black">From:
</span></b><span style="color:black">Jiali Wang <<a href="mailto:jialiwang@anl.gov" target="_blank">jialiwang@anl.gov</a>><br>
<b>Date: </b>Wednesday, March 17, 2021 at 11:39 AM<br></span></p></div>
<p>Hi NCL users!</p>
<p>I am having a problem running a regrid script. <u></u><u></u></p>
<p>It says “could not find ESMF_RegridWeightGen executable” after generating the source_grid_file and destination_grid_file and before generating the weights.</p>
<p>Here is what I got (by following up this link <a href="https://mailman.ucar.edu/pipermail/ncl-talk/2018-April/011949.html" target="_blank">
https://mailman.ucar.edu/pipermail/ncl-talk/2018-April/011949.html</a>), it seems everything is at the same place but it just can’t find it.</p>
<p>(ncl_stable) [jialiwang@beboplogin4 regrid_test]$ which ncl<u></u><u></u></p>
<p>/soft/anaconda3/5.2.0/envs/ncl_stable/bin/ncl<u></u><u></u></p>
<p>(ncl_stable) [jialiwang@beboplogin4 regrid_test]$ ncl -V<u></u><u></u></p>
<p>6.6.2<u></u><u></u></p>
<p>(ncl_stable) [jialiwang@beboplogin4 regrid_test]$ env | grep NCARG<u></u><u></u></p>
<p><b>NCARG</b>_ROOT=/soft/anaconda3/5.2.0/envs/ncl_stable<u></u><u></u></p>
<p>(ncl_stable) [jialiwang@beboplogin4 regrid_test]$ which ESMF_RegridWeightGen<u></u><u></u></p>
<p>/soft/anaconda3/5.2.0/envs/ncl_stable/bin/ESMF_RegridWeightGen<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Any suggestions would be appreciated!<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Jiali</p></div></div></blockquote></div></div></div></blockquote></div></blockquote></div></div></div></div></div></div></div></div></div></div></div></div></div>