<div dir="ltr"><div><div><div>If you are new to NCL, please read the Mini-Language Manual<br> <a href="http://www.ncl.ucar.edu/Document/Manuals/">http://www.ncl.ucar.edu/Document/Manuals/</a><br><br>===<br><br></div>[1] This is not NCL syntax. Again read the manual, please<br> rain_exp(it, nlat, nlon)==>rain_exp_xgrd<br> rain_con(it, nlat, nlon)==>rain_con_xgrd<br><br></div>[2] Further, on all the WRF files we know of there are no variables named 'xlat or 'xlon'.<br></div> Rather ....<br><div><br> float XLAT(Time, south_north, west_east) ;<br> XLAT:FieldType = 104 ;<br> XLAT:MemoryOrder = "XY " ;<br> XLAT:description = "LATITUDE, SOUTH IS NEGATIVE" ;<br> XLAT:units = "degree_north" ;<br> XLAT:stagger = "" ;<br><br> float XLONG(Time, south_north, west_east) ;<br> XLONG:FieldType = 104 ;<br> XLONG:MemoryOrder = "XY " ;<br> XLONG:description = "LONGITUDE, WEST IS NEGATIVE" ;<br> XLONG:units = "degree_east" ;<br> XLONG:stagger = "" ;<br><br></div><div>[3] Also, XLAT and XLONG are *three* dimensional.<br><br> lat2d=a->XLAT(0,:,:)<br>
lon2d=a->XLONG(0,:,:)<br><br></div><div>[4] Why are you doung this? lon=fspan(0,nlon,1)<br></div><div> Try print(lon)<br></div><div> You are gettind 1,2,3,,,,63,64 for longitudes.<br></div><div> Maybe you want<br><br> lon = <strong>lonGlobeF</strong>(mlon, "lon", "longitude", "degrees_east")<br><br></div><div>Please use 'print or 'printVarSummary' often<br></div><div><pre><br><br><br></pre><br>'<br>
</div><div><br><div> <br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 12:55 AM, 易路 <span dir="ltr"><<a href="mailto:dg1225033@smail.nju.edu.cn" target="_blank">dg1225033@smail.nju.edu.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I try to use rcm2grid to interpolates WRF output data on a curvilinear grid to a rectilinear grid. But the teminal showed erros as follows:<br>
<br>
fatal:syntax error: line 80 in file 2gridPrecipitation.ncl before or near =>rain_exp_xgrd<br>
rain_exp(it, nlat, nlon)==>rain_exp_xgrd<br>
-----------------------------------------------^<br>
<br>
fatal:syntax error: line 81 in file 2gridPrecipitation.ncl before or near =>rain_con_xgrd<br>
rain_con(it, nlat, nlon)==>rain_con_xgrd<br>
-----------------------------------------------^<br>
<br>
fatal:Syntax Error in block, block not executed<br>
fatal:error at line 177 in file 2gridPrecipitation.ncl<br>
<br>
And my parts of scripts are as follows, would you please help me check it?<br>
<br>
rain_exp = wrf_user_getvar(a,"RAINNC",it)<br>
rain_con = wrf_user_getvar(a,"RAINC",it)<br>
<br>
<br>
; rcm2rgrid **********************************************<br>
nlat=48<br>
nlon=64<br>
lat=latGau(nlat,"lat","latitude", "degrees_north")<br>
lon=fspan(0,nlon,1)<br>
lat2d=a->xlat<br>
lon2d=a->xlon<br>
<br>
rain_exp_xgrd =rcm2rgrid(lat2d,lon2d,rain_exp,lat,lon,0)<br>
;rain_con_xgrd =rcm2rgrid(lat2d,lon2d,rain_con,lat,lon,0)<br>
<br>
rain_exp(it, nlat, nlon)==>rain_exp_xgrd(it,64,128)<br>
;rain_con(it, nlat, nlon)==>rain_con_xgrd(it,64,128)<br>
; rain_tot = rain_exp + rain_con<br>
;*******************************************************************<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>