<div dir="ltr"><div>Hi ,<br></div><div>It stops at the same line. (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 'rectilinear'<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) 'ESMF_RegridWeightGen --source <a href="http://source_grid_file.nc">source_grid_file.nc</a> --destination <a href="http://destination_grid_file.nc">destination_grid_file.nc</a> --weight <a href="http://weights_file.nc">weights_file.nc</a> --method patch -i'<br>(0) --------------------------------------------------<br></div><div>Here it is stopped. No errors. <br><br></div><div>Please, Could someone help me to fix this bug?<br><br></div><div>Thank you,<br></div><div>Adv<br></div><div><br><br><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 5:05 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></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 class="gmail_default" style="font-size:small">I don't know if this has anything to do with it, but you don't want a "return" statement in your main code. Try removing it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If you continue to have problems, then you can try this as a debugging trick:</div><div class="gmail_default"><ul><li>Comment the "begin" and "end" statements</li><li>Run the script with "ncl -x" and watch as every line gets executed.</li><li>If stops again, look at which line it is stopping on, and report that information back to ncl-talk.</li></ul><div>--Mary</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Feb 4, 2016 at 2:15 PM, Adv <span dir="ltr"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl"<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("stationmac.txt", -1, "string") ;<br> print(strll) ; STATION","STATION_NAME", "LAT", "LON"<br> print("=====")<br><br>sloc = str_get_field(strll , 2, ",")<br> lat = tofloat( str_get_field(strll , 3, ",") )<br> lon = tofloat( str_get_field(strll , 4, ",") )<br> print(sloc +" : "+lat+" "+lon)<br>print(lon)<br>;&&&&&&&&&&&<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+"prec_avg_Jan-Dec1965-2005",-1,"float")<br>print(z1)<br>printVarSummary(z1)<br>z0 = onedtond(z1,(/390,390/))<br>print(z0)<br>printVarSummary(z0)<br>z0!0="lat"<br>z0!1="lon"<br>z0&lat=latm<br>z0&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'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 = "0.1deg" ; destination grid<br> Opt@ForceOverwrite = True<br> Opt@SrcGridMask = where(.not.ismissing(z0),1,0)<br> Opt@Debug = True<br> Opt@InterpMethod = "patch"<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 'rectilinear'<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) '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'<br>(0) --------------------------------------------------<br> <br></div><div>After this it just stopped. I couldn'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>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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>
</blockquote></div><br></div>