Hovmueller with WRF

From: Erik Noble <enoble_at_nyahnyahspammersnyahnyah>
Date: Fri, 9 Nov 2007 17:33:47 -0500

Would anyone have a suggestions for keeping time as a variable while
creating this Hovmueller plot from WRF data that is time v. longitude?
I read 4 hourly data for a month. How do you make a 2D variable become
3D again?
Since pressure level is a diagnostic in the WRF data, I can only use
the "wrf_user_getvar" function to retrieve a WRF variable at a
pressure-level for all time. This function is set up to retrieve a
variable for only a single moment in time. Therefore, my variable
changes from being 3D to 2D. The gsn_csm_hov function only creates a
contour plot of lat and lon.

Also, how can I retain the longitude values?

Sincerely,
Erik

> ; ===========================================
> ; hov_1.ncl
> ; ===========================================
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
> begin
> ;WRF Out file
> diri1 ="/Volumes/Data_and_Models/Model-Output/Athena/"
> ifile1 ="WRF-SOP3_Athena_3_1_2.nc"
> a=addfile(diri1+ifile1,"r")
> ; Which times and how many time steps are in this data set?
> times = wrf_user_list_times(a) ; get times in the file
> ntimes = dimsizes(times) ; number of times in the file
> ;;;;;;;Get Variables;;;;;;;;;;
> times = wrf_user_list_times(a)
> do it = 248,ntimes-1, 8 ;;;;;Time step you
> want!!!!
> print("Working on time: " + times(it) )
> pressure = 700.
> v = wrf_user_getvar(a,"va", it) ; v averaged to mass points
> p = wrf_user_getvar(a, "pressure", it) ; pressure
> v_plane = wrf_user_intrp3d( v,p,"h",pressure,0.,False)
>
> end do
> printVarSummary(v_plane)
> ;==============================================
> ; creat plot
> ;==============================================
> wks = gsn_open_wks ("x11", "hov" ) ; open workstation
> res = True ; plot mods desired
> res_at_tiMainString = "Default Hovmueller" ; title
> plot = gsn_csm_hov(wks, v_plane, res ) ; default
> hovmueller
> end

Erik_at_noble:/Volumes/Data_and_Models/ncl_scripts:ncl hov_WRFV700.ncl
  Copyright (C) 1995-2007 - All Rights Reserved
  University Corporation for Atmospheric Research
  NCAR Command Language Version 5.0.0
  The use of this software is governed by a License Agreement.
  See http://www.ncl.ucar.edu/ for more details.

Variable: v_plane
Type: float
Total Size: 60604 bytes
             15151 values
Number of Dimensions: 2
Dimensions and sizes: [109] x [139]
Coordinates:
Number Of Attributes: 4
   description : v Velocity
   units : m/s
   _FillValue : -999999
   PlotLevelID : 700 hPa

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Nov 09 2007 - 15:33:47 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 12 2007 - 09:17:56 MST