Re: help ploting graphic using "gsn_contour_shade"

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 19 Nov 2007 14:52:13 -0700

Rosa,

To plot only the contours on/near Brazil, you can use coordinate
subscripting. Right now, you are using index subscripting.

You can only use coordinate subscripting when you've set up coordinate
arrays and attached them to your data, which it looks like you've done.

To get the area around Brazil, then, you can use something like this
(note the use of curly braces; this causes coordinate subscripting to
be used):

     plot = gsn_csm_contour_map(wks,tempc(1,1,{-35:10},{-75:-35}),res)

Note that you will also need to zoom in on the map area you are
interested in:

   res_at_mpMinLatF = -35
   res_at_mpMaxLatF = 10
   res_at_mpMinLonF = -75
   res_at_mpMaxLonF = -35

Of course, you can change these lat/lon values to whatever area you are
interested in.

By using coordinate subscripting to subselect the area that you are
interesting in contouring, I'm hoping this will help get rid of the
other error messages. If it doesn't, then please let me know if you can
give me your data so I can run your script here and take a look at it.

--Mary

On Nov 19, 2007, at 2:05 PM, Rosa Maria Nascimento dos Santos wrote:

> Hi Mary,
>
> I setted the resource as you told me (res_at_gsnAddCyclic = False), but
> it's
> still showing the warnings! I'm sending the script attached, ok!
> I have another question: how do I set the lat and long limits in the
> graphics? For instance, if I want to plot temperature only to Brazil,
> how
> can I do that?!
>
> Thanks in advance!
>
> Cheers,
>
> Rosa
>
>
>> Rosa,
>>
>> I think you are missing "res@" in front of the resource name:
>>
>> res_at_gsnAddCyclic = False
>>
>> The "res" should be replaced with whatever your resource variable name
>> is.
>>
>> If you are doing this but still getting the error, then can you email
>> me your script?
>>
>> Thanks,
>>
>> --Mary
>>
>>
>> On Nov 14, 2007, at 4:15 PM, Rosa Maria Nascimento dos Santos wrote:
>>
>>> Hi Gary, Adam, Michael and everyone!
>>>
>>> Thanks to you all!
>>>
>>> I tryed to set gsnAddCyclic = False and it worked (NCL created the
>>> graphic). But it's still giving a warning 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:gsn_add_cyclic is not a valid resource in teste_contour at
>>> this time
>>> 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
>>>
>>> Is that going to be a problem to other graphics? For instance, if I
>>> want
>>> to make panels, this warnings will lead to errors?!
>>>
>>> Thanks again!
>>>
>>> Cheers,
>>>
>>> Rosa
>>>
>>> --
>>> Rosa Maria Nascimento dos Santos
>>> Doutora em Meteorologia
>>> LBA/INPA
>>> Tel: +55 92 36433623
>>> e-mail: rosasto_at_inpa.gov.br
>>> rosa_sto_at_yahoo.com
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk_at_ucar.edu
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> --
> Rosa Maria Nascimento dos Santos
> Doutora em Meteorologia
> LBA/INPA
> Tel: +55 92 36433623
> e-mail: rosasto_at_inpa.gov.br
>
> rosa_sto_at_yahoo.com<teste.ncl>__________________________________________
> _____
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 19 2007 - 14:52:13 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 25 2007 - 07:21:25 MST