Re: plotting trajectories (Was: (no subject))

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Wed, 6 May 2009 09:20:07 -0600 (MDT)

Hi Kevin,

One (or more) of your "xpt" set of longitude values has values like:

(114) 6.847113
(115) 4.961234
(116) 3.07686
(117) 1.207852

and then the next values jump to:

(118) 359.3726
(119) 357.5829
(120) 355.8436

NCL has no way of knowing that you want to treat these values as if
they were just going from 1.2 to -0.6 (359.4-360), so you need to
adjust these values yourself.

See the attached modified version of your script that has a
"lon_adjust" procedure to do this. It checks for a sudden jump in
consecutive longitude values, and subtracts 360 from the remaining
values. You may need to modify this function if your longitude values
are not always monotonically decreasing.

--Mary

On Wed, 6 May 2009, Kevin Keay wrote:

>
> Hi!
>
> I am trying to plot some trajectories using NCL Version 5.0.0 for Windows.
>
> Something strange happens for trajectories that cross the Greenwich meridian. Instead of continuing directly over the meridian the curve double backs and goes around the globe to make the connection. I wouldn't want to go with an airline that did that!
>
> I attach my NCL script, the small input NetCDF file and a PNG plot of the output. There are 14 trajectories in the input file, each has 145 points. I am using gsn_polyline to plot the trajectories.
>
> Cheers!
>
> Kevin
>
> --------------------------------------------------------------------------------
> Kevin Keay
>
> Senior Research Assistant
>
> Room 343
> School of Earth Sciences
> University of Melbourne
> Victoria 3010
> Australia
>
> E-mail: keay_at_unimelb.edu.au
>
> Web: http://www.earthsci.unimelb.edu.au/~kevin/kevin.html <http://www.earthsci.unimelb.edu.au/~kevin/kevin.html>
>
> Phone: +61 3 8344 6907 / 7227 (work)
> Fax: +61 3 8344 7761
>
> "I wandered lonely as a cloud." William Wordsworth
> --------------------------------------------------------------------------------
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed May 06 2009 - 09:20:07 MDT

This archive was generated by hypermail 2.2.0 : Wed May 06 2009 - 16:48:59 MDT