Re: Profile Measurements from wrfout

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 29 2012 - 13:49:17 MDT

Hi Sean,
As your aircraft flight is likely not simply on a straight line, that
makes things much more complex as you've likely guessed.

On the WRF-NCL examples page they have numerous examples on how to do
cross-sections:
http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/CROSS_SECTION/wrf_CrossSection2.htm

But as your cross section plane is likely changing directions as the
plane goes along, you can't just use one of these examples as is. I'm
not an expert at using these functions, but I think you might be able to
start by modifying example 3 here:
http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/CROSS_SECTION/wrf_CrossSection_3.ncl

In this example, they interpolate to a single plane...

plane = new(4,float)
plane = (/ 2,2, mdims(nd-1)-2, mdims(nd-2)-2 /) ; start x;y & end x;y point
opts = True ; start and end points specified

rh_plane = wrf_user_intrp3d(rh,z,"v",plane,0.,opts)
tc_plane = wrf_user_intrp3d(tc,z,"v",plane,0.,opts)

I wonder if you should interpolate to a new plane for every 2 pairs of
your airplane's lat/lon coordinates. In other words, do it in a loop:

plane = new(4,float)
do gg = 0,nlat-2 ; nlat = number of latitude points from aircraft flight.
    plane = (/ air_lon(gg),air_lat(gg), air_lon(gg+1), air_lat(gg+1) /) ; start x;y & end x;y point of airplane trip leg, after converting from lat/lon to model grid pt indices
    int_plane = wrf_user_intrp3d(rh,z,"v",plane,0.,opts)
    .......
;; SAVE int_plane for each do loop iteration, adding each iteration to the x-axis dimension in your saved array
end do

There are labeling issues that you will have to address, you will need
to convert your airplane coordinates to the nearest model grid indices
(by using wrf_ll_to_ij?), and I am guessing you will have to deal with
wrf_user_intrp3d not returning the same number of x-axis points for each
iteration (I haven't used wrf_user_intrp3d before.). But I think it all
quite possible.

If that option doesn't make sense to you to try, I would recommend
writing to WRF-help and asking how they would recommend doing it. They
may have a better option than the one I am presenting.
Good luck,
Adam

On 06/28/2012 07:20 PM, Sean Egan wrote:
> I have two sets of information: 1)hourly wrfout files and
> 2)lat,long,height and time for an aircraft flight that occurred within
> the same domain as my wrfout files.
>
> What I would like to do is make a 2D plot with NCL of profile
> measurements at various heights along the flight time. The idea would
> be to have height on the Y axis, and time on the X axis corresponding
> to the time of the flight. The graph would be filled with a contour
> plot showing ash concentrations at every height at the latitude and
> longitude where the plane was located at that time.
>
> Does anyone know of script I could start with that does something
> semi-similar to this?
>
> Thanks,
>
> Sean Egan
> University of Alaska
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jun 29 13:49:26 2012

This archive was generated by hypermail 2.1.8 : Fri Jun 29 2012 - 15:46:13 MDT