<div dir="ltr"><div><div>Hi ,<br></div>Sorry about previous email. It takes long time to go ahead. It works.<br><br></div>Thank you<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 3:15 PM, Adv <span dir="ltr">&lt;<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div>I have been trying to use ESMF_regridding method to regrid station data sets. <br><br><div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl&quot;<br>begin<br>;a = (/1,2,3,4,5,6,7,8/)<br>;a0 = onedtond(a,(/4,2/))<br>;print(a0)<br>;printVarSummary(a0)<br>;return<br>strll  = asciiread(&quot;stationmac.txt&quot;, -1, &quot;string&quot;) ;<br>  print(strll)   ; STATION&quot;,&quot;STATION_NAME&quot;, &quot;LAT&quot;, &quot;LON&quot;<br>  print(&quot;=====&quot;)<br><br>sloc = str_get_field(strll , 2, &quot;,&quot;)<br>  lat  = tofloat( str_get_field(strll , 3, &quot;,&quot;)  )<br>  lon  = tofloat( str_get_field(strll , 4, &quot;,&quot;)  )<br>  print(sloc +&quot; : &quot;+lat+&quot; &quot;+lon)<br>print(lon)<br>;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;<br>lonm=lon(0:389)<br>latm=lat(0:389)<br>;****************<br>mlon = 390<br>dlon = -90.35 / mlon<br>lonn  = fspan (-116.1, (mlon - 1) * dlon, mlon)<br>mlat = 390<br>dlat = 49.0 / mlat<br>latt  = fspan (40.00, (mlat - 1) * dlat, mlat)<br>print(lonn)<br>minlat=min(latt)<br>minlon=min(lonn)<br>maxlat=max(latt)<br>z1 = asciiread(diri+&quot;prec_avg_Jan-Dec1965-2005&quot;,-1,&quot;float&quot;)<br>print(z1)<br>printVarSummary(z1)<br>z0 = onedtond(z1,(/390,390/))<br>print(z0)<br>printVarSummary(z0)<br>z0!0=&quot;lat&quot;<br>z0!1=&quot;lon&quot;<br>z0&amp;lat=latm<br>z0&amp;lon=lonm<br>printVarSummary(z0)<br>;print(z0)<br>print(min(z0)-min(z1))<br>print(max(z0)-max(z1))<br>;ESMF REGRID *******************<br>;---Set up options for regridding to 0.1 degree grid<br>  Opt                 = True<br><br>  Opt@SrcGridLat      = latm<br>  Opt@SrcGridLon      = lonm<br>;---If you don&#39;t set these two, the regridding will be VERY slow<br>  Opt@DstLLCorner     = (/floor(minlat)-0.1,floor(minlon)+0.1/)<br>  Opt@DstURCorner     = (/ ceil(maxlat)-0.1, ceil(maxlon)+0.1/)<br>  Opt@DstGridType     = &quot;0.1deg&quot;                ; destination grid<br>  Opt@ForceOverwrite  = True<br>  Opt@SrcGridMask    = where(.not.ismissing(z0),1,0)<br> Opt@Debug           = True<br>  Opt@InterpMethod    = &quot;patch&quot;<br>  pwv_regrid_p = ESMF_regrid(z0,Opt)<br>  printVarSummary(pwv_regrid_p)<br>return<br>end<br><br></div><div>Output printed on the terminal: <br>(0)    get_src_grid_info: source lat dims = (390)<br>(0)    get_src_grid_info: source lon dims = (390)<br>(0)    get_src_grid_info: source grid type is &#39;rectilinear&#39;<br>(0)    curvilinear_to_SCRIP: calculating grid corners...<br>(0)    curvilinear_to_SCRIP: no lat values are at the poles, so<br>(0)           calculating grid corners using<br>(0)           calc_SCRIP_corners_noboundaries...<br>(0)    calc_SCRIP_corners_noboundaries<br>(0)         min/max original lat: 40.0097/49<br>(0)         min/max original lon: -116/-90.35<br>(0)    calc_SCRIP_corners_noboundaries<br>(0)         min/max Extlat2d: 40.0097/49<br>(0)         min/max Extlon2d: -116/-90.35<br>(0)    calc_SCRIP_corners_noboundaries<br>(0)         min/max ExtGridCenter_lat: 40.0612/48.989<br>(0)         min/max ExtGridCenter_lon: -114.417/-91.4917<br>(0)    curvilinear_to_SCRIP: calculating grid corners...<br>(0)    curvilinear_to_SCRIP: no lat values are at the poles, so<br>(0)           calculating grid corners using<br>(0)           calc_SCRIP_corners_noboundaries...<br>(0)    calc_SCRIP_corners_noboundaries<br>(0)         min/max original lat: 39.9/48.9<br>(0)         min/max original lon: -116.9/-89.9<br>(0)    calc_SCRIP_corners_noboundaries<br>(0)         min/max Extlat2d: 39.8/49<br>(0)         min/max Extlon2d: -117/-89.8<br>(0)    calc_SCRIP_corners_noboundaries<br>(0)         min/max ExtGridCenter_lat: 39.85/48.95<br>(0)         min/max ExtGridCenter_lon: -116.95/-89.85<br>(0)    ESMF_regrid_gen_weights: number of processors used: 1<br>(0)    --------------------------------------------------<br>(0)    ESMF_regrid_gen_weights: the following command is about to be executed on the system:<br>(0)    &#39;ESMF_RegridWeightGen --source <a href="http://source_grid_file.nc" target="_blank">source_grid_file.nc</a> --destination <a href="http://destination_grid_file.nc" target="_blank">destination_grid_file.nc</a> --weight <a href="http://weights_file.nc" target="_blank">weights_file.nc</a> --method patch -i&#39;<br>(0)    --------------------------------------------------<br>                                <br></div><div>After this it just stopped. I couldn&#39;t see any output corresponds to the command (printVarSummary)<br></div><div><br></div><div>I would appreciate any suggestions to get rid of this bug.<br><br></div><div>Thank you,<br></div><div>Adv<br></div><div><br></div></div></div>
</blockquote></div><br></div>