<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:10pt;color:#2672EC;background-color:#FFFFFF;font-family:Arial,Helvetica,sans-serif;">
<p>Hi All,</p>
<p><br>
</p>
<p>I've a gridded data & I want to mask it while using shapefile. But it is not taking it as a grid and giving error: <span style="color: rgb(255, 0, 0);">shapefile_mask_data: Error: not a valid rectilinear, curvilinear, or unstructured grid</span></p>
<p><br>
</p>
<p></p>
<div> left_longitude : 30.05<br>
right_longitude : 120.05<br>
upper_latitude : 40.05<br>
lower_latitude : -39.95<br>
lat_interval : 0.1<br>
lon_interval : 0.1<br>
NCO : "4.5.4"<br>
CDO : Climate Data Operators version 1.7.0 (http://mpimet.mpg.de/cdo)<br>
dimensions:<br>
longitude = 300<br>
latitude = 380<br>
time = 1 // unlimited<br>
variables:<br>
double longitude ( longitude )<br>
standard_name : longitude<br>
long_name : longitude<br>
units : degrees_east<br>
axis : X<br>
<br>
double latitude ( latitude )<br>
standard_name : latitude<br>
long_name : latitude<br>
units : degrees_north<br>
axis : Y<br>
<br>
double time ( time )<br>
standard_name : time<br>
units : minutes since 2000-1-1 00:00:00<br>
calendar : standard<br>
axis : T<br>
<br>
float IMR_DLY ( time, latitude, longitude )<br>
standard_name : Precipitation<br>
long_name : INSAT Multispectral Rainfall(Daily)<br>
units : mm/day<br>
_FillValue : -999<br>
missing_value : -999<br>
</div>
<p></p>
<p><br>
</p>
<p><br>
</p>
<p><span style="color: rgb(75, 165, 36);">Now how to convert my data into </span>
<span style="color: rgb(75, 165, 36);">a valid rectilinear, curvilinear, or unstructured grid so that masking can be performed.</span></p>
<p><span style="color: rgb(75, 165, 36);"><br>
</span></p>
<p><span style="color: rgb(75, 165, 36);"></span></p>
<div>var = doubletofloat(a->IMR_DLY)<br>
lat = a->latitude<br>
lon = a->longitude</div>
<span>shp_mask = shapefile_mask_data(var(i,:,:),filename,opt)</span> ------> <span style="color: rgb(255, 0, 0);">
error here</span>
<p></p>
<p><span style="color: rgb(255, 0, 0);"><br>
</span></p>
<p><span style="color: rgb(255, 0, 0);">script is also attached.</span><br>
</p>
</div>
</body>
</html>