npp/42.bias_global.nc
author Forrest Hoffman <forrest@climatemodeling.org>
Thu, 26 Mar 2009 14:02:21 -0400
changeset 1 4be95183fbcd
permissions -rw-r--r--
Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
forrest@0
     1
; ***********************************************
forrest@0
     2
; xy_4.ncl
forrest@0
     3
; ***********************************************
forrest@0
     4
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
forrest@0
     5
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
forrest@0
     6
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
forrest@0
     7
;************************************************
forrest@0
     8
begin
forrest@0
     9
;************************************************
forrest@0
    10
; read in data
forrest@0
    11
;************************************************
forrest@0
    12
 g     = addfile ("Npp_T42_mean.nc","r")
forrest@0
    13
 c     = g->NPP  
forrest@0
    14
 u     = ndtooned(c)
forrest@0
    15
forrest@0
    16
;f     = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r")
forrest@0
    17
 f     = addfile ("i01.04casa_1605-1629_ANN_climo.nc","r")
forrest@0
    18
 b     = f->NPP      
forrest@0
    19
 v     = ndtooned(b)
forrest@0
    20
forrest@0
    21
 sec_to_year = 86400.*365.
forrest@0
    22
 v = v * sec_to_year
forrest@0
    23
forrest@0
    24
 good = ind(.not.ismissing(u) .and. .not.ismissing(v))
forrest@0
    25
 uu = u(good)
forrest@0
    26
 nx = dimsizes(uu)
forrest@0
    27
;print (nx)
forrest@0
    28
forrest@0
    29
 do i = 0,nx-1
forrest@0
    30
    if (uu(i) .lt. 1.) then
forrest@0
    31
       uu(i) =10.
forrest@0
    32
    end if
forrest@0
    33
 end do
forrest@0
    34
forrest@0
    35
 ccr = esccr(uu,v(good),0)
forrest@0
    36
 print (ccr)
forrest@0
    37
;print (uu)
forrest@0
    38
 bias = sum(((v(good)-uu)/uu)^2)
forrest@0
    39
 print (bias)
forrest@0
    40
 M    = 1.- sqrt(bias/nx)
forrest@0
    41
 print (M)
forrest@0
    42
forrest@0
    43
end