[Thread Prev][Thread Next][Index]

Re: [ferret_users] Southern Hemisphere polar stereographic plot issue



Hi Geeta,

Here's what I do to do that kind of plot - even puts the color bar at the bottom, as a bonus :)

Cheers,

Paul


use "z500_djf.nc" !e.g. 500 mb geopotential height

define symbol lv = (-inf)(-30,30,5)(inf) !Some plotting options
let latS = -40
let size = 0.11

set region/y=-90:`latS`   !Plot set up
set region/x=-180:180                            
set grid z500[d=1]                    
go mp_stereographic_south 180 

fill/lev=($lv)/noaxes/set/x=-180:180 \    
      z500[d=1], x_page, y_page  !Do the plot
ppl title " "                       
let xlo = ($ppl$xorg) - 1.5         
let xhi = `xlo` + ($ppl$xlen) + 3   
let ylo = ($ppl$yorg) - 0.6         
let yhi = ($ppl$yorg) - 0.6 + 0.12  
ppl shakey `dokey[i=($xxx)]`,0,`size`,2,-0,,`xlo`,`xhi`,`ylo`,`yhi` 
ppl fill                            
go mp_land 7                         !Continents (heavy black)
go mp_graticule " "  " "  " " `latS` `latS` 5 13   !Outline the whole circle




On Mar 20, 2012, at 10:21 AM, Geeta Persad wrote:

Hi All,
I am having a problem doing a polar stereographic plot for the Southern Hemisphere. Here is the code I am using:

SET MODE METADATA


GO mp_stereographic_south 180 50

GO mp_grid gz[d=1]

SET REGION/X=0:360/Y=90S:11S/Z=500/L=1

GO mp_aspect

let masked_gz1s = gz[d=1]*mp_mask

CONTOUR/NOAXES/NOLAB masked_gz1s, x_page, y_page

GO mp_land

GP mp_graticule 0 360 60 -11 -90 10 0.5

GO mp_label 180 6 0 0 0.2 "Southern Hem. DJF Geopotential Height at 500 mb" 

Where 'gz[d=1]' is the geopotential height variable in the 'all_vars.djf.nc' file.

This script throws the error

**ERROR: illegal limits: "(MP_Y[J=@MAX] + MP_..." does not exist at Y=-90:-11
                Axis extremes are Y=0.5:10000000
DEFINE VARIABLE/quiet mp_gtest = 50 - `(mp_y[j=@max] + mp_y[j=@min])/`
Command file, command group, or REPEAR execution aborted

I followed some earlier advice by Ansley from the archives indicating that putting the mp_grid statement before the set region and mp_aspect statement could solve this problem. However, the error is now being thrown following the call to mp_land. When I comment out mp_land, it is thrown after the call to mp_graticule. Ferret succeeds at running the contour command, though. I have also tried changing the standard parallel term in the call to mp_stereographic_south to '-50' instead of '50', but that doesn't seem to have an effect. 

Is there some other way in which mp_land and mp_graticule need to be called when using the Southern Hemisphere polar stereographic projection? Or is there some other visible error with my code? 

Thanks for your help!

~Geeta


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement