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