Master student, Kazakh-British Technical University, Kazakhstan, Almaty
A WEB-BASED TOOL FOR THE ANALYSIS AND VISUALIZATION OF ATMOSPHERIC MODELING DATA
ABSTRACT
This paper presents a web-based application for the analysis and visualization of atmospheric modeling data using the WRF model, with a focus on the city of Almaty. Developed in Python with Streamlit, Xarray, Cartopy, and other libraries, the tool offers an interactive interface for processing NetCDF files. Its core features include 2D maps of temperature and wind fields, scatter plots, wind roses, and statistical metrics (BIAS, MAE, RMSE) for model verification using weather station data. The application enables comparative evaluation of different model runs, supports vertical cross-section and altitude-based visualizations, and provides a module for turbulence diagnostics through turbulent kinetic energy and power spectral density. Designed to assist both scientific research and practical applications, the tool facilitates detailed analysis of urban climate processes and helps assess the performance of simulation setups. Its intuitive design and reproducibility make it a useful platform for environmental monitoring and urban planning.
АННОТАЦИЯ
В статье представлено веб-приложение для анализа и визуализации данных атмосферного моделирования с использованием модели WRF на примере города Алматы. Приложение разработано на языке Python с использованием библиотек Streamlit, Xarray, Cartopy и других, и обеспечивает интерактивную работу с файлами в формате NetCDF. Основные функции включают построение двумерных карт температурных и ветровых полей, диаграмм рассеяния, роз ветров и расчёт статистических метрик (BIAS, MAE, RMSE) для верификации моделей по данным метеостанций. Поддерживается сравнительный анализ различных вариантов расчёта, визуализация вертикальных разрезов и распределения параметров по высоте. Реализован модуль диагностики турбулентности с расчётом турбулентной кинетической энергии и спектральной плотности мощности. Приложение ориентировано на поддержку научных исследований и прикладных задач, включая мониторинг окружающей среды и планирование городской застройки. Благодаря наглядной визуализации сложных атмосферных процессов инструмент представляет собой ценный ресурс для комплексного анализа городской климатической среды.
Keywords: application, data visualization, atmospheric modeling, comparative analysis.
Ключевые слова: приложение, визуализация данных, моделирование атмосферы, сравнительный анализ.
Introduction
Numerical modeling has become an essential tool in the study of climate and atmospheric processes. Modern models such as the Weather Research and Forecasting (WRF) [[1]] system enable highly accurate simulations thanks to advances in computational power and the development of sophisticated physical and mathematical algorithms. However, the output of such models consists of large multidimensional datasets that vary in time and space often ranging from hundreds of megabytes to several gigabytes posing significant challenges in analysis, interpretation, and visualization.
One of the standard formats for storing atmospheric model outputs is NetCDF (Network Common Data Form) [[2]], developed by NCAR. Several tools support NetCDF data visualization and processing: Panoply (NASA) [[3]] allows for plotting maps and graphs across platforms; Ncview [[4]] provides a simple viewer for 2D arrays on Linux/macOS; IDV [[5], [6]] (UCAR) offers powerful 3D visualization but has a steep learning curve. Additionally, ArcGIS Pro [[7]] supports multidimensional NetCDF arrays, enabling spatial-temporal analysis and map-based representations of climate parameters.
WRF model outputs are structured as arrays along latitude, longitude, altitude, and time dimensions, containing atmospheric and surface variables such as temperature, wind components, pressure, humidity, precipitation, cloud cover, and energy fluxes. Their complexity necessitates specialized tools for post-processing. Several solutions have emerged, including PostWRF [[8]] (based on NCL) and GIS4WRF [[9]] (a QGIS plugin), which support basic visualization and domain configuration. However, these tools often lack advanced capabilities for statistical verification and diagnostic visualization.
In the course of studying wind and thermal regimes in the city of Almaty under various urban development scenarios during ecologically unfavorable periods [[10], [11], [12]], the authors identified a lack of tools that offered a comprehensive suite of features from loading WRF NetCDF outputs to visualization and comparison with observational data. Limitations in processing external datasets (e.g., radiosondes, surface stations) and insufficient support for custom research workflows further motivated the creation of a tailored application.
This paper presents the development of such a web-based tool designed for processing, analyzing, and visually interpreting the results of numerical atmospheric modeling for the urban environment of Almaty using WRF.
Materials and methods
Architecture and Functionality
The developed web application enables interactive analysis and visualization of atmospheric modeling and observational data, with a focus on automation and usability. Built with Streamlit, it runs in a web browser and does not require specialized installation. The system supports WRF output in NetCDF format and meteorological observations in CSV, TXT, or Excel files.
Internally, the application performs data extraction, temporal alignment, and visual rendering of results as maps, graphs, and statistical tables. The modular design supports scalability and consists of several core functions: comparison with observational data, vertical and horizontal cross-sections, turbulence diagnostics, and statistical evaluation using metrics such as BIAS, MAE, and RMSE.
Key analytical tools include:
- Comparison of modeled vs observed time series;
- Wind rose and vertical profile plots;
- 2D temperature and wind maps with topographic overlays;
- Interactive visualization of turbulence (TKE, PSD) and vertical structure analysis.
Parameter selection via drop-down menus and sliders allows real-time exploration without coding knowledge.
Technologies and Libraries
The application is developed in the Python programming language using a modern scientific stack that ensures high performance and flexibility. The web interface is implemented with the Streamlit library [[13]], allowing the application to run directly in a browser without requiring additional software installation. For handling the multidimensional output data from the WRF model in NetCDF format, the Xarray library [[14]] is used, providing convenient access to data along spatial and temporal dimensions. Low-level reading and writing of NetCDF files is performed using the netCDF4 library. Meteorological observations from Excel and CSV files are processed using Pandas [[15]], which offers powerful tools for filtering, aggregation, and temporal alignment. Numerical operations such as interpolation and gradient computation are performed with NumPy. Visualization of time series, vertical profiles, and statistical diagrams is implemented using Matplotlib [[16]], while temperature and wind field maps are generated with Cartopy [[17]], which supports map projections, coordinate grids, and topographic overlays. For reading Excel files, the openpyxl or xlrd libraries are additionally employed. The integration of these components enables efficient processing, analysis, and visualization of large meteorological datasets.
Structure and Modules
The application is organized into modular Python scripts:
·meteoanalyzer.py: core logic for data reading, preprocessing, and analysis.
·readWRFData() and readObservedData(): retrieve model and observation data with temporal filtering.
·BIAS.py: implements error metrics (BIAS, MAE, RMSE).
·plot2D_TempMap.py and plot2D_WindVect.py: generate 2D maps using Cartopy.
·common.py: handles WRF file loading, station selection, and datetime interface elements.
·translation.py: multilingual support via JSON-based translation dictionaries.
Specialized modules support turbulence diagnostics, such as WRFDataArraysTKE: extracts turbulent kinetic energy, calc_psd: computes power spectral density (PSD) using Welch’s method, plot_psd and plot_psd_speed: visualize energy spectra with a -5/3 reference slope for turbulence analysis.
Together, these modules form a cohesive system for processing and interpreting WRF simulation results with observational data.
Results and discussion
To assess the accuracy of WRF model simulations, the developed web application includes a module for statistical comparison of modeled air temperature with observational data. Figure 1 presents key verification metrics BIAS, MAE, and RMSE calculated both at weather station locations and averaged over a 3×3 grid surrounding each station. This enables objective evaluation of model performance and selection of optimal parameterizations.
/Baimurzin.files/image001.jpg)
Figure 1. Statistical analysis of modeling results
Users can select specific weather stations, variables, time ranges, and WRF output files. Upon triggering metric calculations, the system automatically extracts and compares the data. This functionality supports not only temperature validation but also analysis of wind speed, direction, and horizontal components.
Beyond numerical evaluation, the application enables spatial visualization of average temperature and wind speed fields (Figure 2), allowing users to detect features such as heat islands and stagnation zones. The tool supports configuration of simulation scenarios, temporal averaging, and time intervals.
/Baimurzin.files/image002.png)
/Baimurzin.files/image003.png)
Figure 2. Mean air temperature (left) and wind speed (right) tools
A scatter plot module (Figure 3) further facilitates point-by-point comparison between observed and modeled temperatures. It visualizes model performance using deviation thresholds (±5°C) and separates day/night observations, aiding in the detection of systematic errors and outliers.
/Baimurzin.files/image004.png)
Figure 3. The tools of scatter plots
Time series comparison plots and wind roses (Figure 4, left) offer insight into temporal dynamics and directional distributions. Vertical atmospheric structure is examined via radiosonde profile comparisons (Figure 4, right), which depict temperature and wind speed versus height.
/Baimurzin.files/image005.jpg)
/Baimurzin.files/image006.png)
Figure 4. Visual comparative analysis of modeling results with data from in-kind measurements
Figure 5 shows temperature and wind maps at selected vertical levels, revealing spatial variability across the domain.
/Baimurzin.files/image007.jpg)
/Baimurzin.files/image008.jpg)
Figure 5. Display of simulated temperature (left) and wind (right) fields for certain altitude levels
The application also includes functionality for constructing vertical cross-sections of atmospheric parameters, which plays a key role in analyzing the vertical structure of the atmosphere. Users can specify the direction of the cross-section (e.g., west–east or south–north), define the start and end coordinates, and select variables for analysis such as temperature, vertical wind component, or both. Figure 7 presents examples of such cross-sections: the left panel displays the vertical velocity field, highlighting zones of upward and downward motion, while the right panel shows the temperature profile with a color scale indicating vertical gradients and potential inversions. Horizontal wind vectors are overlaid on both plots, allowing the evaluation of interactions between vertical and horizontal airflows.
Vertical cross-section analysis is particularly valuable for investigating phenomena such as convection, turbulence, frontal systems, and orographic effects. This diagnostic tool enhances understanding of atmospheric dynamics, supports the refinement of numerical modeling outputs, and improves forecast reliability.
/Baimurzin.files/image009.png)
/Baimurzin.files/image010.png)
Figure 6. Vertical cross-section of air temperature and the wind component
Advanced turbulence analysis modules include PSD plots (Figure 7, left) and TKE maps (7, right). PSD allows spectral decomposition of wind components, identifying energy contributions from various frequencies. TKE visualization captures turbulent dynamics over time, especially relevant for diagnosing local circulations, urban ventilation, and vertical mixing processes.
/Baimurzin.files/image011.png)
/Baimurzin.files/image012.png)
Figure7 – Power Spectral Density of wind velocity
Together, these tools form an integrated platform for evaluating model outputs and interpreting complex urban meteorological phenomena.
Conclusion
The developed web-based application offers a comprehensive solution for post-processing, analysis, and visualization of atmospheric modeling data, with a focus on WRF model outputs. It addresses the critical challenge of handling large, multidimensional datasets by integrating meteorological observations and enabling both diagnostic and comparative analyses within an accessible browser-based interface. Built on a modern Python technology stack, including Streamlit, Xarray, Pandas, Matplotlib, Cartopy, and NetCDF4, the application ensures reproducibility, scalability, and ease of use without requiring specialized software installation or coding skills. A key feature is its capability for quantitative validation of WRF outputs through the calculation of statistical errors, facilitating the objective selection of modeling configurations and sensitivity analysis under varying surface and urban conditions. The inclusion of diverse visualization tools such as time series, vertical profiles, 2D maps, wind roses, cross-sections, and power spectral analysis supports comprehensive interpretation of atmospheric processes across spatial and temporal scales.
The tool is particularly valuable for analyzing urban climate phenomena, including the urban heat island effect, local circulations, and turbulence dynamics. With an intuitive interface and multilingual support, the application is suitable for use in scientific research, urban planning, and environmental management. In the context of sustainable urban development and climate resilience, it provides a robust analytical foundation for informed decision-making.
References:
- Skamarock W.C., Klemp J.B., Dudhia J., Gill D.O., Liu Z., Berner J., ... Huang X.Y. A Description of the Advanced Research WRF Model Version 4.3. – NCAR Technical Note NCAR/TN-556+STR. – 2021.
- Unidata. NetCDF: Network Common Data Form. Available at: https://www.unidata.ucar.edu/software/netcdf/ (accessed May 5, 2025).
- NASA GISS. Panoply netCDF, HDF and GRIB Data Viewer. Available at: https://www.giss.nasa.gov/tools/panoply/ (accessed May 5, 2025).
- Pierce D. Ncview – A visual browser for NetCDF format files. Available at: https://cirrus.ucsd.edu/ncview/ (accessed May 5, 2025).
- Unidata. Integrated Data Viewer (IDV). Available at: https://www.unidata.ucar.edu/software/idv/ (accessed May 5, 2025).
- Murray D., McWhirter J., Wier S., Emmerson S. The Integrated Data Viewer: a web-enabled application for scientific analysis and visualization // Proc. of the 19th Conf. on Interactive Information and Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology. – 2003 Available at: https://ams.confex.com/ams/pdfpapers/57870.pdf
- Esri. Working with a multidimensional raster layer. Available at: https://pro.arcgis.com/en/pro-app/latest/help/data/imagery/working-with-a-multidimensional-raster-layer.htm (accessed 5 May 2025)
- Barlage M., Islam T., Gebremichael M. PostWRF: An interactive tool for post-processing and visualization of WRF model output // Environmental Modelling & Software. – 2022. – Vol. 149. – 105591. – https://doi.org/10.1016/j.envsoft.2022.105591
- Meyer D., Riede J. GIS4WRF: A QGIS plugin for the advanced configuration, simulation and visualization of weather models // Environmental Modelling & Software. – 2018. – Vol. 108. – S. 76–85. – https://doi.org/10.1016/j.envsoft.2018.07.003
- Zakarin E., Baklanov A., Balakay L., Dedova T., Bostanbekov K. Modeling of the calm situations in the atmosphere of Almaty // Asian Journal of Atmospheric Environment. – 2022. – Vol. 16, № 2. – 2022007. – https://doi.org/10.5572/ajae.2022.007
- Dedova T., Balakay L., Zakarin E., Bostanbekov K., Abdimanap G. Investigating stagnant air conditions in Almaty: A WRF modeling approach // Atmosphere. – 2024. – Vol. 15, № 6. – 633. – https://doi.org/10.3390/atmos15060633
- Dedova T., Balakay L., Zakarin E., Bostanbekov K., Abdimanap G. High-Resolution WRF Modeling of Wind and Thermal Regimes with LCZ in Almaty, Kazakhstan // Atmosphere. – 2024. – Vol. 15, № 8. – 966. – https://doi.org/10.3390/atmos15080966
- Streamlit Inc. Streamlit – Apps for the modern data scientist. Available at: https://streamlit.io/ (accessed 5 May 2025).
- Xarray Developers. Xarray Documentation. Available at: https://docs.xarray.dev/en/stable/ (accessed May 5, 2025).
- Pandas Development Team. Pandas: Python Data Analysis Library. Available at: https://pandas.pydata.org/ (accessed May 5, 2025).
- Matplotlib: Visualization with Python. Available at: https://matplotlib.org/(accessed 03.05.2025).
- Cartopy – A cartographic Python library. Available at: https://scitools.org.uk/cartopy/docs/latest/# (accessed 5 May 2025).