[ncl-talk] gsn_csm_vector_scalar_map
Mary Haley
haley at ucar.edu
Sun Feb 7 16:02:07 MST 2016
Xi,
For an example of using gsn_csm_vector_scalar_map and changing the contour
levels, please see example "lcnative_5.ncl" at:
http://www.ncl.ucar.edu/Applications/lcnative.shtml#ex5
You will need to add the following lines to the code:
res at cnLevelSelectionMode = "ManualLevels"
res at cnMinLevelValF = 270
res at cnMaxLevelValF = 310
res at cnLevelSpacingF = 2
The data file can be downloaded from:
http://www.ncl.ucar.edu/Applications/Data/#grb
Note that this example also shows how to create this kind of plot using
gsn_csm_contour_map and gsn_csm_vector. I sometimes recommend this method
if you want more control over the individual vector and contour plots.
--Mary
On Fri, Feb 5, 2016 at 1:19 PM, Xi Chang <xi.chang01 at gmail.com> wrote:
> Hi Karin,,
>
> I did, but it doesnt work for gsn_csm_vector_scalar_map, no idea why..
>
> Chang.
>
> On Fri, Feb 5, 2016 at 7:53 PM, Karin Meier-Fleischer <
> meier-fleischer at dkrz.de> wrote:
>
>> Hi Xi,
>>
>> have you taken a look at the first example of the vector examples page
>> http://ncl.ucar.edu/Applications/Scripts/vector_1.ncl
>>
>> When you want to control the minimum/maximum and interval of the contour
>> lines use
>>
>> res at cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
>> res at cnMinLevelValF = 24.0 ; set min contour level
>> res at cnMaxLevelValF = 29 ; set max contour level
>> res at cnLevelSpacingF = 0.10 ; set contour spacing
>>
>> Bye,
>> Karin
>>
>> Am 05.02.16 um 19:00 schrieb Xi Chang:
>>
>> Hello...
>>
>> Could you please tell me how to control the contour interval for color
>> shading once im using this function *gsn_csm_vector_scalar_map*.
>>
>> ;===========PLOT=================
>>
>> wks = gsn_open_wks("png","overlay")
>>
>> res = True ; plot mods desired
>> plot = new(16,graphic)
>>
>> res at gsnDraw = False ; don't draw
>> res at gsnFrame = False ; don't advance frame
>>
>> ; vector rescoures
>> res at vcRefLengthF = 0.045
>> res at vcRefMagnitudeF = 20.0
>> res at vcRefAnnoOrthogonalPosF = -0.12
>> res at vcRefAnnoParallelPosF = 0.997
>> res at vcRefAnnoFontHeightF = 0.015
>> res at vcMinDistanceF = 0.03
>> res at lbLabelBarOn = False
>>
>> res at mpProjection = "AzimuthalEquidistant" ; choose map projection
>> res at mpLimitMode = "LatLon" ; use lat/lon coordinates to
>> limit area
>> res at mpMinLatF = 25.
>> res at mpMaxLatF = 75.
>> res at mpMinLonF = -80.
>> res at mpMaxLonF = 20.
>> res at gsnMaximize = True
>>
>>
>>
>>
>>
>> * res at gsnScalarContour = True res at cnFillOn =
>> True res at cnFillPalette = "gui_default" ; set color map
>> res at cnLinesOn = False ; turn off contour lines *
>>
>>
>> do i=0,15
>> plot(i) = gsn_csm_vector_scalar_map(wks,u(i,:,:),v(i,:,:), \
>> p(i,:,:),res)
>> end do
>>
>> resP = True ; modify the panel plot
>> resP at gsnMaximize = True
>> gsn_panel(wks,plot,(/4,4/),resP) ; now draw as one plot
>>
>>
>> end
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing listncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160207/91dbc6ee/attachment.html
More information about the ncl-talk
mailing list