forrest@0: ; *********************************************** forrest@0: ; xy_1.ncl forrest@0: ; *********************************************** 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: ;************************************************ forrest@0: ; read in data forrest@0: ;************************************************ forrest@0: f = addfile ("Npp_T42_mean.nc","r") forrest@0: u = f->NPP forrest@0: ;************************************************ forrest@0: ; read in model data forrest@0: ;************************************************ forrest@0: g = addfile ("i01.03cn_1545-1569_ANN_climo.nc","r") forrest@0: x = g->NPP forrest@0: lat = g->lat forrest@0: lon = g->lon forrest@0: forrest@0: delta = 0.00000000001 forrest@0: x0 = x(0,:,:) forrest@0: u = where(ismissing(u).and.(ismissing(x0).or.(x0.lt.delta)),0.,u) forrest@0: forrest@0: ; do j = 0,dimsizes(lat)-1 forrest@0: ; do i = 0,dimsizes(lon)-1 forrest@0: ; print(u(j,i)) forrest@0: ; print(x(0,j,i)) forrest@0: ; if (ismissing(u(j,i)) .and. (ismissing(x(0,j,i)).or. \ forrest@0: ; x(0,j,i) .lt. 0.00000000001)) then forrest@0: ; u(j,i) = 0. forrest@0: ; end if forrest@0: ; end do forrest@0: ; end do forrest@0: forrest@0: v = zonalAve(u) forrest@0: forrest@0: v@long_name = "NPP (gC/m2/year)" forrest@0: ;************************************************ forrest@0: ; plotting parameters forrest@0: ;************************************************ forrest@0: wks = gsn_open_wks ("png","xy") forrest@0: forrest@0: res = True forrest@0: res@tiMainString = "Observed MODIS MOD 17" forrest@0: forrest@0: plot = gsn_csm_xy (wks,v&lat,v,res) forrest@0: end