forrest@0
|
1 |
; ****************************************************
|
forrest@0
|
2 |
; combine scatter, histogram, global and zonal plots
|
forrest@0
|
3 |
; *********************************************************
|
forrest@0
|
4 |
|
forrest@0
|
5 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
|
forrest@0
|
6 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
|
forrest@0
|
7 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
|
forrest@0
|
8 |
; **********************************************************
|
forrest@0
|
9 |
|
forrest@0
|
10 |
; Main code.
|
forrest@0
|
11 |
begin
|
forrest@0
|
12 |
|
forrest@0
|
13 |
;===================================================
|
forrest@0
|
14 |
; observed station name and location (lat,lon)
|
forrest@0
|
15 |
;===================================================
|
forrest@0
|
16 |
|
forrest@0
|
17 |
beta_4_ob = 0.60
|
forrest@0
|
18 |
|
forrest@0
|
19 |
station = (/"DukeFACE" \
|
forrest@0
|
20 |
,"AspenFACE" \
|
forrest@0
|
21 |
,"ORNL-FACE" \
|
forrest@0
|
22 |
,"POP-EUROFACE" \
|
forrest@0
|
23 |
/)
|
forrest@0
|
24 |
|
forrest@0
|
25 |
lat_ob = (/ 35.58, 45.40, 35.54, 42.22/)
|
forrest@0
|
26 |
lon_ob = (/-79.05, -89.37, -84.20, 11.48/)
|
forrest@0
|
27 |
lon_ob = where(lon_ob.lt.0.,lon_ob+360.,lon_ob)
|
forrest@0
|
28 |
;print (lon_ob)
|
forrest@0
|
29 |
|
forrest@0
|
30 |
n_sta = dimsizes(station)
|
forrest@0
|
31 |
|
forrest@0
|
32 |
;====================================================
|
forrest@0
|
33 |
; model data
|
forrest@0
|
34 |
;====================================================
|
forrest@0
|
35 |
|
forrest@0
|
36 |
co2_i = 283.1878
|
forrest@0
|
37 |
co2_f = 364.1252
|
forrest@0
|
38 |
|
forrest@0
|
39 |
;model_name_i = "i01.07cn"
|
forrest@0
|
40 |
;model_name_f = "i01.10cn"
|
forrest@0
|
41 |
|
forrest@0
|
42 |
model_name_i = "i01.07casa"
|
forrest@0
|
43 |
model_name_f = "i01.10casa"
|
forrest@0
|
44 |
|
forrest@0
|
45 |
dirm = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
|
forrest@0
|
46 |
film_i = model_name_i + "_1990-2004_ANN_climo.nc"
|
forrest@0
|
47 |
film_f = model_name_f + "_1990-2004_ANN_climo.nc"
|
forrest@0
|
48 |
|
forrest@0
|
49 |
fm_i = addfile (dirm+film_i,"r")
|
forrest@0
|
50 |
fm_f = addfile (dirm+film_f,"r")
|
forrest@0
|
51 |
|
forrest@0
|
52 |
npp_i = fm_i->NPP
|
forrest@0
|
53 |
npp_f = fm_f->NPP
|
forrest@0
|
54 |
|
forrest@0
|
55 |
xm = fm_i->lon
|
forrest@0
|
56 |
ym = fm_i->lat
|
forrest@0
|
57 |
|
forrest@0
|
58 |
npp_i_4 =linint2_points(xm,ym,npp_i,True,lon_ob,lat_ob,0)
|
forrest@0
|
59 |
|
forrest@0
|
60 |
npp_f_4 =linint2_points(xm,ym,npp_f,True,lon_ob,lat_ob,0)
|
forrest@0
|
61 |
|
forrest@0
|
62 |
; Units for these variables are:
|
forrest@0
|
63 |
; npp_i: g C/m^2/s
|
forrest@0
|
64 |
|
forrest@0
|
65 |
print (npp_i_4)
|
forrest@0
|
66 |
print (npp_f_4)
|
forrest@0
|
67 |
;============================
|
forrest@0
|
68 |
;compute beta
|
forrest@0
|
69 |
;============================
|
forrest@0
|
70 |
|
forrest@0
|
71 |
beta_4 = new((/n_sta/),float)
|
forrest@0
|
72 |
|
forrest@0
|
73 |
beta_4 = ((npp_f_4/npp_i_4) - 1.)/log(co2_f/co2_i)
|
forrest@0
|
74 |
|
forrest@0
|
75 |
beta_4_avg = avg(beta_4)
|
forrest@0
|
76 |
|
forrest@0
|
77 |
print (beta_4)
|
forrest@0
|
78 |
print (beta_4_avg)
|
forrest@0
|
79 |
|
forrest@0
|
80 |
M_beta = abs((beta_4_avg/beta_4_ob) - 1.)* 5.
|
forrest@0
|
81 |
|
forrest@0
|
82 |
print (M_beta)
|
forrest@0
|
83 |
end
|