extract_max: Creata a NetCDF file with the surface maximum

View source: R/extract_max.R

extract_maxR Documentation

Creata a NetCDF file with the surface maximum

Description

Read and calculate the maximum value of a variable from a list of wrf output files.

Usage

extract_max(
  filelist,
  variable = "o3",
  field = "4d",
  prefix = "max",
  units = "ppmv",
  meta = T,
  filename,
  verbose = TRUE
)

Arguments

filelist

list of files to be read

variable

variable name

field

'4d' (default), '3d', '2d' or '2dz' see notes

prefix

to output file, defolt is serie

units

units on netcdf file (default is ppmv)

meta

use Times, XLONG and XLAT data (only work with 2d variable for file)

filename

name for the file, in this case prefix is not used

verbose

display additional information

Note

The field argument '4d' / '2dz' is used to read a 4d/3d variable droping the 3rd dimention (z).

Examples

dir.create(file.path(tempdir(), "MAX"))
folder <- system.file("extdata",package="hackWRF")
wrf_file <- paste0(folder,"/wrf.day1.o3.nc")
extract_max(filelist = wrf_file,prefix = paste0(file.path(tempdir(),"MAX"),'/mean'))


Schuch666/hackWRF documentation built on June 9, 2025, 1:46 p.m.