<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 ("/Users/saurabh/Downloads/wrfout_d01_2000-01-24_12:00:<a href="http://00.nc">00.nc</a>","r") </div><div>Rain = a->RAINC </div><div>rainfall = a->RAINC </div><div>printVarSummary(rainfall) ; look at the variable </div><div>printMinMax(rainfall, True ) ; contributed.ncl </div><div>rainfall!0 = "time" </div><div>rainfall!1 = "lat" </div><div>rainfall!2 = "lon" </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->XLAT(0,:,:) </div><div> lon2d = a->XLONG(0,:,:) </div><div> lat2d_at_units = "degrees_north" ; not required for interpolation </div><div> lon2d_at_units = "degrees_east" </div><div> printVarSummary(lat2d) </div><div> printVarSummary(lon2d) </div><div>;Your 'target' (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= "lon" </div><div> lon_at_units = "degrees_east" </div><div> print(mlon) </div><div> nlat = 14 ; however many points you want </div><div> lat = fspan (latS,latN, nlat) </div><div> lat!0= "lat" </div><div> lat_at_units = "degrees_north" </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:["Execute.c":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:["Execute.c":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>