<div dir="ltr">Hi Lin, <div><br></div><div>In your script, the dimension of Opt@SrcMask2D does not match the dimension of latitude (or longitude), which cause an error in L1614 of ESMF_regridding.ncl</div><div><br></div><div>(here is L1614 to 1620 of ESMF_regridding.ncl)</div><div><br></div><div><div>      if(.not.all(dimsizes(Opt@$grid_mask_name$).eq.latlon_dims)) then</div><div>        print(&quot;curvilinear_to_SCRIP: Opt@&quot; + grid_mask_name + \</div><div>              &quot; is not the correct dimensionality&quot;)</div><div>        exit</div><div>      else</div><div>        grid_mask = Opt@$grid_mask_name$</div><div>      end if</div></div><div><br></div><div>As you set the masking based on thetao (L58 in your attached script), which is a 3-dimensional array with the time dimension, you have to reduce this dimension to solve the problem.</div><div><br></div><div>P.S. As mentioned in the NCL document, you are suggested to use SrcGridMask instead of SrcMask2D.</div><div><br></div><div>Cheers,</div><div>Hoffman</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-12-07 17:44 GMT+01:00 林祥 <span dir="ltr">&lt;<a href="mailto:xianglin72@icloud.com" target="_blank">xianglin72@icloud.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi, all<div><br></div><div>     I want to regrid some curvilinear data using the function &quot;ESMF_regrid” , the corresponding codes were listed as below (while the </div><div><br></div><div>whole scripts was also attached with this mail) .</div><div><br></div><div>  125    printVarSummary(thetao)</div><div>  126    thetao_regrid = ESMF_regrid(thetao,Opt)</div><div>  127    printVarSummary(thetao_<wbr>regrid)                   ( the scripts was derived from example of <a style="margin:0pt;padding:0pt;text-decoration:none;color:rgb(133,45,133);font-family:verdana,sans-serif;background-image:none;background-color:rgb(205,232,251);font-size:13.200000762939453px;background-position:0% 0%;background-repeat:repeat repeat">ESMF_regrid_6.ncl</a><span style="font-family:verdana,sans-serif;font-size:13.200000762939453px;background-color:rgb(255,231,198)"> )</span></div><div><br></div><div>  </div><div>     However, something wrong were reported as below:</div><div><br></div><div><div>Variable: thetao</div><div>Type: float</div><div>Total Size: 808704000 bytes</div><div>            202176000 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 1872] x [j | 300] x [i | 360]</div><div>Coordinates: </div><div>            time: [675348.5..732295.5]</div><div>            j: [0..299]</div><div>            i: [0..359]</div><div>Number Of Attributes: 14</div><div>  lon2d :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>&lt;ARRAY of 108000 elements&gt;</div><div>  lat2d :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>&lt;ARRAY of 108000 elements&gt;</div><div>  standard_name :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>sea_ice_area_fraction</div><div>  long_name :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>Sea Ice Area Fraction</div><div>  comment :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>fraction of grid cell covered by sea ice.</div><div>  units :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>%</div><div>  original_units :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>1</div><div>  history :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>2012-01-17T03:16:49Z altered by CMOR: Converted units from &#39;1&#39; to &#39;%&#39;. 2012-01-17T03:16:49Z altered by CMOR: replaced missing value flag (1e+30) with standard missing value (1e+20).</div><div>  cell_methods :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>time: mean</div><div>  cell_measures :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>area: areacello</div><div>  missing_value :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>1e+20</div><div>  _FillValue :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>1e+20</div><div>  associated_files :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>baseURL: <a href="http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation" target="_blank">http://cmip-pcmdi.llnl.gov/<wbr>CMIP5/dataLocation</a> gridspecFile: gridspec_seaIce_fx_ACCESS1-0_<wbr><a href="http://historical_r0i0p0.nc">historical_r0i0p0.nc</a> areacello: areacello_fx_ACCESS1-0_<wbr><a href="http://historical_r0i0p0.nc">historical_r0i0p0.nc</a></div><div>  coordinates :<span class="m_-772626931904036385Apple-tab-span" style="white-space:pre-wrap">        </span>lat lon</div></div><div><br></div><div> fatal:Eq: Dimension size, for dimension number 0, of operands does not match, can&#39;t continue</div><div><br></div><div><br></div><div>fatal:[&quot;Execute.c&quot;:8575]:<wbr>Execute: Error occurred at or near line 1614 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/esmf/ESMF_<wbr>regridding.ncl</div><div><br></div><div><br></div><div>fatal:[&quot;Execute.c&quot;:8575]:<wbr>Execute: Error occurred at or near line 3853 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/esmf/ESMF_<wbr>regridding.ncl</div><div><br></div><div><br></div><div>fatal:[&quot;Execute.c&quot;:8575]:<wbr>Execute: Error occurred at or near line 3983 in file $NCARG_ROOT/lib/ncarg/<wbr>nclscripts/esmf/ESMF_<wbr>regridding.ncl</div><div><br></div><div><br></div><div>fatal:[&quot;Execute.c&quot;:8575]:<wbr>Execute: Error occurred at or near line 126 in file /Users/linx/Data/CMIP5_SIC/<wbr>sic/esmf_regrid_6_sic.ncl</div><div><br></div><div><br></div><div>     According the introduction of “ESMF_regrid”,  the “thetao&quot; can be any dimensionality. So  I can not find out where is the problem. </div><div><br></div><div>Anyone can show me  a hand?  Thanks!</div><div><br></div><div><br></div><div><br></div><div>Lin </div><div><br></div><div></div></div><br><div style="word-wrap:break-word"><div></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>