Creating Visually Similar Cross Sections in MATLAB

Creating Visually Similar Cross Sections in MATLAB
Slide Note
Embed
Share

In this project, cross sections visually similar to those produced in RIP are generated in MATLAB. The process involves plotting time-averaged data based on WRFout files with spatial averaging over customizable points. Code is built to handle zonal wind components in Uintah Basin, producing multi-page PDF outputs using ps2pdf function. Basic steps include cutting angled cross sections, finding model level heights, linear interpolation, and outlining terrain. The final output displays the location of cross sections and spatial averages, resulting in terrain-mapped representations.

  • MATLAB
  • Cross Sections
  • Data Visualization
  • Terrain Mapping
  • Time Averaging

Uploaded on Feb 26, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

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/19 516-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) - i gridpoint to start xsect crsb (237) - i gridpoint 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 1. Cut angled xsect through 3D domain Results in 2D array of data 2. Find height of each model level along xsect 3. Plot data value in new array at model level height New array has 5000 vertical levels of 1 meter each 4. Linearly interpolated in vertical direction between data points for gridpoint along xsect 5. Outline terrain by making all data below ground level = -9999 6. 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 Content