ncl script problem

From: Chao Luo <cluo_at_nyahnyahspammersnyahnyah>
Date: Tue, 11 Jul 2006 15:04:46 -0700

Hi,

I am trying to plot fraction of each dust bin emission to total
emission. Since in many regions the total emissions are zero. So I need
to set Fill value for zero numbers in these region in case of divided
by zero. But the error message: Subscript out of range. Is there any
better ways for this?

Thanks,

Chao

 part of my script is like:

 diri = "/data3/chaoluo/camdst/cam3019aersombf/"
 fl_mdl_3 = addfile(diri+"cam3019aersombf_annual.nc","r")
 sfmbl = fl_mdl_3->DSTSFMBL(0,:,:)
 sfmblx01 = fl_mdl_3->DSTX01SF(0,:,:)

 sfmbl@_FillValue=1.e+36
 nlon=128
 nlat=64
 
 frc1 = new((/nlat,nlon/),float)
 do ilon=0,nlon-1
 do ilat=0,nlat-1
 if (sfmbl(ilon,ilat).ne.0.) then
 frc1(ilon,ilat)=sfmblx01(ilon,ilat)/sfmbl(ilon,ilat)
 else
 frc1(ilon,ilat)=sfmbl@_FillValue
 end if
 end do
 end do
 print (frc1)
 

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 11 2006 - 16:04:46 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 11 2006 - 16:36:05 MDT