<div dir="ltr"><div>Many thanks Mary. <br><br></div>Deba<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 14, 2016 at 5:23 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></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">If you do a difference plot between two variables that have differently ordered latitudes, this will definitely be an issue unless you reverse the latitudes of one of the dimensions. NCL doesn't look at coordinate arrays when you simply subtract two arrays. Also, when you think about what this means for the coordinates of the differenced array, then you really have problems.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">See the attached script which illustrates this.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You need to make sure you reverse the latitude dimension (assuming xarray1 is the one with the reversed latitudes):</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"> xdiff = xarray1(::-1,:) - xarray2</div><div class="gmail_default" style="font-size:small"> copy_VarMeta(xarray2,xdiff) ; </div><span class="HOEnZb"><font color="#888888"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div></font></span><div><div class="h5"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 13, 2016 at 2:53 PM, Debasish Hazra <span dir="ltr"><<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>></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>Hi,<br><br></div>I have attached the code I used to calculate difference between two models at a single time step. Model 1 (grib2 file) dimension is [lat | 181] x [lon | 360] and
coordinates are lat_0: [90..-90], lon_0: [ 0..359]. _FillValue :
1e+20<span><div> </div><div>second one (netcdf) dimension [lat | 180] x
[lon | 360] and coordinates are lat: [-89.5..89.5] , lon:
[-179.5..179.5]. _FillValue : -9999<br><br></div></span><div> I regrid the 2nd to the first one co-ordinate and make a difference plot over different regions. <br><br></div><div>Q1. If the 1st model latitude is [90..-90] and regrided 2nd model latitude coordinates are latitude is [-90..90], does it have any impact on the difference plot ? <br><br></div><div>I have attached the code, model 1 output. I ftp the second model output (icap_<a href="tel:2015091500" value="+12015091500" target="_blank">2015091500</a>_MME_modeaod550.nc) as that is of larger size.<br><br></div><div>Thanks.<span><font color="#888888"><br></font></span></div><span><font color="#888888"><div>Debasish<br></div><div><br></div></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Apr 12, 2016 at 1:57 PM, Mary Haley <span dir="ltr"><<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>></span> wrote:<br></span><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-size:small">Debasish,</div><div style="font-size:small"><br></div><div style="font-size:small">Without seeing your code, we have no way of helping you debug it.</div><div style="font-size:small"><br></div><div style="font-size:small">I recommend using print statements to verify that your data after interpolation is correct. If your interpolated data array is called (data_interp):</div><div style="font-size:small"><br></div><div>printVarSummary(data_interp)</div><div style="font-size:small">printMinMax(data_interp,0)<br>print(num(ismissing(data_interp))) ; count the number of missing values<br><br>If you continue to have problems, it would help if we could see a plot or some code.</div><div style="font-size:small"><br></div><div style="font-size:small">--Mary</div><div style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Mon, Apr 11, 2016 at 6:57 AM, Debasish Hazra <span dir="ltr"><<a href="mailto:debasish.hazra5@gmail.com" target="_blank">debasish.hazra5@gmail.com</a>></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><div dir="ltr">Hi,<div><br></div><div> I am using NCL (v6.3) to make a difference plot between two model outputs. First one (grib2 file) dimension is [lat | 181] x [lon | 360] and coordinates are lat_0: [90..-90], lon_0: [ 0..359]. _FillValue : 1e+20</div><div> </div><div>second one (netcdf) dimension [lat | 180] x [lon | 360] and coordinates are lat: [-89.5..89.5] , lon: [-179.5..179.5]. _FillValue : -9999</div><div><br></div><div>To make both of them equal dimension before doing differences, I used "<font color="#000000"><span style="white-space:pre-wrap">linint2" function to interpolate 2nd one to the dimension of first. However, after doing simple difference plot between the interpolated one and the first output, I am getting all constant value and map plot remains empty. Individual plot of these 2 dataset show lot of differences. Is it because I did not assign fillvalue after interpolation , or something else ? Any suggestions.</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">Thanks</span></font><span><font color="#888888"><br></font></span></div><span><font color="#888888"><div><font color="#000000"><span style="white-space:pre-wrap">Debasish</span></font></div></font></span></div>
<br></div></div>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div></div></div><br></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>