Re: US mapping mask

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 03 2013 - 14:28:23 MDT

Hi,

I had started creating an example before I saw Rick's response. The filled dots show the original data grid. The red dots show the grid points that got masked.

I tried the example with a 20m shapefile from "http://www.census.gov/geo/www/cob/". When I saw Rick's message, I downloaded the nationalatlas shapefile and tried that too. The census one runs faster because the shapefile is smaller and less detailed. (206 wall clock seconds versus 17 wall clock seconds).

Which shapefile you use just depends on how coarse or fine your original data grid is. The nationalatlas shapefile is more detailed and might work better for finer grids.

When you run the script, it will create and write a mask grid to a NetCDF file. You can then use this mask for other variables that are the same size, without having to create it every time. See the CREATE_MASK variable.

--Mary

On Apr 3, 2013, at 1:58 PM, Rick Brownrigg wrote:

> Hi,
>
> Examples 4 & 5 from the shapefiles examples page shows how to use a shapefile as mask to get what you want:
>
> http://www.ncl.ucar.edu/Applications/shapefiles.shtml
>
> In particular, check out the National Atlas for a national boundaries shapefile of the US:
>
> http://www.nationalatlas.gov/atlasftp.html
>
> I think this one in particular *might* do the trick (but untested):
>
> http://www.nationalatlas.gov/atlasftp-1m.html#nationp
>
> Hope that helps…
> Rick
>
> On Apr 3, 2013, at 10:14 AM, Wei Liu <wliu5ster@gmail.com> wrote:
>
>> Hi there
>>
>> Could I ask question about the US masking? Say, I have global atmospheric ptrecipitaion.
>> I want to calculate the mean precipitation over US. How can I get a US masking data file.
>> Is there some US mask data available in NCL or other database?
>>
>>
>> (I found in NCL, there is a Ncarg4_1 Earth 1 database, but how can I get the mask data
>> or build a mask data?)
>>
>>
>> Thanks a lot!
>>
>>
>> Best
>> W
>> _______________________________________________
>> 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 Wed Apr 3 14:28:40 2013

This archive was generated by hypermail 2.1.8 : Thu Apr 04 2013 - 21:06:41 MDT