<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><style type="text/css">.felamimail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style></head><body>Dear NCL community,<br>Greetings!<br><br>I am trying to plot seasonal (DJF) Taylor diagrams and have errors in interpolation my datasets on same grid.<br>(a) read 2 data sets with different resolutions and regrid
(modelled and obs temperature for a test)<br>(b) calculate a pattern correlation
<br><br>My script is attached below ::<br><br>;=============================<div><wbr>==============================<wbr>=======<br>;Taylor diagram calculations<br>;=============================<wbr>=== interpolation onto common grid (of observational data)<br>;ncl pattern_cor between different size arrays<br> t2mw = f->t2mw(0,0,:,{0:360}); remove cyclic point<br> lon = f->lon({0:360})<br>;*****************************<wbr>*******************<br>; interpolate to new grid<br>;*****************************<wbr>******************<br> newlat = fspan(-60.,60,24)<br> newlon = fspan(0.,355.,72)<br><br> newt2mw = linint2_Wrap(lon,t2mw&lat,<wbr>t2mw,True,newlon,newlat,0)</div><br> newt2mw!0 ="lat"<br> newt2mw!1 = "lon"<br> newt2mw&lat = newlat<br> newt2mw&lon = newlon<br>;=============================<div><wbr>==============================<wbr>===========centered Pattern correlation (coslat weighting has been done previously above)<br>re=escorc(airw,newt2mw)<br> ;cor1 = dim_avg_n_Wrap(pattern_cor( t2mw, airw, clat, 0), 0);rc = pattern_cor(x, y,gw, 0) ; gaussian weighting, centered<br> mmd= (/cor1/)<br> printVarSummary(mmd)<br>;=============================<wbr>===Standard deviation ;=============================<wbr>===<br><br>;pre0_Std = dim_avg_n_Wrap( dim_stddev_n_Wrap( t2mw, (/1,2/)), 0)<br> ;std1 = dim_rmsd_Wrap(airw,t2mw, 0);computes rootmean square difference<br>;std1 = dim_rmsd_n(t2mw, airw, 0);<br> std1 = dim_rmsd( t2mw(lat|:,lon|:,time|:), airw(lat|:,lon|:,time|:) ) ; ==> rmsdTime(nlat,nlon)<br><br> ;rmsdTime = dim_rmsd_n( x, y, 0 ) <wbr> ; ==> no reordering needed<br>==============================<wbr>==============================<wbr>====<br></div>I had a look at other interpolation functions for correlations between different grids such a s:<br>
<p>
Assume <em>fi</em> is a 4D array dimensioned <em>ntim</em> x
<em>nlvl</em> x <em>nlat</em> x <em>mlon</em> (<em>ntim</em>=50,
<em>nlvl</em>=30, <em>nlat</em>=64, <em>mlon</em>=128), and that
the
rightmost dimension is to be treated as cyclic (the user should
not
add a cyclic point for the rightmost dimension).</p>
<p>
All times and levels will be interpolated and returned in a new
array
<em>fo</em> dimensioned <em>ntim</em> x <em>nlvl</em> x <em>73</em>
x
<em>144</em>:
</p>
<pre> lon = (0., 2.8125, .... , 357,0125)
lat = (-87.8638, ... ,87.8638)
LON = (0., 2.5, ... , 357.5) ; length 144
LAT = (-90.,87.5,...90.) ; length 73
fo = <strong>linint2_Wrap</strong> (lon,lat,fi, True, LON,LAT, 0)
</pre>Error: <br><br clear="all">Deeply appreciated<br></body></html>