Difference between revisions of "BogotaClimateChange:Climate Simulation Visualization"
From hpcwiki
Jvictorinog (Talk | contribs) (→Funcionamiento básico) |
Jvictorinog (Talk | contribs) (→Funcionamiento básico) |
||
Line 50: | Line 50: | ||
* Window::Window() | * Window::Window() | ||
* WrapperGL::WrapperGL() | * WrapperGL::WrapperGL() | ||
+ | glutInit(&argc, argv); | ||
+ | glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); | ||
+ | glutInitWindowSize(pmain_widget->get_width(), pmain_widget->get_height()); | ||
+ | if(gameMode){ | ||
+ | glutGameModeString("800x600:32@60"); | ||
+ | glutEnterGameMode(); | ||
+ | } | ||
+ | else glutCreateWindow(pmain_widget->get_title().c_str()); | ||
+ | glClearColor(1.0, 1.0, 1.0, 0.1); | ||
+ | glutDisplayFunc(glut_display); | ||
+ | glutReshapeFunc(glut_reshape); | ||
+ | glutMouseFunc(glut_mouse_press); | ||
+ | glutMotionFunc(glut_mouse_drag); | ||
+ | glutPassiveMotionFunc(glut_mouse_move); | ||
+ | glutKeyboardFunc(glut_key_pressed); | ||
+ | glutKeyboardUpFunc(glut_key_released); | ||
+ | glutSpecialFunc(glut_special_key_pressed); | ||
+ | glutSpecialUpFunc(glut_special_key_released); | ||
+ | |||
* WrapperGL::init() | * WrapperGL::init() | ||
* Window::init() | * Window::init() |
Revision as of 16:56, 1 October 2013
Contents |
WRF Data Extraction
path scripts to generate fields
/home/jvictorino/wrf/scripts
path fields data generated
/home/jvictorino/wrf/wrf_data
4D fields generated {lats 287, lons 280, levs 34, times 265} XX corresponds with time index:
- tempXX.dat: temperature
- PsXX.dat: pressure
- UXX.dat: Meridional component of wind
- VXX.dat: Zonal component of wind
- WXX.dat: Verical component of wind
3D fields generated {lats 287, lons 280, times 265}:
- relhum.dat: Relative Humidity
- raina.dat: acummulated rain
- cldfrac.dat: cloud fraction
Terrain Elevation Rendering
Data source: ASTER_GDEM
Demo versión 0.1 de Render de elevación del terreno en los cerros orientales de Bogotá, resolución 30 metros, región de 5.4 Km x 5.4 Km. Usando OpenGL.
Temperature 3D, 10 layers, selected region.
Physically-based Cloud Generation
GUI OpenGL
Elementos de la libreria
Estructura de la interfaz
Funcionamiento básico
Orden de llamados:
- Constructor de la clase Widget
- Constructor de la ventana de usuario que desciende de Widget
- Constructor WrapperGL
- Llamado a la función init() de la ventana llamada por WrapperGL::init()
- Llamado a la función resize() de la ventana llamada por WrapperGL::reshape()
- Llamado a la función draw() de la ventana llamada por WrapperGL::glut_display()
- Automáticamente se llama por segunda a la función draw() de la ventana
- El motor gráfico queda escuchando los eventos activados
La función WrapperGL::reshape() configura una proyección de perspectiva. Y en la función WrapperGL::glut_display() configura una proyección Ortogonal
-Estado inicial de OpenGL
- Widget::Widget()
- Window::Window()
- WrapperGL::WrapperGL()
glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); glutInitWindowSize(pmain_widget->get_width(), pmain_widget->get_height()); if(gameMode){ glutGameModeString("800x600:32@60"); glutEnterGameMode(); } else glutCreateWindow(pmain_widget->get_title().c_str()); glClearColor(1.0, 1.0, 1.0, 0.1); glutDisplayFunc(glut_display); glutReshapeFunc(glut_reshape); glutMouseFunc(glut_mouse_press); glutMotionFunc(glut_mouse_drag); glutPassiveMotionFunc(glut_mouse_move); glutKeyboardFunc(glut_key_pressed); glutKeyboardUpFunc(glut_key_released); glutSpecialFunc(glut_special_key_pressed); glutSpecialUpFunc(glut_special_key_released);
- WrapperGL::init()
- Window::init()
- WrapperGL::reshape()
- Window::resize()
- WrapperGL::glut_display()
- Window::draw()
- Window::draw()
- glut_exec()...
-Funciones y utilidades de OpenGL
Visualización de campos WRF
Descripción de objetos
TODO List
- Propose a model for cloud generation based on single cells in a simulation domain (WRF)