<div dir="ltr"><div><br></div>Dear Mam/Sir <div><br></div><div>NCL 6.3.0</div><div>OS Ubuntu</div><div><br></div><div>I am trying to regard WRF precipitation data from curvilinear grid to rectilinear grid ignorer to take its difference from TRMM data. i am using the code :</div><div><br></div><div><div>a = addfile (&quot;/Users/saurabh/Downloads/wrfout_d01_2000-01-24_12:00:<a href="http://00.nc">00.nc</a>&quot;,&quot;r&quot;) </div><div>Rain = a-&gt;RAINC </div><div>rainfall = a-&gt;RAINC </div><div>printVarSummary(rainfall) ; look at the variable </div><div>printMinMax(rainfall, True ) ; contributed.ncl </div><div>rainfall!0 = &quot;time&quot; </div><div>rainfall!1 = &quot;lat&quot; </div><div>rainfall!2 = &quot;lon&quot; </div><div>printVarSummary(rainfall) </div><div>rearrange_rain = rainfall(time|:,lon|:,lat|:) </div><div>; reorder coordinates for next step </div><div>; Average all lats as a function of lon for Time vs. Longitude plot </div><div>;(Hovmueller diagram) </div><div>rain=dim_avg(rearrange_rain) ; avg rightmost dimension with center dimension </div><div>copy_VarMeta(rearrange_rain, rain) </div><div>printVarSummary(rain) </div><div>printMinMax(rain) </div><div>;WRF XLAT/XLONG are (Time,south_north,west_east) </div><div>;Generally, they do not change with time. </div><div>;Hence, read then as 2D arrays </div><div>                          ; These are [*][*] (two dimensional) </div><div> lat2d = a-&gt;XLAT(0,:,:) </div><div> lon2d = a-&gt;XLONG(0,:,:) </div><div> lat2d_at_units = &quot;degrees_north&quot; ; not required for interpolation </div><div> lon2d_at_units = &quot;degrees_east&quot; </div><div> printVarSummary(lat2d) </div><div> printVarSummary(lon2d) </div><div>;Your &#39;target&#39; (rectilinear) grid is lat[*],lon[*]. </div><div>;This could be from some other model </div><div>;or you could manually create via </div><div> latS = 5 ; regular grid output </div><div> latN = 11 </div><div> lonL = -30 </div><div> lonR = -20 </div><div> mlon = 22 ; however many points you want, here 22 </div><div> ;because 0.5 degree </div><div> lon = fspan (lonL, lonR, mlon) </div><div> lon!0= &quot;lon&quot; </div><div> lon_at_units = &quot;degrees_east&quot; </div><div> print(mlon) </div><div> nlat = 14 ; however many points you want </div><div> lat = fspan (latS,latN, nlat) </div><div> lat!0= &quot;lat&quot; </div><div> lat_at_units = &quot;degrees_north&quot; </div><div> print(nlat) </div><div>raingrd = rcm2rgrid(lat2d,lon2d,rain,lat,lon,0) </div><div>printVarSummary(ringed) </div></div><div><br></div><div>but the regrinding does not happen, i get the following error:</div><div><br></div><div><br></div><div><br></div><div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255)"><span style="">fatal:rcm2rgrid: The rightmost dimensions of fi must be nlat2d x nlon2d, where nlat2d and nlon2d are the dimensions of the lat2d/lon2d arrays</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255)"><span style="">fatal:[&quot;Execute.c&quot;:8575]:Execute: Error occurred at or near line 46 in file regrid.ncl</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255);min-height:13px"><span style=""></span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255)"><span style="">fatal:Variable (raingrd) is undefined</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255)"><span style="">fatal:[&quot;Execute.c&quot;:8575]:Execute: Error occurred at or near line 47 in file regrid.ncl</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255)"><span style=""><br></span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:Menlo;background-color:rgb(246,253,255)"><span style="">Kindly help me to solve this problem.</span></p></div>-- <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></div>