isDormantSeason: Check dormant season

Description Usage Arguments Details Examples

Description

Routine to check if the current month is within a dormant period or not. This is to "switch off" leaf area and hence inhibit photosynthesis,

Usage

1
isDormantSeason(current.month, leafgrow, leaffall)

Arguments

current.month

The current month (ADD MORE)

leafgrow

Leaf grow (ADD MORE)

leaffall

Leaf fall (ADD MORE)

Details

NEEDS MORE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (current.month, leafgrow, leaffall) 
{
    is.dormant <- as.logical()
    if (any(c(leafgrow, leaffall) == 0)) {
        is.dormant <- FALSE
    }
    else if (leafgrow > leaffall) {
        if (current.month >= leaffall && current.month < leafgrow) {
            is.dormant <- TRUE
        }
        else is.dormant <- FALSE
    }
    else if (leafgrow < leaffall) {
        if (current.month < leafgrow || current.month >= leaffall) {
            is.dormant <- TRUE
        }
        else is.dormant <- FALSE
    }
    return(is.dormant)
  }

drGeorgeXenakis/fr3PGD documentation built on June 3, 2020, 6:10 a.m.