Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tav amp switched #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Package: APSIM
Type: Package
Title: General Utility Functions for the 'Agricultural Production Systems
Simulator'
Version: 0.9.2
Date: 2017-07-24
Version: 0.9.4
Date: 2019-05-22
Author: Justin Fainges
Maintainer: Justin Fainges <Justin.Fainges@csiro.au>
Maintainer: Dean Holzworth <Dean.Holzworth@csiro.au>
LazyData: true
Description: Contains functions designed to facilitate the loading
and transformation of 'Agricultural Production Systems Simulator'
Expand Down
4 changes: 2 additions & 2 deletions R/MetFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ insertTavAmp <- function(met){
data$meanDayT <- (data$maxt + data$mint) / 2
mmt <- plyr::ddply(data, "month", function(df) mean(df$meanDayT))
if (nrow(mmt) != 12) print("WARNING: At least 12 months of data is required to generate tav and amp. Values may be inaccurate.")
met@tav <- max(mmt$V1) - min(mmt$V1)
met@amp <- mean(mmt$V1)
met@amp <- max(mmt$V1) - min(mmt$V1)
met@tav <- mean(mmt$V1)
return(met)
}

Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ A package containing general purpose utility functions for loading and manipulat
Release Notes
=============

### 0.9.4

-

### 0.9.3

- TAV and AMP calculations have been incorrect (swapped)

### 0.9.2

- loadApsim has new option: skipEmpty, which will skip output files with no data.
Expand Down