<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"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</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>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>
</blockquote></div><br></div>