[ncl-talk] polar plot and gsnAddCyclic

Adam Phillips asphilli at ucar.edu
Wed Dec 14 15:10:27 MST 2016


Hi Marston,
Thanks for providing your data file and a easy to run script as that always
makes debugging so much easier.

Looking at your longitudes they are regularly spaced from 1.267E to
357.349E by 2.5254 degrees. I believe the gsn_add_cyclic error message is
coming in because the spacing between your first and last longitudes is
much larger than the spacing between all other neighboring longitudes: 3.91
degrees. Thus, you can set gsnAddCyclic = True (=the default) and NCL will
interpolate between the first and last longitudes when plotting, but it
will warn you that it isn't sure it should be doing this.

Thus, if you are fine with NCL interpolating over the larger distance over
the prime meridian I do not think you need to worry about the error
messages. If you really want to get rid of them you can try interpolating
to a new longitude between your first and last longitudes (that will result
in very irregular longitude spacing and still might not get rid of the
error messages) or interpolating to a new grid (say a 2.5 degree grid that
starts at 0).

Hope that helps!
Adam

On Wed, Dec 14, 2016 at 12:25 PM, Marston Johnston <shejo284 at gmail.com>
wrote:

> Hi Dennis,
>
>
>
> Appreciate you looking into this.
>
> My script: plot_tr_stats.ncl
>
> Data: stat_trs_scl_VOR850_neg_1.nc
>
>
>
> The files are uploaded.
>
>
>
> Best,
>
> /M
>
>
>
>
>
> *From: *<ncl-talk-bounces at ucar.edu> on behalf of Dennis Shea <
> shea at ucar.edu>
> *Date: *Wednesday, 14 December 2016 at 18:21
> *To: *Marston Johnston <marston.johnston at gu.se>
> *Cc: *"ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
> *Subject: *Re: [ncl-talk] polar plot and gsnAddCyclic
>
>
>
> I think you will have to provide a clean script and the data for ncl-talk
> to address this issue.
>
> ftp ftp.cgd.ucar.edu
>
> anonymous
>
> your_email
>
> cd incoming
>
> put ... script ...
>
> put ... data ...
>
> quit
>
> Let ncl-talk know after successful completion of the ftp transfer.
>
> THX
>
>
>
> On Mon, Dec 12, 2016 at 5:32 AM, Marston Johnston <marston.johnston at gu.se>
> wrote:
>
> Hi,
>
>
>
> I’m trying to make some plot using the polar stereographic projection.
>
> When I set res at gsnAddCyclic = False, everything works well but the plots
> have a gap at 0 deg longitude. However, whenever I set this to True, I get
> the standard warning that my longitude data doesn’t go to 360, but I don’t
> get a gap in the data.
> Is there a way to remove the gap and the warning? I was thinking of just
> extending the longitude copying the last longitude values to this new line,
> but searching for something more elegant.
> Note: this doesn’t happen when using Mercator projection.
>
>
>
> /M
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Marston S. Johnston, PhD
>
> Department of Earth Sciences
>
> University of Gothenburg, Sweden
>
> Email: marston.johnston at gu.se
>
> SkypeID: marston.johnston
>
> Phone: +46-31-7864901 <+46%2031%20786%2049%2001>
>
> Only the fruitful thing is true!
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________ ncl-talk mailing list
> ncl-talk at ucar.edu List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161214/3e0071ea/attachment.html 


More information about the ncl-talk mailing list