<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">One way to go would be to use the 1-D array anyway by doing a smart conform. Otherwise you can create 2-D "dummy" variables using these functions:<div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" size="1" class="">undef("create_lon2d")</font></div><div class=""><font face="Menlo" size="1" class="">function create_lon2d(lat[*]:numeric, lon[*]:numeric)</font></div><div class=""><font face="Menlo" size="1" class="">local x, i</font></div><div class=""><font face="Menlo" size="1" class="">begin</font></div><div class=""><font face="Menlo" size="1" class=""> x = new((/dimsizes(lat),dimsizes(lon)/),typeof(lat))</font></div><div class=""><span style="font-family: Menlo; font-size: x-small;" class=""> do i=0,dimsizes(lat)-1</span></div><div class=""><font face="Menlo" size="1" class=""> x(i,:) = lon</font></div><div class=""><font face="Menlo" size="1" class=""> end do</font></div><div class=""><font face="Menlo" size="1" class=""> return(x)</font></div><div class=""><font face="Menlo" size="1" class="">end</font></div><div class=""><br class=""></div><div class=""><font face="Menlo" size="1" class="">undef("create_lat2d")</font></div><div class=""><font face="Menlo" size="1" class="">function create_lat2d(lat[*]:numeric, lon[*]:numeric)</font></div><div class=""><font face="Menlo" size="1" class="">local y, i</font></div><div class=""><font face="Menlo" size="1" class="">begin</font></div><div class=""><font face="Menlo" size="1" class=""> y = new((/dimsizes(lat),dimsizes(lon)/),typeof(lat))</font></div><div class=""><span style="font-family: Menlo; font-size: x-small;" class=""> do i=0,dimsizes(lon)-1</span></div><div class=""><font face="Menlo" size="1" class=""> y(:,i) = lat</font></div><div class=""><font face="Menlo" size="1" class=""> end do</font></div><div class=""><font face="Menlo" size="1" class=""> return(y)</font></div><div class=""><font face="Menlo" size="1" class="">end</font></div></div><div class=""><font face="Menlo" size="1" class=""><br class=""></font></div><div class=""><font face="Menlo" size="1" class=""><div class=""> lat2d = create_lat2d(lat,lon) </div><div class=""> lon2d = create_lon2d(lat,lon)</div></font></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 30. Aug 2017, at 10:29, Dinuka Silva <<a href="mailto:dinu.kera@gmail.com" class="">dinu.kera@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><font face="Times New Roman" size="3" class=""><br class=""></font></div><div class=""><font face="Times New Roman" size="3" class=""><div class="">printVarSummary(x) is as follows.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">Variable: x</div><div class="">Type: float</div><div class="">Total Size: 454377600 bytes</div><div class=""> 113594400 values</div><div class="">Number of Dimensions: 3</div><div class="">Dimensions and sizes: [time | 1753] x [latitude | 180] x [longitude | 360]</div><div class="">Coordinates: </div><div class=""> time: [15.49999..53340.5]</div><div class=""> latitude: [89.5..-89.5]</div><div class=""> longitude: [-179.5..179.5]</div><div class="">Number Of Attributes: 8</div><div class=""> lon2d : <ARRAY of 360 elements></div><div class=""> lat2d : <ARRAY of 180 elements></div><div class=""> _FillValue : -1e+30</div><div class=""> standard_name : sea_surface_temperature</div><div class=""> long_name : sst</div><div class=""> units : C</div><div class=""> cell_methods : time: lat: lon: mean</div><div class=""> missing_value : -1e+30</div><div class="">fatal:And: Dimension size, for dimension number 0, of operands does not match, can't continue</div></div><div class=""><br class=""></div></font><div class=""><span style="font-family: 'Times New Roman'; font-size: inherit;" class="">It looks like "latitude" and "longitude" are 1D arrays . How can I make them to be 2D arrays. </span><span style="font-family: 'Times New Roman'; font-size: inherit;" class=""><br class=""></span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: inherit;" class=""><br class=""></span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: inherit;" class="">Dinuka.</span></div><div class=""><span style="font-family: 'Times New Roman'; font-size: inherit;" class=""> </span><br class=""></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Aug 30, 2017 at 4:04 PM, Guido Cioni <span dir="ltr" class=""><<a href="mailto:guidocioni@gmail.com" target="_blank" class="">guidocioni@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dinuka, <div class="">don’t start new topic if the problem is always the same. People will get confused when they search for answers. </div><div class=""><br class=""></div><div class="">Did you check that your latitude and longitude are 2-D arrays? </div><div class="">The error is exactly telling you where the problem is.</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">Il giorno 30 ago 2017, alle ore 07:30, Dinuka Silva <<a href="mailto:dinu.kera@gmail.com" target="_blank" class="">dinu.kera@gmail.com</a>> ha scritto:</div><br class="m_-2090860911938063932Apple-interchange-newline"></div></div><div class=""><div class=""><div class="h5"><div dir="ltr" class=""><div dir="ltr" class=""><span style="font-size:12.8px" class="">Hi all,</span><br class=""><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">I want to remove SST data of one box ({03N - 12N}, {90E- 140E}) and then find the correlation between remaining SST data and rainfall index. I want to know how can I remove the SST data of that box. SST data has 3 dimensions. I used mask function but I got error message. </span></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><div class=""><span style="font-size:12.8px" class="">x = fin2->sst(:,:,:)</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""> x@lat2d = fin2->latitude</span></div><div class=""><span style="font-size:12.8px" class=""> x@lon2d = fin2->longitude</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""> latMin = 03</span></div><div class=""><span style="font-size:12.8px" class=""> latMax = 12</span></div><div class=""><span style="font-size:12.8px" class=""> lonMin = 90</span></div><div class=""><span style="font-size:12.8px" class=""> lonMax = 140</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""> x = mask (x, conform(x, (<a href="mailto:x@lat2d.ge.latMin" target="_blank" class="">x@lat2d.ge.latMin</a> .<a href="mailto:and.x@lat2d.le.latMax" target="_blank" class="">and.x@lat2d.le.latMax</a> .<a href="mailto:and.x@lon2d.ge.lonMin" target="_blank" class="">and.x@lon2d.ge.lonMin</a> .<a href="mailto:and.x@lon2d.le.lonMax" target="_blank" class="">and.x@lon2d.le.lonMax</a>), (/1,2/)), True)</span></div><div class=""><span style="font-size:12.8px" class="">printVarSummary(x)</span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div class=""><span style="font-size:inherit;font-family:'Times New Roman'" class="">The error message : </span><font face="Times New Roman" size="3" class="">Dimension size, for dimension number 0, of operands does not match, can't continue</font><br class=""></div></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class=""><br class=""></span></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">Thanks for your help.</span></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class="">Dinuka</span><br class=""></div><div style="font-size:12.8px" class=""><span style="font-size:12.8px" class=""><br class=""></span></div></div></div><div id="m_-2090860911938063932DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" class=""><br class="">
<table style="border-top:1px solid #d3d4de" class="">
<tbody class=""><tr class="">
<td style="width:55px;padding-top:13px" class=""><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon" target="_blank" class=""><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width:46px;height:29px" class=""></a></td>
<td style="width:470px;padding-top:12px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px" class="">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link" style="color:#4453ea" target="_blank" class="">www.avast.com</a>
</td>
</tr>
</tbody></table><a width="1" height="1" class=""></a></div></div></div>
______________________________<wbr class="">_________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" target="_blank" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">Guido Cioni</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><a href="http://guidocioni.altervista" class="">http://guidocioni.altervista</a>.org</div>
</div>
<br class=""></div></body></html>