Home > Uncategorized > Unweighted SST temps.

Unweighted SST temps.

The code. NOTE his will only work if you use the latest drop of raster AND fix the NA problem in the SST metadata. Ask how if you cant figure it out

library(“ncdf”)

source(“Global.R”)

seafile<-“HadSST2_1850on.nc”

SST<-brick(seafile,varname=’sst’)

FirstMonth<-raster(SST,layer=1)

png(“FirstMonth.png”,width=650,height=380)

plot(FirstMonth)

dev.off()


loop<-nlayers(SST)

month<-vector(length=loop)

start<-as.character(Sys.time())

for(i in 1:loop){

mth<-raster(SST,layer=i)

month[i]<-cellStats(mth)

}

end<-as.character(Sys.time())

month<-zoo(month)

png(“temps.png”,width=650,height=380)

plot(month)


dev.off()

Categories: Uncategorized
  1. August 25, 2010 at 6:39 PM

    I like the first figure!

    • Steven Mosher
      August 25, 2010 at 7:43 PM

      Ya I was happy for that. The minor oddities in the early record are not a big concern for me, but I’ve dropped them
      a note.

  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: