Penultimate steps on SST validation
With the latest version of raster, we are almost home. Testing will move onto the new functionality in ‘area()’ where the ability to calculate weights has been added. Prior to that testing, we rebaseline and check applyStack() against the climatology period 1961-1990. We read in the whole SST, subset the months from jan1961-1990. Apply a mean function by ‘years’. I then apply area weighting as we did before, in a loop. That task will be taken over by the new functionaility in area(brick,na.rm=T,weight=T). Calling area that way will return a ‘brick’ of weights.
So the code will look like this:
SST <- brick(“file”,’sst’)
And one can use apply stack to generate annual maps of the SST.
Starting off we verify against Hadley, both AREA weighted ( their method versus mine):
And then we plot all the maps for those thirty years: