Home > Uncategorized > MoshTemp 4.1

MoshTemp 4.1

Replaces 4.0, minor changes made here and there. totally replaces 4.0 as the testing move forward.

see 4.1

Run: DownloadAll.

Run: DataSetUp.

SSTTest reruns the SST analsyis and compares at HADSST2

Land1900Present: reruns the old version of program with a bench against CRU land figures.

Next version will integrate more of raster to the analysis, then we throw out a bunch of old code and use raster for everything.

First raster bit is working

Land<-getMask(file=LandWaterMask_File)

Inv<-getGhcnInventory()

Inv<-as.GriddedInventory(Inv,Land)

Anom<-loadAnomalies(getwd())

Data<-intersect.InvAnomalies(Inv,Anom)

Anom<-Data$Anomalies

Inv<-Data$GridInventory

CellMatrix<-as.GridCells(Anom,Inv)

#####################################################

m<-matrix(nrow=ncell(Land),ncol=ncol(CellMatrix))

b<-brick(Land)

clearValues(b)

m[as.numeric(row.names(CellMatrix)),]<-as.matrix(CellMatrix)

b<-setValues(b,m)

plot(cellStats(b,mean,na.rm=T))

bricktest

Adding area weighting and land masking

m<-matrix(nrow=ncell(Land),ncol=ncol(CellMatrix))

b<-brick(Land)

clearValues(b)

m[as.numeric(row.names(CellMatrix)),]<-as.matrix(CellMatrix)

b<-setValues(b,m)

Weights <- area(b,na.rm=T,weight=T)

Temps<-Weights*b*Land

monthly<-cellStats(Temps,sum)

landBrick2

About these ads
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

Follow

Get every new post delivered to your Inbox.

Join 39 other followers

%d bloggers like this: