[ncl-talk] Flight Pathway Data

Alan Brammer abrammer at albany.edu
Wed Feb 18 09:05:34 MST 2015


Negin,

This is a multi-step process, which is kind of specific to you, and I don't
think there is really an answer to suit all, beyond the application Mary
Barth sent.

You'll have to decide whether you want interpolation of nearest grid
point.  There are plenty of functions to do both.

As far as examples, not sure if there is a common flight data format.  I
have code to do this but it is specific to the data and flights I have.  My
steps though are to read in the lat,lon and alt from my flight data, then
interpolate in my gridded data in the horizontal to get a profile, then
interpolate in the vertical along that profile for the levels I want.

I'd start with the pages below and build up an attempt and come back to the
list if there are specific problems.

e.g.
 https://www.ncl.ucar.edu/Document/Functions/interp.shtml.
https://www.ncl.ucar.edu/Document/Functions/Contributed/ind_nearest_coord.shtml



Good luck.
~Alan.


On Tue, Feb 17, 2015 at 5:20 PM, Negin S <negin513 at gmail.com> wrote:

> Dear Mary,
>
> Thanks so much for your email and useful information.
> Is there any example of extracting flight data using NCL codes? I need to
> do extract the data using post-processing tools. I need to do interpolation
> over time and layers(height).
>
> I appreciate your helps.
>
> Best Regards,
> Negin
>
> On Tue, Feb 17, 2015 at 1:36 PM, Mary Barth <barthm at ucar.edu> wrote:
>
>>  Hi Negin,
>>
>> For doing the same thing as you, I have found the model level by using
>> the WRF height array ("z") that you can get from wrf_getvar routine.
>>
>> It is also possible to create an output file from WRF-chem of variables
>> along a flight track. Here is some more info:
>>
>>  “Tracking”  output:  vertical  profiles  of  prescribed  meteorological
>> and  chemical
>> species  at  a  set  of  prescribed  times  and  horizontal  coordinates
>> are  written  to  a
>> special  output  file,  wrfout_track_d<nn>.    The  namelist  variable
>> track_loc_in  is  a
>> count  of  the  track  locations  and  must  be  set  to  a  positive
>> value  otherwise  the  default
>> setting  of  zero  will  result  in  no  track  output  of  any
>> variables.    Times  and  locations
>> must  be  specified  in  the  file  wrfinput_track.txt(  see  example
>> below).  Meteorological
>> variables  z,  p,  t,  u,  v,  w,  alt,  qcloud,  qrain,  qice,  qsnow,
>> qgraup,  and  qvapor  are  output
>> if  track_loc_in  is  non-­zero.    Chemical  species  concentrations
>> may  also  be  output  if
>> both  namelist  variables  track_chem_num  and  track_chem_name  are
>> set.    The  total
>> number  of  chemical  species  to  output  must  be  <=  100.
>>
>> As  an  example  the  following  namelist  settings  will  output  the
>> default  meteorological
>> variables  and  co  and  o3  species  concentrations  at  the  two
>> times  and  locations
>> specified  in  the  wrfinput_track.txt  file  :
>>
>> &domains
>> track_loc_in  =  2,
>> /
>> &chem
>> track_chem_num  =  2,
>> track_chem_name  =  ‘co’,  ‘o3’,
>> /
>>
>> The  following  two  lines  comprise  the  contents  of  the  ascii
>> input  file
>> wrfinput_track.txt:
>>
>> 2010-­08‐10_00:12:00  41.450  -­87.300
>> 2010‐08‐10_00:36:00  41.510  -­87.390
>>
>> This  will  result  in  the  indicated  variables  being  output  to
>> wrfout_track_d01  at  the
>> times  00:12:00  UTC  and  00:36:00  UTC  on  August  10,  2010  at  the
>> grid  points  nearest
>> to  the  points  (41.450, -­87.300)  and  (41.510, -­87.390).    Note
>> that  the  tracking  tool
>> does  not  interpolate  in  time.  The  indicated  output  times  need
>> to  be  given  in
>> multiples  of  model  time  steps  else  no  output  is  produced.
>> The  exact  Fortran  format  for  the  lines  in  the  file
>> wrfinput_track.txt  is
>> (A19,1X,F7.3,1X,F7.3)  and  the  horizontal  coordinates  are  ordered
>> for  latitude,
>> longitude  with  standard  WRF  conventions  wherein  south  latitudes
>> and  west
>> longitudes  are  negative.
>>
>> This information is from
>> http://www.acd.ucar.edu/wrf-chem/MOZCART_UsersGuide.pdf
>>
>> -- Mary Barth
>>
>> On 2/17/15 12:00 PM, ncl-talk-request at ucar.edu wrote:
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Mon, 16 Feb 2015 23:45:34 -0600
>> From: Negin S <negin513 at gmail.com> <negin513 at gmail.com>
>> Subject: [ncl-talk] flight pathway data
>> To: Ncl Talk <ncl-talk at ucar.edu> <ncl-talk at ucar.edu>
>> Message-ID:
>> 	<CAJpVDhqVPP-5sXWZ2saDg4vpE4OxcWK8LcN7nwgk_gtRN99X7Q at mail.gmail.com> <CAJpVDhqVPP-5sXWZ2saDg4vpE4OxcWK8LcN7nwgk_gtRN99X7Q at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>>
>> Hi Everyone!
>>
>> Recently I am working on extracting data along a flight pathway.
>>
>> I used the following for figuring out grid index of flight data across its
>> pathway:
>>
>> nm = getind_latlon2d (lat2d,lon2d, lat, lon)
>>
>> do k=0,dimsizes(lat)-1
>>      n = nm(k,0)
>>      m = nm(k,1)
>> end
>>
>> but I also need some help calculating the layer number based on flight
>> altitude and time step based on flight time.
>> I could not find any example for extracting data along flight pathway.
>>
>> Basically what I wanted to do is to extract data along flight pathway from
>> model output(i.e. wrf-chem output) and write all the variables from model
>> in a txt file.
>>
>> I highly appreciate all your helps.
>>
>> Best Regards,
>> Negin
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150218/fcb91cc8/attachment.html 


More information about the ncl-talk mailing list