Re: Draw contour map on a bigger map

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Tue Dec 04 2012 - 17:28:01 MST

Hi Ronny,
Changing the opacity is available in v6.1.0. In previous NCL versions
you cannot change the opacity, so make sure you are using v6.1.0 if you
want to alter the transparency of the colors.

To see an example of changing the opacity of a color-filled field see
example #5 here:
http://www.ncl.ucar.edu/Applications/rgbacolor.shtml#ex5

If instead you wish to change the colors that are used, simply change
your colormap. You are currently using BlGrYeOrReVi200; you can select a
different colormap from the list here:
http://www.ncl.ucar.edu/Document/Graphics/color_table_gallery.shtml

Numerous color filled examples can be found here:
http://www.ncl.ucar.edu/Applications/color.shtml

Good luck,
Adam

On 12/4/12 4:34 PM, Ronny Berndt wrote:
> Hi Adam,
>
> thanks, this works perfect and next time i press the correct button for reply to all ;-)!
>
> Now i have another little question.
>
> Instead of drawing this contour on the map
> is it possible to draw this area with a maybe with a
> darker/lighter color (or a little bit opaque)?
>
> Cheers,
> Ronny
>
>
>
> Am 05.12.2012 um 00:11 schrieb Adam Phillips:
>
>> Hi Ronny,
>> Thank you for sending an easy-to-run script along with the datafile, as this makes diagnosing what is wrong much easier. Note though: In the future please respond to ncl-talk, as that way everyone can read your reply, and possibly respond with an answer..
>>
>> Are you receiving the same error messages I am receiving upon running your script?:
>> (0) check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.
>> (0) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:
>> (0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
>> (0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.
>> (0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values:
>> (0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
>>
>> If you are, then the error messages are telling you exactly what is wrong: Your latitude/longitude arrays do not have valid units attributes. I added these two lines to your script:
>> fsd&rlat@units = "degrees_north" ; was "degrees"
>> fsd&rlon@units = "degrees_east"
>>
>> Once I set those two lines I received another error message, warning me that the data is not cyclic and to set gsnAddCyclic = False:
>> (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
>>
>> I then added res@gsnAddCyclic = False, and the resulting plot looks like what I think you want. (attached)
>> Please let ncl-talk know if this does not resolve your issue.
>> Best regards,
>> Adam
>>
>>
>>
>> On 12/4/12 3:47 PM, Ronny Berndt wrote:
>>> Hi Adam,
>>>
>>> i have attached the script with an example ncl.
>>>
>>> i set your variables to
>>> res@mpMinLatF = -50.
>>> res@mpMaxLatF = 10.
>>> res@mpMinLonF = -10.
>>> res@mpMaxLonF = 50.
>>> res@mpCenterLonF = (res@mpMaxLonF+res@mpMinLonF)/2.
>>>
>>> But the full map is colored. it should be only colored
>>> from lat ~21S to ~-10S and lon ~10E to lon ~25E and the rest of the map
>>> should be only the countrys and water and so on...
>>>
>>> Do i have to make to maps and overlay them, or is
>>> there and easier solution?
>>>
>>> Cheers,
>>> Ronny
>>>
>> <native.png>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Dec 4 17:28:10 2012

This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST