<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yiv4672912922"><div id="yui_3_16_0_1_1453644145733_3069"><div style="background-color: rgb(255, 255, 255);" id="yui_3_16_0_1_1453644145733_3068"><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">I have to add the 24 binary rainfall files (cmorph) and get one rainfall variable that has 24 hours data. </div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><br></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">Following the part of the script used for reading the rainfall. </div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="yiv4672912922" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><br></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="yiv4672912922" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><br></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="yiv4672912922"><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; ----Defining for Once -----</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""><br id="yui_3_16_0_1_1453644145733_3180" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> wks = gsn_open_wks("ps","cmorph-v2")</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> gsn_define_colormap(wks,"prcp_2")</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""><br id="yui_3_16_0_1_1453644145733_3185" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> plot = new(24,graphic)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""><br id="yui_3_16_0_1_1453644145733_3189" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> files = systemfunc("ls CMORPH_8KM-30MIN_20151130*")</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; print(files)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; print(files(0))</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> no_of_files = dimsizes(files)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> print(no_of_files)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""><br id="yui_3_16_0_1_1453644145733_3197" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> ntim = 1</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> nlat = 1649 </div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> nlon = 4948</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""><br id="yui_3_16_0_1_1453644145733_3203" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> lat = 59.963614 - ispan(0,nlat-1,1)*0.072771377</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> lat!0 = "latitude"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> lat@units = "degrees_north"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; printVarSummary(lat)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; print(lat)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""><br id="yui_3_16_0_1_1453644145733_3211" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> lon = 0.036378335 + ispan(0,nlon-1,1)*0.072756669</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> lon!0 = "longitude"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class=""> lon@units = "degrees_east"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; printVarSummary(lon)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="">; print(lon)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">; Reading File-----------------</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3250" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> cmordaily= new(8159252,float,255)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> printVarSummary(cmordaily)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3255" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3258" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> do n = 0, no_of_files</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> outfile = "cmorph"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> outfile = outfile+n+".txt"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> drf = "cmori"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> drf = drf+n+".txt"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3266" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> rf = fbindirread(files(0),0,(/ntim,nlat,nlon/),"ubyte")</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> printVarSummary(rf)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3271" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">; temp = str_split(files(n),"_") ; For date of the data file</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">; date_time = temp(1)+temp(2)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">; print(date_time)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">; date_time!0 = "time"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3278" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3281" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> cmorrf = where(rf.eq.255,255,rf*0.2)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> printVarSummary(cmorrf)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> cmorrf@units = "mm"</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> cmorrf@_FillValue = 255</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> asciiwrite(outfile,cmorrf)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3289" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> cmor1d = ndtooned(cmorrf)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> asciiwrite("cmor1d_after1d.txt",cmor1d)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> printVarSummary(cmor1d)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3295" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> cmordaily = cmor1d+cmordaily</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">; cmordaily@_FillValue = 255</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"> asciiwrite(drf,cmordaily)</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr"><br id="yui_3_16_0_1_1453644145733_3301" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><br id="yui_3_16_0_1_1453644145733_3304" class=""></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><br></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">I am not getting getting the data added in the last file. </div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">I am attaching the cmordaily files. </div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">Following files are created</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">-rw-rw-r-- 1 aditya aditya 3635 Jan 24 22:08 cmorph-daily.ncl</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">-rw-rw-r-- 1 aditya aditya 25048562 Jan 24 22:11 cmorph0.txt</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">-rw-rw-r-- 1 aditya aditya 25048562 Jan 24 22:11 cmor1d_after1d.txt</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr">-rw-rw-r-- 1 aditya aditya 32637008 Jan 24 22:12 cmori0.txt</div><div dir="ltr" id="yui_3_16_0_1_1453644145733_4085" class=""><br id="yui_3_16_0_1_1453644145733_4087" class=""></div></div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">cmori0.txt file has only 8199252 values each equal to 255.</div><div id="yiv4672912922yui_3_16_0_1_1453036470046_2426" class="" dir="ltr" style="color: rgb(0, 0, 0); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;">can someone suggest...</div></div></div></div></div></div></div></body></html>