dumping multiple variables in one output binary file

From: Ipsita Putatunda <ipsita.putatunda_at_nyahnyahspammersnyahnyah>
Date: Thu Jul 04 2013 - 05:10:55 MDT

Hi,
   I have some HDF files, each containing 21 variables. I want to convert
it in binary files. below is the ncl script given, that I'm using for this
conversion. But is there any way to dump all the 21 variables in one output
binary files using fbindirwrite?
Otherwise I am getting 21 output binary files for each variable.
;----------------------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
;------------------------------------------------------
;------------------------------------------------------------
  fi=addfile("test.HDF","r")
  data=fi->Q1RMean
  data!0="lev"
  data!1="lon"
  data!2="lat"
  d_reorder=data(lev|:,lat|:,lon|:)

   nlev=19
    do nlv=0,nlev-1
     fbindirwrite("Q1RMean.dat",d_reorder(nlv,:,:))
    end do

Thanks,
Ipsita

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 4 05:11:38 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 05 2013 - 13:06:49 MDT