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.
This repository contains the computational workflow developed during the Master's research:
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.
The results obtained during the Master's research were subsequently published as a peer-reviewed scientific article:
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
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.
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.
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.
The main precipitation dataset used in this project is:
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.
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
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
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
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.
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.
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 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
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.
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.
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.
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.
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
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.
git clone https://github.com/RonaldRN/DiurnalCycle_AmazonBasin.gitEnter the repository:
cd DiurnalCycle_AmazonBasinThe recommended way to reproduce the original computational environment is:
conda env create -f tese-projeto.ymlThe environment defined in the file is called:
tese
Activate it with:
conda activate teseTo update an existing environment using the configuration file:
conda env update -f tese-projeto.ymlWhen finished:
conda deactivateThe repository consists primarily of Python scripts.
A script can generally be executed with:
python script_name.pyFor example:
python cycle_diurnal_xarray_DJF.pyBefore 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
Ronald Guiuseppi RamΓrez Nina Atmospheric Sciences Institute of Astronomy, Geophysics and Atmospheric Sciences University of SΓ£o Paulo β IAG/USP
- π§ ronald.ramirez.nina@usp.br
- π§ ronald.ramirez.nina@alumni.usp.br
- π§ ronald.ramirez.nina@gmail.com
- π GitHub β @RonaldRN
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.