Re: Reshape and write binary

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Apr 26 2012 - 12:10:49 MDT

  vals = fi->data
  fbinrecwrite (fo, -1, (/ vals(lat|:,lon|:,time|:) /)) ;

===
The mini-language manual
   http://www.ncl.ucar.edu/Document/Manuals/
briefly discusses this in section 2.10

Also, the Reference manual

http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclVariables.shtml

See "Named Subscripting"

On 04/26/2012 11:26 AM, Noel Aloysius wrote:
> Hi
>
> The netcdf data variable is written as data (time, lat, lon)
> where the dimenstion are time = 1200, lat = 180, lon = 360
>
> I use the following to write a binary file
>
> fi = addfile (fnames_in1, "r")
> fo = diri + fnames_out
> vals = (fi->data)
> fbinrecwrite (fo, -1, (/ vals(:,:,:) /)) ; data(time,lat,lon)
>
> I want to reshape the vals as data(lon,lat,time) and then write the
> binary file.
>
> I will appreciate any help on this.
>
> Thanks,
> Noel
>
>
>
>
> _______________________________________________
> 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 Thu Apr 26 12:10:57 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 30 2012 - 09:21:12 MDT