<div dir="ltr"><span style="font-size:12.8px">Hi,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">My apologies for the previous incomplete message.</div><div style="font-size:12.8px"> </div><div style="font-size:12.8px">I was running into issues of ESMF_regid_with_weights. I am trying to regrid the the NDVI data (at the resolution of 1/12 degree) to a 0.75 degree for my analysis.</div><div style="font-size:12.8px">When I try to regrid them using ESMF_regrid_with_weights functions, I ran into the problem during weight generation step. The information provided by the debug option is listed here:</div><div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>=====&gt; CPU Elapsed Time: rectilinear_to_SCRIP: 9.34327 seconds &lt;=====</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>ESMF_regrid_gen_weights: number of processors used: 1</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>--------------------------------------------------</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>ESMF_regrid_gen_weights: the following command is about to be executed on the system:</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>&#39;ESMF_RegridWeightGen --source src_SCRIP.nc --destination dst_SCRIP.nc --weight <a href="http://gimms_to_rect.nc">gimms_to_rect.nc</a> --method patch -i --check&#39;</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>--------------------------------------------------</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>ESMF_regrid_gen_weights: output from &#39;ESMF_RegridWeightGen&#39;:</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>      Starting weight generation with these inputs: </span></div><div><span style="font-size:12.8px">(1)<span style="white-space:pre">        </span>        Source File: src_SCRIP.nc</span></div><div><span style="font-size:12.8px">(2)<span style="white-space:pre">        </span>        Destination File: dst_SCRIP.nc</span></div><div><span style="font-size:12.8px">(3)<span style="white-space:pre">        </span>        Weight File: <a href="http://gimms_to_rect.nc">gimms_to_rect.nc</a></span></div><div><span style="font-size:12.8px">(4)<span style="white-space:pre">        </span>        Source File is in SCRIP format</span></div><div><span style="font-size:12.8px">(5)<span style="white-space:pre">        </span>        Source Grid is a global grid</span></div><div><span style="font-size:12.8px">(6)<span style="white-space:pre">        </span>        Source Grid is a logically rectangular grid</span></div><div><span style="font-size:12.8px">(7)<span style="white-space:pre">        </span>        Destination File is in SCRIP format</span></div><div><span style="font-size:12.8px">(8)<span style="white-space:pre">        </span>        Destination Grid is a global grid</span></div><div><span style="font-size:12.8px">(9)<span style="white-space:pre">        </span>        Destination Grid is a logically rectangular grid</span></div><div><span style="font-size:12.8px">(10)<span style="white-space:pre">        </span>        Regrid Method: patch</span></div><div><span style="font-size:12.8px">(11)<span style="white-space:pre">        </span>        Pole option: ALL</span></div><div><span style="font-size:12.8px">(12)<span style="white-space:pre">        </span>        Ignore unmapped destination points</span></div><div><span style="font-size:12.8px">(13)<span style="white-space:pre">        </span>        Norm Type: dstarea</span></div><div><span style="font-size:12.8px">(14)<span style="white-space:pre">        </span>     </span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>--------------------------------------------------</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre">        </span>ESMF_regrid_gen_weights: &#39;ESMF_RegridWeightGen&#39; was not successful.</span></div><div style="font-size:12.8px"><br></div></div><div style="font-size:12.8px">My scripts is listed below:</div><div style="font-size:12.8px"><br></div><div><div><span style="font-size:12.8px">;**********************************************</span></div><div><span style="font-size:12.8px">;  process_ndvi3g_data.ncl</span></div><div><span style="font-size:12.8px">;</span></div><div><span style="font-size:12.8px">;    -read in ndvi 3g data</span></div><div><span style="font-size:12.8px">;    -regrid 1/12 degree to 0.75 deg</span></div><div><span style="font-size:12.8px">;    -during regridding, mask climatology value</span></div><div><span style="font-size:12.8px">;***********************************************</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/esmf/ESMF_regridding.ncl&quot;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">pixel   = 0.75                           ; new grid size</span></div><div><span style="font-size:12.8px">latN    = todouble(  90.-0.5*pixel)      ; geolocation limits</span></div><div><span style="font-size:12.8px">latS    = todouble( -90.+0.5*pixel)      ; for center of coner grids</span></div><div><span style="font-size:12.8px">lonW    = todouble(-180.+0.5*pixel)</span></div><div><span style="font-size:12.8px">lonE    = todouble( 180.-0.5*pixel)</span></div><div><span style="font-size:12.8px">nlon    = toint((lonE-lonW)/pixel+1)</span></div><div><span style="font-size:12.8px">nlat    = toint((latN-latS)/pixel+1)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">lat_new = todouble(fspan(latS,latN,nlat))</span></div><div><span style="font-size:12.8px">lon_new = todouble(fspan(lonW,lonE,nlon))</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">lat_new!0             = &quot;lat&quot;</span></div><div><span style="font-size:12.8px">lat_new&amp;lat           = lat_new</span></div><div><span style="font-size:12.8px">lat_new&amp;lat@long_name = &quot;latitude&quot;</span></div><div><span style="font-size:12.8px">lat_new&amp;lat@units     = &quot;degrees_north&quot;</span></div><div><span style="font-size:12.8px">lon_new!0             = &quot;lon&quot;</span></div><div><span style="font-size:12.8px">lon_new&amp;lon           = lon_new</span></div><div><span style="font-size:12.8px">lon_new&amp;lon@long_name = &quot;longitude&quot;</span></div><div><span style="font-size:12.8px">lon_new&amp;lon@units     = &quot;degrees_east&quot;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ndvi_all = new((/24,nlat,nlon/),float)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">fin  = addfile(&quot;<a href="http://ndvi3g_1982_nasa.nc">ndvi3g_1982_nasa.nc</a>&quot;,&quot;r&quot;)</span></div><div><span style="font-size:12.8px">ndvi = fin-&gt;ndvi</span></div><div><span style="font-size:12.8px">flag = fin-&gt;flag</span></div><div><span style="font-size:12.8px">printVarSummary(ndvi)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ntime = dimsizes(ndvi&amp;time)</span></div><div><span style="font-size:12.8px">;---iterate through each 15-day period</span></div><div><span style="font-size:12.8px">;   masking out data with flag=2 &amp; missing data</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Generate dst grid file</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">  dstGridName        = &quot;dst_SCRIP.nc&quot;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">  Opt                = True</span></div><div><span style="font-size:12.8px">  Opt@ForceOverwrite = True</span></div><div><span style="font-size:12.8px">  Opt@PrintTimins    = True</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">  rectilinear_to_SCRIP(dstGridName,lat_new,lon_new,Opt)</span></div><div><span style="font-size:12.8px">  delete(Opt)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">  do itime = 0, ntime-1</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;---Generate Src grids (mask is changing)</span></div><div><span style="font-size:12.8px">   tmpndvi = ndvi(itime,:,:)</span></div><div><span style="font-size:12.8px">   tmpmask = flag(itime,:,:)</span></div><div><span style="font-size:12.8px">   tmpmask = where((.not.ismissing(tmpndvi)).and.(tmpmask.ne.2),1,0)</span></div><div><span style="font-size:12.8px">      </span></div><div><span style="font-size:12.8px">   srcGridName        = &quot;src_SCRIP.nc&quot;</span></div><div><span style="font-size:12.8px">   wgtFileName        = &quot;<a href="http://gimms_to_rect.nc">gimms_to_rect.nc</a>&quot;</span></div><div><span style="font-size:12.8px">   </span></div><div><span style="font-size:12.8px">   Opt                = True</span></div><div><span style="font-size:12.8px">   Opt@GridMask       = tmpmask</span></div><div><span style="font-size:12.8px">   Opt@ForceOverwrite = True</span></div><div><span style="font-size:12.8px">   Opt@PrintTimings   = True</span></div><div><span style="font-size:12.8px">   Opt@Title          = &quot;GIMMS Grid&quot;</span></div><div><span style="font-size:12.8px">   </span></div><div><span style="font-size:12.8px">   rectilinear_to_SCRIP(srcGridName,tmpndvi&amp;lat,tmpndvi&amp;lon,Opt)</span></div><div><span style="font-size:12.8px">   delete(Opt)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">;----------------------------------------------</span></div><div><span style="font-size:12.8px">;  Generate the weights between Src to Dst grids</span></div><div><span style="font-size:12.8px">;----------------------------------------------</span></div><div><span style="font-size:12.8px">   Opt                = True</span></div><div><span style="font-size:12.8px">   Opt@InterpMethod   = &quot;patch&quot;</span></div><div><span style="font-size:12.8px">   Opt@ForceOverwrite = True</span></div><div><span style="font-size:12.8px">   Opt@PrintTimings   = True</span></div><div><span style="font-size:12.8px">   Opt@Debug          = True</span></div><div><span style="font-size:12.8px">   Opt@Check          = True</span></div><div><span style="font-size:12.8px">;   setfileoption(&quot;nc&quot;,&quot;Format&quot;,&quot;LargeFile&quot;)</span></div><div><span style="font-size:12.8px">   ESMF_regrid_gen_weights(srcGridName,dstGridName,wgtFileName,Opt)</span></div><div><span style="font-size:12.8px">   delete(Opt)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">   ;--------------------------------------------</span></div><div><span style="font-size:12.8px">   ; esmf_regrid with precalculated weight file</span></div><div><span style="font-size:12.8px">   ;--------------------------------------------</span></div><div><span style="font-size:12.8px">   Opt                 = True</span></div><div><span style="font-size:12.8px">   Opt@PrintTimings    = True</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">   tmp_regrid = ESMF_regrid_with_weights(tmpndvi,wgtFileName,Opt)</span></div><div><span style="font-size:12.8px">   printVarSummary(tmp_regrid)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">   ndvi_all(itime,:,:) = tmp_regrid</span></div><div><span style="font-size:12.8px">   </span></div><div><span style="font-size:12.8px">  end do ;itime</span></div><div><span style="font-size:12.8px">  </span></div><div><span style="font-size:12.8px">ndvi_all!0             = &quot;time&quot;</span></div><div><span style="font-size:12.8px">ndvi_all!1             = &quot;lat&quot;</span></div><div><span style="font-size:12.8px">ndvi_all!2             = &quot;lon&quot;</span></div><div><span style="font-size:12.8px">ndvi_all&amp;lat           = lat_new</span></div><div><span style="font-size:12.8px">ndvi_all&amp;lon           = lon_new</span></div><div><span style="font-size:12.8px">ndvi_all&amp;lat@units     = &quot;degrees_north&quot;</span></div><div><span style="font-size:12.8px">ndvi_all&amp;lon@units     = &quot;degrees_east&quot;</span></div><div><span style="font-size:12.8px">ndvi_all&amp;lat@long_name = &quot;latitude&quot;</span></div><div><span style="font-size:12.8px">ndvi_all&amp;lon@long_name = &quot;longitude&quot;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ndvi_all@time          = systemfunc(&quot;date&quot;)</span></div><div><span style="font-size:12.8px">ndvi_all@comments      = &quot;Regridded GIMMS 3g NDVI data from NASA NEX using ESMF_regrid in NCL. Only NDVI values with flag (0,1) is used in regridding.&quot;</span></div><div><span style="font-size:12.8px">ndvi_all@long_name     = &quot;Normalized Difference Vegetation Index (GIMMS 3g)&quot;</span></div><div><span style="font-size:12.8px">ndvi_all@scale         = 0.0001</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ndvi_all               = where(ismissing(ndvi_all),toshort(-32768),toshort(ndvi_all*10000))</span></div><div><span style="font-size:12.8px">ndvi_all@_FillValue   := toshort(-32768)    ; conver to short to compress</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">ndvi_all&amp;time          = fspan(0.5,12,24)</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">oname = &quot;<a href="http://ndvi3d_1982_r0.75x0.75.nc">ndvi3d_1982_r0.75x0.75.nc</a>&quot;</span></div><div><span style="font-size:12.8px">system(&quot;rm -f &quot;+oname)</span></div><div><span style="font-size:12.8px">fout  = addfile(oname,&quot;c&quot;)</span></div><div><span style="font-size:12.8px">fout-&gt;ndvi = ndvi_all</span></div></div><div><span style="font-size:12.8px">---------------------------------------------------------------------------------------------------------------------</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">I have put my data in the <a href="http://ftp.cgd.ucar.edu/incoming">ftp.cgd.ucar.edu/incoming</a>, the file name is &quot;<a href="http://ndvi3g_1982_nasa.nc">ndvi3g_1982_nasa.nc</a>&quot;.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Could you help me look into this issue?</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thanks!</span></div><div><span style="font-size:12.8px">Best,</span></div><div><span style="font-size:12.8px">Douglas</span></div><div style="font-size:12.8px"><br></div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="font-size:small;font-family:tahoma,sans-serif;display:inline">​</div><span style="font-size:small">-- </span><br style="font-size:small"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><span style="font-size:12.8px">Rao, Yuhan (Douglas)</span><br style="font-size:12.8px"><span style="font-size:12.8px">Doctoral Candidate/Graduate Research Assistant</span><br style="font-size:12.8px"><span style="font-size:12.8px">Department of Geographical Sciences</span></div><div style="font-size:12.8px"><span style="font-size:12.8px">Cooperative Institute for Climate and Satellites-Maryland</span></div><div dir="ltr" style="font-size:12.8px"><span style="font-size:12.8px">University of Maryland</span><br style="font-size:12.8px"><span style="font-size:12.8px">2138 LeFrak Hall, </span><span style="font-size:12.8px">7251 Preinkert Dr.</span></div><div dir="ltr" style="font-size:12.8px"><span style="font-size:12.8px">College Park, MD 20742</span><br style="font-size:12.8px"><span style="font-size:12.8px">E-mail: </span><a href="mailto:yuhan.rao@gmail.com" style="font-size:12.8px" target="_blank">yuhan.rao@gmail.com</a><span style="font-size:12.8px">/</span><a href="mailto:yrao@terpmail.umd.edu" style="font-size:12.8px" target="_blank">yrao@terpmail.umd.edu</a></div></div></div></div></div></div></div></div></div></div>
</div>