Re: how to draw vector fields with the unstructured grid data

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sun Jul 07 2013 - 17:31:25 MDT

On Jul 7, 2013, at 5:02 PM, zhuxm@nmefc.gov.cn wrote:

> Hi Mary,
>
> Thank you for your responding so quickly.
>
> Can you send me some links on interpolating unstructured data to regular grid data? Do you think ESMF_regrid is the best one?

It depends on your data, but yes, in general, ESMF_regrid is the best one. You can start by looking at example ESMF_regrid_10.ncl, which goes from an unstructured grid to a 0.25 degree grid:

http://www.ncl.ucar.edu/Applications/ESMF.shtml#ex10

We also have some ESMF templates available:

http://www.ncl.ucar.edu/Applications/Templates/

See either one of these ones:

unstructured ---> 0.25 degree grid (ESMF_unstruct_to_0.25deg.ncl)
unstructured ---> rectilinear (ESMF_unstruct_to_rect.ncl)

If ESMF_regrid looks too complex, then you can go to:

http://www.ncl.ucar.edu/Document/Functions/interp.shtml

and search for the word "unstructured". You will see several choices that involve interpolation or just placing points on a grid:

cssgrid Uses tension splines to interpolate unstructured (randomly-spaced) data on a unit sphere to data values on a rectilinear grid.

dsgrid2 Interpolates data from an unstructured (randomly-spaced) grid to a rectilinear grid using inverse distance weighted interpolation.

natgrid Interpolates data from an unstructured (randomly-spaced) grid to a rectilinear grid using natural neighbor interpolation.

triple2grid Places unstructured (randomly-spaced) data onto the nearest locations of a rectilinear grid.

--Mary

>
>
>
> By the way, I want to make sure that once I interpolate the U/V data to a regular grid, may I use gsn_vector_* or gsn_csm_vector_* functions to display them?
>
> Thanks.
>
>
>
>
>
>
>
> Hi Xueming,
>
> Yes, for now, you will need to interpolate your U/V data to a rectilinear (regular) or curvilinear grid.
>
> Or, you can try using the wmvect or wmvectmap procedures to plot single vectors. These two routlines are rather limited. See:
>
> http://www.ncl.ucar.edu/Document/Functions/Built-in/wmvect.shtml
> http://www.ncl.ucar.edu/Document/Functions/Built-in/wmvectmap.shtml
>
>
> Or see examples 8 and 9 at:
>
> http://www.ncl.ucar.edu/Applications/weather_sym.shtml
>
> We do have it high on our list to add capabilities for drawing vectors on unstructured grids, but we're not sure when we'll get to it.
>
> --Mary
>
> On Jul 7, 2013, at 2:06 PM, zhuxm@nmefc.gov.cn wrote:
>
>
>> Hi,
>>
>> I want to plot vector fields with unstructured grid data from FVCOM output by NCL, which both u and v variables are only one-dimension like u(nele),v(nele). But all the vector functions (gsn_vector_*) in ncl need two dimensional u and v, such as u(:,:),v(:,:). How should I do for my unstructured grid data? Do I have to interpolate them to regular grid?
>>
>> Thanks.
>>
>>
>> Xueming
>>
>> _______________________________________________
>>
>> 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 Sun Jul 7 17:31:38 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 12 2013 - 16:37:39 MDT