[ncl-talk] could not find ESMF_RegridWeightGen executable

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Thu Mar 18 11:09:16 MDT 2021


Actually Laura might have the right answer.  If ESMF_RegridWeightGen is
present but not correctly built for your current environment, this is not
diagnosed correctly in ESMF_regridding.ncl (line 2750).  An execution error
is hidden and reported simply as "could not find".  This is misleading.

So I agree with Laura, try running ESMF_RegridWeightGen standalone on the
shell command line, and see if you get a different execute error with
better information.


On Thu, Mar 18, 2021 at 10:55 AM Dave Allured - NOAA Affiliate <
dave.allured at noaa.gov> wrote:

> 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.
>
> ESMFBINDIR takes priority.  If this variable is set incorrectly, then NCL
> will not look in your regular PATH, and you will get that error.
>
> For most installations, I recommend including the path to ESMF in your
> regular PATH variable, and make sure that ESMFBINDIR is *NOT SET*.  But
> use ESMFBINDIR if you need to keep ESMF out of your normal PATH for some
> reason.
>
> 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.
>
>     system ("echo $PATH")
>     system ("echo $ESMFBINDIR")
>     system ("which ESMF_RegridWeightGen")
>
>
> On Thu, Mar 18, 2021 at 10:12 AM Laura Fowler via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Hi Jiali:
>>
>> 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 ESMF_RegridWeightGen from the command line of your terminal
>> window:
>>
>> ESMF_RegridWeightGen --ignore_degenerate  --source EDGAR_SCRIP.nc
>> --destination WRF_SCRIP.nc --weight EDGAR_to_WRF_conserve.nc --method
>> conserve --src_regional --dst_regional -i --norm_type fracarea
>>
>> That will give you more information as to why you cannot find
>> ESMF_RegridWeightGen?
>>
>> Laura
>>
>>
>> On Thu, Mar 18, 2021 at 9:53 AM Wang, Jiali <jialiwang at anl.gov> wrote:
>>
>>> Thank you Laura.
>>>
>>>
>>>
>>> I have loaded 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.
>>>
>>>
>>>
>>> The problem is when it’s trying to call ESMF_RegridWeightGen, it
>>> couldn’t find the executable, but I can see the executable is in the same
>>> path as ncl.
>>>
>>>
>>>
>>> I am attaching my ncl script and the data I am using. Can you please
>>> take a look and advise?
>>>
>>>
>>>
>>> Thanks again!
>>>
>>> Jiali
>>>
>>>
>>>
>>> *From: *"laura at ucar.edu" <laura at ucar.edu>
>>> *Date: *Thursday, March 18, 2021 at 10:18 AM
>>>
>>>
>>>
>>> Hi Jiali:
>>>
>>>
>>>
>>> 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.
>>>
>>>
>>>
>>> Hope this helps,
>>>
>>> Laura
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Mar 18, 2021 at 6:17 AM Wang, Jiali via ncl-talk <
>>> ncl-talk at mailman.ucar.edu> wrote:
>>>
>>> Hi,
>>>
>>>
>>>
>>> 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.
>>>
>>>
>>>
>>> https://www.ncl.ucar.edu/Applications/Scripts/ESMF_regrid_36.ncl
>>>
>>>
>>>
>>> Can anyone advise please?
>>>
>>> Thanks
>>>
>>> Jiali
>>>
>>>
>>>
>>> *From: *Jiali Wang <jialiwang at anl.gov>
>>> *Date: *Wednesday, March 17, 2021 at 11:39 AM
>>>
>>> Hi NCL users!
>>>
>>> I am having a problem running a regrid script.
>>>
>>> It says “could not find ESMF_RegridWeightGen executable” after
>>> generating the source_grid_file and destination_grid_file and before
>>> generating the weights.
>>>
>>> Here is what I got (by following up this link
>>> https://mailman.ucar.edu/pipermail/ncl-talk/2018-April/011949.html), it
>>> seems everything is at the same place but it just can’t find it.
>>>
>>> (ncl_stable) [jialiwang at beboplogin4 regrid_test]$ which ncl
>>>
>>> /soft/anaconda3/5.2.0/envs/ncl_stable/bin/ncl
>>>
>>> (ncl_stable) [jialiwang at beboplogin4 regrid_test]$ ncl -V
>>>
>>> 6.6.2
>>>
>>> (ncl_stable) [jialiwang at beboplogin4 regrid_test]$ env | grep NCARG
>>>
>>> *NCARG*_ROOT=/soft/anaconda3/5.2.0/envs/ncl_stable
>>>
>>> (ncl_stable) [jialiwang at beboplogin4 regrid_test]$ which
>>> ESMF_RegridWeightGen
>>>
>>> /soft/anaconda3/5.2.0/envs/ncl_stable/bin/ESMF_RegridWeightGen
>>>
>>>
>>>
>>> Any suggestions would be appreciated!
>>>
>>>
>>>
>>> Jiali
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210318/b776bc6e/attachment.html>


More information about the ncl-talk mailing list