<div dir="ltr"><div class="gmail_default" style="font-size:small">​Hi Mary,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for your help. I think it might be the memory allocation issue on my computer since the source data is at high resolution. So I tried to run the scripts on a computing cluster, and it completed successfully.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I used &quot;patch&quot; because when I first ran the script on my computer with &quot;bilinear&quot; it failed. So I want to try if &quot;patch&quot; could run successfully, but it also didn&#39;t.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Now I have tried both on the cluster and both succeeded. I will used the &quot;bilinear&quot; one. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks a lot.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Best,</div><div class="gmail_default" style="font-size:small">Douglas</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><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>
<br><div class="gmail_quote">On Tue, Aug 1, 2017 at 12:35 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 class="gmail_default" style="font-size:small">Douglas,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default">Yesterday I regridded the full 24 timesteps using the &quot;bilinear&quot; interpolation method.  It ran successfully to completion.</div><div class="gmail_default"><br></div><div class="gmail_default">Today, I decided to try &quot;patch&quot;, since this is what your original script had.  This takes *much* longer than bilinear, but it did run to completion.</div><div class="gmail_default"><br></div><div class="gmail_default">Both scripts created a NetCDF file with the regridded &quot;ndvi&quot; variable.</div><div class="gmail_default"><br></div><div class="gmail_default">I wrote a script to plot the data from both regridded files and compare with the data from the original NetCDF file.</div><div class="gmail_default"><br></div><div class="gmail_default">I&#39;m not sure what could be the problem on your end, but the &quot;bad_alloc&quot; might be that your system ran out of memory. I recommend trying the &quot;bilinear&quot; method to see if you can get the script to run to completion.  </div><div class="gmail_default"><br></div><div class="gmail_default">Here&#39;s what the various attached files are:</div><div class="gmail_default"><br></div>regrid_ndvi_mod.ncl </div><div class="gmail_default"><br></div><div class="gmail_default">Script for regridding your data. Change the &quot;interp_method&quot; to either &quot;patch&quot; or &quot;bilinear&quot; before running. This should create a NetCDF file with the regridded data called either &quot;<a href="http://ndvi3d_1982_r0.75x0.75_patch.nc" target="_blank">ndvi3d_1982_r0.75x0.75_patch.<wbr>nc</a>&quot; or &quot;<a href="http://ndvi3d_1982_r0.75x0.75_bilinear.nc" target="_blank">ndvi3d_1982_r0.75x0.75_<wbr>bilinear.nc</a>&quot;</div><div class="gmail_default"><br></div><div class="gmail_default">regrid_xxxx_output.txt</div><div class="gmail_default"><br></div><div class="gmail_default">The two output files from running regrid_ndv_mod.ncl with either bilinear or patch.</div><div class="gmail_default"><br></div><div class="gmail_default">plot_ndvi_compare.ncl</div><div class="gmail_default"><br></div><div class="gmail_default">Script for reading data from the original file and the two <a href="http://ndvi3d_1982_r0.75x0.75_xxxx.nc" target="_blank">ndvi3d_1982_r0.75x0.75_xxxx.nc</a> files, and creating a series of paneled plots, one for each time step.</div><div class="gmail_default"><br></div><div class="gmail_default">plot_ndvi_compare.txt</div><div class="gmail_default"><br></div><div class="gmail_default">The output from running plot_ndvi_compare.ncl<br>  















<div class="gmail_default">ndvi_compare.png</div><div class="gmail_default"><br></div><div class="gmail_default">One of the 24 images generated by the plotting script.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">--Mary<br></div><div style="font-size:small"><br></div></font></span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Jul 31, 2017 at 1:30 PM, Yuhan Rao <span dir="ltr">&lt;<a href="mailto:yrao@terpmail.umd.edu" target="_blank">yrao@terpmail.umd.edu</a>&gt;</span> wrote:<br></span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Mary!<div><br></div><div>I have tried several times for this code. Only one time it provide some information in the Log file. I have attached the content of the Log file here.</div><div><br></div><div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>----------</div><div><br></div><div><div>20170728 103137.390 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 103900.100 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 104239.462 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 104941.512 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 110122.770 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 112721.098 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 112900.452 INFO             PET0 Running with ESMF Version 6.3.0rp1</div><div>20170728 113226.698 ERROR            PET0 ESMCI_Regrid_F.C:424 c_esmc_regrid_create() Internal error: Bad condition std::bad_alloc</div><div>20170728 113226.701 ERROR            PET0 ESMF_Regrid.F90:321 ESMF_RegridStore Internal error: Bad condition - Internal subroutine call returned Error</div><div>20170728 113226.701 ERROR            PET0 ESMF_FieldRegrid.F90:1008 ESMF_FieldRegridStoreNX Internal error: Bad condition - Internal subroutine call returned Error</div><div>20170728 113226.719 ERROR            PET0 ESMF_RegridWeightGen.F90:1152 ESMF_RegridWeightGenFile Internal error: Bad condition - Internal subroutine call returned Error</div><div>20170728 113639.935 INFO             PET0 Running with ESMF Version 6.3.0rp1</div></div><div><br></div><div>------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>------------</div><div><br></div><div>Thanks for the catch of type mismatch.</div><div><br></div><div>Best,</div><div>Douglas</div></div><div class="gmail_extra"><span><br clear="all"><div><div class="m_-3816366371084014116m_-4066704825060021196gmail_signature" data-smartmail="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">yr<wbr>ao@terpmail.umd.edu</a></div></div></div></div></div></div></div></div></div></div>
<br></span><div><div class="m_-3816366371084014116h5"><div class="gmail_quote">On Mon, Jul 31, 2017 at 1:23 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 class="gmail_default" style="font-size:small">I ran your script over the first four timesteps instead of all of them, just so I could see the end result faster.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It completed without any errors.  I&#39;m now trying it with the full ntime timesteps. A side note: I had to change:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span><div class="gmail_default"> ndvi_all@time          = systemfunc(&quot;date&quot;)</div><div class="gmail_default"><br></div></span><div class="gmail_default">to:</div><span><div class="gmail_default"><br></div><div class="gmail_default"> ndvi_all@time          := systemfunc(&quot;date&quot;)</div><div class="gmail_default"><br></div></span><div class="gmail_default">because otherwise there&#39;s an error about the attribute being a different type.</div></div><div class="gmail_default" style="font-size:small"><br></div>Meanwhile, can you send me the PET0.RegridWeightGen.Log file if you still have it?<div class="gmail_default" style="font-size:small;display:inline">​ It will hopefully explain what was causing your error.</div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">--Mary</div></div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">​</div> 







</div></div><div class="m_-3816366371084014116m_-4066704825060021196HOEnZb"><div class="m_-3816366371084014116m_-4066704825060021196h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 31, 2017 at 9:40 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 class="gmail_default" style="font-size:small">Hi Douglas,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing a clean script and your data.  I tried running it on Friday, but it was taking a really long time for some reason and I never got back to it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m running it again to see if I can reproduce the error.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-3816366371084014116m_-4066704825060021196m_8270367882324752183h5">On Fri, Jul 28, 2017 at 11:54 AM, Yuhan Rao <span dir="ltr">&lt;<a href="mailto:yrao@terpmail.umd.edu" target="_blank">yrao@terpmail.umd.edu</a>&gt;</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="m_-3816366371084014116m_-4066704825060021196m_8270367882324752183h5"><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><span><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></span><div><div><span style="font-size:12.8px">(0)<span style="white-space:pre-wrap">        </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-wrap">        </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-wrap">        </span>------------------------------<wbr>--------------------</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre-wrap">        </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-wrap">        </span>&#39;ESMF_RegridWeightGen --source src_SCRIP.nc --destination dst_SCRIP.nc --weight <a href="http://gimms_to_rect.nc" target="_blank">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-wrap">        </span>------------------------------<wbr>--------------------</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre-wrap">        </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-wrap">        </span>      Starting weight generation with these inputs: </span></div><div><span style="font-size:12.8px">(1)<span style="white-space:pre-wrap">        </span>        Source File: src_SCRIP.nc</span></div><div><span style="font-size:12.8px">(2)<span style="white-space:pre-wrap">        </span>        Destination File: dst_SCRIP.nc</span></div><div><span style="font-size:12.8px">(3)<span style="white-space:pre-wrap">        </span>        Weight File: <a href="http://gimms_to_rect.nc" target="_blank">gimms_to_rect.nc</a></span></div><div><span style="font-size:12.8px">(4)<span style="white-space:pre-wrap">        </span>        Source File is in SCRIP format</span></div><div><span style="font-size:12.8px">(5)<span style="white-space:pre-wrap">        </span>        Source Grid is a global grid</span></div><div><span style="font-size:12.8px">(6)<span style="white-space:pre-wrap">        </span>        Source Grid is a logically rectangular grid</span></div><div><span style="font-size:12.8px">(7)<span style="white-space:pre-wrap">        </span>        Destination File is in SCRIP format</span></div><div><span style="font-size:12.8px">(8)<span style="white-space:pre-wrap">        </span>        Destination Grid is a global grid</span></div><div><span style="font-size:12.8px">(9)<span style="white-space:pre-wrap">        </span>        Destination Grid is a logically rectangular grid</span></div><div><span style="font-size:12.8px">(10)<span style="white-space:pre-wrap">        </span>        Regrid Method: patch</span></div><div><span style="font-size:12.8px">(11)<span style="white-space:pre-wrap">        </span>        Pole option: ALL</span></div><div><span style="font-size:12.8px">(12)<span style="white-space:pre-wrap">        </span>        Ignore unmapped destination points</span></div><div><span style="font-size:12.8px">(13)<span style="white-space:pre-wrap">        </span>        Norm Type: dstarea</span></div><div><span style="font-size:12.8px">(14)<span style="white-space:pre-wrap">        </span>     </span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre-wrap">        </span>------------------------------<wbr>--------------------</span></div><div><span style="font-size:12.8px">(0)<span style="white-space:pre-wrap">        </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">;*****************************<wbr>*****************</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">;*****************************<wbr>******************</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/nclscri<wbr>pts/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)<wbr>)</span></div><div><span style="font-size:12.8px">lon_new = todouble(fspan(lonW,lonE,nlon)<wbr>)</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" target="_blank">ndvi3g_1982_nasa.nc</a>&quot;,<wbr>&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(dstGridNa<wbr>me,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)<wbr>).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" target="_blank">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(srcGridN<wbr>ame,tmpndvi&amp;lat,tmpndvi&amp;lon,Op<wbr>t)</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">;-----------------------------<wbr>-----------------</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">;-----------------------------<wbr>-----------------</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;L<wbr>argeFile&quot;)</span></div><div><span style="font-size:12.8px">   ESMF_regrid_gen_weights(srcGr<wbr>idName,dstGridName,wgtFileName<wbr>,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">   ;----------------------------<wbr>----------------</span></div><div><span style="font-size:12.8px">   ; esmf_regrid with precalculated weight file</span></div><div><span style="font-size:12.8px">   ;----------------------------<wbr>----------------</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(tmpnd<wbr>vi,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),tosh<wbr>ort(-32768),toshort(ndvi_all*1<wbr>0000))</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" target="_blank">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">------------------------------<wbr>------------------------------<wbr>------------------------------<wbr>---------------------------</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" target="_blank">ftp.cgd.ucar.edu/incoming</a>, the file name is &quot;<a href="http://ndvi3g_1982_nasa.nc" target="_blank">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><span><div style="font-size:12.8px"><br></div><div><div class="m_-3816366371084014116m_-4066704825060021196m_8270367882324752183m_-672606457213805719m_8691324554335367460gmail_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">yr<wbr>ao@terpmail.umd.edu</a></div></div></div></div></div></div></div></div></div></div>
</span></div>
<br></div></div>______________________________<wbr>_________________<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/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div>