1 / 8

Terrain-mapped Cross Sections in MATLAB

Terrain-mapped Cross Sections in MATLAB. Erik Neemann 15 April 2014. Objective. Create cross sections visually similar to what is produced in RIP Add capability to plot time-averaged data. Before. After. Notes. Code built to produce cross section of zonal wind component in Uintah Basin

remy
Download Presentation

Terrain-mapped Cross Sections in MATLAB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Terrain-mapped Cross Sections in MATLAB Erik Neemann 15 April 2014

  2. Objective • Create cross sections visually similar to what is produced in RIP • Add capability to plot time-averaged data

  3. Before After

  4. Notes • Code built to produce cross section of zonal wind component in Uintah Basin • Data is time-averaged • Based on wrfout files every 6 hours with 6 times each (hourly data) • Data is spatially averaged over 10 points on each side of cross section centerline (customizable) • Depth of cross section originally set to 25 model levels (customizable) • If deeper than 5000 m code will need minor modification • Produces multi-page pdf for figures and requires ps2pdf function, found here: • http://www.mathworks.com/matlabcentral/fileexchange/19516-ps2pdf

  5. Options & Editable parameters • Can skip time-average part and just use on single wrfout time • Must create formula for “line” where cross section will be taken along • Use algebra to get slope & y-intercept from (i,j) points • slope (-.1411) - from your derived equation • yintercept (184.44) - form your derived equation • crsa (74) - igridpoint to start xsect • crsb (237) - igridpoint to end xsect • depth (25) - to cover all data along xsect (model levels) • width (10) - grid point avg on each side of xsect

  6. Basic Steps of Code • Cut angled xsect through 3D domain  Results in 2D array of data • Find height of each model level along xsect • Plot data value in new array at model level height  New array has 5000 vertical levels of 1 meter each • Linearly interpolated in vertical direction between data points for gridpoint along xsect • “Outline” terrain by making all data below ground level = -9999 • Plot final data

  7. Output Displays location of cross section and outer bounds for spatial average

  8. Output Final “terrain-mapped” cross section

More Related