Re: Convert to Ascii format

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri, 15 May 2009 11:15:23 -0600

If you are new to NCL, please read the mini-language manual at

http://www.ncl.ucar.edu/Document/Manuals/

Also, the line-by-line "Getting Started" tutorial at:

http://www.ncl.ucar.edu/Document/Manuals/Getting_Started/

===
Writing netCDF to ascii will result in *huge* files.
You should have a good reason to do this.

Read the following:
http://www.ncl.ucar.edu/Document/Functions/Built-in/write_matrix.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/systemfunc.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml
===
A sketch of what could be done

  diri = "./" ; input directory
  fils = systemfunc("ls " + diri + "foo*")
  nfil = dimsizes(fils)

  fmtx = ...

  do nf=0,nfils-1
       f = addfile (fils(nf) , "r")

       x = f->VAR1

     opt = True
     opt_at_fout = "VAR1_nf="+nf
      write_matrix (x, fmtx, opt)

; other variables
  end do

Good luck
_______________________________________________
ncl-install mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-install
Received on Fri May 15 2009 - 11:15:23 MDT

This archive was generated by hypermail 2.2.0 : Tue May 19 2009 - 09:18:50 MDT