Hi Mike,
Dennis will fix this, but meanwhile, you can fix this yourself if you
have permissions to change the file:
$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
Go to the line (roughly 8533) that has:
if (.not.ismissing(ind1d)) then
and change to:
if (.not.any(ismissing(ind1d))) then
If you don't have permission to change the file, then you might be
able to copy into your own directory, edit it, and then load your own
version of the file instead of the one in $NCARG_ROOT.
--Mary
On Fri, 14 Mar 2008, Michael Notaro wrote:
> The following script, using getind_latlon2d, results in this error:
>
> fatal:Conditional statements (if and do while) require SCALAR logical values,
> see all and any functions
> fatal:Execute: Error occurred at or near line 8538 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
> fatal:Execute: Error occurred at or near line 53
>
> Any ideas why getind_latlon2d would produce this error?
>
> Thanks, Mike
>
>
> 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
>
> nlat=1801
> nlon=3601
>
> 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_at_units="degrees_north"
> lon2d_at_units="degrees_east"
>
> lats=ndtooned(lat2d)
> lons=ndtooned(lon2d)
>
> lat=fspan(-90.,90.,nlat)
> lon=fspan(-180.,180.,nlon)
> lat!0="lat"
> lat_at_units="degrees_north"
> lat&lat=lat
> lon!0="lon"
> lon_at_units="degrees_east"
> lon&lon=lon
>
> latit=new((/nlat,nlon/),float)
> longit=new((/nlat,nlon/),float)
> do i=0,nlat-1
> latit(i,:)=lat(i)
> end do
> do j=0,nlon-1
> longit(:,j)=lon(j)
> end do
>
> nm=getind_latlon2d(latit,longit,lats,lons)
>
> print(nm)
>
> end
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Mar 14 2008 - 10:00:36 MDT
This archive was generated by hypermail 2.2.0 : Fri Mar 14 2008 - 10:05:29 MDT