outpout data for region

From: Hasibur Rahman <rahman_at_nyahnyahspammersnyahnyah>
Date: Fri, 26 May 2006 12:08:15 +0530 (IST)

Hi,
    I am using AIRS hdf data to extract different parameters.I am
writing the out put on a singale file, because of large volume of the data
sets i am not able to write it on a singale file for a season or so i
could able to write for about 10 days data. Is there anyway of writng it
for a region say 30E-150E and -30S-30N ?
given below is the code which i used

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"

begin

         fils = systemfunc("ls AIRS*.hdf")

         nfils = dimsizes(fils)
         nlon = 360
         nlat = 180
         nlev = 24
         lev = (/1000,925,850,700,600,500,400,300,250,200,150,100,70,50,30,
\
                 20,15, 10,7,5,3,2,1.5,1/)

          T_A = new ( (/nfils,nlev,nlat,nlon/), "float")
          T_D = new ( (/nfils,nlev,nlat,nlon/), "float")
           ; T = new ( (/nfils,nlev,nlat,nlon/), "float")

         ;do nf=0,nfils-1
         do nf=0,1
print(fils(nf))

         f1 = addfile (fils(nf), "r")
         T_A(nf,:,:,:) = f1->Temperature_MW_A
         T_D(nf,:,:,:) = f1->Temperature_MW_D
         ;T(nf,:,:,:) = (T_A + T_D)/2.
            end do

         lats = f1->Latitude
         lons = f1->Longitude
         lon = lons(0,0:359)
         lat = lats(0:179,0)

;
-------------------------------------------------------------------
; Writes binary records to a file in manner analogous to
; fortran's "access=direct".
;
-------------------------------------------------------------------
         path = "05_07_t_a_d.grd"
         system("rm -f "+path) ;remove any previously exist file
              do nf = 0, nfils-1
          do nl = 0, nlev-1
           fbindirwrite(path,T_A(nf,nl,:,:) )
               end do
          do nl = 0, nlev-1
           fbindirwrite(path,T_D(nf,nl,:,:) )
              end do
         end do

end
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 26 2006 - 00:38:15 MDT

This archive was generated by hypermail 2.2.0 : Tue May 30 2006 - 09:35:39 MDT