Re: help ploting graphic using "gsn_contour_shade"

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed, 14 Nov 2007 15:08:17 -0700

Hi Rosa,
I do not believe that the problem lies within the gsn_contour_shade
function... The gsn_add_cyclic error message is indicating that your
longitude range is not 360, and to set res_at_gsnAddCyclic = False. Does
your data span 360 degrees? And if not, have you tried setting
gsnAddCyclic = False?
Adam

Rosa Maria Nascimento dos Santos wrote:
> Hi Everyone,
>
> I'm trying to plot a graphic in NCL, using the gsn_contour_shade function,
> but my
> script is not work. I'm sending bellow the error mesage and the script
> lines. Could
> anyone look over it and help me?!
>
> Thanks in advance!
>
> Cheers,
>
> Rosa
>
> ERROR MESAGE:
> (0) gsn_add_cyclic: Warning: The range of your longitude data is not 360.
> (0) You may want to set gsnAddCyclic to False to avoid a warning (0)
> message from the spline function.
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransInitialize: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransSetValues: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransSetValues: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransSetValues: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransSetValues: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransSetValues: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
> fatal:Attribute assignment type mismatch
> fatal:Execute: Error occurred at or near line 65 in file teste.ncl
>
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X
> axis failed: consider adjusting trXTensionF value
> warning:IrTransSetValues: error creating spline approximation for
> trXCoordPoints;
> defaulting to linear
>
>
> SCRIPT:
>
> begin
>
> f=addfile("/mnt/LACIE/b30.030e/b30.030e.cam2.h3.SA_T.1999-01-01_cat_1999-12-31.nc","r")
> temp=f->T
> lat = f->lat
> lon = f->lon
> level=f->lev
> time = f->time
> data = f->date
> ;tempo1 = f->mdt
> tempo1 = f->datesec
>
>
> ;*********Creating the variable tempc
> (oC)**************************************************
> tempc = new(dimsizes(temp),typeof(temp))
>
> tempc!0 = "time"
> tempc!1 = "lev"
> tempc!2 = "lat"
> tempc!3 = "lon"
>
> tempc&time = time
> tempc&lev = level
> tempc&lat = lat
> tempc&lon = lon
>
> tempc_at_long_name = "temperature"
> tempc_at_units = "oC"
> tempc_at_grid_type = "gaussian"
>
> tempc = (temp(:,::-1,:,:) - 273.15)
> ;********************************************************************************************
> ;*********Creating the variable tempo
> (YYYY-MM-DD-HH)****************************************
> tempo = new(dimsizes(tempo1),string)
>
> hora= new(dimsizes(tempo1),typeof(tempo1))
>
> hora = tempo1/3600
>
> tempo = data + "-" + hora
> ;********************************************************************************************
>
>
> wks = gsn_open_wks("ps","teste")
>
> res = True
> res_at_gsnDraw = False
> res_at_gsnFrame = False
> res_at_cnInfoLabelOn = False
>
> plot = gsn_csm_contour_map(wks,tempc(1,1,:,:),res)
>
> opt = True
> opt_at_gsnShadeFillType = "color"
> opt_at_gsnShadeHigh = 14
> opt_at_gsnShadeHigh = "red"
>
> plot = gsn_contour_shade(plot,0.,35.,opt)
>
> draw(plot)
> frame(wks)
>
>
> end
>
>
>

-- 
--------------------------------------------------------------
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
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Nov 14 2007 - 15:08:17 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 15 2007 - 10:01:54 MST