1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/npp/42.bias_global.nc Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,43 @@
1.4 +; ***********************************************
1.5 +; xy_4.ncl
1.6 +; ***********************************************
1.7 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
1.9 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
1.10 +;************************************************
1.11 +begin
1.12 +;************************************************
1.13 +; read in data
1.14 +;************************************************
1.15 + g = addfile ("Npp_T42_mean.nc","r")
1.16 + c = g->NPP
1.17 + u = ndtooned(c)
1.18 +
1.19 +;f = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r")
1.20 + f = addfile ("i01.04casa_1605-1629_ANN_climo.nc","r")
1.21 + b = f->NPP
1.22 + v = ndtooned(b)
1.23 +
1.24 + sec_to_year = 86400.*365.
1.25 + v = v * sec_to_year
1.26 +
1.27 + good = ind(.not.ismissing(u) .and. .not.ismissing(v))
1.28 + uu = u(good)
1.29 + nx = dimsizes(uu)
1.30 +;print (nx)
1.31 +
1.32 + do i = 0,nx-1
1.33 + if (uu(i) .lt. 1.) then
1.34 + uu(i) =10.
1.35 + end if
1.36 + end do
1.37 +
1.38 + ccr = esccr(uu,v(good),0)
1.39 + print (ccr)
1.40 +;print (uu)
1.41 + bias = sum(((v(good)-uu)/uu)^2)
1.42 + print (bias)
1.43 + M = 1.- sqrt(bias/nx)
1.44 + print (M)
1.45 +
1.46 +end