MyNixOS website logo
Description

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.

CRAN Total Downloads CRAN Download Badge CRAN Version

BrazilMet

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.


🌍 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.

⚡ 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)

🚀 Usage Example design ETo calculation

Here’s a quick example of how to download INMET station data and estimate reference evapotranspiration (ETo) using FAO-56, followed by the calculation of the design ETo.


library(BrazilMet)
stations <- BrazilMet::see_stations_info()

df <- BrazilMet::download_AWS_INMET_daily(stations = "A001", start_date = "2000-01-01", end_date = "2025-03-31")

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)

BrazilMet::design_eto(eto_daily_data = df, percentile = .80)

🤝 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! 🚀

Metadata

Version

0.4.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows