lai/02.read_byte_LAI.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.
     1 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"  
     2 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"  
     3 load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"  
     4 
     5 begin
     6   nlat  = 3600
     7   mlon  = 7200
     8 
     9   diri  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    10   fili  = "MOD15A2_GEO_2000001.nc"
    11   a  = addfile(diri+fili,"r")
    12 
    13   diro  = "/fis/cgd/cseg/people/jeff/clamp_data/"
    14   filo  = "LAI_2000001_3.nc"
    15   c = addfile(diro+filo,"c")
    16 
    17   y = a->Lai_0_05deg
    18 
    19   y@_FillValue = inttobyte(253)
    20   y@_FillValue = inttobyte(255)
    21 
    22   x = byte2flt(y)
    23   
    24 ; x@_FillValue = -17281                      ; orig fill    
    25   x@_FillValue =  1.e+36                     ; new fill
    26 
    27   lat  = latGlobeFo(nlat, "lat", "latitude", "degrees_north")
    28   lat  = (/ lat(::-1) /)                     ; make N->S
    29   lon  = lonGlobeFo(mlon, "lon", "longitude", "degrees_east")
    30   lon  = (/ lon - 180. /) ; subtract 180 from all values 
    31   lon&lon = lon           ; update coordinates
    32 
    33   x!0  = "lat"
    34   x!1  = "lon"
    35   x&lat=  lat
    36   x&lon=  lon
    37 
    38   c->LAI  = x 
    39 end
    40