michael böttinger introduction to vector field visualization · 2013. 11. 11. · avizo:...
TRANSCRIPT
-
Deutsches Klimarechenzentrum German Climate Computing Centre
Michael Böttinger
Introduction to Vector Field Visualization
Michael Böttinger: Vector Field Visualization
-
3D Vector fields in Earth System Modeling:
◦ Wind
◦ Ocean Currents
“Flow Fields”: Time dependent, discreet time steps
◦ Exception: Temporal means of circulation data ->
“Steady Flow”
Data
Michael Böttinger: Vector Field Visualization
-
Methods intended for steady data
◦ Arrows
◦ (Illuminated) Streamlines
◦ Line Integral Convolution (LIC)
Methods for time dependent data
◦ Particle Pathlines (Trajectories)
◦ Methods for steady flow
Methods (available in Avizo)
Michael Böttinger: Vector Field Visualization
-
Methods: Vector Arrows
Michael Böttinger: Vector Field Visualization
Arrows visualize the local direction and magnitude (length) of the vector field
-
Methods: Streamlines
Michael Böttinger: Vector Field Visualization
Streamlines: Curves, which are everywhere tangent to the corresponding velocity vectors of a flow field - at one point in time.
-
Methods: Streamlines
Michael Böttinger: Vector Field Visualization
Streamlines: Curves, which are everywhere tangent to the corresponding velocity vectors of a flow field - at one point in time. 2D streamlines: sources and sinks, although the 3D flow field is a zero divergence field!
-
Avizo: 3D Illuminated Streamlines (DisplayISL)
Michael Böttinger: Vector Field Visualization
-
Avizo: 3D Illuminated Streamlines (DisplayISL)
Michael Böttinger: Vector Field Visualization
-
Methods: Line Integral Convolution (LIC)
Michael Böttinger: Vector Field Visualization
Image based method: 1.) Computation of streamlines
2.) For each pixel, a noise texture is convolved along the respective stream line
Cabral and Leedom, 1993
Hege and Stalling, 1997
-
Michael Böttinger: Vector Field Visualization
LIC: from sparse streamlines to a continous image based representation of the flow field.
Advances: LIC shows more detailed the critical points or regions in the flow field.
Methods: Line Integral Convolution (LIC)
-
Michael Böttinger: Vector Field Visualization
LIC: The use of colours can add information and emphasize specific structures. Example: Magnitude of the velocity Sqrt(U*U+V*V+W*W)
Methods: Line Integral Convolution (LIC)
-
Multivariate Visualization: LIC + Color (Magnitude) Overlays: BumpSlice (VILW) and Isolines (SLP)
Michael Böttinger: Vector Field Visualization
-
Time Dependent Flow: Arrows + Color (Magnitude)
Michael Böttinger: Vector Field Visualization
-
Michael Böttinger: Vector Field Visualization
Time Dependent Flow: LIC + Color (Magnitude)
-
Particle Advection / Trajectories
Michael Böttinger: Vector Field Visualization
-
Particle Advection (in Avizo: ParticlePathlines) Weightless particles are “released” in the 3D vector field Suppose initial position - seed point – is (x0, y0, z0) How does the path ( x(t), y(t), z(t) ) develop over time?
Motion of a particle is given by: dx/dt = vx; dy/dt = vy; dz/dt = vz Three ordinary differential equations with initial conditions at
time zero: x(0) = x0; y(0) = y0; z(0) = z0
Time Dependent Flow: Particle Advection
Michael Böttinger: Vector Field Visualization
In 2D, we have:
(x0,y0)
Velocity at initial position: (vx,vy)
-
Simple solution: Euler’s method dp/dt = ( p(t+∆t) - p(t)) / ∆t = v(p(t)) with p= (x, y, z), v=(vx, vy, vz) hence the position for the next time step is
p(t+∆t) = p(t) + ∆t v(p(t))
Velocity values (vxn, vyn, vzn) need to be interpolated for each new position (xn,yn,zn) – e.g. by trilinear interpolation.
Michael Böttinger: Vector Field Visualization
In 2D, we have: Velocity at initial position: (vx0,vy0)
∆t.vx,∆t.vy
Velocity at new position: (vx1,vy1)
p(t +∆t)
p(t)
Time Dependent Flow: Particle Advection
-
Michael Böttinger: Vector Field Visualization
• Problem: if the time step ∆t is large, dx/dt can be >> grid spacing and the velocity varies along the path
• Euler’s method is inaccurate, unless dx/dt is small compared to the grid spacing!
• Look at velocity maxima and grid spacing in order to estimate the appropriate maximal time step - dx/dt should be less than the grid spacing!
dx/dt for large ∆t
xi
xi+1
Time Dependent Flow: Particle Advection
-
Michael Böttinger: Vector Field Visualization
• Better: Runge-Kutta (Here: 2nd order) • Estimate new particle position x*(t+1) with Euler • Estimate velocity vector v*at new position x* • For advection, use the mean of the velocity vectors v and v*
x* = x(t) + ∆t vx(p(t)) (Euler)
x (t+∆t) = x(t) + ∆t { vx(p(t)) + vx(p*)}/2
• Method allows for moderately larger integration steps
vx(p*)
vx(p(t))
vx(p(t)) vx(p*)
Time Dependent Flow: Particle Advection
-
Vector Field Visualization – Methods: Particles (Trajectories)
Michael Böttinger: Vector Field Visualization
-
Hybrid (Sigma) Coordinates ◦ Terrain following near the surface ◦ Pressure levels at the top of the atmosphere ◦ Interpolated in between
Vertical Coordinates of Atmospheric Models
Michael Böttinger: Vector Field Visualization
-
Avizo supports Height levels Pressure levels cdo ml2hl,hlevels
cdo ml2pl,plevels
The input files should contain (beside the desired quantity)
log. surface pressure or the surface pressure.
Orography (surface geopotential)
Michael Böttinger: Vector Field Visualization
Vertical Coordinates of Atmospheric Models
-
Coordinates of Vector Components in Climate Models
Michael Böttinger: Vector Field Visualization
Atmosphere: k points upwards Ocean: k points downwards
-
Avizo needs all vector components on one common
grid
Interpolation onto the scalar grid:
Horizontal Interpolation of U and V onto Scalar Grid Points
cdo remapbil,
Vertical Interpolation of W onto Scalar Grid Points
cdo intlevel,
Grids and Coordinates
Michael Böttinger: Vector Field Visualization
-
Rotation of Vector Components
Michael Böttinger: Vector Field Visualization
Rotation: Needed for Rotated Regional Grids (REMO, CLM)
-
Rotation of Vector Components
Michael Böttinger: Vector Field Visualization
Rotation: Needed for Curvilinear Grids (MPI-OM)
-
MPI-OM: Interpolation and Rotation of horizontal Vector Components
Michael Böttinger: Vector Field Visualization
cdo mrotuvb
-
Vertical Velocity in Atmosphere Models
Michael Böttinger: Vector Field Visualization
code description 130 temperature [K] 133 specific humidity [kg/kg] 134 Surface pressure [Pa] 135 Vertical velocity [Pa/s]
Vertical Velocity (code 135) is mostly given in [Pa/s].
Avizo needs [m/s] in all 3 Dimensions! Conversion: New cdo command – not yet mentioned in the documentation: cdo vertwind
Quantities needed for vertwind
-
Michael Böttinger: Vector Field Visualization
Thank you for your attention!
[email protected] http://www.dkrz.de
-
Convert MPI-OM GRIB data to NetCDF
cdo -f nc -t mpiom1 -r copy gr15-1.2.3-core-010_500.grb gr15_test.nc
Vertical interpolation from W-point levels to levels of scalar points
cdo_intlevel,6,17,27,37,47,57,69,83,100,123,150,183,220,263,310,363,420,485,560,645,7
40,845,960,1085,1220,1365,1525,1700,1885,2080,2290,2525,2785,3070,3395,3770,4195,4
670,5170,5720 GR15_WO.nc GR15_WO_s.nc
Horizontal Interpolation of U and V onto Scalar grid and Rotation of
Velocity Vectors
cdo_-r mrotuvb -setgrid,/pool/data/MPIOM/GR15/GR15u.nc -selvar,UKO gr15_test.nc -
setgrid,/pool/data/MPIOM/GR15/GR15v.nc -selvar,VKE gr15_test.nc ukovke_nswe.nc cdo
setgrid,/pool/data/MPIOM/GR15/GRID_-180_180/GR15s.nc uko_vke_nswe.nc
uko_vke_nsweG.nc
Set Grid Description to Scalar Grid
cdo setgrid,/pool/data/MPIOM/GR15/GRID_-180_180/GR15s.nc ukovke_nswe.nc
ukovke_nsweG.nc
Processing Workflow for MPI-OM (1)
Michael Böttinger: Vector Field Visualization
-
Combine U,V,W
cdo –r merge ukovke_nsweG.nc gr15_WO_s.nc gr15_UVW.nc
Get or Create Mask
…
Reassign Special Values to U,V,W
cdo ifthen
Michael Böttinger: Vector Field Visualization
Processing Workflow for MPI-OM (2)
-
Remapping onto regular grid
Compute interpolation weights (OpenMP parallel)
cdo -P 4 genbil,r4096x2048 vel75_0031-07-01_0031-12-31_s.nc
remap_weights_TP06_vel_r4096x2048.nc
Do remapping
cdo remap,r4096x2048,remap_weights_TP06_vel_r4096x2048.nc vel75_0031-
07-01_0031-12-31m.nc vel75_0031-07-01_0031-12-31_reg_temp.nc
Re-order longitudes
> cdo selindexbox,2049,2048,1,2048 vel75_0031-07-01_0031-12-
31_reg_temp.nc vel75_0031-07-01_0031-12-31_reg.nc
> \rm vel75_0031-07-01_0031-12-31_reg_temp.nc
Michael Böttinger: Vector Field Visualization
Processing Workflow for MPI-OM (3)
�Michael Böttinger�Introduction to Vector Field Visualization�DataMethods (available in Avizo)Methods: Vector ArrowsMethods: StreamlinesMethods: StreamlinesAvizo: �3D Illuminated Streamlines (DisplayISL)Avizo: �3D Illuminated Streamlines (DisplayISL)Methods: Line Integral Convolution (LIC)Methods: Line Integral Convolution (LIC)Methods: Line Integral Convolution (LIC)Multivariate Visualization: LIC + Color (Magnitude)�Overlays: BumpSlice (VILW) and Isolines (SLP)Time Dependent Flow: Arrows + Color (Magnitude)Time Dependent Flow: LIC + Color (Magnitude)Particle Advection / TrajectoriesTime Dependent Flow: Particle AdvectionTime Dependent Flow: Particle AdvectionTime Dependent Flow: Particle AdvectionTime Dependent Flow: Particle AdvectionVector Field Visualization �– Methods: Particles (Trajectories)Vertical Coordinates of Atmospheric ModelsVertical Coordinates of Atmospheric ModelsCoordinates of Vector �Components in Climate ModelsGrids and CoordinatesRotation of Vector ComponentsRotation of Vector ComponentsMPI-OM: Interpolation and �Rotation of horizontal Vector ComponentsVertical Velocity in Atmosphere ModelsFoliennummer 30Processing Workflow for MPI-OM (1)Processing Workflow for MPI-OM (2)Processing Workflow for MPI-OM (3)