co2/metrics_table.ncl
author Forrest Hoffman <forrest@climatemodeling.org>
Mon, 26 Jan 2009 22:08:20 -0500
changeset 0 0c6405ab2ff4
permissions -rw-r--r--
Initial commit of C-LAMP Diagnostics from Jeff Lee
forrest@0
     1
;*************************************************
forrest@0
     2
; NCL Graphics: table_2.ncl
forrest@0
     3
;*************************************************
forrest@0
     4
forrest@0
     5
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
forrest@0
     6
forrest@0
     7
begin
forrest@0
     8
; Header
forrest@0
     9
  ncr1  = (/1,1/)               ; 1 row, 1 column
forrest@0
    10
  x1    = (/0.005,0.335/)       ; Start and end X
forrest@0
    11
  y1    = (/0.900,0.995/)       ; Start and end Y
forrest@0
    12
  text1 = "CAM METRICS"
forrest@0
    13
forrest@0
    14
; Sub header
forrest@0
    15
  ncr2  = (/2,2/)               ; 2 rows, 2 columns
forrest@0
    16
  x2    = (/0.335,0.995/)       ; Start and end X
forrest@0
    17
  y2    = (/0.900,0.995/)       ; Start and end Y
forrest@0
    18
  text2 = (/ (/"Case A","Case B"/),(/"ANN","ANN"/)/)
forrest@0
    19
forrest@0
    20
; Main table body
forrest@0
    21
  ncr3  = (/16,3/)              ; 16 rows, 3 columns
forrest@0
    22
  x3    = (/0.005,0.995/)       ; Start and end X
forrest@0
    23
  y3    = (/0.005,0.900/)       ; Start and end Y
forrest@0
    24
forrest@0
    25
  text3 = (/ (/"SLP_ERA40",        "1.230", "1.129"/), \
forrest@0
    26
             (/"Tsfc_ERA40",       "0.988", "0.996"/), \
forrest@0
    27
             (/"Prc_GPCP",         "1.092", "1.016"/), \
forrest@0
    28
             (/"Prc 30S-30N_GPCP", "1.172", "1.134"/), \
forrest@0
    29
             (/"LW_ERS",           "1.064", "1.023"/), \
forrest@0
    30
             (/"SW_ERS",           "0.966", "0.962"/), \
forrest@0
    31
             (/"U300_ERA40",       "1.079", "1.048"/), \
forrest@0
    32
             (/"Guess_BOGUS",      "0.781", "0.852"/), \
forrest@0
    33
             (/"RH_NCEP",          "1.122", "0.911"/), \
forrest@0
    34
             (/"LHFLX_ERA40",      "1.000", "0.835"/), \
forrest@0
    35
             (/"TWP_ERA40",        "0.998", "0.712"/), \
forrest@0
    36
             (/"CLDTOT_NCEP",      "1.321", "1.122"/), \
forrest@0
    37
             (/"O3_NASA",          "0.842", "0.956"/), \
forrest@0
    38
             (/"Q_JMA",            "0.978", "0.832"/), \
forrest@0
    39
             (/"PBLH_JMA",         "0.998", "0.900"/), \
forrest@0
    40
             (/"Omega_CAS",        "0.811", "1.311"/)/)
forrest@0
    41
forrest@0
    42
forrest@0
    43
  wks = gsn_open_wks("ps","table")
forrest@0
    44
forrest@0
    45
;
forrest@0
    46
; Main header.
forrest@0
    47
;
forrest@0
    48
  res1               = True
forrest@0
    49
  res1@txFontHeightF = 0.03
forrest@0
    50
  res1@gsFillColor   = "CornFlowerBlue"
forrest@0
    51
forrest@0
    52
  gsn_table(wks,ncr1,x1,y1,text1,res1)
forrest@0
    53
forrest@0
    54
;
forrest@0
    55
; Sub header
forrest@0
    56
;
forrest@0
    57
  res2               = True
forrest@0
    58
  res2@txFontHeightF = 0.02
forrest@0
    59
  res2@gsFillColor   = "Gray"
forrest@0
    60
forrest@0
    61
  gsn_table(wks,ncr2,x2,y2,text2,res2)
forrest@0
    62
forrest@0
    63
;
forrest@0
    64
; Main body of table.
forrest@0
    65
;
forrest@0
    66
  res3 = True             ; Set up resource list
forrest@0
    67
forrest@0
    68
;  res3@gsnDebug = True     ; Useful to print NDC row,col values used.
forrest@0
    69
forrest@0
    70
  res3@txFontHeightF = 0.02
forrest@0
    71
forrest@0
    72
  res3@gsFillColor = (/ (/"gray","transparent","palegreen"/), \
forrest@0
    73
                       (/"gray","transparent","hotpink"/), \
forrest@0
    74
                       (/"gray","transparent","palegreen"/), \
forrest@0
    75
                       (/"gray","transparent","palegreen"/), \
forrest@0
    76
                       (/"gray","transparent","palegreen"/), \
forrest@0
    77
                       (/"gray","transparent","palegreen"/), \
forrest@0
    78
                       (/"gray","transparent","palegreen"/), \
forrest@0
    79
                       (/"gray","transparent","hotpink"/), \
forrest@0
    80
                       (/"gray","transparent","palegreen"/), \
forrest@0
    81
                       (/"gray","transparent","palegreen"/), \
forrest@0
    82
                       (/"gray","transparent","palegreen"/), \
forrest@0
    83
                       (/"gray","transparent","palegreen"/), \
forrest@0
    84
                       (/"gray","transparent","hotpink"/), \
forrest@0
    85
                       (/"gray","transparent","palegreen"/), \
forrest@0
    86
                       (/"gray","transparent","palegreen"/), \
forrest@0
    87
                       (/"gray","transparent","hotpink"/)/)
forrest@0
    88
forrest@0
    89
  gsn_table(wks,ncr3,x3,y3,text3,res3)
forrest@0
    90
forrest@0
    91
  frame(wks)      ; Advance the frame.
forrest@0
    92
forrest@0
    93
end