[gradsusr] Mask out function help

Jayakrishnan P.R prjayakrishnan at gmail.com
Thu Apr 4 04:24:51 EDT 2019


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

****************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190404/63398cbd/attachment-0001.html>


More information about the gradsusr mailing list