GIMMS NDVI

From: Benjamin Lamptey <bllamptey_at_nyahnyahspammersnyahnyah>
Date: Thu, 19 Jun 2008 16:52:04 +0000

Hello,
Can anyone tell me what I am doing wrong in reading my GIMMS NDVI files?
I get maximum NDVI values greater than one. This should not be so.

I use the code below as a test

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin
diri="/Users/Lamptey_all/Ben/Ben_new/research/uswest_paper/GSFC/"

names=asciiread("filenames",(/600/),"string")
a =
fbindirread(diri+"Ancillary_Files/LatLonFiles/namer_albers.lat",0,(/1024,1280/),"short")

lat2d=short2flt(a)
lat2d=lat2d/100.

b =
fbindirread(diri+"Ancillary_Files/LatLonFiles/namer_albers.lon",0,(/1024,1280/),"short")

lon2d=short2flt(b)
lon2d=lon2d/100.
lat2d!0="lat"
lat2d!1="lon"
lon2d!0="lat"
lon2d!1="lon"
lat2d_at_units="degrees_north"
lon2d_at_units="degrees_east"
sw=new((/600/),float)

do i=0,599

d = fbindirread(diri+"NAndvig/namer/"+names(i),0,(/1024,1280/),"short")

 var=(/short2flt(d)/)
 var=var/10000.
 print(max(var))
end do

end
xxxxxxxxxxxxxxxxxxxxx

The output is as follows:
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 4.3.1
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
(0) 3.252
(0) 3.252
(0) 3.252
(0) 3.252
(0) 3.2515
(0) 3.2511
(0) 3.2511
(0) 3.2767
(0) 3.2767
(0) 3.2511
(0) 3.2511
(0) 3.2511
(0) 3.2511
(0) 3.2511
(0) 3.2511
(0) 3.2511
(0) 3.2511
(0) 3.2516
(0) 3.2513
(0) 3.2513
(0) 3.2515
(0) 3.252
(0) 3.252
(0) 3.252
(0) 3.252
(0) 3.252
(0) 3.2525
(0) 3.252
(0) 3.252
(0) 3.2511
(0) 3.2767
(0) 3.2767
(0) 3.2767

.
.
.
xxxxxxxxxxxxxxxxxxxxx

The data files have names

NA06nov15b.n17-VIg NA90dec15a.n11-VIg NA98jun15b.n14-VIg
NA06oct15a.n17-VIg NA90dec15b.n11-VIg NA98mar15a.n14-VIg
NA06oct15b.n17-VIg NA90feb15a.n11-VIg NA98mar15b.n14-VIg
NA06sep15a.n17-VIg NA90feb15b.n11-VIg NA98may15a.n14-VIg
NA06sep15b.n17-VIg NA90jan15a.n11-VIg NA98may15b.n14-VIg
NA82apr15a.n07-VIg NA90jan15b.n11-VIg NA98nov15a.n14-VIg
NA82apr15b.n07-VIg NA90jul15a.n11-VIg NA98nov15b.n14-VIg
NA82aug15a.n07-VIg NA90jul15b.n11-VIg NA98oct15a.n14-VIg
NA82aug15b.n07-VIg NA90jun15a.n11-VIg NA98oct15b.n14-VIg
NA82dec15a.n07-VIg NA90jun15b.n11-VIg NA98sep15a.n14-VIg
.
.
.

Thanks
Ben

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 19 2008 - 10:52:04 MDT

This archive was generated by hypermail 2.2.0 : Thu Jun 19 2008 - 16:27:49 MDT