equal
deleted
inserted
replaced
|
1 ; *********************************************** |
|
2 ; xy_4.ncl |
|
3 ; *********************************************** |
|
4 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" |
|
5 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" |
|
6 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" |
|
7 ;************************************************ |
|
8 begin |
|
9 ;************************************************ |
|
10 ; read in observed data |
|
11 ;************************************************ |
|
12 f = addfile ("Npp_T42_mean.nc","r") |
|
13 y = f->NPP |
|
14 ;************************************************ |
|
15 ; read in model data |
|
16 ;************************************************ |
|
17 g = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r") |
|
18 ;g = addfile ("i01.04casa_1605-1629_ANN_climo.nc","r") |
|
19 x = g->NPP |
|
20 |
|
21 delta = 0.00000000001 |
|
22 x0 = x(0,:,:) |
|
23 y = where(ismissing(y).and.(ismissing(x0).or.(x0.lt.delta)),0.,y) |
|
24 |
|
25 p = zonalAve(y) |
|
26 |
|
27 sec_to_year = 86400.*365. |
|
28 x0 = x0 * sec_to_year |
|
29 q = zonalAve(x0) |
|
30 |
|
31 good = ind(p .ne. 0.) |
|
32 u = p(good) |
|
33 v = q(good) |
|
34 |
|
35 ccr = esccr(u,v,0) |
|
36 print (ccr) |
|
37 bias = sum(((v-u)/u)^2) |
|
38 print (bias) |
|
39 M = 1.- sqrt(bias/dimsizes(u)) |
|
40 print (M) |
|
41 |
|
42 end |