Re: write 3D matrix

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 24 2012 - 13:22:49 MDT

This question is vague. ascii, binary, netCDF,... ???
Please see:

  http://www.ncl.ucar.edu/Applications/list_io.shtml
+++++++++++++++++++++++++++++++++++++++++
Let x3d ; (time,lat,lon)

ASCII:

    x2d = onedtond( ndtooned(x3d), (/ntim,nlat*mlon/) )

    fmtx = "144f8.2"

    opt = True
    opt@fout = "JorgeConrado.txt"
    write_matrix (x2d, opt)

See:
  http://www.ncl.ucar.edu/Document/Functions/Built-in/write_matrix.shtml
  http://www.ncl.ucar.edu/Document/Functions/Built-in/ndtooned.shtml
  http://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml

====
  Binary

  fout = "JorgeConrado.bin"
  fbindirwrite(fout,x3d)

See:
  http://www.ncl.ucar.edu/Document/Functions/Built-in/fbindirwrite.shtml
====

netCDF
  system("/bin/rm -f JorgrConrado.nc") ; rm any pre-existing file
  ncdf = addfile("JorgeConrado.nc" ,"c") ; open output netCDF file

     ; make time and UNLIMITED dimension (recommended)applications
  filedimdef(ncdf,"time",-1,True)
  ncdf->X = x3d

On 9/24/12 12:53 PM, jorge.conrado@cptec.inpe.br wrote:
>
>
>
> Hello,
>
>
> I calculate the velocity potential using NCEP reanalysis for
> 2011 daily data.
>
> This the dimension of velocity potential:
>
>
> Variable: vp
> Type: float
> Total Size: 15347520 bytes
> 3836880 values
> Number of Dimensions: 3
> Dimensions and sizes: [365] x [73] x [144]
> time lat lon
>
> How can I write a matrix for this 3D data in my disk.
>
>
> Thanks.
>
>
>
> Conrado
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 24 13:23:08 2012

This archive was generated by hypermail 2.1.8 : Wed Sep 26 2012 - 13:56:04 MDT