<div dir="ltr"><div>Dear mam the code gives following error </div><div><br></div><div>ncl 43> rtrmm = rcm2rgrid_Wrap(u11,opt)<br>fatal:syntax error: function rcm2rgrid_Wrap expects 6 arguments, got 2<br>fatal:error at line 43<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 3:42 AM, 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">The error is telling you exactly what the problem is. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">This function rcm2rgrid expects the first two arguments to be 2D lat/lon arrays, because this routine is regridding from a curvilinear grid to a rectilinear grid. Curvilinear grids are represented by 2D lat/lon arrays. You are giving it 1D lat/lon arrays, which represent a rectilinear grid.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You may want to use ESMF_regrid:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">UNTESTED:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt = True</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt@SrcGridLat = lat2d ; this variable should be renamed since it's not 2D</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt@SrcGridLon = lon2d ; ditto</font></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace"> opt@SrcRegional = False ; set to False if your source grid is regional</font></div><div><font face="monospace, monospace"><br></font></div></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt@DstGridLat = lat</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt@DstGridLon = lon</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt@DstRegional = False ; ditto<br></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> opt@SrcMask@d = where(.not.ismissing(var),1,0) ; only necessary if u11 contains missing values</font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> rtrmm = rcm2rgrid_Wrap(u11,opt)</font></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Apr 27, 2016 at 12:30 PM, Saurabh Singh <span dir="ltr"><<a href="mailto:saurabhsingh123op@gmail.com" target="_blank">saurabhsingh123op@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 class="h5"><div dir="ltr"><div><div><div>Dear sir I am trying to interpolate Reanalysis-II data to TRMM data in order to find correlation; </div><div><br></div><div>NCL Version 6.3.0</div><div>OS: UBUNTU 15.10</div><div><br></div><div>ncl_filedum <a href="http://uwnd.nc/" target="_blank">uwnd.nc</a></div><div><br></div><div><i>float lat ( lat )<br> units : degrees_north<br> actual_range : ( 14.2855, -14.2855 )<br> long_name : Latitude<br> standard_name : latitude<br> axis : Y<br> coordinate_defines : point</i></div><div><i><br></i></div><div><i> float lon ( lon )<br> units : degrees_east<br> long_name : Longitude<br> actual_range : ( 90, 123.75 )<br> standard_name : longitude<br> axis : X<br> coordinate_defines : point</i></div><div><i><br></i></div><div><i> double time ( time )<br> units : hours since 1800-1-1 00:00:0.0<br> long_name : Time<br> actual_range : ( 1753152, 1823256 )<br> delta_t : 0000-00-01 00:00:00<br> standard_name : time</i><br></div><div><br></div><div><br></div><div>Thereafter I use the following code :</div><div><br></div><div> a=addfile("/home/cee2/SV10.nc","r")</div><div><br></div><div>y=a->lat<br> u10=a<-uwnd<br> u11=u10(:,0,:,:)<br></div></div></div><div>lat2d=a->lat<br> lon2d=a->lon<br> <br> ; Global TRMM grid .... Change for the Reanalysis region <br><span> nlat = 400<br> mlon = 1440<br> lat = ispan(0,nlat-1,1)*0.25 - 49.875<br> lon = ispan(0,mlon-1,1)*0.25 - 179.875</span></div><span><div><br></div><div><br clear="all">lat!0 = "lat"<br> lat@units = "degrees_north"</div><div><br></div><div>; lon = fspan(-179.875, 179.875, nlon-1)<br> lon!0 = "lon"<br> lon@units = "degrees_east"</div><div><br></div></span><div><span>; regrid (bilinear)<br> wks = gsn_open_wks("png","resize") <br></span> rtrmm = rcm2rgrid_Wrap(lat2d,lon2d,u11,lat,lon,0)</div><span><div><br></div><div><b>However I get the following error :</b></div><div><br><u>fatal:Number of dimensions in parameter (0) of (rcm2rgrid_Wrap) is (1), (2) dimensions were expected<br>fatal:["Execute.c":8573]:Execute: Error occurred at or near line 24</u><br clear="all"><br>-- <br></div><div><div dir="ltr"><font size="2" style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif"><span>With regards</span><span></span></font><font size="2" style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span><br></span></span></font><font size="2" style="font-family:arial,helvetica,sans-serif"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span>
</span></font><br style="color:rgb(51,204,0)"><br><font size="1" style="color:rgb(102,102,102)"> <b><i><span lang="EN-GB" style="font-family:Webdings">P</span></i></b><b><i><span lang="EN-GB" style="font-family:Tahoma,sans-serif"> : </span></i></b><b><i><span lang="EN-GB" style="font-family:Arial,sans-serif"> </span></i></b><b><i><span lang="EN-GB" style="font-family:Tahoma,sans-serif">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)"><br><br><br></div></div>
</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" target="_blank" rel="noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><font style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif" size="2"><span>With regards</span><span></span></font><font style="font-family:arial,helvetica,sans-serif" size="2"><span style="color:rgb(0,0,0)"><span><br></span></span></font><font style="font-family:arial,helvetica,sans-serif" size="2"><span style="color:rgb(0,0,0)"><span>Saurabh Kumar singh</span><span></span>
</span></font><br style="color:rgb(51,204,0)"><br><font style="color:rgb(102,102,102)" size="1"> <b><i><span style="font-family:Webdings" lang="EN-GB">P</span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB"> : </span></i></b><b><i><span style="font-family:Arial,sans-serif" lang="EN-GB"> </span></i></b><b><i><span style="font-family:Tahoma,sans-serif" lang="EN-GB">Please consider the environment before printing this e-mail</span></i></b> </font><br style="color:rgb(102,102,102)"><br><br><br></div></div>
</div>