Re: Plotting irregularly spaced vectors on a map

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 11 2013 - 10:44:17 MST

Hi John,

This question appears to have slipped between the cracks, sorry!

The "spline" message warning is usually an indication that your lat/lon values are very irreguarly-spaced, and hence NCL is having a hard time projecting this onto a map.

Sometimes we see these kind of errors, for example, when somebody is plotting global data that has a dense lat/lon grid, say around the equator, and then some data around the poles. In this case, NCL has a hard time with the spacing of the lat/lon grid between the equator and the poles, b/c it is so sparse there.

What kind of grid did you regrid the values to? Can you verify that the lat/lon values look correct and that they have the spacing you expect?

You may also need to set:

   res@gsnAddCyclic =False

if your data is not global.

--Mary

On Feb 6, 2013, at 8:10 AM, John Kerfoot wrote:

> Good Morning,
>
> I really like the graphics capabilities that NCL provides and I've been writing some scripts analyze ocean surface current measurements measured from high-frequency radar. Here's the problem I'm having:
>
> The raw vector measurements are radial velocity vectors measured from a single transmit/receive antenna located on shore. We receive a new radial velocity file every hour which has a header, footer and the data. The data is an array of irregularly spaced points at which the velocity measurements are made. Here's a piece of the file:
>
> %% Longitude Latitude U comp V comp
> 55 %% (deg) (deg) (cm/s) (cm/s)
> 56 -74.7654328 38.9953526 37.390 6.578
> 57 -74.7650369 38.9929993 33.209 2.893
> 58 -74.7649055 38.9906281 31.973 -0.012
> 59 -74.7650393 38.9882570 30.224 -2.656
> 60 -74.7654374 38.9859040 26.660 -4.711
> 61 -74.7660967 38.9835870 16.681 -4.476
> 62 -74.7670121 38.9813237 15.350 -5.593
> 63 -74.7681768 38.9791312 19.292 -9.004
> 64 -74.7695817 38.9770263 12.978 -7.498
>
> ....
> EOF
>
> I figured I could find all of the unique lat and lon values and use them to reshape the U and V arrays into a grid (I've written functions to do all of this) which would have mostly _FillValues, with interspersed vector components. I could then use gsn_csm_vector to overlay the vectors on a map created with gsn_csm_map.
>
> The problem I'm running into is that, after reshaping the U and V arrays to a grid and adding the appropriate lat/lon coordinate variables (which are the unique values from the Latitude and Longitude arrays), I try to plot the vectors using gsn_csm_vector and gsn_csm_map. I'm getting the following errors/warnings:
>
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for Y axis failed: consider adjusting trYTensionF value
> warning:IrTransInitialize: error creating spline approximation for trXCoordPoints; defaulting to linear
> warning:IrTransInitialize: error creating spline approximation for trYCoordPoints; defaulting to linear
>
> Is there any way to plot ungridded vectors onto a map in NCL? I found the following thread:
>
> http://www.ncl.ucar.edu/Support/talk_archives/2007/1104.html
>
> but I don't think there was a published resolution.
>
> Thanks,
> John
>
>
> _______________________________________________
> 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 Feb 11 10:44:32 2013

This archive was generated by hypermail 2.1.8 : Wed Feb 13 2013 - 09:25:58 MST