Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

MPAS Post-processing

Monica

New member
Hi all,

I am currently using ncl to post-process the output file history*.nc of mpas. I want to draw some wind field diagrams, but I found that in the history*nc file, only u(time,nEdges,nVertLevels), there is no v. How should I draw the wind field diagram with ncl? Can you give me some simple example?

char xtime(Time, StrLen) ;
xtime:units = "YYYY-MM-DD_hh:mm:ss" ;
xtime:long_name = "Model valid time" ;
float u(Time, nEdges, nVertLevels) ;
u:units = "m s^{-1}" ;
u:long_name = "Horizontal normal velocity at edges" ;
float w(Time, nCells, nVertLevelsP1) ;
w:units = "m s^{-1}" ;
w:long_name = "Vertical velocity at vertical cell faces" ;
float pressure(Time, nCells, nVertLevels) ;
pressure:units = "Pa" ;
pressure:long_name = "Pressure" ;

Thanks
 

mgduda

Administrator
Staff member
Although it's quite old and I haven't used it for a while, I've attached an example NCL script that overlays wind barbs on a plot of a scalar field. If you look in the script beginning with the comment
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; BEGIN WIND BARB PLOTTING
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
you'll find the code to interpolate the winds to a regular lat-lon grid and to plot them.
 

Attachments

  • atm_barbs.ncl.txt
    4.3 KB · Views: 18

Monica

New member
Hi, mandachasteen, mgduda,
Thank you both for your advice and code, which got me now that the problem is fully resolved.
Thanks
 

Monica

New member
Although it's quite old and I haven't used it for a while, I've attached an example NCL script that overlays wind barbs on a plot of a scalar field. If you look in the script beginning with the comment

you'll find the code to interpolate the winds to a regular lat-lon grid and to plot them.
Hi, mgduda
I now know how to use the uReconstructZonal(Time, nVertLevels, latitude, longitude) and uReconstructMeridional(Time, nVertLevels, latitude, longitude) in the history*.nc to plot a horizontal wind field figure. But another problem is, I need to plot the wind field on a specific 500hPa. But the 'nVertLevels' dimension does not seem to be isobaric surfaces. So what do I need to do? Do I need to do vertical interpolation and How?

Best
 

mgduda

Administrator
Staff member
For the specific case of 500 hPa zonal and meridional winds, these are already available in the default diagnostics stream as 'uzonal_500hPa' and 'umeridional_500hPa'. More generally, though, this forum post illustrates how SciPy's interp1d can be used to vertically interpolate fields to an isobaric surface: Plot moist potential temperature at 500 hPa .
 
Top