Skip to content

Repository files navigation

🌧️ Regionalization of the Diurnal Cycle of Precipitation over the Amazon Basin

Substitute the introductory paragraphs with:

This repository contains Python scripts developed to investigate the diurnal cycle of precipitation over the Amazon Basin, using half-hourly precipitation estimates from the IMERG V06B Final Run product.

The computational workflow was originally developed as part of my Master's research in Atmospheric Sciences at the Institute of Astronomy, Geophysics and Atmospheric Sciences of the University of SΓ£o Paulo (IAG-USP). The research resulted in a Master's dissertation and subsequently in a peer-reviewed scientific article published in Frontiers in Climate.

The project includes routines for processing precipitation data, constructing seasonal diurnal composites, converting UTC to Local Solar Time (LST), harmonic analysis, clustering of precipitation regimes, visualization of harmonic parameters, atmospheric circulation analyses, topography, and generation of animations.

The associated dissertation and scientific publication are presented below.


πŸŽ“ Associated Master's Dissertation

This repository contains the computational workflow developed during the Master's research:

RegionalizaΓ§Γ£o do ciclo diurno da precipitaΓ§Γ£o sobre a Bacia AmazΓ΄nica

Author: Ronald Guiuseppi RamΓ­rez Nina Advisor: Prof. Dr. Maria AssunΓ§Γ£o Faus da Silva Dias Institution: Institute of Astronomy, Geophysics and Atmospheric Sciences β€” University of SΓ£o Paulo (IAG-USP) Program: Meteorology / Atmospheric Sciences Year: 2022 Defense: December 22, 2022

DOI: 10.11606/D.14.2022.tde-13022023-143713

πŸ“– USP Digital Library of Theses and Dissertations: https://teses.usp.br/teses/disponiveis/14/14133/tde-13022023-143713/es.html

The dissertation investigated the spatial and temporal heterogeneity of the precipitation diurnal cycle over the Amazon Basin using IMERG V06B Final Run precipitation estimates from 2001 to 2020.

The analysis combined:

  • seasonal precipitation composites;
  • diurnal and semi-diurnal harmonic analysis;
  • normalized harmonic amplitude;
  • phase of the first and second harmonics;
  • mean precipitation rate;
  • Local Solar Time;
  • K-means clustering;
  • atmospheric circulation;
  • and local factors associated with the spatial variability of precipitation.

πŸ“„ Associated Scientific Publication

The results obtained during the Master's research were subsequently published as a peer-reviewed scientific article:

Heterogeneity of the diurnal cycle of precipitation in the Amazon Basin

Authors: Ronald G. RamΓ­rez-Nina and Maria A. F. Silva Dias Journal: Frontiers in Climate Section: Predictions and Projections Volume: 6 Year: 2024 Article: 1370097

DOI: 10.3389/fclim.2024.1370097

πŸ“„ Full article: https://www.frontiersin.org/journals/climate/articles/10.3389/fclim.2024.1370097/full

Recommended citation

RamΓ­rez-Nina RG and Silva Dias MAF (2024). Heterogeneity of the diurnal cycle of precipitation in the Amazon Basin. Frontiers in Climate, 6, 1370097. https://doi.org/10.3389/fclim.2024.1370097

The article provides a seasonal characterization and regionalization of the precipitation diurnal cycle over the Amazon Basin using IMERG precipitation estimates, harmonic analysis, and clustering techniques.


🎯 Objectives

The main objective of this repository is to provide the computational workflow used to characterize the spatial and temporal variability of the diurnal cycle of precipitation over the Amazon Basin.

The analyses include:

  • processing of half-hourly IMERG precipitation data;
  • construction of seasonal precipitation composites;
  • representation of the diurnal cycle in Local Solar Time (LST);
  • harmonic decomposition of the diurnal cycle;
  • analysis of the amplitude and phase of the first and second harmonics;
  • identification of regions with different diurnal precipitation regimes;
  • classification using K-means clustering;
  • visualization of temporal series and harmonic parameters;
  • analysis of the large-scale atmospheric circulation;
  • evaluation of the relationship between precipitation patterns and topography;
  • generation of animations of the diurnal evolution of precipitation.

πŸ—ΊοΈ Study region

The main study region is the Amazon Basin, including analyses over different sectors and subregions of the basin.

The repository also contains geographic and cartographic auxiliary files used to represent the study domain.


πŸ›°οΈ Dataset

The main precipitation dataset used in this project is:

IMERG V06B Final Run PrecipitationCal

IMERG β€” Integrated Multi-satellitE Retrievals for GPM

Spatial resolution:

0.1Β° Γ— 0.1Β°

Temporal resolution:

30 minutes

Period analyzed:

January 2001
to
December 2020

The half-hourly temporal resolution makes the dataset particularly suitable for investigating the diurnal and semi-diurnal variability of precipitation.


πŸ“š Citation

If you use the scripts, methodology, or results available in this repository for scientific or academic purposes, please cite the associated scientific publication:

RamΓ­rez-Nina RG and Silva Dias MAF (2024). Heterogeneity of the diurnal cycle of precipitation in the Amazon Basin. Frontiers in Climate, 6, 1370097. https://doi.org/10.3389/fclim.2024.1370097

The Master's dissertation can also be cited as:

RamΓ­rez Nina, Ronald Guiuseppi. (2022). RegionalizaΓ§Γ£o do ciclo diurno da precipitaΓ§Γ£o sobre a Bacia AmazΓ΄nica. Master's Dissertation, Institute of Astronomy, Geophysics and Atmospheric Sciences, University of SΓ£o Paulo, SΓ£o Paulo. https://doi.org/10.11606/D.14.2022.tde-13022023-143713

Repository:

RonaldRN/DiurnalCycle_AmazonBasin

GitHub:

https://github.com/RonaldRN/DiurnalCycle_AmazonBasin


πŸ”¬ Research lineage

The relationship between the repository and the associated scientific products can be summarized as:

IMERG V06B Final Run
2001–2020
        β”‚
        β–Ό
Processing and seasonal composites
        β”‚
        β–Ό
Local Solar Time
        β”‚
        β–Ό
Harmonic analysis
        β”‚
        β–Ό
K-means regionalization
        β”‚
        β–Ό
Physical interpretation
        β”‚
        β–Ό
Master's Dissertation
IAG-USP β€” 2022
        β”‚
        β–Ό
Peer-reviewed publication
Frontiers in Climate β€” 2024

πŸ“‚ Repository structure

The repository is organized according to the main stages of the analysis:

DiurnalCycle_AmazonBasin/
β”‚
β”œβ”€β”€ Amazonia_internacional_SIRGAS_2000/
β”œβ”€β”€ CARTOPY_IMGS/
β”œβ”€β”€ SCRIPTS_ATMOSPHERIC-CIRCULATION/
β”œβ”€β”€ SCRIPTS_COMPOSITES_30MIN/
β”œβ”€β”€ SCRIPTS_K-MEANS/
β”œβ”€β”€ SCRIPT_FUNCOES_HARMONICA_LST/
β”œβ”€β”€ SCRIPT_GIFS/
β”œβ”€β”€ SCRIPT_MAPAS_PARAMETROS_HARMONICOS/
β”œβ”€β”€ SCRIPT_PROCESSAR_DADOS_IMERG/
β”œβ”€β”€ SCRIPT_TOPOGRAPHY_AMAZONBASIN/
β”œβ”€β”€ amazonas/
β”‚
β”œβ”€β”€ tese-projeto.yml
└── README.md

🌧️ SCRIPT_PROCESSAR_DADOS_IMERG

Contains the scripts responsible for processing the IMERG precipitation data and constructing the seasonal diurnal cycle.

The analyses are separated into the four climatological seasons:

DJF β€” December, January, February
MAM β€” March, April, May
JJA β€” June, July, August
SON β€” September, October, November

Main scripts:

cycle_diurnal_xarray_DJF.py
cycle_diurnal_xarray_MAM.py
cycle_diurnal_xarray_JJA.py
cycle_diurnal_xarray_SON.py

These routines form one of the first stages of the analysis workflow.


πŸ•’ SCRIPTS_COMPOSITES_30MIN

Contains the routines used to construct half-hourly seasonal composites of the diurnal cycle.

Main scripts include:

composite_diurnal_30min_DJF.py
composite_diurnal_30min_MAM.py
composite_diurnal_30min_JJA.py
composite_diurnal_30min_SON.py

The directory also contains auxiliary functions and plotting routines associated with:

  • Local Solar Time;
  • harmonic analysis;
  • precipitation time series;
  • regional analyses;
  • evaluation of the first harmonic.

β˜€οΈ Local Solar Time β€” LST

Because the Amazon Basin covers a wide longitudinal range, analyses based exclusively on UTC do not represent the same local time at every longitude.

The project therefore includes routines for converting the precipitation cycle from UTC to Local Solar Time (LST).

Auxiliary functions associated with this procedure are available in:

SCRIPT_FUNCOES_HARMONICA_LST/

including:

localsolartimeFunction.py
harmonicFunction.py
harmonicFunction_TimeSeries.py

This allows the timing of precipitation maxima to be compared more consistently across different portions of the basin.


🌊 Harmonic analysis

Harmonic analysis is used to summarize the temporal structure of the precipitation diurnal cycle.

The repository contains routines for estimating and visualizing harmonic parameters associated primarily with the:

  • first harmonic β€” 24-hour component;
  • second harmonic β€” 12-hour component.

These components provide information about the:

Amplitude β†’ relative importance of the harmonic
Phase     β†’ approximate timing of the precipitation maximum

The corresponding mapping routines are located in:

SCRIPT_MAPAS_PARAMETROS_HARMONICOS/

with scripts such as:

DiurnalCycle_HarmonicParam_seasonBA.py
diurnal_cycle_netcdf_BA.py
diurnal_cycle_netcdf_AS.py

🧩 SCRIPTS_K-MEANS

This directory contains routines for applying K-means clustering to identify regions with similar precipitation diurnal-cycle characteristics.

Main files include:

NumberClustersFunction.py
clusters_k-means.py
k-means_diurnal_cycle.py
plots_KMeans.py

The clustering analysis provides an objective way to group regions of the Amazon Basin according to similarities in their temporal precipitation behavior.


🌬️ SCRIPTS_ATMOSPHERIC-CIRCULATION

This directory contains routines used to investigate the large-scale atmospheric circulation associated with the seasonal precipitation regime.

The scripts include processing and visualization of atmospheric fields from ERA5, including analyses at different pressure levels.

Examples include:

mean_seasonal_atmospheric_circulation_200hPa.py
mean_seasonal_atmospheric_circulation_500hPa.py
mean_seasonal_atmospheric_circulation_850hPa.py

as well as vertical cross sections:

transversal_section_latitude_atmospheric_circulation.py
transversal_section_longitude_atmospheric_circulation.py

Additional scripts are provided for obtaining ERA5 data required for these analyses.


⛰️ SCRIPT_TOPOGRAPHY_AMAZONBASIN

Contains routines for representing the topography of the Amazon Basin.

Main script:

topography_amazon_basin.py

Topography is an important component of the analysis because the spatial distribution and timing of precipitation over the Amazon are influenced by complex interactions among atmospheric circulation, surface forcing, and terrain.


🎞️ SCRIPT_GIFS

Contains routines for generating animations illustrating the temporal evolution of the precipitation diurnal cycle.

Available scripts include:

gif_BaciaAmazonica.py
gif_BaciaAmazonica_clusters.py
gif_DiurnalCycle_setoresBA.py
gif_DiurnalCycle_setoresBA_clusters.py

These animations provide a useful visualization of the propagation and spatial evolution of precipitation throughout the day.


πŸ”¬ General workflow

The overall analysis can be summarized as:

IMERG Final Run β€” 30 min
        β”‚
        β–Ό
Precipitation processing
        β”‚
        β–Ό
Seasonal separation
DJF / MAM / JJA / SON
        β”‚
        β–Ό
Half-hourly diurnal composites
        β”‚
        β–Ό
UTC β†’ Local Solar Time
        β”‚
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                     β–Ό
Harmonic analysis         Time series
        β”‚
        β–Ό
Amplitude and phase
        β”‚
        β–Ό
Spatial classification
      K-means
        β”‚
        β–Ό
Regional precipitation regimes
        β”‚
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό               β–Ό
Atmospheric          Topography
circulation
        β”‚               β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                β–Ό
     Physical interpretation

🐍 Computational environment

The analyses were developed using Python and a Conda virtual environment.

An environment specification is provided in:

tese-projeto.yml

The environment was originally built with Python 3.8.

Among the scientific packages used throughout the project are:

numpy
pandas
xarray
matplotlib
cartopy
scipy
scikit-learn
netCDF4
geopandas
rasterio
rioxarray
shapely

Additional dependencies are listed in tese-projeto.yml.


βš™οΈ Installation

1. Clone the repository

git clone https://github.com/RonaldRN/DiurnalCycle_AmazonBasin.git

Enter the repository:

cd DiurnalCycle_AmazonBasin

2. Create the Conda environment

The recommended way to reproduce the original computational environment is:

conda env create -f tese-projeto.yml

The environment defined in the file is called:

tese

Activate it with:

conda activate tese

To update an existing environment using the configuration file:

conda env update -f tese-projeto.yml

When finished:

conda deactivate

▢️ Running the scripts

The repository consists primarily of Python scripts.

A script can generally be executed with:

python script_name.py

For example:

python cycle_diurnal_xarray_DJF.py

Before executing a script, check the paths defined inside the file and adapt the input and output directories to your local filesystem.

Because the original workflow was developed for a specific research environment, some scripts may require adjustments to:

input paths
output paths
IMERG data locations
ERA5 data locations
shapefile locations
figure directories


πŸ‘¨β€πŸ’» Author

Ronald Guiuseppi RamΓ­rez Nina Atmospheric Sciences Institute of Astronomy, Geophysics and Atmospheric Sciences University of SΓ£o Paulo β€” IAG/USP



🌎 Acknowledgements

This repository was developed in the context of graduate research at the Institute of Astronomy, Geophysics and Atmospheric Sciences of the University of SΓ£o Paulo (IAG-USP).

The analyses rely on satellite precipitation estimates and atmospheric reanalysis products that made it possible to investigate the spatial and temporal variability of precipitation over the Amazon Basin.

This repository therefore preserves much of the computational workflow underlying the Master's research and its subsequent scientific publication.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages