Re: Pressure of Lev changing in every time step

From: Rodrigo Colpo <rodrigocolpo2_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 02 2013 - 07:02:54 MDT

Dear Dennis, Thank you very much for your help. Your script does exactly what I was trying to do. Best wishes, Rodrigo. ________________________________ De: Dennis Shea <shea_at_ucar.edu> Para: Rodrigo Colpo <rodrigocolpo2_at_yahoo.com.br> Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu> Enviadas: Sexta-feira, 30 de Agosto de 2013 22:19 Assunto: Re: [ncl-talk] Pressure of Lev changing in every time step Try attached On 8/30/13 12:45 PM, Rodrigo Colpo wrote: > Hi Dennis, > > > Thank you for your reply, but I am not sure if your answer is the solution for the problem I have. > > > when you do: > >    do k=0,klvl-1 >        data&lev = level(k,:) >        plot = gsn_csm_contour(wks,data,False) >    end do > > you are plotting the whole "data(:,:)" for "level(k,0)", then for "level(k,1)", and so on. > > But I want the "data(time|0,lev|:)" to be plotted at "level(0,:)", > "data(time|1,lev|:)" to be plotted at "level(1,:)",and so on. I mean, > the pressure for every level change in every time step. > > > Best wishes,Rodrigo. > > > ________________________________ >  De: Dennis Shea <shea_at_ucar.edu> > Para: Rodrigo Colpo <rodrigocolpo2_at_yahoo.com.br> > Cc: "ncl-talk_at_ucar.edu" <ncl-talk_at_ucar.edu> > Enviadas: Sexta-feira, 30 de Agosto de 2013 16:29 > Assunto: Re: [ncl-talk] Lev changing in every time step > > > level = (/(/1000, 850, 700, 500, 400, 300, 250, 200, 150, 100/)    \ >            ,(/1050, 800, 709, 510, 430, 280, 270, 190, 150, 120/)    \ >            ,(/1100, 830, 730, 510, 400, 300, 230, 200, 150, 103/)    \ >            ,(/1030, 850, 700, 500, 480, 320, 250, 210, 150, 108/)    /) > > printVarSummary(level)  ; (4,10) > > dim_level = dimsizes(level) > > klvl      = dim_level(0) > >    do k=0,klvl-1 >        data&lev = level(k,:) >        plot = gsn_csm_contour(wks,data,False) >    end do > > On 8/30/13 8:19 AM, Rodrigo Colpo wrote: >> Dear all, >> >> Usually plots using "gsn_csm_contour" have a one dimension array with the levels, which are considered the same for every >  time step, as the following: >> >> ;---Generate some dummy data. >>      level = (/1000, 850, 700, 500, 400, 300, 250, 200, 150, 100/) >>      time  = ispan(1,4,1) >> >>      ntim  = dimsizes(time) >>      nlev  = dimsizes(level) >>      data  = generate_2d_array(10, 12, -20., 17., 0, (/ nlev,ntim/)) >> ;---Name the dimensions and attach coordinate arrays >>      data!0    = "lev" >>      data!1    = "time" >>      data&lev  = level >>      data&time = time >> >> plot = gsn_csm_contour(wks,data,False) >> >> How can I do a plot taking into consideration variations in pressure for every time step? >> In this case I would need a two dimensional array with levels, as the following: >> >> level = (/(/1000, 850, 700, 500, 400, 300, 250, >  200, 150, 100/),(/1050, 800, 709, 510, 430, 280, 270, 190, 150, 120/),(/1100, 830, 730, 510, 400, 300, 230, 200, 150, 103/),(/1030, 850, 700, 500, 480, 320, 250, 210, 150, 108/)/) >> >> data&lev  = level >> plot = gsn_csm_contour(wks,data,False) >> >> But this is currently not possible. Do you know how I would do it? >> >> Best wishes, >> Rodrigo. >> >> >> >> _______________________________________________ >> 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 > > > > _______________________________________________ > 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 Mon Sep 2 07:03:07 2013

This archive was generated by hypermail 2.1.8 : Wed Sep 04 2013 - 10:27:57 MDT