[gradsusr] Mask out function help

Jayakrishnan P.R prjayakrishnan at gmail.com
Thu Apr 4 09:38:33 EDT 2019


Wow..That is great information...Thanks and let me try....
Jayakrishnan

On Thu, 4 Apr 2019, 20:06 Davide Sacchetti, <davide.sacchetti at arpal.gov.it>
wrote:

> maskout(p1,p1-1000) displays p1>1000 only
> maskout(p1,2000-p1) displays
> p1<2000 only
> maskout(maskout(p1,p1>1000),2000-p1) displays p1 between
> 1000 and 2000
> bye bye
> Davide
>
> On Thu, 2019-04-04 at 16:24 +0800, Jayakrishnan P.R wrote:
> > Dear Users,
> >                  I would like to classify the whole global grid into
> > four types using the quartiles obtained Q1 and Q3 using some
> > conditions in the two years 1950 and 2013.
> > For example for 1950, Q1=948, Q3=5768, for 1980 Q1=1008, Q3=17089
> > such that my type 1 would be
> > Type 1 grid: 1950 those values higher than Q3 and also 1980 higher
> > than Q3.
> >
> > I did the same using grads as follows.
> >
> > 'reinit'
> > 'sdfopen pp_1950.nc'
> > 'set gxout grfill'
> > 'define p1=ppp'
> > 'sdfopen pp_1980.nc'
> > 'define p2=ppp.2'
> > 'set grads off'
> > 'define mask1=const(maskout(p1,p1-5768*maskout(p2,p2-17089),1)'
> > 'd mask1'
> > 'set sdfwrite type1.nc'
> > 'sdfwrite mask1'
> > 'draw title PPP in 1950 above 2973 and above 6371 in 1980: Type 1'
> > 'printim type1grid_above_2K.png white'
> >
> > Now my second condition for Type 2 in which I am confused about how
> > to do.
> >
> > type 2 : 1950 lower than Q1, 1980 higher than Q1; and 1950 between Q1
> > and Q3, 1980 higher than Q3 .
> > How to express the condition between Q1 and Q3 in maskout function
> > ?.
> > Kindly give some insights.
> >
> > Jayakrishnan
> >
> >
> >
> > --
> > Sincerely
> >
> > **************************************************
> > Dr. Jayakrishnan P.R
> > Post Doctoral Research Fellow
> > Science Technology Building
> > School of System Science
> > Beijing Normal University
> > No. 96 XInjiekouwai Street
> > Beijing 100875
> > China
> > Tel: +86-188 11005715
> >
> > ****************************************************
> >
> >
> >
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190404/61f706d4/attachment-0001.html>


More information about the gradsusr mailing list