checkCont: Checks a single year for continuity. Called from prepareMet.

Description Usage Arguments Details

Description

This is an internal function used by prepareMet to check for continuity in a single year of a met file.

Usage

1

Arguments

data

A dataframe containing met file data.

Details

From tav_amp.for in the APSIM source code: One earth orbit around the sun does not take an integral number of days - 365 + a small part of a day. Since the Gregorian calendar year is measured as 365 days, a correction for this err is made every fourth year by adding one day to the length of the year. This correction is a little too much, thus in the centesimal years the correction is not made. However this over corrects, so in every fourth centesimal year, the correction of adding one day is made.

To summarise - If the year is divisible by 4 it is a leap year, unless it is a centesimal year, in which case it must be divisible by 400. i.e. it is a leap year if either of the conditions hold: (1) the year is divisible by 4 but not by 100; (2) the year is divisible by 400.


APSIM documentation built on May 22, 2019, 9:03 a.m.