Re: masking

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 19 2011 - 13:56:26 MDT

I forgot to attach the "gsn_draw_coordinates" script.

--Mary

On Sep 19, 2011, at 1:52 PM, Mary Haley wrote:

> Hi Fernando,
>
> There are a couple of ways to do this.
>
> The easy way is to use mpFillAreaSpecifiers to indicate some bordering areas
> around Colombia to fill in white:
>
> gres@mpFillAreaSpecifiers = (/"Venezuela","Brazil", "Peru","Ecuador"/)
> gres@mpSpecifiedFillColors = (/ "white", "white","white", "white"/)
>
> I also set these resources:
>
> gres@mpFillOn = True
> gres@mpOceanFillColor = "white"
> gres@mpLandFillColor = "transparent"
> gres@mpInlandWaterFillColor = "white"
>
> If you need the edges to match exactly, then the harder way is to
> download shapefiles for Venezuela, Brazil, Peru, and Ecuador,
> and fill all of these areas in white, pretty much using the same
> code that you use to draw the Colombia outlines.
>
> I will include a script for the "easy" way. I also created a second frame
> and drew the locations where you have data, so you can see why the
> contours look the way they do.
>
> Finally, I decided to draw raster contours instead of the default "area fill"
> contours. If you don't like this, set USE_RASTER to False.
>
> --Mary
> <com_rf_simple.ncl>
> <com_rf-0.png>
> <com_rf-1.png>
> On Sep 19, 2011, at 5:30 AM, Luis Fernando Montana Roa wrote:
>
>> Hi Mary,
>> Sorry, I had forgotten to attach the script and data.
>> I need to mask out all contours that are outside of Colombia shapefile.
>>
>> Best regards,
>>
>> Fernando
>> <com_rf.ncl><pr-ene.txt><com_rf.png>
>> From: Mary Haley <haley@ucar.edu>
>> Date: September 18, 2011 4:54:24 PM MDT
>> To: Luis Fernando Montana Roa <lfmontanar@unal.edu.co>
>> Cc: ncl-talk@ucar.edu
>> Subject: Re: masking
>>
>>
>> Hi Fernando,
>>
>> It's hard to tell which part of this plot is from the shapefile, so I'm not sure which areas you want masked out.
>> In the future, it would help if you could provide your script, and even better if you can provide your data too.
>>
>> Generally, if you want to mask out certain areas, the easiest thing to do is fill in these map areas with white.
>> If your contours are going halfway through a country, however, it'
>>
>> See example "maponly_22.ncl" at:
>>
>> http://www.ncl.ucar.edu/Applications/maponly.shtml#ex22
>>
>> It shows how to use the mpFillAreaSpecifiers resource to specify which areas to fill in.
>> You need to provide a corresponding mpSpecifiedFillColors resource to indicate which color
>> you want for each area.
>>
>> --Mary
>>
>> On Sep 16, 2011, at 8:36 PM, Luis Fernando Montana Roa wrote:
>>
>>> Hi all, I need to mask all contours outside the shapefile.
>>>
>>> Any suggestions?
>>>
>>> Best regards,
>>>
>>> Fernando
>>>
>>> <com_rf1.png>_______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 19 15:56:34 2011

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2011 - 17:12:44 MDT