The code may priorize make all necessary calculations in Python and CDO. For python you will need pandas, numpy, scipy, xarray and alive-progress All conected by BASH and running in Linux systems.
./extremos.sh netcdf/tmax.nc 1990 90 15 [netcdf/pr.nc] [netcdf/tmin.nc]
the params inside [] are option that need only if the calculus need The paramns are:
- it's the daily maximum temperature netcdf file complete, like (1961-2024)
- it's the year that start the calculation of index
- it's the percentil that is used in temperature relative calculations
- it's number of days that are used like window calculation
- it's the daily precipitation netcdf file, like (1961-2024)
- it's the daily minimum temperature netcdf file complete, like (1961-2024)
The images are saved ar directory "imagens" and the data are saved in directory "dados"
- Heatwave.csv is the file with annual heatwaves
- Heatwaves_days.csv is the file with the maximum continum period of heatwave
- Heatwaves_complete.csv is the file that say the dayly period of heatwaves. 0 don't have heatwave, 1 have heatwaves next 3 days
- season.csv if the file with daily heatwave, but separete by season, colum:1 of Nov-Fev, colum:2 of Mar-Mai, colum:3 of Jun-Ago, colum:4 of Set-Nov
- season_heatwave.csv is the heatwaves separate by season, colum:1 of Nov-Fev, colum:2 of Mar-Mai, colum:3 of Jun-Ago, colum:4 of Set-Nov
- kendall.csv is the file with heatwaves values for mann-Kendall test and linear regression
- input.csv is the file with all data from campinas in txt format the facilite the update
#1. tmax.nc is the tmax temperatura for one latitude and longitude #1. tmin.nc is the tmin temperatura for one latitude and longitude #1. pr.nc is the precipitation for one latitude and longitude
-
spy.py use the precipitaion to calculate the spi index
-
HeatWave.py calculate the heatwave by year, season and extention considering World Meteorogical Organization definition of Heatwave
-
tmaxtmin_heatwave.py calculate the heatwave by year, season and extention considering World Meteorogical Organization definition of Heatwave using min temperature
-
geirinhas.py calculate the index based at gueirinhas metodology
-
linear.py calculate the linear regresion and Mann-Kendall test for heatwaves
-
linear_season.py calculate linear regression and Mann-Kendall test for season heatwaves and continum heatwaves
-
plot_spi.py create the graph of spi in html
-
plot_linear_tmaxtmin_heatwave.py create the graph of heatwave of tmaxtmin heatwaves
-
anomaly.py create the graph of temperature anomaly of each heatwave
-
cumulative_heat.py calculate the anomaly of temperature for each heatwave
-
txttonetcdf.py open the file in ./dados/input.csv, that can be updated with excel and after to convert to netcdf
-
heatwave3ormore open the file in ./intern/heatwave3ormore.py, that create the heatwave files considering heatwaves when has 3 hotdays using maximum temperature
Geirinhas, João & Russo, Ana & Libonati, Renata & Sousa, Pedro & Miralles, Diego & Trigo, Ricardo. (2021). Recent increasing frequency of compound summer drought and heatwaves in Southeast Brazil. Environmental Research Letters. 16. 10.1088/1748-9326/abe0eb.
United Nations Office for Disaster Rist Reduction, Accessed 3 mar 2024
Xavier, A. C., Scanlon, B. R., King, C. W., & Alves, A. I. (2022). New improved Brazilian daily weather gridded data (1961–2020) . International Journal of Climatology, 42(16), 8390– 8404. https://doi.org/10.1002/joc.7731
Intense Heat Wave
John R. Nairn 1,* and Robert J. B. Fawcett. (2013). The Excess Heat Factor: A Metric for Heatwave Intensity and Its Use in Classifying Heatwave Severity . International Journal of Environmental Research and Public Health (IJERPH)The Heatwaves graph is: