class/01.test.ncl
author Forrest Hoffman <forrest@climatemodeling.org>
Thu, 26 Mar 2009 14:02:21 -0400
changeset 1 4be95183fbcd
permissions -rw-r--r--
Modifications to scoring and graphics production for the final version of code for the C-LAMP paper in GCB.
forrest@0
     1
;*************************************************
forrest@0
     2
; ce_1.ncl
forrest@0
     3
;************************************************
forrest@0
     4
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
forrest@0
     5
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
forrest@0
     6
;************************************************
forrest@0
     7
begin
forrest@0
     8
 
forrest@0
     9
;************************************************
forrest@0
    10
; read in model data
forrest@0
    11
;************************************************
forrest@0
    12
  diri  = "/fis/cgd/cseg/people/jeff/clamp/class/"
forrest@0
    13
  fili  = "T42.clamp.surface-data.060412.nc"
forrest@0
    14
  f     = addfile(diri+fili,"r")
forrest@0
    15
forrest@0
    16
  y     = f->PCT_PFT
forrest@0
    17
  printVarSummary(y)
forrest@0
    18
forrest@0
    19
  x = y(0,:,:)
forrest@0
    20
  
forrest@0
    21
  dimx = dimsizes(y)
forrest@0
    22
  nlat = dimx(1)
forrest@0
    23
  nlon = dimx(2)
forrest@0
    24
forrest@0
    25
  do j= 0,nlat-1
forrest@0
    26
  do i= 0,nlon-1
forrest@0
    27
     x(j,i) = sum(y(:,j,i))      
forrest@0
    28
  end do
forrest@0
    29
  end do 
forrest@0
    30
forrest@0
    31
  print (x)
forrest@0
    32
forrest@0
    33
end