Function to extract temperature and precipitation data from WRF nc files, reproject to match osiris CRS and resolution, calculate monthly mean temperature and precipitation flux, and save to a new nc file.

wrf_to_osiris(
  wrf_ncdf = NULL,
  osiris_ncdf = NULL,
  write_dir = "wrf_to_osiris",
  time_step = "3 hours",
  scenario = NULL
)

Arguments

wrf_ncdf

Default = NULL. Path to WRF data, which should start at the beginning of a month. You can add multiple paths, e.g., c("/HOT_NEAR", "/HOT_FAR"), which must be in chronological order.

osiris_ncdf

Default = NULL. Path to osiris temperature nc file.

write_dir

Default = "wrf_to_osiris". Output Folder.

time_step

Default = "3 hours". Other option is "1 hour".

scenario

Default = NULL. Scenario to put in output ncdf filename.

Value

number

Examples

if (FALSE) {
library(osiris)
osiris::wrf_to_osiris()
}