MASK

From: Guilherme Martins <jgmsantos_at_nyahnyahspammersnyahnyah>
Date: Fri, 03 Apr 2009 12:58:36 -0300

Hi users,

I did a ncl script to do plot a variable with mask but the result isn't
correct.

In attach are my files. Does anyboby can help me?

Thanks,

Guilherme.

-- 
----------------------------------------------------------
José Guilherme Martins dos Santos
Grupo de Modelagem da Atmosfera e Interfaces - GMAI
Divisão de Modelagem e Desenvolvimento
Centro de Previsão de Tempo e Estudos Climáticos    -  INPE
Rodovia Presidente Dutra, km 39   -    CEP 12630-000
Cachoeira Paulista, SP, Brasil
Telefone(CP): +55 12 3185 8529 / Celular: +55 12 91678770
E-mail: guilherme.martins_at_cptec.inpe.br
E-mail alternativo: jgmsantos_at_gmail.com
Homepage: http://jgmsantos.googlepages.com/index.html
-----------------------------------------------------------


load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin

tf = addfile("jja.nc","r")
t = tf->msp
;km/h to m/s
t = t*3.6e-1

;open the mask file
f = addfile("tden_jja_mask.nc","r")
mask1 = f->mask1

msp=mask(t,mask1,1)

wks = gsn_open_wks("ps","figura5b_genesis_density-JJA") ; Open X11 window
gsn_define_colormap(wks,"gsltod")

res = True
res_at_mpGeophysicalLineThicknessF = 3 ; espessura do contorno do mapa
res_at_mpOutlineBoundarySets = "National" ; mostra divisao dos paises

res_at_gsnMajorLatSpacing = 10 ; escala do eixo y
res_at_gsnMajorLonSpacing = 10 ; escala do eixo x, variacao
res_at_tmXBMinorOn = False ; no lon minior tickmarks

t&lat_at_units = "degree_north"
t&long_at_units = "degree_east"
f&lat_at_units = "degree_north"
f&long_at_units = "degree_east"

res_at_gsnMaximize = True ; Maximize plot in frame.
res_at_cnLineLabelsOn = True ; turn on line labels
res_at_cnLineLabelBackgroundColor = "white" ; white bckgrnd around label

res_at_gsnMaximize = True ; Ajusta o grafico a janela
res_at_cnLevelSelectionMode = "ManualLevels" ; Fixa os contornos de forma manual
res_at_cnMinLevelValF = 8.0 ; Minimo valor
res_at_cnMaxLevelValF = 12 ; Maximo valor
res_at_cnLevelSpacingF = 1.0
res_at_mpGridAndLimbOn = False ; Turn on lat/lon grid
res_at_mpGridLineDashPattern = 2 ; Change dash pattern

res_at_mpMinLonF = -90. ; longitude oeste
res_at_mpMaxLonF = 60. ; longitude leste
res_at_mpMinLatF = -20. ; latitude sul
res_at_mpMaxLatF = 20. ; latitude norte

res_at_cnFillOn = True ; Turn on contour fill.
res_at_cnLinesOn = True ; Turn off contour lines.

res_at_gsnSpreadColors = True ; Span full color map.
res_at_lbLabelBarOn = True ; Turn off labelbar

res_at_lbLabelAutoStride = True ; clean up spacing
res_at_lbOrientation = "Horizontal" ; vertical labelbar
res_at_lbBoxLinesOn = True ; Turn off labelbar lines.
res_at_gsnCenterString = "Climatologia da Velocidade Media das Ondas de Leste - Fonte: ECMWF - Nivel: 700hPa - Periodo: JJA 1980-1995" ; center subtitle
res_at_gsnLeftString = "" ; Leftmost subtitle

;reverse the first two colors
setvalues wks
"wkColorMap" : "gsltod"
"wkForegroundColor" : (/0.,0.,0./)
"wkBackgroundColor" : (/1.,1.,1./)
end setvalues

res_at_lbTitleOn = True ; turn on title
res_at_lbTitleString = "(m s~S~-1~N~)" ; title string
res_at_lbTitlePosition = "Bottom" ; title position
res_at_lbTitleFontHeightF= .015 ; make title smaller
res_at_lbTitleDirection = "Across" ; title direction

res_at_gsnDraw = False ; Turn off draw
res_at_gsnFrame = False ; Turn off frame advance

;;;;plot = gsn_csm_contour_map(wks,t,res) ;faz o plot
plot=new(1,graphic)

plot(0) = gsn_csm_contour_map(wks,t,res) ;faz o plot

pres = True
pres_at_gsnPanelLabelBar = False
pres_at_lbLabelAutoStride = True
;pres_at_gsnPanelFigureStrings = (/"B"/)
pres_at_gsnPanelYWhiteSpacePercent = 0.
gsn_panel(wks,plot,(/1,1/),pres)
system("convert -rotate -90 -trim -density 300 -geometry 1000x1000 figura5b_genesis_density-JJA.ps figura5b_genesis_density-JJA.gif; rm figura5b_genesis_density-JJA.ps; rm *~")

end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Fri Apr 03 2009 - 09:58:36 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 10:01:36 MDT