[ncl-talk] need help to edit maps to exclude color on the ocean and contour values on land points
Ruksana Abedin
ruksana.abedin at gmail.com
Sat Nov 19 07:35:04 MST 2016
Hi,
I have plotted a panel of two bias maps. The plot, input files and the
script is attached. Problem is although my data is only on land points, on
the first bias map, the ocean is colored as orange, which should not be the
case. And the maps show few values of the contours on the land points
irregularly, but I do not want any values to be shown. Can you please help
me to do these two corections?
Thank you for your time and kind efforts.
Best regards,
Ruksana
begin
; read in data
f3=addfile(".........../WAH_APHRO_1998_2007_ANN_sum_precip_bias.nc", "r");
f4=addfile(".........../WAH_GPCC_1998_2007_ANN_sum_precip_bias.nc", "r");
ppt3 = f3->precip
time = f3->time
lat = f3->lat
lon = f3->lon
ppt4 = f4->precip
time = f4->time
lat = f4->lat
lon = f4->lon
wks = gsn_open_wks("eps","ppt1")
plot = new(2,graphic)
printVarSummary(ppt3)
printVarSummary(ppt4)
gsn_define_colormap(wks,"percent_11lev") ; choose colormap for bias
map
;gsn_reverse_colormap(wks)
res = True
res at gsnDraw = False
res at gsnFrame = False
res at cnInfoLabelOn = False
res at cnFillOn = True ; turn on color
res at cnLinesOn = False ; turn off contour lines
res at cnLevelSpacingF = 0.10 ; contour interval
res at cnFillDrawOrder = "PreDraw" ; draw contours first
res at lbLabelStride = 2 ; stride on label bar
res at gsnSpreadColors = True ; use full colormap
res at gsnSpreadColorEnd = -3 ; -3 don't use land color
res at gsnAddCyclic = False ; regional data
res at gsnStringFontHeightF = 0.01
res at tiMainString = ""
res at gsnRightString = ""
;res at mpProjection = "LambertConformal"
;res at gsnMaskLambertConformal = True
res at gsnLeftString = ""
res at mpMaxLatF = 30;max(lat) ; zoom in on region
res at mpMinLatF = 15;min(lat)
res at mpMinLonF = 83;min(lon)
res at mpMaxLonF = 97; max(lon)
res at mpCenterLonF = 10 ; def is zero
res at mpLandFillColor = "Transparent"
res at cnLevelSelectionMode= "ManualLevels"
res at cnMinLevelValF = -2150.00 ;for bias maps
res at cnMaxLevelValF = 4450;100
res at cnLevelSpacingF = 150 ; 150
res at lbLabelBarOn = False
res at lbLabelAutoStride = True
ppt3 at _FillValue = 0.0
ppt3 at _FillValue = -999
plot(0) = gsn_csm_contour_map(wks,ppt3(0,:,:),res)
plot(1) = gsn_csm_contour_map(wks,ppt4(0,:,:),res)
;***********************************************************
; create panel
;***********************************************************
resP = True
resP at gsnFrame = False
resP at gsnMaximize = True
resP at gsnPanelLabelBar = True
resP at lbLabelFontHeightF = 0.01
gsn_panel(wks,plot,(/2,2/),resP) ; now draw as one plot
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161119/bc7aa0dc/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure 1.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 108309 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161119/bc7aa0dc/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WAH_APHRO_1998_2007_ANN_sum_precip_bias.nc
Type: application/x-netcdf
Size: 10248 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161119/bc7aa0dc/attachment.nc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WAH_GPCC_1998_2007_ANN_sum_precip_bias.nc
Type: application/x-netcdf
Size: 8592 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20161119/bc7aa0dc/attachment-0001.nc
More information about the ncl-talk
mailing list