On a previous version of NCL, I used this script and was able to read
binary data fine. Now I am using NCL 5.2 and have recently rerun the
script to find that all the values that are read in are now garbage.
What do I need to change to read the binary files correctly?
Thanks, Michael
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
names=asciiread("filenames",(/600/),"string")
a = fbindirread("/Users/notaro/ndvi/namer_albers.lat",0,(/1024,1280/),"short")
lat2d=short2flt(a)
lat2d=lat2d/100.
b = fbindirread("/Users/notaro/ndvi/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@units="degrees_north"
lon2d@units="degrees_east"
sw=new((/600/),float)
do i=0,599
d = fbindirread("/Users/notaro/ndvi/namer_all/"+names(i),0,(/1024,1280/),"short")
var=(/short2flt(d)/)
var=var/10000.
var!0="lat"
var!1="lon"
var@lat2d=lat2d
var@lon2d=lon2d
sw(i)=(/avg(var(692:694,597:599))/)
end do
ETC............
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 28 15:34:17 2010
This archive was generated by hypermail 2.1.8 : Fri Jul 30 2010 - 13:45:56 MDT