Home > Uncategorized > Penultimate steps on SST validation

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’)

Weights<-area(SST,na.rm=T,weights=T)

Temps<-SST*Weights

Monthly<-cellStats(Temps,sum)

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:

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: