[Thread Prev][Thread Next][Index]

[ferret_users] Re: mp_land_detail no states drawn



Hi Derek,
I just noticed that you'd written your question yesterday to the contact_ferret mail list.  Questions like these, "how to do xyz in Ferret", should go to the Users List instead - that way the questions and answers are part of the documentation for everyone to see and to refer to later by searching the archives. So, please join up by following the directions here-
http://ferret.pmel.noaa.gov/Ferret/email-users-group

One easy way to mark a grid, whether on a map projection or any plot, is to put a small symbol at the grid-cell centers.  Here's how to do it for a map projection
yes? use etopo60
yes? set reg/x=`360-145`:`360-50`/y=40:85
 !-> set reg/x=215:310/y=40:85
yes? go mp_stereographic_north
yes? set grid rose
yes? go mp_aspect
yes? fill/noax rose,x_page,y_page
yes? go mp_land_detail 1 overlay 1 1 blue
yes? plot/vs/over/sym=dot/nolab x_page, y_page  ! mark grid cell centers
 The variables x_page and y_page are defined using the x and y locations of the grid, so this marks the grid locations on the projected plot.

Or to draw lines representing the cell boxes,  you  could use the script mp_graticule.jnl which uses contour commands to contour along some set spacing of longitudes and latitudes.  If your original grid is regularly-spaced you can set the delta-values in the arguments to the script to match the grid resolution.  To see how that script is called,
yes? go/help mp_graticule
Ansley

Derek Tsui wrote:
Thanks! It works perfectly. My next question would be, is there a way draw the grid cells in this projection? I've found an example to draw boxes using ppl aline but don't think it'll work in my case.

Derek

On Thu, Apr 16, 2009 at 4:45 PM, Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi Derek,
Thanks for the report. This has to do with the way you happened to set the region.  If you set the region so that the values lie within x=0:360 then the lines will be drawn.  The script mp_land_detail is smart enough to draw lines outside x=0:360 for the continental boundaries but it doesn't do that for the other choices; states/provinces, rivers, and so on.

We'll fix this in the script, but you can easily get the right plot with this script (your commands but another dataset)


yes? use etopo20
yes? set reg/x=`360-145`:`360-50`/y=40:85
 !-> set reg/x=215:310/y=40:85
yes? go mp_stereographic_north
yes? set grid rose
yes? go mp_aspect
yes? fill/noax rose,x_page,y_page
yes? go mp_land_detail 1 overlay 1 1 blue
 

canda map


Derek Tsui wrote:
Hi,
 
I'm trying to graph in stereograph projection by following the examples. When I set the region X=0:360 and Y=00:90 , countries/states/rivers are drawn. But when I set the region to focus on Canada , only the continent outline is being drawn. Please see attached.
 
Source Code:
 
set data orog
set region/x=-145:-50/y=40:85
go mp_stereographic_north
set grid orog
go mp_aspect
contour/fill orog, x_page, y_page
go mp_land_detail 1 overlay 1 1 blue

Thanks,
Derek









Derek Tsui wrote:
Thanks! It works perfectly. My next question would be, is there a way draw the grid cells in this projection? I've found an example to draw boxes using ppl aline but don't think it'll work in my case.

Derek

On Thu, Apr 16, 2009 at 4:45 PM, Ansley Manke <Ansley.B.Manke@xxxxxxxx> wrote:
Hi Derek,
Thanks for the report. This has to do with the way you happened to set the region.  If you set the region so that the values lie within x=0:360 then the lines will be drawn.  The script mp_land_detail is smart enough to draw lines outside x=0:360 for the continental boundaries but it doesn't do that for the other choices; states/provinces, rivers, and so on.

We'll fix this in the script, but you can easily get the right plot with this script (your commands but another dataset)


yes? use etopo20
yes? set reg/x=`360-145`:`360-50`/y=40:85
 !-> set reg/x=215:310/y=40:85
yes? go mp_stereographic_north
yes? set grid rose
yes? go mp_aspect
yes? fill/noax rose,x_page,y_page
yes? go mp_land_detail 1 overlay 1 1 blue
 

canda map


Derek Tsui wrote:
Hi,
 
I'm trying to graph in stereograph projection by following the examples. When I set the region X=0:360 and Y=00:90 , countries/states/rivers are drawn. But when I set the region to focus on Canada , only the continent outline is being drawn. Please see attached.
 
Source Code:
 
set data orog
set region/x=-145:-50/y=40:85
go mp_stereographic_north
set grid orog
go mp_aspect
contour/fill orog, x_page, y_page
go mp_land_detail 1 overlay 1 1 blue

Thanks,
Derek








[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement