<div dir="ltr"><div>[1]<font color="#000000" face="Calibri"><span><br></span></font></div><div><font color="#000000" face="Calibri"><span>I would say it is highly unlikely that "</span></font><font color="#000000" face="Calibri"><span><font color="#000000" face="Calibri"><span>NCL is not correctly plotting the data</span></font>"!<br>
</span></font></div><div><font color="#000000" face="Calibri"><span>NCL is plotting what you sent it. <br><br>[2]<br></span></font></div><font><font face="Calibri">Did you examine the output from<br><br></font></font><div>
<div><font color="#000000" face="Calibri"><span>printVarSummary(var)<br></span></font></div><div><font color="#000000" face="Calibri"><span><br></span></font></div><div>[snip]<br><br><font color="#000000" face="Calibri"><div>
<span style="font-size:21px"><font>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[TIME | 360] x [lat | 149] x [lon | 182]</font></span></div><div><font><span>Coordinates: </span></font></div><div><font><span> TIME: [76.5..3636.5]</span></font></div>
<div><font><span> lat: [1..149] <================<br></span></font></div><div><font><span> lon: [1..182] <====================<br></span></font></div></font><br>
</div><div>The coordinates associated with 'var' are numbers spanning 1-149 and 1-182<br></div><div>These are *not* latitudes or longitudes. So, when you use<br><br><font color="#000000" face="Calibri"><span>new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)</span></font><br>
</div><div>You could do you own 'debugging by printing the input<br><br></div><div><font>print(</font><font color="#000000" face="Calibri"><span>var&lon)<br></span></font></div><div><font color="#000000" face="Calibri"><span>print(var&lat)<br>
<br></span></font></div><div><font color="#000000" face="Calibri"><span>Punch line ... you are inputting number 1 to 149 and 1 to 182<br></span></font></div><div><font color="#000000" face="Calibri"><span>NCL is interpolating to those values.<br>
<br></span></font></div><div><font color="#000000" face="Calibri"><span>Use <br><br></span></font></div><div><font color="#000000" face="Calibri"><span>ncl_filedump<br><br></span></font></div><div><font color="#000000" face="Calibri"><span>or<br>
<br></span></font></div><div><font color="#000000" face="Calibri"><span>ncdump -h<br><br></span></font></div><div><font color="#000000" face="Calibri"><span>on your source file. That should have some lat.lon info<br></span></font></div>
<div><font color="#000000" face="Calibri"><span><br><br></span></font></div><div><font color="#000000" face="Calibri"><span><br></span></font></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 21, 2014 at 2:12 PM, Vanúcia Schumacher <span dir="ltr"><<a href="mailto:vanucia-schumacher@hotmail.com" target="_blank">vanucia-schumacher@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr"><font style="font-size:16pt" color="#000000" face="Calibri" size="4">Hi users,</font><div><font style="font-size:16pt" color="#000000" face="Calibri" size="4"><br></font></div><div><font color="#000000" face="Calibri"><span style="font-size:21px">I do regridding data for resolution of 2 degrees and the NCL is not correctly plotting the data, it is cutting the data to the new resolution as opposed to a new lat and lon.</span></font></div>
<div><font color="#000000" face="Calibri"><span style="font-size:21px"><br></span></font></div><div><font color="#000000" face="Calibri"><div><span style="font-size:21px">>begin</span></div><div><span style="font-size:21px"> </span></div>
<div><span style="font-size:21px">>var = f[:]->SST</span></div><div><span style="font-size:21px"><br></span></div><div><span style="font-size:21px">>var!1="lat"</span></div><div><span style="font-size:21px">>var!2="lon"</span></div>
<div><span style="font-size:21px">>j=var!1</span></div><div><span style="font-size:21px">>i=var!2 </span></div><div><span style="font-size:21px"><br></span></div><div><span style="font-size:21px">newfile = "<a href="http://tos_90x180.nc" target="_blank">tos_90x180.nc</a>"</span></div>
<div><br></div><div><span style="font-size:21px">file_create = addfile(newfile, "c") </span></div><div><span style="font-size:21px"><br></span></div><div><span style="font-size:21px">new_lon = fspan(0,358, 180) </span></div>
<div><span style="font-size:21px">new_lon@units = "degrees_east"</span></div><div><span style="font-size:21px">new_lon!0 = "lon" </span></div><div><span style="font-size:21px"><br></span></div><div><span style="font-size:21px">new_lat = fspan(-87.86, 87.86, 90)</span></div>
<div><span style="font-size:21px">new_lat@units = "degrees_north"</span></div><div><span style="font-size:21px">new_lat!0 = "lat" </span></div><div><span style="font-size:21px"><br></span></div>
<div><span style="font-size:21px">new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)</span></div><div><br></div><div><span style="font-size:21px">file_create->tos = new_var</span></div><div style="font-size:21px">
<br></div></font></div><div><font color="#000000" face="Calibri"><span style="font-size:21px"><br></span></font></div><div><font color="#000000" face="Calibri"><div><span style="font-size:21px">Variable: var</span></div><div>
<span style="font-size:21px">Type: double</span></div><div><span style="font-size:21px">Total Size: 78099840 bytes</span></div><div><span style="font-size:21px"> 9762480 values</span></div><div><span style="font-size:21px">Number of Dimensions: 3</span></div>
<div><span style="font-size:21px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[TIME | 360] x [lat | 149] x [lon | 182]</span></div><div><span style="font-size:21px">Coordinates: </span></div><div><span style="font-size:21px"> TIME: [76.5..3636.5]</span></div>
<div><span style="font-size:21px"> lat: [1..149]</span></div><div><span style="font-size:21px"> lon: [1..182]</span></div><div><span style="font-size:21px">Number Of Attributes: 4</span></div><div><span style="font-size:21px"> missing_value :<span style="white-space:pre-wrap">        </span>-9.999999999999999e+33</span></div>
<div><span style="font-size:21px"> _FillValue :<span style="white-space:pre-wrap">        </span>-9.999999999999999e+33</span></div><div><span style="font-size:21px"> long_name :<span style="white-space:pre-wrap">        </span>TOS[L=3:122]</span></div>
<div><span style="font-size:21px"> history :<span style="white-space:pre-wrap">        </span>From tos_Omon_CMCC-CM_decadal1980_r1i1p1_198011-199012</span></div><div><span style="font-size:21px"><br></span></div><div><span style="font-size:21px">Variable: new_var</span></div>
<div><span style="font-size:21px">Type: double</span></div><div><span style="font-size:21px">Total Size: 46656000 bytes</span></div><div><span style="font-size:21px"> 5832000 values</span></div><div><span style="font-size:21px">Number of Dimensions: 3</span></div>
<div><span style="font-size:21px">Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[TIME | 360] x [lat | 90] x [lon | 180]</span></div><div><span style="font-size:21px">Coordinates: </span></div><div><span style="font-size:21px"> TIME: [76.5..3636.5]</span></div>
<div><span style="font-size:21px"> lat: [-87.86..87.86]</span></div><div><span style="font-size:21px"> lon: [ 0..358]</span></div><div><span style="font-size:21px">Number Of Attributes: 4</span></div>
<div><span style="font-size:21px"> missing_value :<span style="white-space:pre-wrap">        </span>-9.999999999999999e+33</span></div><div><span style="font-size:21px"> _FillValue :<span style="white-space:pre-wrap">        </span>-9.999999999999999e+33</span></div>
<div><span style="font-size:21px"> long_name :<span style="white-space:pre-wrap">        </span>TOS[L=3:122]</span></div><div><span style="font-size:21px"> history :<span style="white-space:pre-wrap">        </span>From tos_Omon_CMCC-CM_decadal1980_r1i1p1_198011-199012</span></div>
<div style="font-size:21px"><br></div></font><br><br><div><font face="Comic Sans MS"><span style="line-height:17px">---</span></font></div><span style="line-height:17px;background-color:rgb(255,255,255)"><font style="font-size:12pt" face="Comic Sans MS" size="3"><font>Vanúcia Schumacher</font></font></span><div>
<span style="line-height:17px;background-color:rgb(255,255,255)"><font face="Comic Sans MS">Mestranda em Meteorologia - UFV<font style="font-size:12pt" size="3"><font><br style="line-height:17px">Meteorologista -UFPel</font><br>
</font></font></span></div><div><span style="line-height:17px;background-color:rgb(255,255,255)"><font face="Comic Sans MS"><font style="font-size:12pt" size="3"><font>Departamento de Meteorologia Agrícola - DEA</font></font></font></span></div>
<div><span style="line-height:17px;background-color:rgb(255,255,255)"><font style="font-size:12pt" face="Comic Sans MS" size="3"><font>Cel: (31) 9978 2522 </font></font></span></div><div><span style="line-height:17px;background-color:rgb(255,255,255)"><font style="font-size:12pt" face="Comic Sans MS" size="3"><font>DEA: (31) 3899 1890</font></font></span></div>
</div>                                            </div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>