Re: To attach lats and lons to a set of points

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 14 2012 - 13:38:15 MDT

You can also use ESMF regridding. See example 14 at:

https://www.ncl.ucar.edu/Applications/ESMF.shtml

I think you just need to change the following:

 - srcFileName
 - The name of the variable you want to regrid ("div" in this script)
 - The name of the 1D lat/lon values (clon/clat in thie file)
 - Change DstGridType from "5deg" to "1deg"
 - Change other filenames as appropriate, like "ICON_2_5deg.nc", etc.

You need NCL V6.1.0-beta to run the ESMF examples.

--Mary

On Aug 14, 2012, at 12:49 PM, Dennis Shea wrote:

> Interpolation from randomly spaced data to a grid can be done via
>
> http://www.ncl.ucar.edu/Document/Functions/Contributed/natgrid_Wrap.shtml
>
> or
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/obj_anal_ic.shtml
>
> Both can be slow.
>
> On 8/14/12 11:27 AM, Noel Aloysius wrote:
>> Hi Mary,
>>
>> Thanks for the reply.
>>
>> I want to use these 1200 points to create a 1x1 lat/lon gridded time
>> series. Is there a way I can do this?
>>
>> Thanks,
>> Noel
>>
>>
>>
>>
>> On Tue, Aug 14, 2012 at 1:10 PM, Mary Haley <haley@ucar.edu
>> <mailto:haley@ucar.edu>> wrote:
>>
>> Hi Noel,
>>
>> Did anybody ever respond to this?
>>
>> I'm not sure what you mean "attach" the spatial information so you
>> can do analysis and plotting.
>>
>> I assume the lat/lon arrays are 1D of 1200 points? If so, there's no
>> way to automatically attach this to the variable such that the NCL
>> plotting or analysis routines will recognize them. We may add this
>> as a future feature.
>>
>> If you are simply creating contour/map plots, then the way to
>> indicate your lat/lon arrays is via the sfYArray and sfXArray resources:
>>
>> res@sfYArray = lat
>> res@sfXArray = lon
>>
>> where "lat" and "lon" are your 1D arrays.
>>
>> You may also need to set:
>>
>> res@gsnAddCyclic = False
>>
>> --Mary
>>
>>
>> On Aug 8, 2012, at 4:12 PM, Noel Aloysius wrote:
>>
>>> Hello NCL,
>>>
>>> I have a matrix of size flows = (/4,1200,120/) as (/var,
>> location_id, time/).
>>>
>>> I have the lat/lon values for the location_id attribute in
>> separate vectors. I would like to attach this spatial information to
>> flows matrix in order to do some spatial analysis and create various
>> maps.
>>>
>>> I would appreciate your guidance on this.
>>>
>>> Thanks,
>>> Noel
>>>
>>> _______________________________________________
>>> 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 Tue Aug 14 13:38:26 2012

This archive was generated by hypermail 2.1.8 : Wed Aug 15 2012 - 08:12:08 MDT