how to output vorticity along the hysplit trajectory.

Topics about the HYSPLIT trajectory model.
Post Reply
mlc
Posts: 6
Joined: June 23rd, 2015, 9:16 am
Registered HYSPLIT User: No

how to output vorticity along the hysplit trajectory.

Post by mlc »

Hi,
I am interested in vorticity and potential vorticity along the hysplit trajectory. I want to output it such as temperature and hight. I am unable to process the data in the hysplit input. Is there anyway to do it?Thanks!
barbara.stunder
Posts: 451
Joined: November 9th, 2012, 4:23 pm
Registered HYSPLIT User: Yes

Re: how to output vorticity along the hysplit trajectory.

Post by barbara.stunder »

Vorticity cannot be output along the trajectory because it is not in the meteorology file used to compute the trajectory.
yaqiang
Posts: 59
Joined: October 5th, 2015, 10:20 pm
Registered HYSPLIT User: Yes

Re: how to output vorticity along the hysplit trajectory.

Post by yaqiang »

You may calculate vorticity firstly (http://www.meteothinker.com/examples/me ... hdivg.html) and then extract the vorticity data along the trajectory (http://www.meteothinker.com/examples/me ... _data.html).
mlc
Posts: 6
Joined: June 23rd, 2015, 9:16 am
Registered HYSPLIT User: No

Re: how to output vorticity along the hysplit trajectory.

Post by mlc »

thank you ,yaqiang!I will try it!
mlc
Posts: 6
Joined: June 23rd, 2015, 9:16 am
Registered HYSPLIT User: No

Re: how to output vorticity along the hysplit trajectory.

Post by mlc »

How to calculate Specific Humidity which can Along Trajectory in hysplit ? if you can do it ,vorticity is the same.can you tell me ?thank you !
barbara.stunder
Posts: 451
Joined: November 9th, 2012, 4:23 pm
Registered HYSPLIT User: Yes

Re: how to output vorticity along the hysplit trajectory.

Post by barbara.stunder »

HYSPLIT can output certain diagnostic variables, that are in the meteorology dataset, along the trajectory. Click the HELP button from the 1st window when you run HYSPLIT on your PC, scrool down to Advanced Topics and click Trajectory Configuration. See item 6. This takes you to C:/hysplit4/html/S614.htm. Note that meteorology datasets have either relative humidity or specific humidity but not both. If the field you want is not in the file, then you need to do the calculation as described for vorticity.

To get the diagnostic variable from the meteorology dataset along the trajectory, in the GUI, go to Advancedd / Configuration Setup / Trajectory / Add meteorology output along trajectory and choose the field(s) you want.
mlc
Posts: 6
Joined: June 23rd, 2015, 9:16 am
Registered HYSPLIT User: No

Re: how to output vorticity along the hysplit trajectory.

Post by mlc »

Dear stunder:
Thank you for your reply! Can you tell me more detailed about vorticity along the hysplit trajectory?
I think:
Firstly,i will rewrite HYSPLIT data such as 201501.gbl or gdas1 into arl data format.
Secondly,i can calculate vorticity and write it into arl data.i must replace Vorticity with specific humidity or other 3D meteorological variable.
Thirdly,To get the diagnostic variable from the meteorology dataset along the trajectory, in the GUI, go to Advancedd / Configuration Setup / Trajectory / Add meteorology output along trajectory and choose the specific humidity or other 3D meteorological variable.
Can you help me achieve this work ?
detailed steps ?
how to rewrite the meteorology dataset which include vorticity?
yaqiang
Posts: 59
Joined: October 5th, 2015, 10:20 pm
Registered HYSPLIT User: Yes

Re: how to output vorticity along the hysplit trajectory.

Post by yaqiang »

looking for following sample MeteoInfoLab script.

Code: Select all

# Set working directory
trajDir = 'D:/Temp/HYSPLIT'
meteoDir = r'U:\data\ARL\2015'

# Open trjactory data file
print 'Open trajectory data file ...'
trajfn = os.path.join(trajDir, 'traj_20150331')
print 'Trajectory file: ' + trajfn
trajf = addfile_hytraj(trajfn)

# Create trajectory layer
trajLayer = trajf.trajlayer()

# Open meteorological data file
print 'Open meteorological data file...'
meteofn = os.path.join(meteoDir, 'gdas1.mar15.w5')
print 'Meteorological file: ' + meteofn
meteof = addfile(meteofn)

# Get meteorological data along trajectory
print 'Get meteorological data along trajectory...'
outfn = os.path.join(trajDir, 'traj.txt')
outf = open(outfn, 'w')
outf.write('Lon,Lat,Time,Heigh,pres,VORT\n')
#uwnd = meteof['UWND'][:,:,:,:]
#vwnd = meteof['VWND'][:,:,:,:]
uwnd = meteof['UWND'][:,:,[10, 80],[50,140]]
vwnd = meteof['VWND'][:,:,[10, 80],[50,140]]
vort = hcurl(uwnd, vwnd)
idx = 0
for tline in trajLayer.shapes():    
    t = trajLayer.cellvalue('Date', idx)
    h = trajLayer.cellvalue('Hour', idx)
    t.replace(hour=h)
    for ps in tline.getPoints():  
        lon = ps.X
        lat = ps.Y 
        z = ps.M
        pres = ps.Z
        v = vort.interpn([t,pres,lat,lon])
        print 'lon: %.3f; lat: %.3f; time: %s; height: %.1f; pres: %.1f; VORT: %f' % (lon,lat,t.strftime('%Y%m%d_%H:%M'),z,pres,v)
        line = '%.3f,%.3f,%s,%.1f,%.1f,%f' % (lon,lat,t.strftime('%Y%m%d_%H:%M'),z,pres,v)
        outf.write(line + '\n')
        t = t + datetime.timedelta(hours=-1)
    idx += 1
outf.close()
print 'Finish...'
Post Reply

Return to “Trajectory Model”