<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi </p>
<p>I am using a WRF output file and I did the following changes "ONLY" to the code[ <a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" class="OWAAutoLink" id="LPlnk10021" previewremoved="true">https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl</a>]
 . I want to  mask the temperature in Malaysia using the shape file malay.shp. Can you kindly tell me what else do  I need to change as currently I am not able to see the data masked within Malaysia. I will be grateful for your help</p>
<p><br>
</p>
<p></p>
<div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"</div>
<div><br>
</div>
<div>begin</div>
<div>  MASK_INSIDE = True</div>
<div><br>
</div>
<div>  a = addfile("./UTC_0.nc","r")</div>
<div>   lat=a->XLAT</div>
<div>   lon=a->XLONG</div>
<div><br>
</div>
<div>  minlat=min(lat)</div>
<div>  maxlat=max(lat)</div>
<div>  minlon=min(lon)</div>
<div>  maxlon=max(lon)</div>
<div><br>
</div>
<div> nlat=129</div>
<div> nlon=210</div>
<div><br>
</div>
<div>  lat1d       = fspan(minlat,maxlat,nlat)</div>
<div>  lon1d       = fspan(minlon,maxlon,nlon)</div>
<div><br>
</div>
<div> data = wrf_user_getvar(a, "T2", 0)</div>
<div> data@_FillValue = -9999</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>  lat1d       = fspan(minlat,maxlat,nlat)</div>
<div>  lon1d       = fspan(minlon,maxlon,nlon)</div>
<div>  lat1d@units = "degrees_north"</div>
<div>  lon1d@units = "degrees_east"</div>
<div><br>
</div>
<div>;---Attach lat/lon coordinate array information.</div>
<div>  data!0      = "lat"</div>
<div>  data!1      = "lon"</div>
<div>  data&lat    = lat1d</div>
<div>  data&lon    = lon1d</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>  f       = addfile("Shapefile/malay.shp", "r")</div>
<div>  mrb_lon = f->x</div>
<div>  mrb_lat = f->y</div>
<div>  nmrb    = dimsizes(mrb_lon)</div>
<div><br>
</div>
<div>  min_mrb_lat = min(mrb_lat)</div>
<div>  max_mrb_lat = max(mrb_lat)</div>
<div>  min_mrb_lon = min(mrb_lon)</div>
<div>  max_mrb_lon = max(mrb_lon)</div>
<div><br>
</div>
<br>
<div id="LPBorder_GT_15100624072320.4654525021329883" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15100624072320.455548342248405" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15100624072320.004663611720125083" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15100624072320.09492557243074029"></div>
<div id="LPTitle_15100624072320.6738010005615629" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15100624072320.30956730877959604" href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank" style="text-decoration: none;">www.ncl.ucar.edu</a></div>
<div id="LPMetadata_15100624072320.13720756935637524" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
www.ncl.ucar.edu</div>
<div id="LPDescription_15100624072320.9176144495555989" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
;***** ; mask_9.ncl ; ; Concepts illustrated: ; - Drawing the Mississippi River Basin using data from a shapefile ; - Masking a data array based on a geographical ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<p></p>
<div id="LPBorder_GT_15100622944160.7494298591980548" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15100622944120.9651541887180664" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15100622944160.8505426783719574" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15100622944160.6665396278302771"></div>
<div id="LPTitle_15100622944160.9140645359738073" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15100622944160.1858341607238565" href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank" style="text-decoration: none;">www.ncl.ucar.edu</a></div>
<div id="LPMetadata_15100622944160.5647315790547298" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
www.ncl.ucar.edu</div>
<div id="LPDescription_15100622944160.39649117012257995" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
;***** ; mask_9.ncl ; ; Concepts illustrated: ; - Drawing the Mississippi River Basin using data from a shapefile ; - Masking a data array based on a geographical ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: Calibri, Arial, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><b><br>
</b></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:11pt">Muhammad Omer Mughal</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:11pt">MSc BSc Mechanical Engineering</span></font><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:8pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">PhD  Research Scholar</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Remote Sensing and Satellite Research Group</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Department of Imaging and Applied Physics</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt"><br>
Curtin University</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:11pt"><br>
</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt">Curtin University</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Tel |</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">+61
 8 9266 7962</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </span></font><font face="Calibri,sans-serif" size="1" color="#1F497D"><span style="font-size:7pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Fax |</span></font><font face="Arial Bold" size="2" color="#1F497D"><span style="font-size:9pt"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">+61
 8 9266 2377</span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Mobile |</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">0470 237 525</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt">  </span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Email |</span></font><font face="Calibri,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </span></font><a href="mailto:m.lynch@curtin.edu.au" target="_blank" id="LPNoLP"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">m.mughal1@postgrad.curtin.edu.au</span></font></a><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"> </span></font><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Arial Bold" size="2" color="#AB8303"><span style="font-size:9pt">Web |</span></font><font face="Calibri,sans-serif" size="2" color="#AB8303"><span style="font-size:9pt"> </span></font><a href="http://curtin.edu.au/" target="_blank" id="LPNoLP"><font face="Calibri,sans-serif" size="2"><span style="font-size:11pt"><font face="Arial,sans-serif" size="2"><span style="font-size:9pt">http://curtin.edu.au</span></font></span></font></a><font face="Arial,sans-serif" size="2" color="#1F497D"><span style="font-size:9pt"><br>
</span></font><font face="Calibri,sans-serif" size="1" color="#1F497D"><span style="font-size:7pt"><br>
</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Calibri,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt"></span></font><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt">Curtin University is a trademark of Curtin University of Technology. </span></font><br>
</div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt">CRICOS Provider Code 00301J (WA), 02637B (NSW)</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt"><br>
</span></font></span></font></div>
<div style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:15.4545450210571px; margin:0px; background-color:rgb(255,255,255)">
<font face="Times New Roman,serif" size="3"><span style="font-size:12pt"><font face="Arial,sans-serif" size="1" color="#1F497D"><span style="font-size:6pt"><br>
</span></font></span></font></div>
</div>
</div>
</div>
</div>
</body>
</html>