<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 dir="ltr" id="yui_3_16_0_1_1445684607899_5888"><span id="yui_3_16_0_1_1445684607899_5895">I have a rainfall (1D array) and I had to plot those with diff colours depending on the range that I have defined. <br></span></div><div id="yui_3_16_0_1_1445684607899_5918" dir="ltr"><br><span id="yui_3_16_0_1_1445684607899_5895"></span></div><div dir="ltr"><span id="yui_3_16_0_1_1445684607899_5895">I have split my orginal array into smaller arrays and Now I am trying to give different COLORS to each array. <br></span></div><div dir="ltr"><span id="yui_3_16_0_1_1445684607899_5895">This is some part of script <br></span></div><div id="yui_3_16_0_1_1445684607899_5966" dir="ltr"><span id="yui_3_16_0_1_1445684607899_5895"></span></div>;----------Title res<br class="" id="yui_3_16_0_1_1445684607899_6198"><br class="" id="yui_3_16_0_1_1445684607899_6200"> res@tiMainString = fili<br class="" id="yui_3_16_0_1_1445684607899_6202"><br class="" id="yui_3_16_0_1_1445684607899_6204"> plot = gsn_csm_map(wks,res)<br class="" id="yui_3_16_0_1_1445684607899_6206">;<br class="" id="yui_3_16_0_1_1445684607899_6208">;<br class="" id="yui_3_16_0_1_1445684607899_6210">;---------Adding Markers & Coloring them according to the RF value<br class="" id="yui_3_16_0_1_1445684607899_6212"> nrf = dimsizes(rf)<br class="" id="yui_3_16_0_1_1445684607899_6214">; print(nrf)<br class="" id="yui_3_16_0_1_1445684607899_6216"><br class="" id="yui_3_16_0_1_1445684607899_6218"> res_mark = True<br class="" id="yui_3_16_0_1_1445684607899_6281"> res_mark@gsMarkerIndex = 1 ; 17 predefined markers available<br class="" id="yui_3_16_0_1_1445684607899_6283"> res_mark@gsMarkerSizeF = 0.012<br class="" id="yui_3_16_0_1_1445684607899_6285"><br class="" id="yui_3_16_0_1_1445684607899_6287">; Breaking up rf array into small arrays depending on their value<br class="" id="yui_3_16_0_1_1445684607899_6289">;<br class="" id="yui_3_16_0_1_1445684607899_6291">; ind fn return INDEX (in this case the line NOs when the below is TRUE)<br class="" id="yui_3_16_0_1_1445684607899_6293">;<br class="" id="yui_3_16_0_1_1445684607899_6295"> rf0 = ind(rf.eq.0.0)<br class="" id="yui_3_16_0_1_1445684607899_6297"> rf_range0 = rf(rf0)<br class="" id="yui_3_16_0_1_1445684607899_6299"> nrf_range0 = dimsizes(rf_range0)<br class="" id="yui_3_16_0_1_1445684607899_6301">; print("rf0 output of ind(rf) while rf_range0 is actual value of rf"+ " "+rf0+" "+rf_range0)<br class="" id="yui_3_16_0_1_1445684607899_6303"> printVarSummary(rf_range0)<br class="" id="yui_3_16_0_1_1445684607899_6305"><br class="" id="yui_3_16_0_1_1445684607899_6307"> rf1 = ind(rf.ge.0.1.and.rf.lt.2.5)<br class="" id="yui_3_16_0_1_1445684607899_6309"> rf_range1 = rf(rf1)<br class="" id="yui_3_16_0_1_1445684607899_6311"> nrf_range1 = dimsizes(rf_range1)<br class="" id="yui_3_16_0_1_1445684607899_6313">; print("rf1 output of ind(rf) while rf_range1 is actual value of rf"+ " "+rf1+" "+rf_range1)<br class="" id="yui_3_16_0_1_1445684607899_6315"> printVarSummary(rf_range1)<br class="" id="yui_3_16_0_1_1445684607899_6317"><br class="" id="yui_3_16_0_1_1445684607899_6319"> rf2 = ind(rf.ge.2.5.and.rf.lt.7.5)<br class="" id="yui_3_16_0_1_1445684607899_6321"> rf_range2 = rf(rf2)<br class="" id="yui_3_16_0_1_1445684607899_6323"> nrf_range2 = dimsizes(rf_range2)<br class="" id="yui_3_16_0_1_1445684607899_6325"> printVarSummary(rf_range2)<br class="" id="yui_3_16_0_1_1445684607899_6327">; print("rf2 output of ind(rf) while rf_range2 is actual value of rf"+ " "+rf2+" "+rf_range2)<br class="" id="yui_3_16_0_1_1445684607899_6329"><br class="" id="yui_3_16_0_1_1445684607899_6331"> rf3 = ind(rf.ge.7.5.and.rf.lt.35.5)<br class="" id="yui_3_16_0_1_1445684607899_6333"> rf_range3 = rf(rf3)<br class="" id="yui_3_16_0_1_1445684607899_6335"> nrf_range3 = dimsizes(rf_range3)<br class="" id="yui_3_16_0_1_1445684607899_6337">; print("rf3 output of ind(rf) while rf_range3 is actual value of rf"+ " "+rf3+" "+rf_range3)<br class="" id="yui_3_16_0_1_1445684607899_6339"> printVarSummary(rf_range3)<br class="" id="yui_3_16_0_1_1445684607899_6341"><br class="" id="yui_3_16_0_1_1445684607899_6343"> rf4 = ind(rf.ge.35.5.and.rf.lt.64.5)<br class="" id="yui_3_16_0_1_1445684607899_6345"> rf_range4 = rf(rf4)<br class="" id="yui_3_16_0_1_1445684607899_6347"> nrf_range4 = dimsizes(rf_range4)<br class="" id="yui_3_16_0_1_1445684607899_6349">; print("rf4 output of ind(rf) while rf_range4 is actual value of rf"+ " "+rf4+" "+rf_range4)<br class="" id="yui_3_16_0_1_1445684607899_6351"> printVarSummary(rf_range4)<br class="" id="yui_3_16_0_1_1445684607899_6353"><br class="" id="yui_3_16_0_1_1445684607899_6355"><br class="" id="yui_3_16_0_1_1445684607899_6357"><div dir="ltr"><br></div><div id="yui_3_16_0_1_1445684607899_6417" dir="ltr">do n = 0, nrf_range0-1<br class="" id="yui_3_16_0_1_1445684607899_6394"> res_mark@gsMarkerColor = "Blue"<br class="" id="yui_3_16_0_1_1445684607899_6396"> str = unique_string("polymarker")<br class="" id="yui_3_16_0_1_1445684607899_6398"> plot@$str$ = gsn_add_polymarker(wks,plot,lon,lat,res_mark)<br class="" id="yui_3_16_0_1_1445684607899_6400"> end do<br class="" id="yui_3_16_0_1_1445684607899_6402"><br class="" id="yui_3_16_0_1_1445684607899_6404"> do n = 0, nrf_range1-1<br class="" id="yui_3_16_0_1_1445684607899_6406"> res_mark@gsMarkerColor = "red"<br class="" id="yui_3_16_0_1_1445684607899_6408"> str = unique_string("polymarker")<br class="" id="yui_3_16_0_1_1445684607899_6410"> plot@$str$ = gsn_add_polymarker(wks,plot,lon,lat,res_mark)<br class="" id="yui_3_16_0_1_1445684607899_6412"> end do<br class="" id="yui_3_16_0_1_1445684607899_6414"><br class="" id="yui_3_16_0_1_1445684607899_6416">draw(plot)</div><div id="yui_3_16_0_1_1445684607899_6428" dir="ltr">frame(wks)</div><div id="yui_3_16_0_1_1445684607899_6725" dir="ltr"><br></div><div id="yui_3_16_0_1_1445684607899_6734" dir="ltr">Following things I m not able to sort out and seek suggestions. <br></div><div id="yui_3_16_0_1_1445684607899_6727" dir="ltr">1. I get 227 values corresponding to Range0 (when rf=0.0) plotted in RED. <br></div><div id="yui_3_16_0_1_1445684607899_6638" dir="ltr"> Does it has to do it with draw function???</div><div id="yui_3_16_0_1_1445684607899_6637" dir="ltr"><br></div><div id="yui_3_16_0_1_1445684607899_6506" dir="ltr">2. If I want to show the topography/ height of the region, how can I do that.</div><div id="yui_3_16_0_1_1445684607899_6507" dir="ltr"><br></div><div id="yui_3_16_0_1_1445684607899_6508" dir="ltr"><br></div><div id="yui_3_16_0_1_1445684607899_6963" dir="ltr">thanks</div><div id="yui_3_16_0_1_1445684607899_6509" dir="ltr"> <br></div><div id="yui_3_16_0_1_1445684607899_6946" dir="ltr"><br></div></div></body></html>