1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/co2/99.all.ncl.0 Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,558 @@
1.4 +; ***********************************************
1.5 +; using gsn_table for all
1.6 +; combine 19.metric_plot.ncl and 24.lines.ncl
1.7 +; ***********************************************
1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl.test"
1.9 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl.test"
1.10 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
1.11 +;load "/fis/cgd/cseg/people/jeff/clamp/co2/metrics_table.ncl"
1.12 +;************************************************
1.13 +begin
1.14 +;************************************************
1.15 +; read in model data
1.16 +;************************************************
1.17 + diri2 = "/fis/cgd/cseg/people/jeff/clamp_data/model/"
1.18 +; fili2 = "b30.061m_401_425_MONS_climo_atm.nc"
1.19 + fili2 = "b30.061n_1995-2004_MONS_climo_atm.nc"
1.20 +
1.21 + g = addfile(diri2+fili2,"r")
1.22 + x = g->CO2
1.23 + xi = g->lon
1.24 + yi = g->lat
1.25 + xdim = dimsizes(x)
1.26 + nlev = xdim(1)
1.27 + y = x(:,0,:,:)
1.28 +; printVarSummary (y)
1.29 +
1.30 +; get the co2 at the lowest level
1.31 + y = x(:,nlev-1,:,:)
1.32 +
1.33 +; change to unit of observed (u mol/mol)
1.34 +; Model_units [=] kgCO2 / kgDryAir
1.35 +; 28.966 = molecular weight of dry air
1.36 +; 44. = molecular weight of CO2
1.37 +; u mol = 1e-6 mol
1.38 +
1.39 + factor = (28.966/44.) * 1e6
1.40 + y = y * factor
1.41 +
1.42 + y@_FillValue = 1.e36
1.43 + y@units = "u mol/mol"
1.44 +; y = where(y0 .lt. 287.,y@_FillValue,y)
1.45 +; printVarSummary (y)
1.46 +; print (min(y)+"/"+max(y))
1.47 +
1.48 +;************************************************
1.49 +; read in data: observed
1.50 +;************************************************
1.51 + diri = "/fis/cgd/cseg/people/jeff/clamp_data/co2/ob/"
1.52 + fili = "co2_globalView_98.nc"
1.53 + g = addfile (diri+fili,"r")
1.54 + val = g->CO2_SEAS
1.55 + lon = g->LON
1.56 + lat = g->LAT
1.57 + sta = chartostring(g->STATION)
1.58 + delete (g)
1.59 +
1.60 +;print (sta(0))
1.61 +
1.62 + ncase = dimsizes(lat)
1.63 +;print (ncase)
1.64 +
1.65 +;**************************************************************
1.66 +; get only the lowest level at each station
1.67 +;**************************************************************
1.68 + lat_tmp = lat
1.69 + lat_tmp@_FillValue = 1.e+36
1.70 +
1.71 + do n = 0,ncase-1
1.72 + if (.not. ismissing(lat_tmp(n))) then
1.73 + indexes = ind(lat(n) .eq. lat .and. lon(n) .eq. lon)
1.74 + if (dimsizes(indexes) .gt. 1) then
1.75 + lat_tmp(indexes(1:)) = lat_tmp@_FillValue
1.76 + end if
1.77 + delete (indexes)
1.78 + end if
1.79 + end do
1.80 +
1.81 + indexes = ind(.not. ismissing(lat_tmp))
1.82 +;print (dimsizes(indexes))
1.83 +;print (indexes)
1.84 +
1.85 + lat_ob = lat(indexes)
1.86 + lon_ob = lon(indexes)
1.87 + val_ob = val(indexes,:)
1.88 +;printVarSummary (val_ob)
1.89 +;print (lat_ob +"/"+lon_ob)
1.90 +
1.91 +;************************************************************
1.92 +; interpolate model data into observed station
1.93 +; note: model is 0-360E, 90S-90N
1.94 +;************************************************************
1.95 +; to be able to handle observation at (-89.98,-24.80)
1.96 + print (yi(0))
1.97 + yi(0) = -90.
1.98 +
1.99 + i = ind(lon_ob .lt. 0.)
1.100 + lon_ob(i) = lon_ob(i) + 360.
1.101 +
1.102 + yo = linint2_points_Wrap(xi,yi,y,True,lon_ob,lat_ob,0)
1.103 +
1.104 + val_model = yo(pts|:,time|:)
1.105 + val_model_0 = val_model
1.106 +; printVarSummary (val_model)
1.107 +; print (min(val_model)+"/"+max(val_model))
1.108 +
1.109 +; remove annual mean
1.110 + val_model = val_model - conform(val_model,dim_avg(val_model),0)
1.111 +; print (min(val_model)+"/"+max(val_model))
1.112 +
1.113 + nzone = 4
1.114 +
1.115 +;*******************************************************************
1.116 +; for table -- zone
1.117 +;*******************************************************************
1.118 +; table header name
1.119 + table_header_name = "Zone"
1.120 +
1.121 +; column (not including header column)
1.122 + col_header_zone = (/"Stations","Amplitude Ratio", \
1.123 + "Correlation Coef","M score","Combined Score"/)
1.124 + ncol_zone = dimsizes(col_header_zone )
1.125 +
1.126 +; row (not including header row)
1.127 + row_header_zone = (/"60N-90N","30N-60N","EQ-30N","90S-EQ","Total"/)
1.128 + nrow_zone = dimsizes(row_header_zone)
1.129 +
1.130 +; arrays to be passed to table.
1.131 + value_zone = new ((/nrow_zone, ncol_zone/),string )
1.132 +;--------------------------------------------------------------------
1.133 +
1.134 + table_length_zone = 0.4
1.135 +
1.136 +; Table header
1.137 + ncr1 = (/1,1/) ; 1 row, 1 column
1.138 + x1 = (/0.005,0.15/) ; Start and end X
1.139 + y1 = (/0.900,0.995/) ; Start and end Y
1.140 + text1 = table_header_name
1.141 + res1 = True
1.142 + res1@txFontHeightF = 0.03
1.143 + res1@gsFillColor = "CornFlowerBlue"
1.144 +
1.145 +; Column header (equally space in x2)
1.146 + ncr2 = (/1,ncol_zone/) ; 1 rows, 5 columns
1.147 + x2 = (/x1(1),0.995/) ; start from end of x1
1.148 + y2 = y1 ; same as y1
1.149 + text2 = col_header_zone
1.150 + res2 = True
1.151 + res2@txFontHeightF = 0.015
1.152 + res2@gsFillColor = "Gray"
1.153 +
1.154 +; Row header (equally space in y2)
1.155 + ncr3 = (/nrow_zone,1/) ; 5 rows, 1 columns
1.156 + x3 = x1 ; same as x1
1.157 + y3 = (/1.0-table_length_zone,0.900/) ; end at start of y1
1.158 + text3 = row_header_zone
1.159 + res3 = True
1.160 + res3@txFontHeightF = 0.02
1.161 + res3@gsFillColor = "Gray"
1.162 +
1.163 +; Main table body
1.164 + ncr4 = (/nrow_zone,ncol_zone/) ; 5 rows, 5 columns
1.165 + x4 = x2 ; Start and end x
1.166 + y4 = y3 ; Start and end Y
1.167 + text4 = new((/nrow_zone,ncol_zone/),string)
1.168 +
1.169 + color_fill4 = new((/nrow_zone,ncol_zone/),string)
1.170 + color_fill4 = "white"
1.171 + color_fill4(:,ncol_zone-1) = "grey"
1.172 +
1.173 + res4 = True ; Set up resource list
1.174 +; res4@gsnDebug = True ; Useful to print NDC row,col values used.
1.175 + res4@txFontHeightF = 0.02
1.176 + res4@gsFillColor = color_fill4
1.177 +
1.178 + delete (color_fill4)
1.179 +
1.180 +;*******************************************************************
1.181 +; for table -- station
1.182 +;*******************************************************************
1.183 +; column (not including header column)
1.184 + col_header_sta = (/"Latitude","Longitude","Amplitude Ratio", \
1.185 + "Correlation Coef","M score","Combined Score"/)
1.186 + ncol_sta = dimsizes(col_header_sta )
1.187 +;-------------------------------------------------------------------
1.188 +
1.189 +; Table header
1.190 + ncr5 = (/1,1/) ; 1 row, 1 column
1.191 + x5 = (/0.005,0.15/) ; Start and end X
1.192 + y5 = (/0.900,0.995/) ; Start and end Y
1.193 + res5 = True
1.194 + res5@txFontHeightF = 0.02
1.195 + res5@gsFillColor = "CornFlowerBlue"
1.196 +
1.197 +; Column header (equally space in x2)
1.198 + ncr6 = (/1,ncol_sta/) ; 1 rows, 5 columns
1.199 + x6 = (/x5(1),0.995/) ; start from end of x1
1.200 + y6 = y5 ; same as y1
1.201 + text6 = col_header_sta
1.202 + res6 = True
1.203 + res6@txFontHeightF = 0.012
1.204 + res6@gsFillColor = "Gray"
1.205 +
1.206 +; Row header (equally space in y2)
1.207 +
1.208 + res7 = True
1.209 + res7@txFontHeightF = 0.015
1.210 + res7@gsFillColor = "Gray"
1.211 +;--------------------------------------------------------------
1.212 +; for station line plot
1.213 +
1.214 +; for x-axis in xyplot
1.215 + mon = ispan(1,12,1)
1.216 + mon@long_name = "month"
1.217 +
1.218 + plot_type = "ps"
1.219 + plot_type_new = "png"
1.220 +
1.221 + res = True ; plot mods desired
1.222 + res@xyLineThicknesses = (/2.0,2.0,2.0/) ; make 2nd lines thicker
1.223 + res@xyLineColors = (/"red","black"/) ; change line color
1.224 +
1.225 +; Add a boxed legend using the more simple method
1.226 +
1.227 + res@pmLegendDisplayMode = "Always"
1.228 +; res@pmLegendWidthF = 0.1
1.229 + res@pmLegendWidthF = 0.08
1.230 + res@pmLegendHeightF = 0.06
1.231 +; res@pmLegendOrthogonalPosF = -1.17
1.232 +; res@pmLegendOrthogonalPosF = -1.00 ;(downward)
1.233 + res@pmLegendOrthogonalPosF = -0.30 ;(downward)
1.234 +
1.235 +; res@pmLegendParallelPosF = 0.18
1.236 + res@pmLegendParallelPosF = 0.23 ;(rightward)
1.237 +
1.238 +; res@lgPerimOn = False
1.239 + res@lgLabelFontHeightF = 0.015
1.240 + res@xyExplicitLegendLabels = (/"b30.061n","observed"/)
1.241 +;-------------------------------------------------------------------
1.242 +
1.243 + do z = 0,nzone-1
1.244 +
1.245 + if (z .eq. 0) then
1.246 +; maximum score for the zone, 60N-90N
1.247 + zone = "60N-90N"
1.248 + score_max = 5.0
1.249 +; index of stations in this zone
1.250 + ind_z = ind(lat_ob .ge. 60.)
1.251 +; print (ind_z)
1.252 +; print (lat_ob(ind_z)+"/"+lon_ob(ind_z))
1.253 +; print (val_ob(ind_z,:))
1.254 +; print (val_model(ind_z,:))
1.255 + end if
1.256 +
1.257 + if (z .eq. 1) then
1.258 +; maximum score for the zone, 30N-60N
1.259 + zone = "30N-60N"
1.260 + score_max = 5.0
1.261 +; index of stations in this zone
1.262 + ind_z = ind(lat_ob .ge. 30. .and. lat_ob .lt. 60.)
1.263 +; print (ind_z)
1.264 +; print (lat_ob(ind_z)+"/"+lon_ob(ind_z))
1.265 +; print (val_ob(ind_z,:))
1.266 +; print (val_model(ind_z,:))
1.267 + end if
1.268 +
1.269 + if (z .eq. 2) then
1.270 +; maximum score for the zone, EQ-30N
1.271 + zone = "EQ-30N"
1.272 + score_max = 5.0
1.273 +; index of stations in this zone
1.274 + ind_z = ind(lat_ob .ge. 0. .and. lat_ob .lt. 30.)
1.275 +; print (ind_z)
1.276 +; print (lat_ob(ind_z)+"/"+lon_ob(ind_z))
1.277 +; print (val_ob(ind_z,:))
1.278 +; print (val_model(ind_z,:))
1.279 + end if
1.280 +
1.281 + if (z .eq. 3) then
1.282 +; maximum score for the zone, 90S-EQ
1.283 + zone = "90S-EQ"
1.284 + score_max = 5.0
1.285 +; index of stations in this zone
1.286 + ind_z = ind(lat_ob .lt. 0. )
1.287 +; print (ind_z)
1.288 +; print (lat_ob(ind_z)+"/"+lon_ob(ind_z))
1.289 +; print (val_ob(ind_z,:))
1.290 +; print (val_model(ind_z,:))
1.291 + end if
1.292 +
1.293 + npts = dimsizes(ind_z)
1.294 + print (npts)
1.295 +;-------------------------------------------------------------------------
1.296 +; for metric table computation
1.297 +
1.298 + amp_ob = new((/npts/),float)
1.299 + amp_model = new((/npts/),float)
1.300 +
1.301 + amp_ratio_sta = new((/npts/),float)
1.302 + ccr_sta = new((/npts/),float)
1.303 + M_sta = new((/npts/),float)
1.304 + score_sta = new((/npts/),float)
1.305 +
1.306 +;----------------------
1.307 +; for table -- station
1.308 +;----------------------
1.309 +
1.310 +; row (not including header row)
1.311 + nrow_sta = npts
1.312 +
1.313 +; Table header
1.314 + ncr5 = (/1,1/) ; 1 row, 1 column
1.315 + x5 = (/0.005,0.15/) ; Start and end X
1.316 + y5 = (/0.900,0.995/) ; Start and end Y
1.317 + res5 = True
1.318 + res5@txFontHeightF = 0.02
1.319 + res5@gsFillColor = "CornFlowerBlue"
1.320 +
1.321 +; Column header (equally space in x2)
1.322 + ncr6 = (/1,ncol_sta/) ; 1 rows, 5 columns
1.323 + x6 = (/x1(1),0.995/) ; start from end of x1
1.324 + y6 = y1 ; same as y1
1.325 + text6 = col_header_sta
1.326 + res6 = True
1.327 + res6@txFontHeightF = 0.012
1.328 + res6@gsFillColor = "Gray"
1.329 +
1.330 +; Row header (equally space in y2)
1.331 + ncr7 = (/nrow_sta,1/) ; 5 rows, 1 columns
1.332 + x7 = x1 ; same as x1
1.333 +; y7 = (/1.0-table_length_sta,0.900/) ; end at start of y1
1.334 + text7 = new((/nrow_sta/),string)
1.335 + res7 = True
1.336 + res7@txFontHeightF = 0.015
1.337 + res7@gsFillColor = "Gray"
1.338 +;-------------------------------------------------------------------------
1.339 +; for station line plot
1.340 +
1.341 + npts_str = ""
1.342 + npts_str = npts
1.343 +; print (npts_str)
1.344 +
1.345 + plot_data = new((/2,12,npts/),float)
1.346 + plot_data_0 = new((/12,npts/),float)
1.347 +
1.348 + plot_data!0 = "case"
1.349 + plot_data!1 = "month"
1.350 + plot_data!2 = "pts"
1.351 + plot_data@long_name = "CO2 Seasonal"
1.352 +
1.353 + plot_data_0!0 = "month"
1.354 + plot_data_0!1 = "pts"
1.355 + plot_data_0@long_name = "CO2"
1.356 +;--------------------------------------------------------------------------
1.357 + do n=0,npts-1
1.358 + amp_ob(n) = max(val_ob(ind_z(n),:)) - min(val_ob(ind_z(n),:))
1.359 + amp_model(n) = max(val_model(ind_z(n),:)) - min(val_model(ind_z(n),:))
1.360 +
1.361 + amp_ratio_sta(n) = amp_model(n)/amp_ob(n)
1.362 + ccr_sta(n) = esccr(val_ob(ind_z(n),:),val_model(ind_z(n),:),0)
1.363 + M_sta(n) = 1.-abs(amp_ratio_sta(n)-1.)
1.364 + score_sta(n) = (ccr_sta(n)*ccr_sta(n) + M_sta(n))*0.5 * score_max
1.365 +
1.366 + print (sta(ind_z(n))+"/"+lat(ind_z(n))+"/"+lon(ind_z(n))+"/"+amp_ratio_sta(n)+"/"+ccr_sta(n)+"/"+M_sta(n)+"/"+score_sta(n))
1.367 +;----------------------------------------------------------------------
1.368 +; for station line plot
1.369 +
1.370 + plot_data(0,:,n) = (/val_model(ind_z(n),:)/)
1.371 + plot_data(1,:,n) = (/val_ob(ind_z(n),:)/)
1.372 +
1.373 + plot_data_0(:,n) = (/val_model_0(ind_z(n),:)/)
1.374 +
1.375 + plot_name = sta(ind_z(n))
1.376 + title = plot_name+"("+lat(ind_z(n))+","+lon(ind_z(n))+")"
1.377 +; print (title)
1.378 +; print (plot_name)
1.379 +
1.380 + wks = gsn_open_wks (plot_type,plot_name) ; open workstation
1.381 +;------------------------------------------
1.382 +; for panel plot
1.383 +
1.384 + plot=new(2,graphic) ; create graphic array
1.385 + res@gsnFrame = False ; Do not draw plot
1.386 + res@gsnDraw = False ; Do not advance frame
1.387 +
1.388 + pres = True ; panel plot mods desired
1.389 + pres@gsnPanelYWhiteSpacePercent = 5 ; increase white space around
1.390 + ; indiv. plots in panel
1.391 + pres@gsnMaximize = True ; fill the page
1.392 +;------------------------------------------
1.393 + res@tiMainString = title ; add title
1.394 +
1.395 + plot(0)=gsn_csm_xy(wks,mon,plot_data(:,:,n),res) ; create plot 1
1.396 +
1.397 + plot(1)=gsn_csm_xy(wks,mon,plot_data_0(:,n),res) ; create plot 2
1.398 +
1.399 + gsn_panel(wks,plot,(/2,1/),pres) ; create panel plot
1.400 +
1.401 + system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new)
1.402 + system("rm "+plot_name+"."+plot_type)
1.403 + clear (wks)
1.404 +;---------------------------------------------------------------------------
1.405 + end do
1.406 +;-------------------------------------------------------------------------
1.407 +; for line plot in a zone
1.408 +
1.409 + plot_name = "All_"+npts_str
1.410 + title = plot_name + " in "+ zone
1.411 +; print (title)
1.412 +; print (plot_name)
1.413 +
1.414 + wks = gsn_open_wks (plot_type,plot_name) ; open workstation
1.415 +;-----------------------------------------
1.416 +; for panel plot
1.417 +
1.418 + plot=new(2,graphic) ; create graphic array
1.419 + res@gsnFrame = False ; Do not draw plot
1.420 + res@gsnDraw = False ; Do not advance frame
1.421 +
1.422 + pres = True ; panel plot mods desired
1.423 + pres@gsnPanelYWhiteSpacePercent = 5 ; increase white space around
1.424 + ; indiv. plots in panel
1.425 + pres@gsnMaximize = True ; fill the page
1.426 +;-----------------------------------------
1.427 + res@tiMainString = title ; add title
1.428 +
1.429 + plot(0) = gsn_csm_xy (wks,mon,dim_avg_Wrap(plot_data),res) ; create plot 1
1.430 +
1.431 + plot(1) = gsn_csm_xy (wks,mon,dim_avg_Wrap(plot_data_0),res) ; create plot 2
1.432 +
1.433 + gsn_panel(wks,plot,(/2,1/),pres) ; create panel plot
1.434 +
1.435 + system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new)
1.436 + system("rm "+plot_name+"."+plot_type)
1.437 +
1.438 + clear (wks)
1.439 +; delete (ind_z)
1.440 + delete (plot_data)
1.441 + delete (plot_data_0)
1.442 +;---------------------------------------------------------------------------
1.443 +; for zone table value
1.444 +
1.445 + amp_ratio_zone = avg(amp_ratio_sta)
1.446 + ccr_zone = avg(ccr_sta)
1.447 + M_zone = 1.- (sum(abs(amp_model-amp_ob)/(amp_model+amp_ob))/npts)
1.448 + score_zone = (ccr_zone*ccr_zone + M_zone)*0.5 * score_max
1.449 +
1.450 + print (npts+"/"+amp_ratio_zone+"/"+ccr_zone+"/"+M_zone+"/"+score_zone)
1.451 +
1.452 + text4(z,0) = sprintf("%5.2f", npts)
1.453 + text4(z,1) = sprintf("%5.2f", amp_ratio_zone)
1.454 + text4(z,2) = sprintf("%5.2f", ccr_zone)
1.455 + text4(z,3) = sprintf("%5.2f", M_zone)
1.456 + text4(z,4) = sprintf("%5.2f", score_zone)
1.457 +;---------------------------------------------------------------------------
1.458 +; plot station table
1.459 +;----------------------------------
1.460 +; header value for station table
1.461 + text5 = zone
1.462 +
1.463 +; row value for station table
1.464 + text7 = sta(ind_z)
1.465 +
1.466 + if (z .eq. 0) then
1.467 + table_length_sta = 0.5
1.468 + end if
1.469 + if (z .eq. 1) then
1.470 + table_length_sta = 0.995
1.471 + end if
1.472 + if (z .eq. 2) then
1.473 + table_length_sta = 0.8
1.474 + end if
1.475 + if (z .eq. 3) then
1.476 + table_length_sta = 0.8
1.477 + end if
1.478 +
1.479 + x7 = x5
1.480 + y7 = (/1.0-table_length_sta,0.900/) ; end at start of y1
1.481 +
1.482 +; Main table body
1.483 + ncr8 = (/nrow_sta,ncol_sta/) ; 5 rows, 5 columns
1.484 + x8 = x6 ; Start and end x
1.485 + y8 = y7 ; Start and end Y
1.486 + text8 = new((/nrow_sta,ncol_sta/),string)
1.487 +
1.488 + color_fill8 = text8
1.489 + color_fill8 = "white"
1.490 + color_fill8(:,ncol_sta-1) = "grey"
1.491 +
1.492 + res8 = True ; Set up resource list
1.493 + res8@gsnDebug = True ; Useful to print NDC row,col values used.
1.494 + res8@txFontHeightF = 0.02
1.495 + res8@gsFillColor = color_fill8
1.496 +
1.497 + delete (color_fill8)
1.498 +
1.499 +; table value for station table
1.500 + text8(:,0) = sprintf("%5.2f", (/lat(ind_z)/))
1.501 + text8(:,1) = sprintf("%5.2f", (/lon(ind_z)/))
1.502 + text8(:,2) = sprintf("%5.2f", (/amp_ratio_sta/))
1.503 + text8(:,3) = sprintf("%5.2f", (/ccr_sta/))
1.504 + text8(:,4) = sprintf("%5.2f", (/M_sta/))
1.505 + text8(:,5) = sprintf("%5.2f", (/score_sta/))
1.506 +
1.507 + plot_name = "table_sta." + zone
1.508 +
1.509 + wks = gsn_open_wks (plot_type,plot_name) ; open workstation
1.510 +
1.511 + gsn_table(wks,ncr5,x5,y5,text5,res5)
1.512 + gsn_table(wks,ncr6,x6,y6,text6,res6)
1.513 + gsn_table(wks,ncr7,x7,y7,text7,res7)
1.514 + gsn_table(wks,ncr8,x8,y8,text8,res8)
1.515 +
1.516 + frame(wks)
1.517 +
1.518 + system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new)
1.519 + system("rm "+plot_name+"."+plot_type)
1.520 +
1.521 + delete (ind_z)
1.522 + delete (amp_model)
1.523 + delete (amp_ob)
1.524 + delete (amp_ratio_sta)
1.525 + delete (ccr_sta)
1.526 + delete (M_sta)
1.527 + delete (score_sta)
1.528 + delete (text7)
1.529 + delete (text8)
1.530 + delete (res7)
1.531 + delete (res8)
1.532 + clear (wks)
1.533 + end do
1.534 +;**************************************************
1.535 +; plot zone table
1.536 +;**************************************************
1.537 +
1.538 + text4(4,0) = sum(stringtofloat(text4(0:3,0)))
1.539 + text4(4,1) = 0.
1.540 + text4(4,2) = 0.
1.541 + text4(4,3) = 0.
1.542 + text4(4,4) = sum(stringtofloat(text4(0:3,4)))
1.543 +
1.544 + plot_name = "table_zone"
1.545 + wks = gsn_open_wks (plot_type,plot_name) ; open workstation
1.546 +
1.547 + gsn_table(wks,ncr1,x1,y1,text1,res1)
1.548 + gsn_table(wks,ncr2,x2,y2,text2,res2)
1.549 + gsn_table(wks,ncr3,x3,y3,text3,res3)
1.550 + gsn_table(wks,ncr4,x4,y4,text4,res4)
1.551 +
1.552 + frame(wks)
1.553 +
1.554 + system("convert "+plot_name+"."+plot_type+" "+plot_name+"."+plot_type_new)
1.555 + system("rm "+plot_name+"."+plot_type)
1.556 +;-------------------------------------------------------------------
1.557 + system("mkdir temp")
1.558 + system("mv *.png temp")
1.559 + system("tar cf temp.tar temp")
1.560 +;-------------------------------------------------------------------
1.561 +end