forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" forrest@0: load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" forrest@0: forrest@0: begin forrest@0: nlat = 3600 forrest@0: mlon = 7200 forrest@0: forrest@0: diri = "/fis/cgd/cseg/people/jeff/clamp_data/" forrest@0: fili = "MOD15A2_GEO_2000001.nc" forrest@0: a = addfile(diri+fili,"r") forrest@0: forrest@0: y = a->Lai_0_05deg ; byte forrest@0: y@_FillValue = inttobyte(253) forrest@0: y@_FillValue = inttobyte(255) forrest@0: forrest@0: x = byte2flt(y) forrest@0: forrest@0: x@_FillValue = 1.e+36 ; new fill forrest@0: forrest@0: lat = latGlobeFo(nlat, "lat", "latitude", "degrees_north") forrest@0: lat = (/ lat(::-1) /) ; make N->S forrest@0: lon = lonGlobeFo(mlon, "lon", "longitude", "degrees_east") forrest@0: lon = (/ lon - 180. /) ; subtract 180 from all values forrest@0: lon&lon = lon ; update coordinates forrest@0: forrest@0: x!0 = "lat" forrest@0: x!1 = "lon" forrest@0: x&lat= lat forrest@0: x&lon= lon forrest@0: forrest@0: y!0 = "lat" forrest@0: y!1 = "lon" forrest@0: y&lat= lat forrest@0: y&lon= lon forrest@0: forrest@0: iy = new (dimsizes(y), "integer", -999) forrest@0: iy = y forrest@0: forrest@0: iy!0 = "lat" forrest@0: iy!1 = "lon" forrest@0: iy&lat= lat forrest@0: iy&lon= lon forrest@0: forrest@0: print(y(:,{130})+" "+ iy(:,{130})+" "+x(:,{130})) forrest@0: forrest@0: forrest@0: forrest@0: ; diro = "/fis/cgd/cseg/people/jeff/clamp_data/" forrest@0: ; filo = "LAI_2000001_2.nc" forrest@0: ; c = addfile(diro+filo,"c") forrest@0: ; c->LAI = x forrest@0: end forrest@0: