<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:265119766;
        mso-list-type:hybrid;
        mso-list-template-ids:-159749230 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1
        {mso-list-id:907885724;
        mso-list-type:hybrid;
        mso-list-template-ids:-1420688550 -1948749828 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l1:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l2
        {mso-list-id:1755280538;
        mso-list-type:hybrid;
        mso-list-template-ids:-816939734 -544197956 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l2:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l3
        {mso-list-id:1849713064;
        mso-list-type:hybrid;
        mso-list-template-ids:-1870752580 439807724 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l3:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l4
        {mso-list-id:1936286602;
        mso-list-type:hybrid;
        mso-list-template-ids:-1121050032 -1605714692 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l4:level1
        {mso-level-start-at:2;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal>I don’t know if the following is possible, and I need help…<o:p></o:p></p><p class=MsoNormal>I need to use the ‘const’ function for a variable, but ONLY over a specific region…<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Here’s the problem:<o:p></o:p></p><p class=MsoNormal>I have two variables, A & B<o:p></o:p></p><p class=MsoNormal>Variable A is from a dataset with a global 0.5x0.5 grid, yet it has all undefined values over the region covering the Mediterranean Sea.<o:p></o:p></p><p class=MsoNormal>Variable B is from a separate dataset with a 0.167x0.167 resolution that covers the Med. Sea area and also a small portion of the Atlantic (over the Bay of Biscay near France).<o:p></o:p></p><p class=MsoNormal>What I want to do is:<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>First plot variable A from the global dataset using const to fill in all undefined areas<o:p></o:p></p><p class=MsoListParagraph>‘d const(A,0,-u)’<o:p></o:p></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'> </span></span><![endif]>Overlay variable B from the regional dataset onto the global plot of A & ALSO use const to fill in areas with undefined values.<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'>‘d const(B,0,-u)’ , plot ‘const(B) only over the Mediterranean region<o:p></o:p></p><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p><p class=MsoNormal>The problem is that the 2<sup>nd</sup> display command, ‘d const(B,0,-u)’, overwrites the plotting from the first display command, so everything outside variable B’s region is set to a value of ‘0’.<o:p></o:p></p><p class=MsoNormal>I thought about trying to somehow ‘merge’ or ‘add’ the two variables, such as ‘display const(A+B,0,-u)’, but this doesn’t work since the datasets have different sized grids & different resolutions.<o:p></o:p></p><p class=MsoNormal>(I’d really like to avoid having to over-complicate things by having to use regrid and create new grids or merge datasets.)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>…Although I know that this is currently not supported, ideally, I’d like to do something like the following:<o:p></o:p></p><p class=MsoNormal><i>* plot const(A) over entire grid (i.e.,globally)<o:p></o:p></i></p><p class=MsoNormal><b>‘display const(A,0,-u)’<o:p></o:p></b></p><p class=MsoNormal><i><o:p> </o:p></i></p><p class=MsoNormal><i>* now display const(B), overlaying onto previous plot of ‘const(A)’ <o:p></o:p></i></p><p class=MsoNormal><i>* cropping results of ‘const(B)’ so that it ONLY covers the Med. Sea region<o:p></o:p></i></p><p class=MsoNormal><b>‘display const(B,0,-u,lon1=-5.6,lat1=30,lon2=42,lat2=47)<o:p></o:p></b></p><p class=MsoNormal><i><o:p> </o:p></i></p><p class=MsoNormal><i>* Now, handle ‘Bay of Biscay’ region, since it was overwritten by ‘const(B)’<o:p></o:p></i></p><p class=MsoNormal><i>* So, re-plot const(A) over this small region<o:p></o:p></i></p><p class=MsoNormal><b> ‘display const(A,0,-u,lon1=-5.6,lat1=43,lon2=0,lat2=47)<o:p></o:p></b></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Would it be feasible to modify the source code for ‘const’ in order to achieve the ‘regional cropping’ of const that Ive shown in the example above?<o:p></o:p></p><p class=MsoNormal>Or, Can my goal be achieved using some combination of ‘const’, ‘maskout’, ‘set clip’, or some other function(s)?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Please help,<o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>Pablo<o:p></o:p></p></div></body></html>