[gradsusr] labeling latitude/longitude on polar stereograph map projection

Kyle Clem Kyle.Clem at vuw.ac.nz
Mon Sep 15 19:39:51 EDT 2014


Hi Colleen,

Thank you very much for your assistance. Just to clarify, there is not a way to have GrADS automatically display lat/lon boxes on a polar stereographic map projection, correct? You have to plot them yourself?

Thanks,
Kyle

----------------------
Kyle Clem, M.Sc.
PhD Student
School of Geography, Environment and Earth Sciences
Victoria University of Wellington
Cotton Building, Room 222
kyle.clem at vuw.ac.nz
________________________________
From: gradsusr-bounces at gradsusr.org [gradsusr-bounces at gradsusr.org] on behalf of Mikovitz, Colleen (LARC-E302)[SCIENCE SYSTEMS AND APPLICATIONS, INC] [j.c.mikovitz at nasa.gov]
Sent: Saturday, September 13, 2014 12:24 AM
To: GrADS Users Forum
Subject: Re: [gradsusr] labeling latitude/longitude on polar stereograph map projection

Kyle,

I have recently done it this way for a particular area.  You’ll probably need to modify the placement of xpos and ypos in the polargrid script.

'map nps '
'set lat 58 66'
'set lon 116 136’
(do your mapping here)

'set gxout contour'
'interval 58 66 2'
'set ccolor 1'
'set cstyle 5'
'set cthick 3'
'set clab off'
'd lat'
'interval 116 136 4'
'set ccolor 1'
'set cstyle 5'
'set cthick 3'
'set clab off'
'd lon'
'polargrid 116 136 4 58 66 2’

polargrid.gs is
* * * * * * * * * * * * * * * * * * * * * * * * * *
* Draws grid lines at specified intervals
* call is
* polargrid lonmin lonmax lonincr latmin latmax latincr
function polargrid(args)
* parse arguments
lonmin = subwrd(args,1)
lonmax = subwrd(args,2)
lonincr = subwrd(args,3)
latmin = subwrd(args,4)
latmax = subwrd(args,5)
latincr = subwrd(args,6)

midlat = (latmax+latmin)/2
quarterlat = (latmax+midlat)/2
'q dims'
xline = sublin(result,2)
yline = sublin(result,3)
lonstart = subwrd(xline,6)
lonend = subwrd(xline,8)
midlon = (lonstart+lonend)/2
*midlon = (lonmax+lonmin)/2
istart=latmin
while (istart <=latmax)
  'q w2xy 'midlon' ' istart
  xpos=subwrd(result,3)
  ypos=subwrd(result,6)
  'draw string 'xpos' 'ypos' 'istart
  istart=istart+latincr
endwhile
istart=lonmin
while (istart <=lonmax)
  'q w2xy 'istart' ' quarterlat+0.5
  xpos=subwrd(result,3)
  ypos=subwrd(result,6)
  'draw string 'xpos' 'ypos' 'istart
  istart=istart+lonincr
endwhile
return
*********************************
interval.gs is
*********************************

function interval(arg)
*limitation that you must know for sure the start & end will be correct with the interval
if (arg = '')
   say 'Enter Min Max and interval'
   pull cmdline
else
   cmdline=arg
endif
min=subwrd(cmdline,1)
max=subwrd(cmdline,2)
int=subwrd(cmdline,3)

number=(max-min)/int+1
lev = min

i=1
while (i <= number-1)
   next = min+int*i
   lev = lev%' '%next
   i=i+1
endwhile

'set clevs ' lev
*********************************

Colleen

On Sep 11, 2014, at 6:29 PM, Kyle Clem <Kyle.Clem at vuw.ac.nz<mailto:Kyle.Clem at vuw.ac.nz>> wrote:

Hi Everyone,

I am trying to display lat/lon labels on a polar stereographic map projection. Does anyone know how to do this?

Thanks,
Kyle

----------------------
Kyle Clem, M.Sc.
PhD Student
School of Geography, Environment and Earth Sciences
Victoria University of Wellington
Cotton Building, Room 222
kyle.clem at vuw.ac.nz<mailto:kyle.clem at vuw.ac.nz>
_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20140915/6146051c/attachment-0001.html 


More information about the gradsusr mailing list