<div dir="ltr">Please always carefully read the documentation for the functions you are using. That is your responsibility.<br><br>===<br><br>Did you look at the dimensions sizes and variable rank of the variables?<i> </i>The lat & lon variables on the *reanalysis* are<i><br></i><div><i><br></i>float lat ( lat )<br></div><div>float lon( lon )<i><br><br></i></div><div>Both of these are **one-dimensional**<i>.</i> In function/procedure prototyping, the syntax used to denote one-dimensional variables is [*].<br><br>---<br><br></div><div>Please look at the function prototyping for rcm2rgrid as described in the documentation: <br><br><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/rcm2rgrid.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/rcm2rgrid.shtml</a><br><br></div><div>Specifically ... <br></div><div><pre>function rcm2rgrid (
                lat2d [*][*] : numeric,
                lon2d [*][*] : numeric,
                fi : numeric,
                lat [*] : numeric,
                lon [*] : numeric,
                Option : numeric
        )<br><br><br>lat2d/lon2d are prototyped as **two-dimensional**<br><br>In procedure prototyping, the syntax used to denote <br>two-dimensional variables is [*][*] ==> two-dimensional <br></pre><pre>You do the following:<br></pre> lat2d=a->lat ; one dimensional [*] which you put in a variable named lat2d<br> lon2d=a->lon ; I am not sure why you used this confusing naming.<br><br></div><div> <br></div><div> rtrmm = rcm2rgrid_Wrap(lat2d,lon2d,u11,lat,lon,0)<span><div><br></div><div>Then you write ...<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<br>===<br><br></u></div><div>It is telling you exactly what the error is.<br><br></div><div>Function parameter numbering starts at the left an begins with argument 0.<u><br><br></u></div><div><u>So</u> parameter 0 i requires 2-dimensional arguments BUT you are passing in lat (which has the confusing name 'lat2d') which is [*]<br><span><u><br></u></span></div><div><span>Now reread the error message. Does this make sense to you??<br><br></span></div><div><span>I don't even think you need ESMF regrid unless you need conservative regridding.<br><br>===<br></span><br> a = addfile("/home/cee2/SV10.nc","r")<br><div> u11= a->uwnd(:,0,:,:) ; (level,lat,lon)<br><br>; Global TRMM grid .... Change for the Reanalysis region <br><span class="im"> 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><span class="im"><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 class="im">; regrid (bilinear)<br> wks = gsn_open_wks("png","resize") <br></span> rtrmm = linint2_Wrap(u&lat,u&lon,u11,lat,lon,0)<br></div><div> printVarSummary(rtrmm)<br><br>====<br></div><div>I *expect* you to read the documentation for linint2 (linint2_Wrap)<br><br><br></div><br><br></div></div></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><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 class=""> 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 class=""><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 class="">; regrid (bilinear)<br> wks = gsn_open_wks("png","resize") <br></span> rtrmm = rcm2rgrid_Wrap(lat2d,lon2d,u11,lat,lon,0)</div><span class=""><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 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>
</span></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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>