WRF Output - Axes Trouble

From: Lauren Wheeler <lauren.bronwyn.wheeler_at_nyahnyahspammersnyahnyah>
Date: Sun Mar 30 2014 - 12:56:46 MDT

I ran a 3D idealized simulation and I'm trying to plot a vertical cross
section of the winds for a specific z range.

I've created a height variable ('z') using the wrf_user_getvar and when I
check the min and max values and they match my inputs, max = 29.7 km and
min = 0.1 km.

When I try to plot the plane as u versus z though my vertical axis will
only extend to 100.

I stripped the script of anything that I thought might be influencing the
y-axis but I haven't had any luck and I'm still getting the same results.

Attached is the resulting plot and below is my script.

Any suggestions would be welcome and thanks!
Lauren Wheeler

*NCL Script:*

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
;Plots Vertical and Horizontal winds from 3D Hill Simulation
;Feb 2014
;Modified from ;
http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/wrf_Hill2d.ncl
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;load "./WRFUserARW.ncl"

begin

  a = addfile("wrfout_d01_half-01-01_00:00:00"+".nc","r")

   type = "pdf" ;x11, ps, ncgm, pdf

  wks = gsn_open_wks(type,"Wind_XSection_test")

; Set some Basic Plot options
    res = True
    res@MainTitle = "WRF Hill 3D"
    res@InitTime = False
    res@Footer = False

    pltres = True

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Select time outputs for plots

  times = wrf_user_list_times(a) ; get times in the file
  ntimes = dimsizes(times) ; number of times in the file

; The plane data is plotted on

  plane = (/ 0., 50./) ; (x,y) point for vertical plane
  angle = 90.0
  pii = 3.14159
  aspect_ratio = .3 ;0.7 fits on vertical page

; This is the big loop over all of the time periods to process

  do it = 2,ntimes-1,2 ;every other time step
; do it = 1,ntimes-1 ;every time step

    time = it
    res@TimeLabel = times(it)
 ; res@AspectRatio = aspect_ratio

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Collecting data/variables from WRF output

  u_in = wrf_user_getvar(a,"ua",time) ; ua is u averaged to mass points
  v_in = wrf_user_getvar(a,"va",time) ; va is v averaged to mass points
  w_in = wrf_user_getvar(a,"wa",time) ; vertical velocity
  z_in = wrf_user_getvar(a, "z",time) ; grid point height

  u = u_in(0:119,:,:)
  v = v_in(0:119,:,:)
  w = w_in(0:119,:,:)
  z = z_in(0:119,:,:)

  u_plane = wrf_user_intrp3d( u,z,"v",plane,angle,False)
  v_plane = wrf_user_intrp3d( v,z,"v",plane,angle,False)
  w_plane = wrf_user_intrp3d( w,z,"v",plane,angle,False)
  Du_plane = (u_plane-10) ;subtracting input u0 (10 m/s) from u

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Horizontal Wind Perturbation Contour Fill
      opts_th = res
      opts_th@FieldTitle = u_in@description
      opts_th@cnFillOn = True
      opts_th@gsnSpreadColorEnd = -10
      opts_th@PlotOrientation = u_plane@Orientation
      contour_th = wrf_contour(a,wks,Du_plane,opts_th) ; plots
horizontal perturbation

 ; Vertical Velocity
      opts_w = res
      opts_w@FieldTitle = w_in@description
      opts_w@cnLineLabelInterval = 0
      opts_w@cnLevelSpacingF = 0.01
      contour_w = wrf_contour(a,wks, w_plane,opts_w)

      plot = wrf_overlays(a,wks,(/contour_th, contour_w/),pltres)

; ************************************************************

  end do ; end of the time loop

end

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

Received on Sun Mar 30 12:57:06 2014

This archive was generated by hypermail 2.1.8 : Thu Apr 03 2014 - 13:36:27 MDT