class/01.test.ncl
changeset 0 0c6405ab2ff4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/class/01.test.ncl	Mon Jan 26 22:08:20 2009 -0500
     1.3 @@ -0,0 +1,33 @@
     1.4 +;*************************************************
     1.5 +; ce_1.ncl
     1.6 +;************************************************
     1.7 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
     1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
     1.9 +;************************************************
    1.10 +begin
    1.11 + 
    1.12 +;************************************************
    1.13 +; read in model data
    1.14 +;************************************************
    1.15 +  diri  = "/fis/cgd/cseg/people/jeff/clamp/class/"
    1.16 +  fili  = "T42.clamp.surface-data.060412.nc"
    1.17 +  f     = addfile(diri+fili,"r")
    1.18 +
    1.19 +  y     = f->PCT_PFT
    1.20 +  printVarSummary(y)
    1.21 +
    1.22 +  x = y(0,:,:)
    1.23 +  
    1.24 +  dimx = dimsizes(y)
    1.25 +  nlat = dimx(1)
    1.26 +  nlon = dimx(2)
    1.27 +
    1.28 +  do j= 0,nlat-1
    1.29 +  do i= 0,nlon-1
    1.30 +     x(j,i) = sum(y(:,j,i))      
    1.31 +  end do
    1.32 +  end do 
    1.33 +
    1.34 +  print (x)
    1.35 +
    1.36 +end
    1.37 \ No newline at end of file