SamMajumder / VARUNA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

V.A.R.U.N.A. - Visual Analyzer for Regional Understanding of Numerical Atmospheric forecasts

Concept Image
Created using DALL-E by OpenAI

About V.A.R.U.N.A.

V.A.R.U.N.A., named after the Hindu deity of sky, ocean, and celestial order, is a tool designed for visualizing atmospheric forecasts derived from the Coupled Model Intercomparison Projects (CMIP6) climate models. This tool enables users to select a region of interest around a country, choose from a variety of climate models, and examine different climate variables across several Shared Socioeconomic Pathways (SSPs).

This tool can be run by downloading and clicking the VARUNA.bat executable file.

Learn more about CMIP6 models, the climate forecasts and about the Intergovernmental Panel on Climate Change (IPCC):

  1. Simple explanation on CMIP6 and IPCC: https://www.carbonbrief.org/cmip6-the-next-generation-of-climate-models-explained/
  2. IPCC: https://www.ipcc.ch/
  3. CMIP6: https://www.carbonbrief.org/cmip6-the-next-generation-of-climate-models-explained/

Climate Models and Scenarios

Example Image

This tool visualizes forecasts from 35 CMIP6 global climate models, helping predict how the climate could evolve based on various internal and external factors. The SSPs available in V.A.R.U.N.A. represent different pathways of socioeconomic development, affecting greenhouse gas emissions and land use in the future, including:

  • SSP 126: A sustainable path aiming for a low greenhouse gas concentration.
  • SSP 245: A middle-of-the-road scenario.
  • SSP 370: High greenhouse gas emissions due to energy-intensive consumption.
  • SSP 585: The highest greenhouse gas emissions pathway, representing a future with no policy changes to curb emissions.

A great resource to learn more about SSPs apart from the original publication: https://www.carbonbrief.org/explainer-how-shared-socioeconomic-pathways-explore-future-climate-change/

Citation

Riahi, K., van Vuuren, D. P., Kriegler, E., Edmonds, J., O’Neill, B. C., Fujimori, S., Bauer, N., Calvin, K., Dellink, R., Fricko, O., Lutz, W., Popp, A., Crespo Cuaresma, J., KC, S., Leimbach, M., Jiang, L., Kram, T., Rao, S., Emmerling, J., ... Tavoni, M. (2017). The Shared Socioeconomic Pathways and their energy, land use, and greenhouse gas emissions implications: An overview. Global Environmental Change, 42, 153-168. https://doi.org/10.1016/j.gloenvcha.2016.05.009

Climate Variables

The app allows exploration of various climate variables such as:

  • tas: Temperature at Surface (units: Kelvin)
  • tasmax: Maximum Temperature at Surface (units: Kelvin)
  • tasmin: Minimum Temperature at Surface (units: Kelvin)
  • pr: Precipitation flux (units: kg m-2 s-1)
  • hurs: Relative Humidity (units: percent)
  • huss: Specific Humidity (units: dimensionless fraction)
  • rlds: Downwelling Longwave Radiation at Surface (units: W m-2)
  • rsds: Downwelling Shortwave Radiation at Surface (units: W m-2)
  • sfcWind: Mean Surface Wind Speed (units: meters per second)

More information about these variables and how they are measured can be found here: https://pcmdi.llnl.gov/mips/cmip3/variableList.html

Data Source

The NEX-GDDP-CMIP6 dataset, provided by NASA Earth Exchange, comprises global downscaled climate scenarios derived from the General Circulation Model (GCM) runs conducted under CMIP6. Developed in support of the IPCC's Sixth Assessment Report, these high-resolution, bias-corrected projections are distributed through the Earth System Grid Federation. The dataset spans all four 'Tier 1' SSPs, offering insights into climate change impacts on processes sensitive to climate gradients and local topography.

Citation

NASA Earth Exchange Global Daily Downscaled Projections (NEX-GDDP-CMIP6) was accessed on 2024-05-02 from https://registry.opendata.aws/nex-gddp-cmip6. NEX-GDDP-CMIP6 data was accessed on [date] from https://registry.opendata.aws/nex-gddp-cmip6

Technology Stack

  • Data Retrieval and Preparation: Python utility functions are used to retrieve and prepare the CMIP6 data from the Registry of Open Data on AWS.
  • Visualization and App Framework: The visualization and interaction with the data are facilitated through an R Shiny application. This app leverages the robust capabilities of R for statistical analysis and the Shiny framework for creating interactive web applications.

Citation

Python libraries:

  1. GeoPandas

  2. matplotlib

    • Hunter, J. D. (2007). Matplotlib: A 2D graphics environment. Computing in Science & Engineering, 9(3), 90-95. doi:10.1109/MCSE.2007.55
  3. boto3

  4. botocore

    • Amazon Web Services, Inc. Botocore: Low-level interface to a growing number of Amazon Web Services, (2021), GitHub repository, https://github.com/boto/botocore
  5. s3fs

  6. xarray

    • Hoyer, S. & Hamman, J., (2017). xarray: N-D labeled arrays and datasets in Python. Journal of Open Research Software, 5(1), p.10. DOI: http://doi.org/10.5334/jors.148
  7. h5netcdf

    • The h5netcdf developers. h5netcdf: Pythonic interface to the netCDF4 file format that doesn’t use the netCDF4 library, (2021), GitHub repository, https://github.com/h5netcdf/h5netcdf
  8. Shapely

  9. rioxarray

  10. netCDF4

R libraries:

  1. reticulate

  2. here

  3. terra

  4. sf

  5. RColorBrewer

  6. leaflet

  7. tidyverse

    • Wickham, H., Averick, M., Bryan, J., Chang, W., McGowan, L., François, R., Grolemund, G., Hayes, A., Henry, L., Hester, J., Kuhn, M., Pedersen, T., Miller, E., Bache, S. M., Müller, K., Ooms, J., Robinson, D., Seidel, D., Spinu, V., ... Yutani, H. (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686. https://doi.org/10.21105/joss.01686
  8. shiny

  9. shinyWidgets

  10. htmlwidgets

  11. leaflet.providers

Important Scripts

app.R

This R script orchestrates the user interface and server logic of the Shiny application for the V.A.R.U.N.A. project. It sets up the interactive web-based dashboard which allows users to visualize atmospheric forecasts derived from CMIP6 models. The script integrates various R packages for data handling (terra, sf), visualization (leaflet, RColorBrewer), and web app development (shiny, shinyWidgets). It uses a Python virtual environment through the reticulate package to leverage utility functions defined in Python for data retrieval and preprocessing.

R-functions.R

This R script contains custom functions used within the Shiny application to handle specific tasks such as dynamic map generation and data manipulation. The createMap function, for instance, dynamically generates leaflet maps based on user inputs from the app interface, adjusting display properties according to the selected climate data layers. This script enhances modularity and reusability by separating function definitions from the main application logic in app.R.

utils.py

This Python script provides utility functions for data retrieval and preprocessing, essential for the backend operations of the V.A.R.U.N.A. project. It includes functions to download and process climate model data from the Registry of Open Data on AWS, using libraries such as boto3, s3fs, and xarray to handle data in various formats (e.g., netCDF). The script also integrates spatial analysis tools from geopandas and rioxarray to adjust and prepare the data for visualization in the Shiny application.

Contact

Developer: Dr. Sambadi Majumder - sambadimajumder@gmail.com

About

License:MIT License


Languages

Language:Python 64.7%Language:R 35.0%Language:Batchfile 0.3%