Dear Yaqiang,<br><br>Thank you for your email. I will work on it and let you know ASAP.<br><br>Best Regards,<br><br>Serge<br><br><br><div class="gmail_quote">On Sat, Sep 10, 2011 at 7:57 PM, Yaqiang Wang <span dir="ltr"><<a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You can use maskout function to crop your grid data. Or use basemap<br>
script to 'crop' your figure.<br>
<div><div></div><div class="h5"><br>
On Sat, Sep 10, 2011 at 11:57 PM, Rafanoharana Serge Claudio<br>
<<a href="mailto:rafanoharana@gmail.com">rafanoharana@gmail.com</a>> wrote:<br>
> Dear John,<br>
><br>
> Thank you for your answer. I do have ogr2ogr and a shapefile of the study<br>
> area. Thank you anyway for the file.<br>
> In your command, you only deal with .shp files, and ogr2ogr cannot be used<br>
> within GrADS.<br>
> The problem is that I have a .nc file which contains a variable. I want to<br>
> clip this .nc file (but not a .shp file). I am not sure that ogr2ogr can<br>
> deal with .nc format (I also tried but not working).<br>
><br>
> Thanks,<br>
><br>
> Serge<br>
><br>
><br>
> On Fri, Sep 9, 2011 at 1:09 PM, Huddleston, John<br>
> <<a href="mailto:Huddleston@cira.colostate.edu">Huddleston@cira.colostate.edu</a>> wrote:<br>
>><br>
>> Serge<br>
>><br>
>><br>
>><br>
>> Attached is your study area shapefile (Study_Area.shp). Use ogr2ogr to<br>
>> clip your data.<br>
>><br>
>><br>
>><br>
>> You can get ogr2ogr from <a href="http://www.gdal.org/ogr2ogr.html" target="_blank">http://www.gdal.org/ogr2ogr.html</a> or if on Linux<br>
>> use ‘apt-get install gdal-bin’.<br>
>><br>
>><br>
>><br>
>> Use the following command:<br>
>><br>
>><br>
>><br>
>> ogr2ogr -clipsrc Study_Area.shp output.shp Your_input_data.shp<br>
>><br>
>><br>
>><br>
>> where Study_Area.shp is a shapefile in the attached zip file and<br>
>> Your_input_data.shp is the shapefile you want to clip.<br>
>><br>
>><br>
>><br>
>> John Huddleston, PhD<br>
>><br>
>> Cooperative Institute for Research in the Atmosphere<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> From: <a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a> [mailto:<a href="mailto:gradsusr-bounces@gradsusr.org">gradsusr-bounces@gradsusr.org</a>]<br>
>> On Behalf Of Rafanoharana Serge Claudio<br>
>> Sent: Friday, September 09, 2011 12:59 PM<br>
>> To: GrADS Users Forum<br>
>> Subject: [gradsusr] Crop country boundary or masking an area - still not<br>
>> working<br>
>><br>
>><br>
>><br>
>> Dear all,<br>
>><br>
>> I've already posted this message before but I can't get it worked.<br>
>> If any of you have any idea to crop the study area, please let me know.<br>
>> One said that it is possible to grab a shapefile of the top part and fill<br>
>> it with black (I guess he meant re-setting the value of the variable covered<br>
>> by this shapefile to 0). If you have any experience or any tips on how to do<br>
>> that, thanks in advance for your help.<br>
>><br>
>> Kind regards,<br>
>><br>
>> Serge<br>
>><br>
>> ---------- Forwarded message ----------<br>
>> From: Rafanoharana Serge Claudio <<a href="mailto:rafanoharana@gmail.com">rafanoharana@gmail.com</a>><br>
>> Date: Fri, Aug 26, 2011 at 7:53 AM<br>
>> Subject: Crop country boundary<br>
>> To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
>><br>
>><br>
>> Dear all,<br>
>><br>
>> I would like to ask if there is a way to crop the data to a specific area.<br>
>> In GrADS, if we use 'set mpdset hires', we have the country boundary.<br>
>> However for my case I only need the study area (please refer to the attached<br>
>> file).<br>
>><br>
>> I found that <a href="http://www.diva-gis.org/datadown" target="_blank">http://www.diva-gis.org/datadown</a> provides Grid data. Can we<br>
>> use the data from this Website to crop it or...?<br>
>><br>
>> Thank you,<br>
>><br>
>> --<br>
>> Serge<br>
>><br>
>><br>
>> --<br>
>> Serge<br>
>><br>
>> _______________________________________________<br>
>> gradsusr mailing list<br>
>> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Serge<br>
><br>
> _______________________________________________<br>
> gradsusr mailing list<br>
> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
</div></div>*************************************************<br>
Dr. Yaqiang Wang<br>
Chinese Academy of Meteorological Sciences (CAMS)<br>
46, Zhong-Guan-Cun South Avenue<br>
Beijing, 100081<br>
China<br>
<font color="#888888"><br>
<a href="mailto:yaqiang.wang@gmail.com">yaqiang.wang@gmail.com</a><br>
**************************************************<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Serge<br>