[gradsusr] over plot sub region on global chart
James T. Potemra
jimp at hawaii.edu
Thu Jan 27 13:56:17 EST 2011
Hi Bernd:
One way, not very straightforward, is to first plot the global data
(plot1), then
find out where the subplot lat/lon range is on the page, do "parea" for
just that
part, and then plot the subset (plot2).
For example, let say that you plot 0-360, -90-90, and it occupies
0.5-10.5 (width)
and 0.5-8.0 (height) on the page. Next you want to plot something from
180 to
360, 0-90 (i.e., the top right corner). If you enter "parea 5.5 10.5
3.75 8.0", then
set lat/lon and plot the subplot, it will plot in the top right corner.
This is just for
example, the exact location on the page will depend on your borders, labels,
etc. To get the exact location you can plot the first one, then make
use of
"q w2xy", or "q ll2xy" to return the location on the page of specific
lat/lon
points. Also note for the second plot you'll probably want to turn off
the map,
frame box, lat/lon labels, etc. Note that doing it this way will plot
in the area
you specify, so you have to make sure the lat/lons are set correctly
(e.g., you
could theoretically plot 180-360, -90-0 in the upper right corner.
'set lon 0 360'
'set lat -90 90'
'd prec'
'q w2xy 120 0'
xmin = subwrd(result,3)
ymin = subwrd(result,6)
'q w2xy 180 45'
xmax = subwrd(result,3)
ymax = subwrd(result,6)
'set parea 'xmin' 'xmax' 'ymin' 'ymax
'set lat 0 45'
'set lon 120 180'
'set mproj scaled'
'set mpdraw off'
'set frame off'
'set grid off'
'set xlab off'
'set ylab off'
'd tmean'
Jim
Becker, Bernd wrote:
> Hello,
>
> I would like to plot a global map of T
> and a smaller area map of OLR on top of T.
>
> Grads plots the smaller area across the whole canvass.
>
> How can I get this:
>
> plot
> -----------------
> | plot2 --- |
> | | | |
> | --- |
> -----------------
> reset
> LON set to 0 360
> LAT set to -90 90
> ga-> d prec
> Contouring: 0 to 27 interval 3
> ga-> set lat 0 45
> LAT set to 0 45
> ga-> set lon 120 180
> LON set to 120 180
> ga-> d tmean
> Contouring: -20 to 25 interval 5
> ga-> set parea 1 11 1 7.2
> ga-> d tmean
> Contouring: -20 to 25 interval 5
> ga-> set lon 120 245
> LON set to 120 245
> ga-> d tmean
> Contouring: -20 to 25 interval 5
>
> the second "display" grabs as much of the screen as it can,
> rather than homing in on the first map's lat and lon.
>
> How can I do that?
> many thanks!
> Bernd.
>
>
> --
> Bernd Becker Climate Impacts Product Development
> Met Office Hadley Centre FitzRoy Road Exeter Devon EX1 3PB United
> Kingdom
> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050
> E-mail:bernd.becker at metoffice.gov.uk -
> http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/
> bernd-becker
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
More information about the gradsusr
mailing list