fainges / R-APSIM

General APSIM utility package for R
3 stars 4 forks source link

insertTavAmp function has an issue #3

Open andymene opened 5 years ago

andymene commented 5 years ago

The tav and amp computation have been swapped. Tav is instead the mean of the averaged temperature and amp the range of the averaged temperature. so it should be the following met@tav <- mean(mmt$V1) met@amp <- max(mmt$V1) - min(mmt$V1)

instead of met@tav <- max(mmt$V1) - min(mmt$V1) met@amp <- mean(mmt$V1)

The Nasa Power data has similar issue as it uses this APSIM package to generate the .met files.

I tried to edit the script "MetFunctions.R" a week ago, but it was changed.

Thanks, Andy

andymene commented 5 years ago

The tav and amp computation have been swapped. Tav is instead the mean of the averaged temperature and amp the range of the averaged temperature. so it should be the following met@tav <- mean(mmt$V1) met@amp <- max(mmt$V1) - min(mmt$V1)

instead of met@tav <- max(mmt$V1) - min(mmt$V1) met@amp <- mean(mmt$V1)

The Nasa Power data has similar issue as it uses this APSIM package to generate the .met files.

I tried to edit the script "MetFunctions.R" a week ago, but it was changed.

Thanks, Andy