Graphics: NCL - Example

Below is a series of plots illustrating how one might go about generating meteograms from wrfout data.

       

    wrf_meteo_1.ncl

    A very basic plot where T2 at a point is plotted against time, with the function gsn_csm_xy

       

    wrf_meteo_2.ncl

    In this plot we extract some time information from the file to use on the X-axis
    t2_res@tmXBMode = "Explicit"
    t2_res@tmXBValues = taus
    t2_res@tmXBLabels = times

    We also change the line color to Blue.

       

    wrf_meteo_3.ncl

    Plot both T2 and Sea Level Pressure for this point. In order to do this, we need to specify the locations of the two plots explicitly.

    res@vpWidthF = 0.70
    res@vpHeightF = 0.20
    res@vpXF = 0.15

    slp_res = res
    slp_res@vpYF = 0.75

    t2_res = res
    t2_res@vpYF = 0.45

       

    wrf_meteo_4.ncl

    Get a vertical profile of T and wind and this point.

    Note, we use the named dimensions to swap the arrays so that we can plot Time on the X-axis (in NCL right-most dimension is always plotted on the x-axis).
    tt = tc_point(bottom_top|:,Time|:)
    ugrid = u_point(bottom_top|:,Time|:)
    vgrid = v_point(bottom_top|:,Time|:)

    To generate this plot, we use gsn_contour and gsn_vector and then overlay then before drawing.

       

    wrf_meteo_5.ncl

    Now we create a nice and clean plot:

       Add a header with tiMainString

       Manually set the contour levels with tiMainString, cnMinLevelValF, cnMaxLevelValF and cnLevelSpacingF

       Add a label bar in place of the contour information.