Re: Any NCL function or script that can generate vertical profiles of area averaged mean for WRF variables

From: <mmkamal_at_nyahnyahspammersnyahnyah>
Date: Sun Feb 02 2014 - 22:08:50 MST

Hi Mary,

I am able to generate a domain averaged vertical profile of potential
temperature from WRF output. Please see the attached image and code.
Could you please tell me whether I have applied the correct function
or not.

Thanks
Kamal

========================================
begin
;-----------------

   f = addfile("/scratch/wrfout_d01_2002-07-01.nc","r")

;------------------------------------
   lats = (/ 42.48, 44.73 /)
   lons = (/ -82.30, -79.48 /)

   loc = wrf_user_ll_to_ij(f, lons, lats, True)

   x_start = loc(0,0) - 1
   x_end = loc(0,1) - 1
   y_start = loc(1,0) - 1
   y_end = loc(1,1) - 1

;---------------------------------------------
   t1 = f->T + 300
   t2 = dim_avg_n_Wrap(t1,0) ; time average
   t3 = t2(:,y_start:y_end,x_start:x_end)
   theta = dim_avg_n_Wrap(t3,(/1,2/)) ; domain average

;---------------------------------------------
   p1 = wrf_user_getvar(f, "pressure",-1)
   p2 = dim_avg_n_Wrap(p1,0)
   p3 = p2(:,y_start:y_end,x_start:x_end)
   pres = dim_avg_n_Wrap(p3,(/1,2/))

  plot = gsn_csm_xy (wks,theta,pres,res)

  gsn_polyline(wks,plot,(/0,0/),(/0,1000/),False)
  frame(wks)

end

========================================

Quoting Mary Haley <haley@ucar.edu>:

> Hi,
>
> What you are doing is a basic XY plot with a legend. Did you visit
> our XY plot examples page?
>
> http://www.ncl.ucar.edu/Applications/xy.shtml
>
> See examples xy_3.ncl and xy_16.ncl
>
> Also, see the CALIPSO page which has a panel plot of vertical profiles:
>
> http://www.ncl.ucar.edu/Applications/calipso.shtml
>
> This is the kind of question that you can get several answers to if
> you go to any NCL web page: www.ncl.ucar.edu, and type "vertical
> profile" in the "advanced" search window on the right side just
> under the black bar.
>
> I just did this, and got back a number of hits:
>
> http://www.ncl.ucar.edu/Support/talk_archives/2011/2096.html
> http://www.ncl.ucar.edu/Support/talk_archives/2010/1823.html
>
>
> Also, sometimes you get a hit if you go to the "tips" link at the
> top of our Applications page:
>
> http://www.ncl.ucar.edu/Applications/
> http://www.ncl.ucar.edu/Applications/concepts_list.shtml
>
> Then, use your browser "search" to look for the word "profile" or "vertical".
>
> --Mary
>
>
> On Jan 31, 2014, at 11:29 AM, mmkamal@uwaterloo.ca wrote:
>
>> Hi,
>>
>> I was wondering is there any NCL function or example script that
>> can generate vertical profiles of area averaged mean for
>> temperature or moisture variable from WRF or any other model
>> output. I am attaching an example image that I want to generate.
>> Any help would be greatly appreciated!
>>
>>
>> Thanks
>> Kamal
>>
>>
>>
>>
>>
>> <Domain Averaged Moisture
>> Profile.PNG>_______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

pot_temp_pres.png
Received on Sun Feb 2 22:09:03 2014

This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST