Package 'PEcAn.MAAT'

Title: PEcAn Package for Integration of the MAAT Model
Description: This module provides functions to wrap the MAAT model into the PEcAn workflows.
Authors: Shawn Serbin [aut, cre], Anthony Walker [aut]
Maintainer: Shawn Serbin <[email protected]>
License: BSD_3_clause + file LICENSE
Version: 1.7.3.9000
Built: 2025-03-11 02:37:55 UTC
Source: https://github.com/PecanProject/pecan

Help Index


Convert samples for MAAT

Description

convert parameters and parameter names from PEcAn database default units/names with MAAT

Usage

convert.samples.MAAT(trait.samples, runid)

Arguments

trait.samples

a matrix or dataframe of samples from the trait distribution

runid

optional parameter for debugging

Details

Performs model specific unit conversions on a a list of trait values, such as those provided to write.config

Value

matrix or dataframe with values transformed

Author(s)

Shawn Serbin, Anthony Walker


Create MAAT met driver files

Description

met2model wrapper for MAAT

Usage

met2model.MAAT(
  in.path,
  in.prefix,
  outfolder,
  start_date,
  end_date,
  overwrite = FALSE,
  verbose = FALSE,
  leap_year = TRUE,
  ...
)

Arguments

in.path

location on disk where inputs (CF met drivers) are stored

in.prefix

prefix of input and output files

outfolder

location on disk where MAAT met outputs will be stored

start_date

the start date of the data to be downloaded (will only use the year part of the date)

end_date

the end date of the data to be downloaded (will only use the year part of the date)

overwrite

should existing files be overwritten

verbose

should the function be very verbose

leap_year

Enforce Leap-years? If set to TRUE, will require leap years to have 366 days. If set to false, will require all years to have 365 days. Default = TRUE.

...

additional arguments, currently ignored

Author(s)

Shawn P. Serbin


Function to convert MAAT model output to standard netCDF format

Description

Function to convert MAAT model output to standard netCDF format

Usage

model2netcdf.MAAT(
  rundir,
  outdir,
  sitelat = -999,
  sitelon = -999,
  start_date = NULL,
  end_date = NULL
)

Arguments

rundir

Location of MAAT model run (i.e. MAAT project) directory with all required model run inputs. This is needed to identify model runs with and without met drivers and control the model output conversion process

outdir

Location of MAAT model output

sitelat

Latitude of the site

sitelon

Longitude of the site

start_date

Start time of the simulation

end_date

End time of the simulation

Author(s)

Shawn Serbin, Anthony Walker, Alexey Shiklomanov


Writes a MAAT config file.

Description

Requires a pft xml object, a list of trait values for a single model run, and the name of the file to create

Usage

write.config.MAAT(defaults = NULL, trait.values, settings, run.id)

Arguments

defaults

list of defaults to process

trait.values

vector of samples for a given trait

settings

list of settings from pecan settings file

run.id

id of run

Value

configuration file for MAAT for given run

Author(s)

Shawn Serbin, Anthony Walker, Rob Kooper, Chris Black