Hi Jerry,
In order to subscript longitude data using {150:200} type coordinate
subscripting, you have to reorder your longitude coordinate array
so that it goes from 0 to 360, rather than -180 to 180.
If your data is global and doesn't have the cyclic point added, then
you can do this easily by using the "lonFlip" function.
You need to make sure you load contributed.ncl (after loading
gsn_code.ncl and gsn_csm.ncl):
   load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
   load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
   load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
Then, you can call lonFlip before you call the plotting function:
   T_flip = lonFlip(T)
   plot = gsn_csm_contour_map(wks, T_flip({-20:20},{150:200}), res)
--Mary
On Mon, 15 Aug 2005, jerry wrote:
> hi
> if i have a global data T(lat ,lon)  and T&lon is between  -180~180
> now i want to plot contour map in the domain  150E ~20W  20S~20N
>
> so i set the
>
> res@mpCenterLonF = 180
> res@mpMaxLonF = 200
> res@mpMinLonF = 150
> res@mpMaxLatF = 20
> res@mpMinLatF = -20
>
> the question is if i writed the  code like
> plot = gsn_csm_contour_map(wks, T(ĄG,ĄG), res)
> the label bar's value will show the global domain
> but i just need the value in the range   150E ~20W  20S~20N
> so i change the code to
> plot = gsn_csm_contour_map(wks, T({-20ĄG20},{?ĄG?}), res)
>
> if {?ĄG?} set to {150ĄG200)  will got the error message  bescause   T&lon is between  -180~180
>
> how can i convert the coordinate variable to fit it  or any suggestion to change the label bar value ?
>
> Thank you
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Aug 15 2005 - 09:42:33 MDT