Re: Lev changing in every time step

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 30 2013 - 08:29:30 MDT

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
Received on Fri Aug 30 08:29:26 2013

This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT