<div dir="ltr"><div dir="ltr">Thank you very much Davide and Andrew. I wrote the program as follows and got the output. Kindly check it is correct or not.<div><br></div><div><div>'reinit'</div><div>'sdfopen <a href="http://population_ssp2_global_annual_1950-2005.nc">population_ssp2_global_annual_1950-2005.nc</a>'</div><div>'set gxout grfill'</div><div>'set t 1'</div><div>'define p1=population'</div><div>'set t 56'</div><div>'define p2=population'</div><div>'set grads off'</div><div>'define mask1=const(maskout(p1,p1-10000)*maskout(p2,p2-10000),1)'</div><div>'d mask1'</div><div>'draw title Population in the year 1950 above 10000 and above 10000 in 2005'</div><div>'printim type1grid_above10K.png white'</div><div><br></div><div>'define mask1=const(maskout(p1,p1-10000)*maskout(p2,p2-10000), 1)'</div><div>'define mask2=const(maskout(p1,10000-p1)*maskout(p2,p2-10000), 1)'</div><div>'define mask3=const(maskout(p1,10000-p1)*maskout(p2,10000-p2), 1)'</div><div><br></div><div>Jayakrishnan</div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 28, 2018 at 7:56 PM Andrew Friedman <<a href="mailto:andfried@gmail.com">andfried@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="auto"><div dir="ltr"><span></span></div><div dir="ltr"><div dir="ltr"><span></span></div><div dir="ltr"><div dir="ltr"><span></span></div><div dir="ltr"><div dir="ltr"><span></span></div><div dir="ltr"><span>Hi,</span><br><span></span><br><span>You should be able to do all this in GrADS.</span><br><span></span><br><span>If you haven’t, I recommend updating to at least version 2.1.1.b0, which introduced easier logical scripting expressions:</span><br><span><a href="http://cola.gmu.edu/grads/gadoc/expressions.html" target="_blank">http://cola.gmu.edu/grads/gadoc/expressions.html</a></span><br><span></span>See the example here: </div><div dir="ltr"><a href="http://gradsusr.org/pipermail/gradsusr/2017-February/040717.html" target="_blank">http://gradsusr.org/pipermail/gradsusr/2017-February/040717.html</a></div><div dir="ltr"><span></span><br><span>-Andrew</span><br><span></span><br><blockquote type="cite"><span>On Dec 28, 2018, at 4:04 AM, Jayakrishnan P.R <<a href="mailto:prjayakrishnan@gmail.com" target="_blank">prjayakrishnan@gmail.com</a>> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Dear All,</span><br></blockquote><blockquote type="cite"><span>          I have a gridded data of population globally from 1950 to 2005. I wanted to do as follows.</span><br></blockquote><blockquote type="cite"><span>1) Convert the grid into three different types.</span><br></blockquote><blockquote type="cite"><span>ie </span><br></blockquote><blockquote type="cite"><span>Type 1 grid>>> Display those grids if greater than value 10000 in the year 1950 and greater than value 10000 in the year 2015..</span><br></blockquote><blockquote type="cite"><span>Type 2 grid  Display those grids if value less than 10000 in the year 1950 and greater than 10000 in the year 2015...</span><br></blockquote><blockquote type="cite"><span>Type 3 grid Display those grids if less than value 10000 in the year 1950 and less than value 10000 in 2015</span><br></blockquote><blockquote type="cite"><span>Any thoughts in grads will be appreciated....Can we do this using maskout function, constant function and if else statement ?. I am unable to do it in grads. Trying to do in mathlab...</span><br></blockquote><blockquote type="cite"><span>Jayakrishnan </span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>-- </span><br></blockquote><blockquote type="cite"><span>Sincerely</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>**************************************************</span><br></blockquote><blockquote type="cite"><span>Dr. Jayakrishnan P.R</span><br></blockquote><blockquote type="cite"><span>Post Doctoral Research Fellow</span><br></blockquote><blockquote type="cite"><span>Science Technology Building</span><br></blockquote><blockquote type="cite"><span>School of System Science</span><br></blockquote><blockquote type="cite"><span>Beijing Normal University</span><br></blockquote><blockquote type="cite"><span>No. 96 XInjiekouwai Street</span><br></blockquote><blockquote type="cite"><span>Beijing 100875</span><br></blockquote><blockquote type="cite"><span>China</span><br></blockquote><blockquote type="cite"><span>Tel: +86-188 11005715</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>****************************************************</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>_______________________________________________</span><br></blockquote><blockquote type="cite"><span>gradsusr mailing list</span><br></blockquote><blockquote type="cite"><span><a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a></span><br></blockquote><blockquote type="cite"><span><a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a></span><br></blockquote><span></span><br></div></div></div></div></div>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org" target="_blank">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" rel="noreferrer" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px">Sincerely</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">**************************************************</div><div style="font-size:12.8px">Dr. Jayakrishnan P.R</div><div style="font-size:12.8px">Post Doctoral Research Fellow</div><div style="font-size:12.8px"><div style="font-size:12.8px"><span style="font-size:12.8px">Science Technology Building</span><br></div><div style="font-size:12.8px">School of System Science</div><div style="font-size:12.8px">Beijing Normal University</div><div style="font-size:12.8px">No. 96 XInjiekouwai Street</div><div style="font-size:12.8px">Beijing 100875</div><div style="font-size:12.8px">China</div></div><div style="font-size:12.8px"><span style="font-size:12.8px">Tel: +86-188 11005715</span></div><div style="font-size:12.8px"><span style="font-size:12.8px"><br></span></div><div style="font-size:12.8px">****************************************************</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><span style="color:rgb(7,55,99)"><font size="1"><br></font></span></div><div style="font-size:12.8px"><span style="color:rgb(7,55,99)"><font size="1"><br></font></span></div><div style="font-size:12.8px"><br></div></div></div></div></div></div>