Download and Processing of Automatic Weather Stations (AWS) Data of INMET-Brazil

A collection of functions for downloading and processing automatic weather station (AWS) data from INMET (Brazilโ€™s National Institute of Meteorology), designed to support the estimation of reference evapotranspiration (ETo). The package facilitates streamlined access to meteorological data and aims to simplify analyses in agricultural and environmental contexts.


BrazilMet

CRAN Total Downloads CRAN Download Badge

R-CMD-check

Overview

BrazilMet is an R package designed to facilitate the acquisition and processing of meteorological data from INMET stations. It includes functions for downloading, calculating atmospheric parameters, estimating evapotranspiration, and more. Please, see the package page ๐Ÿ”— https://filgueirasr.github.io/BrazilMet/


๐ŸŒ Features

๐Ÿ“ฅ Downloading Data

  • Automatic weather station data from INMET (daily aggregation).
  • Automatic weather station data from INMET (hourly intervals).
  • Climatological normals from conventional INMET weather stations.
  • Download and Extraction of Maximum Reference Evapotranspiration (ETo) Grids for Brazil (Dias, 2018).

๐ŸŒค๏ธ Atmospheric Parameter Calculations

  • Atmospheric pressure calculation based on altitude.
  • Psychrometric constant calculation based on atmospheric pressure.

๐Ÿ’ง Evapotranspiration Estimation

  • Reference evapotranspiration (ETo) via Hargreaves-Samani.
  • Reference evapotranspiration (ETo) via Penman-Monteith FAO-56.
  • Potential evapotranspiration (ETp) via Thornthwaite.
  • Correction for sunlight hours and the number of days in the month for Thornthwaite ETp.
  • Design reference evapotranspiration.

โ˜€๏ธ Radiation Parameter Estimation

  • Extraterrestrial radiation for daily periods.
  • Solar radiation estimation (Angstrom formula & temperature-based methods).
  • Clear-sky solar radiation with/without calibrated values.
  • Net solar (shortwave) radiation, net longwave radiation, and net radiation.

๐Ÿ’จ Air Humidity & Wind Speed Parameters

  • Mean saturation vapor pressure.
  • Actual vapor pressure derived from dew point or relative humidity.
  • Vapor pressure deficit and relative humidity calculations.
  • Wind speed at 2 meters above ground level.

๐Ÿ“ Station Selection & Information

  • Automatic weather station (AWS) metadata.
  • Selection of AWS stations using an sf object.

๐Ÿ’ง Water Balance

  • Sequential water balance (Thornthwaite & Mather, 1955) for daily, weekly, monthly or custom time steps.

โšก Installation

You can install the latest version of BrazilMet from GitHub:

# Install devtools if not already installed
install.packages("devtools")

# Install BrazilMet
devtools::install_github("FilgueirasR/BrazilMet")

๐Ÿš€ Usage Example - ETo estimation

Hereโ€™s a quick example of how to download INMET station data and estimate reference evapotranspiration (ETo) using FAO-56 for multiple stations and years:

# Load the package
library(BrazilMet)

# View available station information
see_stations_info()

# Download daily weather data for two stations
df <- download_AWS_INMET_daily(stations = c("A001", "A042"),
                               start_date = "2023-01-01",
                               end_date = "2024-12-31")

# Calculate daily ETo using the FAO-56 method
df$eto <- daily_eto_FAO56(lat = df$latitude_degrees,
                          tmin = df$tair_min_c,
                          tmax = df$tair_max_c,
                          tmean = df$tair_mean_c,
                          Rs = df$sr_mj_m2,
                          u2 = df$ws_2_m_s,
                          Patm = df$patm_mb,
                          RH_max = df$rh_max_porc,
                          RH_min = df$rh_min_porc,
                          z = df$altitude_m,
                          date = df$date)

๐Ÿค Contributing

We welcome contributions from the community! Whether itโ€™s reporting issues, suggesting improvements, or submitting pull requests, your help is greatly appreciated.

How to contribute: Fork the repository

Create a new branch (git checkout -b feature-branch)

Make your changes and commit (git commit -m "Description of changes")

Push to your branch (git push origin feature-branch)

Open a pull request

Letโ€™s make BrazilMet even better together! ๐Ÿš€

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("BrazilMet")

0.5.0 by Roberto Filgueiras, 19 days ago


https://github.com/FilgueirasR/BrazilMet, https://filgueirasr.github.io/BrazilMet/


Report a bug at https://github.com/FilgueirasR/BrazilMet/issues


Browse source code at https://github.com/cran/BrazilMet


Authors: Roberto Filgueiras [aut, cre] (ORCID: , Luan P. Venancio [aut] , Catariny C. Aleman [aut] (ORCID: , Fernando F. da Cunha [aut] (ORCID: , Arthur T. Calegario [ctb] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports stringr, readxl, dplyr, tibble, lubridate, sf, stringi, terra

Suggests knitr, rmarkdown, ggplot2, testthat


See at CRAN