<div dir="ltr"><div dir="ltr">Dear Dennis and all <div><br></div><div>I have rewritten the code (please see attached) to obtain the value of TA_MEAN at respective station heights. I am assuming it is correct since I am subtracting the terrain height. Please let me know if you think that the logic is incorrect. </div><div>The issue is that the RMSE of WRF extracted values against observations increased on all stations. I was expecting that when the temperature is interpolated at the correct height it will reduce the RMSE instead of increasing it. When I am extracting the value of temperature at the first eta level the RMSE was less. Any help would be greatly appreciated. </div><div><br></div><div>I asked a similar question but nobody answered the following question. I think this is extremely important when doing data analysis using NCL </div><div><a href="https://mailman.ucar.edu/pipermail/ncl-talk/2021-March/017963.html">https://mailman.ucar.edu/pipermail/ncl-talk/2021-March/017963.html</a><br></div><div><br></div><div>I would be grateful to all for support and suggestions</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 19, 2021 at 3:05 PM ali mughal <<a href="mailto:mughalali655@gmail.com" target="_blank">mughalali655@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear Dennis <div><br></div><div>Thank you for the response. Please see the following output from the statement print("it="+it+" nlt="+nlt+" nln="+nln+" nlev="+nlev)</div><div><br></div><div><div>(0) it=0 nlt=1 nln=80 nlev=6</div><div>(0) it=0 nlt=85 nln=154 nlev=27</div></div><div><br></div><div>which is correct according to what is required, however, not sure why "it" remains 0. </div><div><br></div><div>The following is the output of prinVarSummary for ta_interp which is also correct.</div><div><br></div><div>Variable: ta_interp<br></div><div><div>Type: float</div><div>Total Size: 572682600 bytes</div><div> 143170650 values</div><div>Number of Dimensions: 4</div><div>Dimensions and sizes: [Time | 755] x [interp_levels | 7] x [south_north | 129] x [west_east | 210]</div><div>Coordinates:</div><div> interp_levels: [6..15]</div><div>Number Of Attributes: 8</div><div> _FillValue : 9.96921e+36</div><div> FieldType : 104</div><div> MemoryOrder : XYZ</div><div> description : T Abs. Mean</div><div> units : K</div><div> stagger :</div><div> coordinates : XLONG XLAT XTIME</div><div> vert_interp_type : theta</div></div><div><br></div><div>The total number of the eta levels (vertical levels) in the wrfout file were 51. I needed to interpolate the values to exact heights of the seven stations as I mentioned before as some of the stations lie above the height of 1st vertical level. The first level is at 5.5 m height. </div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 19, 2021 at 3:03 AM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>120 alist = [/times(it),lat1,lon1,ta_interp(it,nlev,nlt,nln)/] ; Store data to be written in a list.</div><div>=============</div><div>fatal:Subscript out of range, error in subscript #1</div><div><br></div><div>Subscript #1 of ta_interp(it,<b>nlev</b>,nlt,nln) is "nlev" [ subscript numbers: (0,1,2,3) ]<br></div><div><br></div><div>When you get this type of error, use print statements prior to the offending statement:</div><div><br></div><div>print("it="+it+" nlt="+nlt+" nln="+nln+" nlev="+nlev)<br></div><div>alist = [/times(it),lat1,lon1,ta_interp(it,nlev,nlt,nln)/]</div><div>=====</div><div><br></div><div>After the computation of 'ta_interp' add a printVarSummary:</div><div> <br></div><div> ta_interp = wrf_user_vert_interp(a,ta_mean,vert_coord,lev,opts)</div><div> printVarSummary(ta_interp)</div><div><br></div><div>This will give you the variable dimension information.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 17, 2021 at 11:53 PM ali mughal via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear All <div><br></div><div>I am trying to obtain values of temperature at seven specific station locations and their respective heights. To do so, I have modified the script write_csv 5.ncl according to my usage. </div><div>But I am getting the following error at line </div><div><div>fatal:Subscript out of range, error in subscript #1</div><div>fatal:An error occurred reading ta_interp</div><div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 120 in file write_TA_MEAN_intrp.ncl</div></div><div><br></div><div>Can someone kindly guide me on what I can correct so that I can get the required values at respective heights and location of the stations ?</div><div><br></div><div><br></div></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>
</blockquote></div>