1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/co2/metrics_table.ncl.example Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,93 @@
1.4 +;*************************************************
1.5 +; NCL Graphics: table_2.ncl
1.6 +;*************************************************
1.7 +
1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
1.9 +
1.10 +begin
1.11 +; Header
1.12 + ncr1 = (/1,1/) ; 1 row, 1 column
1.13 + x1 = (/0.005,0.335/) ; Start and end X
1.14 + y1 = (/0.900,0.995/) ; Start and end Y
1.15 + text1 = "CAM METRICS"
1.16 +
1.17 +; Sub header
1.18 + ncr2 = (/2,2/) ; 2 rows, 2 columns
1.19 + x2 = (/0.335,0.995/) ; Start and end X
1.20 + y2 = (/0.900,0.995/) ; Start and end Y
1.21 + text2 = (/ (/"Case A","Case B"/),(/"ANN","ANN"/)/)
1.22 +
1.23 +; Main table body
1.24 + ncr3 = (/16,3/) ; 16 rows, 3 columns
1.25 + x3 = (/0.005,0.995/) ; Start and end X
1.26 + y3 = (/0.005,0.900/) ; Start and end Y
1.27 +
1.28 + text3 = (/ (/"SLP_ERA40", "1.230", "1.129"/), \
1.29 + (/"Tsfc_ERA40", "0.988", "0.996"/), \
1.30 + (/"Prc_GPCP", "1.092", "1.016"/), \
1.31 + (/"Prc 30S-30N_GPCP", "1.172", "1.134"/), \
1.32 + (/"LW_ERS", "1.064", "1.023"/), \
1.33 + (/"SW_ERS", "0.966", "0.962"/), \
1.34 + (/"U300_ERA40", "1.079", "1.048"/), \
1.35 + (/"Guess_BOGUS", "0.781", "0.852"/), \
1.36 + (/"RH_NCEP", "1.122", "0.911"/), \
1.37 + (/"LHFLX_ERA40", "1.000", "0.835"/), \
1.38 + (/"TWP_ERA40", "0.998", "0.712"/), \
1.39 + (/"CLDTOT_NCEP", "1.321", "1.122"/), \
1.40 + (/"O3_NASA", "0.842", "0.956"/), \
1.41 + (/"Q_JMA", "0.978", "0.832"/), \
1.42 + (/"PBLH_JMA", "0.998", "0.900"/), \
1.43 + (/"Omega_CAS", "0.811", "1.311"/)/)
1.44 +
1.45 +
1.46 + wks = gsn_open_wks("ps","table")
1.47 +
1.48 +;
1.49 +; Main header.
1.50 +;
1.51 + res1 = True
1.52 + res1@txFontHeightF = 0.03
1.53 + res1@gsFillColor = "CornFlowerBlue"
1.54 +
1.55 + gsn_table(wks,ncr1,x1,y1,text1,res1)
1.56 +
1.57 +;
1.58 +; Sub header
1.59 +;
1.60 + res2 = True
1.61 + res2@txFontHeightF = 0.02
1.62 + res2@gsFillColor = "Gray"
1.63 +
1.64 + gsn_table(wks,ncr2,x2,y2,text2,res2)
1.65 +
1.66 +;
1.67 +; Main body of table.
1.68 +;
1.69 + res3 = True ; Set up resource list
1.70 +
1.71 +; res3@gsnDebug = True ; Useful to print NDC row,col values used.
1.72 +
1.73 + res3@txFontHeightF = 0.02
1.74 +
1.75 + res3@gsFillColor = (/ (/"gray","transparent","palegreen"/), \
1.76 + (/"gray","transparent","hotpink"/), \
1.77 + (/"gray","transparent","palegreen"/), \
1.78 + (/"gray","transparent","palegreen"/), \
1.79 + (/"gray","transparent","palegreen"/), \
1.80 + (/"gray","transparent","palegreen"/), \
1.81 + (/"gray","transparent","palegreen"/), \
1.82 + (/"gray","transparent","hotpink"/), \
1.83 + (/"gray","transparent","palegreen"/), \
1.84 + (/"gray","transparent","palegreen"/), \
1.85 + (/"gray","transparent","palegreen"/), \
1.86 + (/"gray","transparent","palegreen"/), \
1.87 + (/"gray","transparent","hotpink"/), \
1.88 + (/"gray","transparent","palegreen"/), \
1.89 + (/"gray","transparent","palegreen"/), \
1.90 + (/"gray","transparent","hotpink"/)/)
1.91 +
1.92 + gsn_table(wks,ncr3,x3,y3,text3,res3)
1.93 +
1.94 + frame(wks) ; Advance the frame.
1.95 +
1.96 +end
1.97 \ No newline at end of file