rmacroliteSimPeriod-methods: Fetch the simulation input period (start / stop time) from...

Description Usage Arguments Value Examples

Description

Fetch the simulation input period (start / stop time) from imported MACRO parameters.

Usage

1
2
3
4
rmacroliteSimPeriod(x, ...)

## S3 method for class 'macroParFile'
rmacroliteSimPeriod(x, climate = TRUE, ...)

Arguments

x

A 'macroParFile' object, such as obtained with rmacroliteImportParFile-methods.

...

Not used.

climate

Single logical value. If TRUE (the default), the time-period for the weather data is also extracted.

Value

Returns a list with 4 items: sim, a vector of two POSIXct time-dates, start and end time of the simulation; metPeriod, a vector of two POSIXct time-dates, as read from the parameter METPERIOD. rainBinPeriod and metBinPeriod are the same, but read from the rainfall and meteorological data directly.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
library( "rmacrolite" )

#   Path to an example par-file
par_file_path <- system.file( "par-files", 
    "chat_winCer_GW-X_900gHa_d182.par", 
    package = "rmacrolite" )  

#   Import the example par-file
par_file <- rmacroliteImportParFile( 
    file = par_file_path ) 

#   Find out simulation start and end dates
rmacroliteSimPeriod( x = par_file ) 

#   Clean-up
rm( par_file_path, par_file )

julienmoeys/rmacrolite documentation built on May 22, 2019, 6:31 p.m.