Home > Uncategorized > FDM in 5 minutes

FDM in 5 minutes

Recently over at CA we have been discussing FDM. I always wanted to try FDM. Willis uses it and EM smith does. What happens if you used FDM to do global  averages? Well, we shall see.

Once i understood the method it was clear I could do the deal in about 5 minutes:

Like so:

DataOBJ<-loadV2Mean(getwd())

V2Mean<-DataOBJ$Data

V2Zoo<-as.Zoo(V2Mean)

X<-diff(V2Zoo,lag=12,na.PAD=T)
X<-X/12
Y<-rowMeans(X,na.rm=T)
Z<-cumsum(Y)
plot(as.zoo(Z)))
That’s it. Now of course I will want to area weight it, But thats a builtin in function. So, we will have to do a bit more work.
It will look like this:
Create the First differences:  take the mean of series PER cell ( as.gridCell) then, multiply by the gridweight and we are done. A couple things here and their on the order of operations, But its not A problem
I Love R

AND YES, the units are 1/10s of C.

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: