ssm: ssm: Summer soil moisture content

Description Usage Arguments Details Value Examples

Description

ssm calculates average soil moisture content over the summer period.

Usage

1
ssm(soilm, year, startday = 152, endday = 243, r)

Arguments

soilm

a three dimensional array of soil moisture values for one year.

year

calendar year.

startday

assumed day of year of start of summer in northen hemisphere in non-leap year.

endday

assumed end of summer. Defaults are 1st June to 31st Aug.

r

a raster of same extent as temp coded as 1 for northern hemisphere and 0 for southern hemisphere.

Details

Seasons are flipped in southern hemisphere. I.e. 1st June (day 152) = day 152+365/2+0.5 = 334 = 1st Dec. in leap years, 1 day added. Startday and endday should be for northern hemisphere, and are calculated for southern hemisphere within the function.

Value

a matrix of mean summer soil moisture values.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
soilm <- array(runif(1460, 0, 65), dim= c(73,144,1460))
m <- matrix(1, 73, 144)
r <- raster(m, crs="+init=epsg:4326")
extent(r) <- c(-1.25, 358.75, -91.25, 91.25)
enorth<-extent(-1.25,358.75,0,91.25)
esouth<-extent(-1.25,358.75,-91.25,0)
rn<-crop(r,enorth) * 0 + 1
rs<-crop(r,esouth) * 0
r<-mosaic(rn,rs,fun=mean)
ssm(soilm, 2010, startday = 152, endday = 243, r)

ilyamaclean/climvars documentation built on June 19, 2019, 2:22 p.m.