Package 'PEcAn.LINKAGES'

Title: PEcAn Package for Integration of the LINKAGES Model
Description: This module provides functions to link the (LINKAGES) to PEcAn.
Authors: Mike Dietze [aut], Ann Raiho [aut, cre], University of Illinois, NCSA [cph]
Maintainer: Ann Raiho <[email protected]>
License: BSD_3_clause + file LICENSE
Version: 1.7.3.9000
Built: 2024-11-20 21:32:29 UTC
Source: https://github.com/PecanProject/pecan

Help Index


Write LINKAGES met files

Description

Converts a met CF file to a model specific met file. The input files are calld <in.path>/<in.prefix>.YYYY.cf

Usage

met2model.LINKAGES(
  in.path,
  in.prefix,
  outfolder,
  start_date,
  end_date,
  overwrite = FALSE,
  verbose = FALSE,
  ...
)

Arguments

in.path

path on disk where CF file lives

in.prefix

prefix for each file

outfolder

location where model specific output is written

start_date, end_date

when to start and end conversion. Only year portion is used

overwrite

Force replacement of an existing output file?

verbose

ignored

...

Additional arguments, currently ignored

Value

OK if everything was succesful.

Author(s)

Ann Raiho, Betsy Cowdery


Convert LINKAGES's output into netCDF format

Description

Convert MODEL output into the NACP Intercomparison format (ALMA using netCDF)

Usage

model2netcdf.LINKAGES(
  outdir,
  sitelat,
  sitelon,
  start_date = NULL,
  end_date = NULL,
  pft_names = NULL
)

Arguments

outdir

Location of 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

pft_names

names of PFTs to use in output labels

Author(s)

Ann Raiho, Betsy Cowdery


Read Restart for LINKAGES

Description

Read Restart for LINKAGES

Usage

read_restart.LINKAGES(
  outdir,
  runid,
  stop.time,
  settings,
  var.names = NULL,
  params = NULL
)

Arguments

outdir

output directory

runid

run ID

stop.time

year that is being read

settings

PEcAn settings object

var.names

var.names to be extracted

params

passed on to return value

Value

X.vec vector of forecasts

Author(s)

Ann Raiho [email protected]


split_inputs.LINKAGES

Description

Splits climate met for LINKAGES

Usage

split_inputs.LINKAGES(settings, start.time, stop.time, inputs)

Arguments

settings

ignored

start.time, stop.time

ignored

inputs

returned

Details

Stub implementation – currently returns 'inputs' and ignores all other arguments

Value

files split up climate files

Author(s)

Ann Raiho


write_restart.LINKAGES

Description

Write restart files for LINKAGES

Usage

write_restart.LINKAGES(
  outdir,
  runid,
  start.time,
  stop.time,
  settings,
  new.state,
  RENAME = TRUE,
  new.params,
  inputs
)

Arguments

outdir

output directory

runid

run ID

start.time, stop.time

year that is being read

settings

PEcAn settings object

new.state

analysis vector

RENAME

flag to either rename output file or not

new.params

updated parameter values to write.

inputs

passed on to 'write.config.LINKAGES()'

Value

NONE

Author(s)

Ann Raiho [email protected]


Writes a LINKAGES 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.LINKAGES(
  defaults = NULL,
  trait.values,
  settings,
  run.id,
  restart = NULL,
  spinup = FALSE,
  inputs = NULL,
  IC = NULL
)

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

restart

logical: Write a restart file? If NULL (default), treated as FALSE

spinup

logical: perform spinup using 'spinup.LINKAGES()'? If NULL (default), treated as FALSE

inputs

inputs section of a PEcAn settings object. Currently only used for climate file (inputs$met$path), which is taken from 'settings$input$met$path' if 'inputs' is NULL.

IC

TODO currently ignored

Value

configuration file for LINKAGES for given run

Author(s)

Ann Raiho, Betsy Cowdery