Re: I have a problem to set map with my plot

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon, 08 Dec 2008 10:14:00 -0700

Hi Ehsan,

If your data does not span 360 degrees of longitude, then you need to
set the resource gsnAddCyclic = False whenever you are using a gsn_csm
function to plot data on a map. Otherwise NCL will try to fill the area
between the first and last longitude values, and you will get an error
message.

http://www.ncl.ucar.edu/FAQ/#err_msgs_011
Adam

Ehsan Khorsandi wrote:
> Dear all,
>
> I want to plot the output of MCIP grided file that have no LAT and LON descriptur with it, The vary that i want is like this:
>
> float VD_NO2 ( TSTEP, LAY, ROW, COL )
> long_name : VD_NO2
> units : M/S
> var_desc : deposition velocity for species NO2
>
> So I used the ncl and described the LAT and LON by myself, the erorr is like this:
>
> (0) gsn_add_cyclic: Warning: The range of your longitude data is not 360.
> ....
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value
> ....
> ...
> ..
>
> and the output is not what i want, please see the code and help me in this case :
>
> -----------------
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
> tf = addfile("METCRO2D_bandar.nc","r")
> n=5
> T = tf->VD_NO2(n,0,:,:)
>
> u=(/T/)
> u!0 = "lat"
> u&lat = fspan(25.930, 27.784, 100)
> u&lat_at_units = "degrees_north"
> u!1 = "lon"
> u&lon = fspan(54.800,57.275,121)
> u&lon = fspan(54,57,121)
> u&lon_at_units = "degrees_east"
>
>
> printVarSummary(T)
> wks = gsn_open_wks("X11","bandar")
> gsn_define_colormap(wks,"rainbow")
>
>
> ; res = False
> res = True
>
> res_at_cnFillOn = True
> res_at_gsnSpreadColors = True
> res_at_lbOrientation = "Vertical"
> res_at_gsnMaximize = True
> res_at_lbLabelAutoStride = True
>
>
> res_at_cnLinesOn = False
> res_at_lbBoxLinesOn = False
>
> res_at_mpLimitMode = "LatLon"
> res_at_mpMinLatF = 25.93
> res_at_mpMaxLatF = 27.784
> res_at_mpMinLonF = 54.8
> res_at_mpMaxLonF = 57.275
>
>
>
> res_at_cnInfoLabelOrthogonalPosF = -0.007
> res_at_pmLabelBarOrthogonalPosF = -0.01
> plot = gsn_csm_contour_map_ce(wks,u,res)
>
> end
> --------------
> Thanks
>
> Ehsan
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 08 2008 - 10:14:00 MST

This archive was generated by hypermail 2.2.0 : Thu Dec 11 2008 - 03:51:46 MST