Displaying SLA provided in mercator projection
Dr. A. Luis
alvluis at YAHOO.COM
Thu Sep 8 08:11:08 EDT 2005
Hi GrADS-users,
Probably someone out there might have tried
displying Sea Level Anomaly (MSLA)distributed at
ftp://ftp.cls.fr/pub/oceano/enact/msla/
I could open the netCDF files in GrADS but could not
display. Reason: the maps are provided on a MERCATOR
1/3° grid. Resolutions in kilometers in latitude and
longitude are thus identical and vary with the cosine
of latitude (e.g. from 37 km at the equator to18.5 km
at 60°N/S). Could someone tell me please how to
display this type of files in GrADS?
Thanks,
Louis
--- "Dr. Rupa Kumar Kolli" <kolli at TROPMET.RES.IN>
wrote:
> Hi
>
> Try this script.
>
> RK.
>
> anil kumar rohilla wrote:
>
> >
> > HI
> > Everybody
> > Any body know how to plot a vertical colour bar
> in between of
> > multipe plots,e.g four plots are there on single
> screen ,how to plot
> > single colour bar in vertical .Any script if
> available ?
> > thanks in advance
> > anil
> >
> > ANIL KUMAR( METEOROLOGIST GR -II)
>
>
> --
>
==============================================================================
> Dr. Rupa Kumar Kolli
> Scientist-F & Head
> Climatology & Hydrometeorology Division
> Indian Institute of Tropical Meteorology
> Homi Bhabha Road, Pune 411 008, India
>
> Phone: +91-20-2589-3600 ext 351 (work);
> +91-20-2586-3399 (home)
> Fax: +91-20-2589-3825
> email: kolli at tropmet.res.in ;
> rupakumar.kolli at gmail.com
>
-------------------------------------------------------------------------------
> Visit 'Monsoon On Line':
> http://soman.tropmet.res.in/MOL/index.html
>
==============================================================================
>
>
> > *
> * Script to plot a colorbar
> *
> * The script will assume a colorbar is wanted even
> if there is
> * not room -- it will plot on the side or the
> bottom if there is
> * room in either place, otherwise it will plot
> along the bottom and
> * overlay labels there if any. This can be dealt
> with via
> * the 'set parea' command. In version 2 the
> default parea will
> * be changed, but we want to guarantee upward
> compatibility in
> * sub-releases.
> *
> *
> * modifications by Mike Fiorino
> 940614
> * by Rupa Kumar Kolli
> 971204
> *
> * - the extreme colors are plotted as
> triangles
> * - the colors are boxed in white
> * - full control on the x,y size of bar and
> character size
> * - the bar can be placed in physical
> coordinates anywhere on
> * the full page
> * - input arguments in during a run execution:
> *
> * run cbar_rup leng thik vert xmid ymid csiz
> page
> *
> * leng - length of bar in vpage coordinates
> * thik - thickness of bar in vpage coordinates
> * vert - H draws a horizontal bar
> * - V draws a vertical bar
> * xmid - the x position on the virtual page of
> center of bar
> * ymid - the y position on the virtual page of
> center of bar
> * csiz - character size for numbers
> (default=0.12)
> * page - 0 places the bar in current vpage
> coordinates (default)
> * - l or L places the bar in physical
> page coordinates (landscape)
> * - p or P places the bar in physical
> page coordinates (portrait)
> *
> * if vert,xmid,ymid are not specified, they
> are selected
> * as in the original algorithm
> *
> * Please report bugs to kolli at tropmet.ernet.in
>
> function colorbar (args)
>
> leng=subwrd(args,1)
> thik=subwrd(args,2)
> vert=subwrd(args,3)
> vert=substr(vert,1,1)
> if(vert='v');vert='V';endif
> xmid=subwrd(args,4)
> ymid=subwrd(args,5)
> csiz=subwrd(args,6)
> page=subwrd(args,7)
> *say leng
> *say thik
> *say vert
> *say xmid
> *say ymid
> *say csiz
> *say page
>
> *
> * Check shading information
> *
> 'query shades'
> shdinfo = result
> if (subwrd(shdinfo,1)='None')
> say 'Cannot plot color bar: No shading
> information'
> return
> endif
>
> if(page='L' | page='l')
> 'set vpage 0 11 0 8.5'
> else
> if(page='P' | page='p')
> 'set vpage 0 8.5 0 11'
> endif
> endif
>
> *
> * Get plot size info
> *
> 'query gxinfo'
> rec2 = sublin(result,2)
> rec3 = sublin(result,3)
> rec4 = sublin(result,4)
> xsiz = subwrd(rec2,4)
> ysiz = subwrd(rec2,6)
> ylo = subwrd(rec4,4)
> xlo = subwrd(rec3,4)
> xhi = subwrd(rec3,6)
> xd = xsiz - xhi
>
> sf=1.0
>
> ylolim=0.6*sf
> xdlim1=1.0*sf
> xdlim2=1.5*sf
> barsf=0.8*sf
> yoffset=0.2*sf
> stroff=0.05*sf
> if csiz=''
> strxsiz=0.12
> strysiz=0.13
> else
> strxsiz=csiz
> strysiz=csiz+csiz/10.
> endif
>
> *
> * Decide if horizontal or vertical color bar
> * and set up constants.
> *
> if(page!='L' & page!='l' & page!='P' & page!='p' &
> ylo<ylolim & xd<xdlim1)
> * say ylo
> * say ylolim
> * say xd
> * say xdlim1
> say "Not enough room in plot for a colorbar"
> return
> endif
> cnum = subwrd(shdinfo,5)
> *
> * logic for setting the bar orientation with
> user overides
> *
> if (ylo<ylolim | xd>xdlim1)
> vchk = 1
> if(vert != 'V') ; vchk = 0 ; endif
> else
> vchk = 0
> if(vert = 'V') ; vchk = 1 ; endif
> endif
> *
> * vertical bar
> *
>
> if (vchk = 1 )
>
> if(xmid = '') ; xmid = xhi+xd/2 ; endif
> if(thik>0)
> xwid=thik
> else
> xwid = 0.2*sf
> endif
> if(leng>0)
> ywid=leng/cnum
> else
> ywid = 0.5*sf
> endif
>
> xl = xmid-xwid/2
> xr = xl + xwid
> if (ywid*cnum > ysiz*barsf)
> ywid = ysiz*barsf/cnum
> endif
> if(ymid = '') ; ymid = ysiz/2 ; endif
> yb = ymid - ywid*cnum/2
> 'set string 1 l 2'
> vert = 'V'
>
> else
>
> *
> * horizontal bar
> *
>
> if(thik>0)
> ywid=thik
> else
> ywid = 0.2*sf
> endif
> if(leng>0)
> xwid=leng/cnum
> else
> xwid = 0.8
> endif
>
> if(ymid = '') ; ymid = ylo/2-ywid/2 ; endif
> * yt = ymid + yoffset
> yt = ymid + ywid
> yb = ymid
>
=== message truncated ===
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
More information about the gradsusr
mailing list