Home > Uncategorized > Done!

Done!

DONT TOUCH. wet PaintJust a quick not before I go. Done. I added the last two routines. So here it IS. from file load to plot

source(“Global.R”)

Land<-getLandMask()

invOBJ<-loadGridInventory(getwd())

anomOBJ<-loadAnomalies(getwd())

data<-intersect.InvAnomalies(invOBJ$Data,anomOBJ$Data)

CellMatrix<-as.GridCells(data$Anomalies,data$GridInventory)

AreaAdjusted<-CellMatrix*gridWeight(CellMatrix,Land,LAND.MASK)

AreaAdjusted<-zoo(t(AreaAdjusted),order.by=timeline,frequency=12)

MonthlyTemp<-zoo(rowSums(AreaAdjusted,na.rm=T) ,

order.by=timeline,frequency=12)

YearlyTemp<-aggregate(MonthlyTemp,by=as.year(timeline), mean, na.rm=T)

plotAnomalySeries(getwd(),”year3″,YearlyTemp,Smooth=ipcc)

Thats it. get the land. get the anomalies. get the inventory. THEN, create a cell matrix. then weight by area. the collect monthly average. Then sum by year. I will probably cut this down by a couple lines.

THEN, it becomes a subroutine.

Categories: Uncategorized
  1. Benjamin
    August 21, 2010 at 4:07 AM

    Your anomaly should be divided by ten.

  2. Steven Mosher
    August 21, 2010 at 4:09 AM

    ya. I’m talking about all the calculation code working. The control of unit conversion will be passed to graphics.

  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: