Re: Setting Mexico data to _FillValue

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu, 28 May 2009 10:31:54 -0600

If you are going to use this same grid and mask, do it once
and save it to a netCDF file for reuse.

Mary Haley wrote:
> Eric,
>
> I'm afraid this is not possible. The graphical area mapping stuff
> doesn't have any way to look at your data to determine what
> areas to set to missing.
>
> We've had lots of requests for this capability, however, and it's on
> our to-do list. I can't make any estimates as to when we'll get to it
> however.
>
> I think in this case, Dennis' suggestion is the best one so far.
>
> --Mary
>
>
>
> On Thu, 28 May 2009, Eric D. Robinson wrote:
>
>
>> Mary,
>> I actually need to do some calculations using only the CONUS data, so I
>> need to eliminate the data as opposed to just covering it up graphically. Is
>> there a way that I can use the information in the mpAreaNames (et al.)
>> databases to create an array and then use mask to eliminate the data. I know
>> that you can set mpAreaMasking to mask say just Mexico graphically and that
>> you can use the getvalues function to retrieve a list of the Names (or Types)
>> used in the plot, but I was wondering if I can somehow query the AreaType on
>> a point by point basis and create an array that way. For example, I think
>> that all the US states in the Ncarg4_0 database have an mpAreaTypes value of
>> 6, so if I can check every point in my domain for it's respective mpAreaTypes
>> value, and only save points with value 6, I think I could create a mask array
>> and then use mask to get rid of everything not in the US. Is this even
>> remotely possible? Thanks for your help!
>>
>> -Eric
>>
>> Mary Haley wrote:
>>
>>> Hi Eric,
>>>
>>> Dennis mentioned a way you might do this via calculations.
>>>
>>> If all you are concerned about is not plotting the areas over the
>>> ocean, Canada, and Mexico, then you can accomplish this by doing
>>> graphical masking.
>>>
>>> See example 4 at:
>>>
>>> http://www.ncl.ucar.edu/Applications/mask.shtml
>>>
>>> Also see attached script that shows the first frame with no masking,
>>> and the second with. It's a goofy looking plot, but I was in a
>>> hurry. :-)
>>>
>>> --Mary
>>>
>>> On Thu, 28 May 2009, Eric D. Robinson wrote:
>>>
>>>
>>>> I have data that covers most of CONUS and part of the ocean, Canada, and
>>>> Mexico. I would like to set all the data that is not over the CONUS to
>>>> _FillValue. but I can't find an efficient way to do this. I know I can
>>>> set the ocean data to _FillValue with the mask function since I have the
>>>> land/sea mask, but I do not have a similar data set for political
>>>> boundaries. Any suggestions would be appreciated. Thanks!
>>>>
>>>> -Eric
>>>>
>>>> _______________________________________________
>>>> 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
>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
Received on Thu May 28 2009 - 10:31:54 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 01 2009 - 07:47:28 MDT