[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Horrible map reprojections



Ben Marriage wrote:
> 
> Martin Schultz wrote:
> 
> > (1) make sure that the "center" longitude is at the center of your
> > LIMIT (or at least within and not at the border)
> > (2) you can get rid off the silly lines if you omit the clip=0
> > keyword.
> >
> > The following looks ok to me (same version and platform as you have):
> > map_set,0,180,limit=[-30,0,30,360],xmar=0,$
> >    ymar=0,noborder=1,/grid,/iso,/mercator
> > map_continents,/hires
> >
> 
> Thanks Martin, that kinda solves one problem. However, the contour
> problem still remains. Take a look at
> http://www.met.ed.ac.uk/~aaron/funny_lines.gif. There are lines drawn
> from one edge of the plot to the other (the data when filled with the
> /cell_fill keyword looks OK), just when a line contour is drawn over the
> top, these parallel lines appear. They look to be where the data is
> trying to connect one point to the same point, but in a different region
> of the plot window?
> 
> Thanks,
> Ben

Yeah. That's the big problem I still haven't solved in a
satisfactorily general manner (admitting that I haven't tried too
hard). It would be very nice, if you could contact support@rsinc.com
with your problem and request that they finally improve the stability
and functionality of the mapping tools in IDL. Sure, most of the time
you can get them to work, but it's always a pain and not very
user-friendly at all.

    What you are facing with these contours somehow has to do with how
map_set treats out-of-bounds data (sloppy formulation). There are two
things you should check:
(1) don't pass (much) more data than you need to display (i.e. cut off
all data north and southwards of 35 deg latitude before drawing the
contour
(2) make sure that your data is arrange din the correct order. If the
data is from -180 to 180, but you rmap projection (as it is now) is
set up from 0 to 360, you will have to shuffle the data with somethin
glike this (assuming a 1x1 degree grid):
    newdata = [ data[0:179,*], data[180:*,*] ]

Hope this helps,
Martin


-- 
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[
[[ Dr. Martin Schultz   Max-Planck-Institut fuer Meteorologie    [[
[[                      Bundesstr. 55, 20146 Hamburg             [[
[[                      phone: +49 40 41173-308                  [[
[[                      fax:   +49 40 41173-298                  [[
[[ martin.schultz@dkrz.de                                        [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[