<html><head></head><body><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dears,</div><div>I've just tried to run the attached script (which is written by Dennis). After about 1 hour I've got following error:</div><div><br></div><div><br></div><div><div>(0) =====> CPU Elapsed Time: curvilinear_to_SCRIP: 1.12063 seconds <=====</div><div>(0) =====> CPU Elapsed Time: latlon_to_SCRIP: 13.2744 seconds <=====</div><div><span style="background-color: rgb(253, 248, 105);">(0) ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.</span></div><div><br></div>Also I've attached <span style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">PET0.RegridWeightGen.Log</span>, which is produced after run this script.</div><div>I'll be thankful for any recommendation.</div><div><br></div><div><i>Sincerely<br>Ehsan</i></div>
<div id="yahoo_quoted_9084814105" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Wednesday, February 14, 2018, 11:21:21 PM GMT+3:30, Mary Haley <haley@ucar.edu> wrote:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv0061820304"><div><div dir="ltr"><div class="yiv0061820304gmail_default" style="font-size:small;">Dear Ehsan,</div><div class="yiv0061820304gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv0061820304gmail_default" style="font-size:small;">I was able to run Dennis' attached script under NCL 6.4.0 on one system, but not on another. It is ESMF_RegridWeightGen that's the issue, and not NCL.</div><div class="yiv0061820304gmail_default" style="font-size:small;"><br clear="none"></div>Before I provide you with a new binary, can you please try Dennis' script with your current version of NCL. If it doesn't work, send email back to ncl-talk and include any error messages and the <br clear="none">PET0.RegridWeightGen.Log file.<div><br clear="none"></div><div><div class="yiv0061820304gmail_default" style="font-size:small;">Before you run the script, you will need to add this line to the top of it, or it won't run:</div><div class="yiv0061820304gmail_default" style="font-size:small;"><br clear="none"></div>load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"</div><div><br clear="none"><div class="yiv0061820304gmail_default" style="font-size:small;">Also, I think there are some hard-coded paths to Dennis' directories that you will need to fix in order to have it point to your own files.</div><div class="yiv0061820304gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv0061820304gmail_default" style="font-size:small;">--Mary</div><br clear="none"></div></div><div class="yiv0061820304gmail_extra"><br clear="none"><div class="yiv0061820304gmail_quote">On Wed, Feb 7, 2018 at 4:14 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"><blockquote class="yiv0061820304gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0061820304yqt9695209061" id="yiv0061820304yqt61839"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div><br clear="none"></div><div>I appreciate your helpful replies.<br clear="none"></div><div>Outputs are:</div><div><br clear="none"></div><div><div>%> uname -a</div><div><span style="background-color:rgb(253,248,105);">Linux localhost.localdomain 3.10.0-693.11.6.el7.x86_64 #1 SMP Thu Jan 4 01:06:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux</span></div><br clear="none"></div><div><br clear="none"></div><div><div><span style="color:rgb(0,0,0);">%> </span>gcc --version</div><div><span style="background-color:rgb(253,248,105);">gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)</span></div><div><span style="background-color:rgb(253,248,105);">Copyright (C) 2015 Free Software Foundation, Inc.</span></div><div><span style="background-color:rgb(253,248,105);">This is free software; see the source for copying conditions. There is NO</span></div><div><span style="background-color:rgb(253,248,105);">warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</span></div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div>
<div class="yiv0061820304m_443400711839365928yahoo_quoted" id="yiv0061820304m_443400711839365928yahoo_quoted_8961818151">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><span class="yiv0061820304">
</span><div>
On Wednesday, February 7, 2018, 7:42:22 AM GMT+3:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv0061820304m_443400711839365928yiv4954023465"><div><span class="yiv0061820304"></span><div dir="ltr"><div><div><div><div><div>Inadvertently, I used the 6.5 0 version of NCL to perform the ESMF interpolation. <br clear="none">As you indicated offline, the 6.4.0 ESMF interpolation was not successful. <br clear="none">-----<br clear="none"><span style="background-color:rgb(253,248,105);">(0) ESMF_regrid_gen_weights: 'ESMF_RegridWeightGen' was not successful.<br clear="none">-----<br clear="none"><br clear="none"></span></div><div><span style="background-color:rgb(253,248,105);">Likely there were some changes to the underlying ESMF software.<br clear="none"></span></div><div><br clear="none"></div>-----<br clear="none"></div>Perhaps, the NCL developers can make a beta version of NCL 6.5.0 available.<br clear="none"><br clear="none"></div>Please send <a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a> the output from:<br clear="none"><br clear="none"></div>%> uname -a<br clear="none"></div>%> gcc --version<br clear="none"><br clear="none">----<br clear="none"><br clear="none"><div><div><br clear="none"></div></div></div><div class="yiv0061820304m_443400711839365928yiv4954023465yqt9371557877" id="yiv0061820304m_443400711839365928yiv4954023465yqt63445"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_extra"><br clear="none"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_quote"><span class="yiv0061820304">On Mon, Feb 5, 2018 at 8:49 PM, Dennis Shea <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>></span> wrote:<br clear="none"></span><blockquote class="yiv0061820304m_443400711839365928yiv4954023465gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div><div><div><div><span class="yiv0061820304">The script you sent had numerous issues. It looks like you copy-and-pasted parts of scripts. Please be more careful.<br clear="none"><br clear="none">Please <br clear="none"><br clear="none">[1] Carefully read the documentation of any function. <br clear="none">[2] Always use printVarSummary(...) and look at the varuable overview. It is your responsibility to examine the output. <br clear="none">[3] Carefully examine any error messages. Think about what is be communicated. For example, your previous email had:<span class="yiv0061820304m_443400711839365928yiv4954023465"><br clear="none"><br clear="none"></span></span><div><span style="background-color:rgb(253,248,105);">fatal:(lat2d) is not a named dimension in variable (var).</span></div><div><span style="background-color:rgb(253,248,105);">fatal:["Execute.c":8640]:Execu te: Error occurred at or near line .......<br clear="none"></span></div><div><div class="yiv0061820304h5"><div><span style="background-color:rgb(253,248,105);">Well, did you see any dimension named 'lat2d'? There was a variable named that but not a named dimension.<br clear="none"></span></div><br clear="none"><br clear="none"></div></div></div><div><div class="yiv0061820304h5">For your benefit, I suggest that you spend some time examining the NCL User Guide (NUG). <br clear="none">The NUG was created by Karin Meier-Fleischer and Michael
Böttinger of <a rel="nofollow" shape="rect" target="_blank" href="https://www.dkrz.de/">DKRZ</a> (Deutsches
Klimarechenzentrum). <br clear="none"><br clear="none"><b><a rel="nofollow" shape="rect" target="_blank" href="https://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/">https://www.ncl.ucar.edu/ Document/Manuals/NCL_User_ Guide/</a><br clear="none"><br clear="none"></b>===<br clear="none"></div></div></div><div><div class="yiv0061820304h5">Attached is a modification of the script you sent. It has many print statements. See [2] above.<br clear="none"></div></div></div><div><div class="yiv0061820304h5"><div>It contains the interpolated values where possible. As noted in the 'linint2_points documentation:<br clear="none"><br clear="none">"if missing values are present, then <strong>linint2_points</strong>
will perform the piecewise linear interpolation at all points
possible, but will return missing values at coordinates which could
not be used. If one or more of the four closest grid points
to a particular (<em>xo</em>,<em>yo</em>) coordinate pair are missing,
then the return value for this coordinate pair will be missing."<br clear="none"><br clear="none"></div><div>It looks like there are ?bogus? or island values of soil moisture in ocean areas.<br clear="none"></div><div>Interpolation is not performed across adjacent swaths. <br clear="none"></div><div><br clear="none"></div><div>A sample of the interpolated points:<br clear="none"></div><div><br clear="none">(0) >>> yyyymmdd: 20170401 after ESMF Regrid <<<<br clear="none">(0) ****************************** ******************<br clear="none">(0) 35.70 50.06 -9999.00<br clear="none">(1) 36.67 46.73 0.11<br clear="none">(2) 34.75 46.15 0.22<br clear="none"></div><div>(3) 34.77 50.86 -9999.00 < not surrounded by 4 non-missing avlues.<br clear="none"></div><div>(4) 35.67 51.02 -9999.00<br clear="none">(5) 35.20 48.69 -9999.00<br clear="none">(6) 37.32 49.62 -9999.00<br clear="none">(7) 35.25 47.01 0.22<br clear="none">(8) 36.02 50.54 -9999.00<br clear="none">(9) 36.54 50.21 -9999.00<br clear="none">(10) 38.42 44.97 0.19<br clear="none">(11) 36.65 49.19 -9999.00<br clear="none">(12) 34.87 48.53 -9999.00<br clear="none">(13) 36.66 48.52 -9999.00<br clear="none">(14) 37.48 49.46 -9999.00<br clear="none">(15) 37.97 46.03 0.16<br clear="none">(16) 37.50 45.85 0.18<br clear="none">(17) 38.22 48.33 0.16<br clear="none">(18) 38.93 45.60 0.15<br clear="none">(19) 37.66 45.06 0.19<br clear="none">(20) 34.35 47.15 0.29<br clear="none"></div><div>[SNIP]<br clear="none"><br clear="none"><br clear="none"></div><br clear="none"></div></div></div><br clear="none"><br clear="none"><div><div><div><b></b></div></div></div></div><div class="yiv0061820304m_443400711839365928yiv4954023465HOEnZb"><div class="yiv0061820304m_443400711839365928yiv4954023465h5"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_extra"><br clear="none"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_quote"><div><div class="yiv0061820304h5">On Mon, Feb 5, 2018 at 8:57 AM, Mary Haley <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:haley@ucar.edu" target="_blank" href="mailto:haley@ucar.edu">haley@ucar.edu</a>></span> wrote:<br clear="none"></div></div><blockquote class="yiv0061820304m_443400711839365928yiv4954023465gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="yiv0061820304h5"><div dir="ltr"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;">You are treating "lat2d" and "lon2d" like coordinate arrays with the following call:</div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"><br clear="none"></div> curvilinear_to_SCRIP(srcGridNa me,var&lat2d,var&lon2d,Opt)<div><br clear="none"></div><div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;">These two variables are NOT attached to var, and they couldn't be anyway, because they violate the rule that coordinate arrays be one-dimensional.</div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;">lat2d and lon2d are standalone variables that you read off a file earlier in your script, so you simply want:</div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"> curvilinear_to_SCRIP(srcGridNa me,lat2d,lon2d,Opt)</div><span class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972HOEnZb"><font color="#888888"></font></span><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;">--Mary</div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"><br clear="none"></div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default" style="font-size:small;"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default"><br clear="none"></div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_default"><br clear="none"></div></div><div><br clear="none"></div><br clear="none"></div></div></div></div><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_extra"><br clear="none"><div class="yiv0061820304m_443400711839365928yiv4954023465gmail_quote"><div><div class="yiv0061820304h5"><div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972h5">On Mon, Feb 5, 2018 at 5:05 AM, Ehsan Taghizadeh <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>></span> wrote:<br clear="none"></div></div></div></div><blockquote class="yiv0061820304m_443400711839365928yiv4954023465gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972h5"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div><div class="yiv0061820304h5"><div></div>
<div>Dear NCL users,</div><div>I've modified the script and I have some problems with it, yet.</div><div>New outputs and errors are:</div><div><br clear="none"></div></div></div><div><div><div class="yiv0061820304h5"><span></span><div><span style="background-color:rgb(173,215,115);">Variable: lat2d</span></div><div><span style="background-color:rgb(173,215,115);">Type: float</span></div><div><span style="background-color:rgb(173,215,115);">Total Size: 1565536 bytes</span></div><div><span style="background-color:rgb(173,215,115);"> 391384 values</span></div><div><span style="background-color:rgb(173,215,115);">Number of Dimensions: 2</span></div><div><span style="background-color:rgb(173,215,115);">Dimensions and sizes: [DIM_000 | 406] x [DIM_001 | 964]</span></div><div><span style="background-color:rgb(173,215,115);">Coordinates:</span></div><div><span style="background-color:rgb(173,215,115);">Number Of Attributes: 2</span></div><div><span style="background-color:rgb(173,215,115);"> long_name : Latitude of the center of the Earth based grid cell.</span></div><div><span style="background-color:rgb(173,215,115);"> units : degrees_north</span></div><div><span style="background-color:rgb(173,215,115);"><br clear="none"></span></div><span></span><div><span style="background-color:rgb(173,215,115);">Variable: lon2d</span></div><div><span style="background-color:rgb(173,215,115);">Type: float</span></div><div><span style="background-color:rgb(173,215,115);">Total Size: 1565536 bytes</span></div><div><span style="background-color:rgb(173,215,115);"> 391384 values</span></div><div><span style="background-color:rgb(173,215,115);">Number of Dimensions: 2</span></div><div><span style="background-color:rgb(173,215,115);">Dimensions and sizes: [DIM_000 | 406] x [DIM_001 | 964]</span></div><div><span style="background-color:rgb(173,215,115);">Coordinates:</span></div><div><span style="background-color:rgb(173,215,115);">Number Of Attributes: 2</span></div><div><span style="background-color:rgb(173,215,115);"> long_name : Longitude of the center of the Earth based grid cell.</span></div><div><span style="background-color:rgb(173,215,115);"> units : degrees_east</span></div><div><span style="background-color:rgb(173,215,115);"><br clear="none"></span></div><span></span><div><span style="background-color:rgb(173,215,115);">Variable: var</span></div><div><span style="background-color:rgb(173,215,115);">Type: float</span></div><div><span style="background-color:rgb(173,215,115);">Total Size: 1565536 bytes</span></div><div><span style="background-color:rgb(173,215,115);"> 391384 values</span></div><div><span style="background-color:rgb(173,215,115);">Number of Dimensions: 2</span></div><div><span style="background-color:rgb(173,215,115);">Dimensions and sizes: [DIM_000 | 406] x [DIM_001 | 964]</span></div><div><span style="background-color:rgb(173,215,115);">Coordinates:</span></div><div><span style="background-color:rgb(173,215,115);">Number Of Attributes: 6</span></div><div><span style="background-color:rgb(173,215,115);"> _FillValue : -9999</span></div></div></div><span class="yiv0061820304"></span><div><span style="background-color:rgb(173,215,115);"> coordinates : /Soil_Moisture_Retrieval_Data_ AM/latitude /Soil_Moisture_Retrieval_Data_ AM/longitude</span></div><div><span style="background-color:rgb(173,215,115);"> long_name : Representative soil moisture measurement for the Earth based grid cell.</span></div><div><span style="background-color:rgb(173,215,115);"> units : cm**3/cm**3</span></div><div><span style="background-color:rgb(173,215,115);"> valid_max : 0.5</span></div><div><span style="background-color:rgb(173,215,115);"> valid_min : 0.02</span></div><span class="yiv0061820304"></span><div><span style="background-color:rgb(253,248,105);">fatal:(lat2d) is not a named dimension in variable (var).</span></div><div><span style="background-color:rgb(253,248,105);">fatal:["Execute.c":8640]:Execu te: Error occurred at or near line 101 in file 2_SPL3SMP_E_Interpolating1.ncl</span></div><div><div class="yiv0061820304h5"><div><br clear="none"></div>I'll be thankful if I could have your help.</div></div></div><div><div class="yiv0061820304h5"><div><br clear="none"></div><div><i>Sincerely</i></div><span class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970HOEnZb"><font color="#888888"></font></span><div><i>Ehsan Taghizadeh</i></div><div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970h5">
<div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yahoo_quoted" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yahoo_quoted_8403328213">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
On Sunday, February 4, 2018, 3:32:14 PM GMT+3:30, Ehsan Taghizadeh <<a rel="nofollow" shape="rect" ymailto="mailto:ehsantaghizadeh@yahoo.com" target="_blank" href="mailto:ehsantaghizadeh@yahoo.com">ehsantaghizadeh@yahoo.com</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div>Dear Dennis</div><div>Thank you so much for you help.</div><div>I've changed my script to attached one by adding lines 79-91, however it seems to have some basic problems! Could I ask help me about them, please? I faced following errors:</div><div><br clear="none"></div><div><div><span style="background-color:rgb(253,248,105);">fatal:syntax error: line 87 in file 2_SPL3SMP_E_Interpolating1.ncl before or near \n</span></div><div><span style="background-color:rgb(253,248,105);"> curvilinear_to_SCRIP(src_file, var&LAT,var&LON,Opt)</span></div><div><span style="background-color:rgb(253,248,105);">------------------------------ -------------------------^</span></div><div><span style="background-color:rgb(253,248,105);"><br clear="none"></span></div><div><span style="background-color:rgb(253,248,105);">fatal:syntax error: possibly an undefined procedure</span></div><div><span style="background-color:rgb(253,248,105);">fatal:syntax error: line 88 in file 2_SPL3SMP_E_Interpolating1.ncl before or near \n</span></div><div><span style="background-color:rgb(253,248,105);"> latlon_to_SCRIP(dstGridName,"5 x5",Opt)</span></div><div><span style="background-color:rgb(253,248,105);">------------------------------ ----------^</span></div><div><span style="background-color:rgb(253,248,105);"><br clear="none"></span></div><div><span style="background-color:rgb(253,248,105);">fatal:syntax error: possibly an undefined procedure</span></div><div><span style="background-color:rgb(253,248,105);">fatal:syntax error: line 89 in file 2_SPL3SMP_E_Interpolating1.ncl before or near \n</span></div><div><span style="background-color:rgb(253,248,105);"> ESMF_regrid_gen_weights(src_fi le,dstGridName,wgtFileName,Opt )</span></div><div><span style="background-color:rgb(253,248,105);">------------------------------ ------------------------------ ---^</span></div><div><span style="background-color:rgb(253,248,105);"><br clear="none"></span></div><div><span style="background-color:rgb(253,248,105);">fatal:syntax error: possibly an undefined procedure</span></div><div><span style="background-color:rgb(253,248,105);">fatal:Syntax Error in block, block not executed</span></div><div><span style="background-color:rgb(253,248,105);">fatal:error at line 126 in file 2_SPL3SMP_E_Interpolating1.ncl</span></div><div><br clear="none"></div></div><div><br clear="none"></div><div>Sincerely</div><div>Ehsan</div><div><br clear="none"></div>
<div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yahoo_quoted" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yahoo_quoted_8638518042">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yqt1462782316" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yqtfd57874"><div>
On Tuesday, January 30, 2018, 7:34:40 AM GMT+3:30, Dennis Shea <<a rel="nofollow" shape="rect" ymailto="mailto:shea@ucar.edu" target="_blank" href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:
</div>
<div><br clear="none"></div>
<div><br clear="none"></div>
<div><div id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559"><div><div dir="ltr"><div><div>[1] As noted in the documentation, <span style="font-weight:normal;"><font size="2">linint2_points</font></span> Interpolates from a *rectilinear grid* to a user specified set of points using
bilinear interpolation.
<br clear="none"><br clear="none"> <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Document/Functions/Built-in/linint2_points.shtml">http://www.ncl.ucar.edu/Docume nt/Functions/Built-in/linint2_ points.shtml</a><br clear="none"></div><div><br clear="none"></div>[2] The SMAP data are on a *curvilinear* grid: [DIM_000 | 406] x [DIM_001 | 964] . Hence, 'linint2_points' will not work.<br clear="none"><br clear="none"></div><div>[3] I suggest that you <br clear="none"> (a) use ESMF regridding to interpolate from the curvilinear grid to a rectilinear grid of approximately the same resolution.<br clear="none"></div><div> (b) then use linint2_points on (3a)<br clear="none"><br clear="none">===<br clear="none"></div><div>See the NARR Example 5. NARR uses a curvilinear grid. Create an SMAP ESMF weight file [eg: ESMF eamaple 30) ; Use the weight file to generate a rectilinear grid; use linint2_points.<br clear="none"><br clear="none"> <a rel="nofollow" shape="rect" target="_blank" href="http://www.ncl.ucar.edu/Applications/narr.shtml">http://www.ncl.ucar.edu/Appli cations/narr.shtml</a><br clear="none"><br clear="none"></div><div>Good luck<br clear="none"></div><div> <br clear="none"></div><div><span style="background-color:rgb(173,215,115);"></span><br clear="none"><span style="background-color:rgb(173,215,115);"></span></div><div><span style="background-color:rgb(173,215,115);"></span><span style="font-weight:normal;"></span></div></div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559gmail_extra"><br clear="none"><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559gmail_quote">On Mon, Jan 29, 2018 at 9:23 AM, Ehsan Taghizadeh via ncl-talk <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>></span> wrote:<br clear="none"><blockquote class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yqt5353952860" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yqt90247"><div><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div></div>
<div><span style="color:rgb(38,40,42);">Hi,</span><br clear="none"></div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayahoo_quoted" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayahoo_quoted_7713408982"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div><div id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249ydpbbc61b17yahoo_quoted" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249ydpbbc61b17yahoo_quoted_8100818481"><div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div><div id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249ydpbbc61b17yiv0430163723"><div style="font-family:bookman old style, new york, times, serif;font-size:16px;"><div>I want to interpolate soil moisture data from SMAP (Soil Moisture Ative/Passive) to some specified locations (in stations_NW.csv attached file). Some information of data are as belows.</div><div><br clear="none"></div><div><div>printVarSummary(lat2d)<br clear="none"></div><div><div><span style="background-color:rgb(173,215,115);">Variable: lat2d</span></div><div><span style="background-color:rgb(173,215,115);">Type: float</span></div><div><span style="background-color:rgb(173,215,115);">Total Size: 1565536 bytes</span></div><div><span style="background-color:rgb(173,215,115);"> 391384 values</span></div><div><span style="background-color:rgb(173,215,115);">Number of Dimensions: 2</span></div><div><span style="background-color:rgb(173,215,115);">Dimensions and sizes: [DIM_000 | 406] x [DIM_001 | 964]</span></div><div><span style="background-color:rgb(173,215,115);">Coordinates:</span></div><div><span style="background-color:rgb(173,215,115);">Number Of Attributes: 2</span></div><div><span style="background-color:rgb(173,215,115);"> long_name : Latitude of the center of the Earth based grid cell.</span></div><div><span style="background-color:rgb(173,215,115);"> units : degrees_north</span></div><div><br clear="none"></div></div><div><div>printVarSummary(lon2d)<br clear="none"></div><div><span style="background-color:rgb(173,215,115);">Variable: lon2d</span></div><div><span style="background-color:rgb(173,215,115);">Type: float</span></div><div><span style="background-color:rgb(173,215,115);">Total Size: 1565536 bytes</span></div><div><span style="background-color:rgb(173,215,115);"> 391384 values</span></div><div><span style="background-color:rgb(173,215,115);">Number of Dimensions: 2</span></div><div><span style="background-color:rgb(173,215,115);">Dimensions and sizes: [DIM_000 | 406] x [DIM_001 | 964]</span></div><div><span style="background-color:rgb(173,215,115);">Coordinates:</span></div><div><span style="background-color:rgb(173,215,115);">Number Of Attributes: 2</span></div><div><span style="background-color:rgb(173,215,115);"> long_name : Longitude of the center of the Earth based grid cell.</span></div><div><span style="background-color:rgb(173,215,115);"> units : degrees_east</span></div><div><br clear="none"></div></div><div>printVarSummary(var):<br clear="none"></div><div><div><span style="background-color:rgb(173,215,115);">Variable: var</span></div><div><span style="background-color:rgb(173,215,115);">Type: float</span></div><div><span style="background-color:rgb(173,215,115);">Total Size: 1565536 bytes</span></div><div><span style="background-color:rgb(173,215,115);"> 391384 values</span></div><div><span style="background-color:rgb(173,215,115);">Number of Dimensions: 2</span></div><div><span style="background-color:rgb(173,215,115);">Dimensions and sizes: [DIM_000 | 406] x [DIM_001 | 964]</span></div><div><span style="background-color:rgb(173,215,115);">Coordinates:</span></div><div><span style="background-color:rgb(173,215,115);">Number Of Attributes: 6</span></div><div><span style="background-color:rgb(173,215,115);"> _FillValue : -9999</span></div><div><span style="background-color:rgb(173,215,115);"> coordinates : /Soil_Moisture_Retrieval_Data_ AM/latitude /Soil_Moisture_Retrieval_Data_ AM/longitude</span></div><div><span style="background-color:rgb(173,215,115);"> long_name : Representative soil moisture measurement for the Earth based grid cell.</span></div><div><span style="background-color:rgb(173,215,115);"> units : cm**3/cm**3</span></div><div><span style="background-color:rgb(173,215,115);"> valid_max : 0.5</span></div><div><span style="background-color:rgb(173,215,115);"> valid_min : 0.02</span></div></div><div><span style="background-color:rgb(173,215,115);"><br clear="none"></span></div></div><div>However I've faced below error:<br clear="none"></div><div><span style="background-color:rgb(228,172,100);">fatal:(lon) is not a dimension name in variable (var), could not determine dimension number</span><br clear="none"></div><div><br clear="none"></div><div>I searched in google and I found may be <span style="background-color:rgb(125,190,241);">"<span style="color:rgb(0,0,0);font-size:medium;">There is no 'lon' dimension name. In fact, there are no latitude/longitude </span><span style="color:rgb(0,0,0);font-size:medium;">coordinates on the file at all.</span>"</span><br clear="none"></div><div>So I used following line:</div><div><div> <span style="background-color:rgb(210,100,170);">SMAP_fo = linint2_points(lon2d,lat2d, var(</span><span style="background-color:rgb(132,90,167);">DIM_000 | :, DIM_001 | :)</span><span style="background-color:rgb(210,100,170);">, False , lon_NW, lat_NW, 0)</span></div><div><br clear="none"></div>instead of:</div><div><div> <span style="background-color:rgb(210,100,170);">SMAP_fo = linint2_points(lon2d,lat2d, var(</span><span style="background-color:rgb(132,90,167);">lat | :, lon | :</span><span style="background-color:rgb(210,100,170);">), False , lon_NW, lat_NW, 0)</span></div><div><br clear="none"></div>and after that I faced following error:</div><div><span style="background-color:rgb(228,172,100);">fatal:linint2_points: If xi is not one-dimensional, then it must have one less dimension than fi<br clear="none"></span></div><div><br clear="none"></div><div>After that I added following lines to the script:</div><div><div><span style="background-color:rgb(210,100,170);"> lat1d = ndtooned(lat2d)</span></div><div><span style="background-color:rgb(210,100,170);"> lon1d = ndtooned(lon2d)</span></div><div><br clear="none"></div>Again I had following error:</div><div><span style="background-color:rgb(228,172,100);">fatal:linint2_points: The rightmost dimensions of fi must be nyi x nxi, where nyi and nxi are the lengths of yi and xi respectively</span><br clear="none"></div><div><br clear="none"></div><div>And here I'm not sure about what I've done.</div><div>I've attached the script, stations_NW.csv (input for unstructured points) and links.txt (which contains links for downloading SMAP data. Sorry about that but I couldn't attach SMAP files, because of their sizes. However to download them it is necessary to have earthdata user name!).<br clear="none"></div><div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqt7366927260" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqtfd76790">I'll be thankful if I could have your help, again.</div></div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqt7366927260" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqtfd02077"><div><br clear="none"></div><div>Sincerely</div><span class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559HOEnZb"><font color="#888888"></font></span><div>Ehsan<br clear="none"></div></div></div></div></div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqt7366927260" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqtfd44909">
</div></div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqt7366927260" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559m_-7490938470158028763ydpdfb568aayiv8920612249yqtfd00362">
</div></div></div></div></div>
</div>
</div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div>
</div></div><div class="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yqt1462782316" id="yiv0061820304m_443400711839365928yiv4954023465m_7252436723098526972m_-6857558326229278970m_3543603993019868521yiv4071997559yqtfd43205">
</div></div></div></div></div></div>
</div>
</div></div></div></div></div></div></div><br clear="none"></div></div><div><div class="yiv0061820304h5">______________________________ _________________<span><br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailma n/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></span></div></div></blockquote></div><br clear="none"></div><div><div class="yiv0061820304h5">
<br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailma n/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></div></div></blockquote></div><br clear="none"></div>
</div></div></blockquote></div><br clear="none"></div></div></div></div></div>
</div>
</div></div></div></div><br clear="none">______________________________ _________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/ mailman/listinfo/ncl-talk</a><br clear="none">
<br clear="none"></blockquote></div><br clear="none"></div></div></div></div>
</div>
</div></div></body></html>