<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div abp="3319"><span abp="3320"></span></div> <div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1465879989122_8090" abp="3321"><br clear="none" abp="3322"></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1465879989122_8086" style="display: block;" abp="3323"><div id="yui_3_16_0_ym19_1_1465879989122_8085" style="font-family: times new roman, new york, times, serif; font-size: 16px;" abp="3324"><div id="yui_3_16_0_ym19_1_1465879989122_8084" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" abp="3325"><div class="y_msg_container" id="yui_3_16_0_ym19_1_1465879989122_8083" abp="3326"><div id="yiv6567604380" abp="3327"><div id="yui_3_16_0_ym19_1_1465879989122_8082" abp="3328"><div class="yiv6567604380yqt3373770128" id="yiv6567604380yqt62286" abp="3329"><div class="yiv6567604380gmail_extra" id="yui_3_16_0_ym19_1_1465879989122_8094" abp="3330"><div class="yiv6567604380gmail_quote" id="yui_3_16_0_ym19_1_1465879989122_8097" abp="3331"><blockquote class="yiv6567604380gmail_quote" id="yui_3_16_0_ym19_1_1465879989122_8100" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" abp="3332"><div id="yui_3_16_0_ym19_1_1465879989122_8099" abp="3333"><div id="yui_3_16_0_ym19_1_1465879989122_8098" style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 16px; background-color: rgb(255, 255, 255);" abp="3334"> <div id="yui_3_16_0_ym19_1_1465879989122_8102" style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 16px; background-color: rgb(255, 255, 255);" abp="3335"><div id="yui_3_16_0_ym19_1_1465879989122_8101" abp="3336">To whom it may concern,</div><div id="yui_3_16_0_ym19_1_1465879989122_8106" abp="3337"><br clear="none" abp="3338"></div><div id="yui_3_16_0_ym19_1_1465879989122_8129" abp="3339">I have written a simple NCL code to extract and take the average of my data and write the table of my data. but in the write part the output is only one data instead of 4.</div><div id="yui_3_16_0_ym19_1_1465879989122_8111" abp="3340"><br clear="none" abp="3341"></div><div id="yui_3_16_0_ym19_1_1465879989122_8110" abp="3342">I wrote this email. to find any kind of help.</div><div id="yui_3_16_0_ym19_1_1465879989122_8128" abp="3343"><br clear="none" abp="3344"></div><div id="yui_3_16_0_ym19_1_1465879989122_8109" abp="3345">I appreciate your time and kindness.</div><div abp="3346"><br clear="none" abp="3347"></div><div id="yui_3_16_0_ym19_1_1465879989122_8108" abp="3348">Best regards,</div><div id="yui_3_16_0_ym19_1_1465879989122_8107" abp="3349"><br clear="none" abp="3350"></div><div dir="ltr" abp="3351">Snow Sho</div><div dir="ltr" abp="3352"><br clear="none" abp="3353"></div><div dir="ltr" abp="3354"><br clear="none" abp="3355"></div><div dir="ltr" abp="3356">this is the code:</div><blockquote id="yui_3_16_0_ym19_1_1465879989122_8121" style="font-size: 13px;" abp="3357" type="cite"><div id="yui_3_16_0_ym19_1_1465879989122_8120" abp="3358"><div id="yui_3_16_0_ym19_1_1465879989122_8119" style="font-size: 16px;" abp="3359"><div id="yui_3_16_0_ym19_1_1465879989122_8118" abp="3360"><div id="yui_3_16_0_ym19_1_1465879989122_8117" abp="3361"><div id="yui_3_16_0_ym19_1_1465879989122_8116" abp="3362"><div id="yui_3_16_0_ym19_1_1465879989122_8115" abp="3363"><div id="yui_3_16_0_ym19_1_1465879989122_8114" abp="3364"><div id="yui_3_16_0_ym19_1_1465879989122_8113" abp="3365"><div id="yui_3_16_0_ym19_1_1465879989122_8112" dir="ltr" abp="3366">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br clear="none" abp="3367">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br clear="none" abp="3368">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br clear="none" abp="3369">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br clear="none" abp="3370">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br clear="none" abp="3371">begin<br clear="none" abp="3372">;----------------------------------------------------------------------<br clear="none" abp="3373">; WRF data translate NetCDF file to ascii file <br clear="none" abp="3374">;----------------------------------------------------------------------</div><div dir="ltr" abp="3375"><br clear="none" abp="3376"></div><div id="yui_3_16_0_ym19_1_1465879989122_8122" dir="ltr" abp="3377"> infile=("wrfout_d03_2007-07-24_00_00_00")<br clear="none" abp="3378"> fn=dimsizes(infile)</div><div dir="ltr" abp="3379"> fin=addfile(infile,"r")<br clear="none" abp="3380"> R=fin->RAINNC(0,:,:)</div><div dir="ltr" abp="3381"> a=(/189,193,191,192,192,193,192,188,198,196,192,187,197,194,190,187,197,196,195,195,196/)<br clear="none" abp="3382"> b=(/285,286,287,288,289,290,291,292,293,294,295,296,296,297,298,299,298,299,300,301,302/)</div><div id="yui_3_16_0_ym19_1_1465879989122_8123" dir="ltr" abp="3383"> c=(/180,174,172,181,179,173,184,175,185,174,184,173,183,193,182,191,179,189,178,188,176/)<br clear="none" abp="3384"> d=(/264,266,267,267,268,269,270,270,271,271,272,273,273,273,274,273,275,274,276,275,277/)<br clear="none" abp="3385"> e=(/202,205,206,206,198,197,206,205,204,202,200,200,200,200,210,209,205,202,212,208,204,203/)<br clear="none" abp="3386"> f=(/270,271,272,273,274,276,277,278,279,280,281,282,283,284,284,284,285,286,287,288,289,290/)<br clear="none" abp="3387"> g=(/208,208,209,210,211,210,207,205,215,212,213,215,216,207,209,210,211,214,215,209,211,215,214/)<br clear="none" abp="3388"> h=(/263,264,265,266,267,267,268,269,269,270,271,273,274,276,277,278,279,279,280,282,283,284,287/)</div><div id="yui_3_16_0_ym19_1_1465879989122_8127" dir="ltr" abp="3389"> R1=new((/21/),"float") <br clear="none" abp="3390"> R2=new((/21/),"float")<br clear="none" abp="3391"> R3=new((/22/),"float")<br clear="none" abp="3392"> R4=new((/23/),"float")</div><div dir="ltr" abp="3393"><br clear="none" abp="3394"></div><div id="yui_3_16_0_ym19_1_1465879989122_8124" dir="ltr" abp="3395"> do k=0,20<br clear="none" abp="3396"> R1(k)=R(a(k),b(k))<br clear="none" abp="3397"> end do<br clear="none" abp="3398"> ; print(R1)<br clear="none" abp="3399"> do k=0,20<br clear="none" abp="3400"> R2(k)=R(c(k),d(k))<br clear="none" abp="3401"> end do<br clear="none" abp="3402"> do k=0,21<br clear="none" abp="3403"> R3(k)=R(e(k),f(k))<br clear="none" abp="3404"> end do<br clear="none" abp="3405"> do k=0,22<br clear="none" abp="3406"> R4(k)=R(g(k),h(k))<br clear="none" abp="3407"> end do</div><div id="yui_3_16_0_ym19_1_1465879989122_8125" dir="ltr" abp="3408"> R5=avg(R1(:))<br clear="none" abp="3409"> R6=avg(R2(:))<br clear="none" abp="3410"> R7=avg(R3(:))<br clear="none" abp="3411"> R8=avg(R4(:))</div><div dir="ltr" abp="3412"><br clear="none" abp="3413"></div><div dir="ltr" abp="3414"> ca=new((/1/),"float")<br clear="none" abp="3415"> ca=(/R5/)<br clear="none" abp="3416"> cb=new((/1/),"float")<br clear="none" abp="3417"> cb=(/R6/)<br clear="none" abp="3418"> cc=new((/1/),"float")<br clear="none" abp="3419"> cc=(/R7/)<br clear="none" abp="3420"> cd=new((/1/),"float")<br clear="none" abp="3421"> cd=(/R8/)</div><div dir="ltr" abp="3422"><br clear="none" abp="3423"></div><div id="yui_3_16_0_ym19_1_1465879989122_8126" dir="ltr" abp="3424">; alist=[/R5,R6,R7,R8/]<br clear="none" abp="3425"> alist=[/ca,cb,cc,cd/]<br clear="none" abp="3426"> write_table("list.txt", "a", alist, "%5.5f")</div><div dir="ltr" abp="3427"> end</div></div></div></div></div></div></div></div></div></blockquote></div></div></div></blockquote></div><br clear="none" abp="3428"></div></div></div></div><br abp="3429"><br abp="3430"></div> </div> </div> </div></div></body></html>