[Thread Prev][Thread Next][Index]

Re: Saving 4D data slicewise



Hi Nils,

Easy solution. /APPEND can either extent a file along the time axis or add
new variables, OR ORVER_WRITE EXISTING PARTS OF A FILE. The qualifiers
/ILIMITS, /JLIMITS, etc. are convenient tools in your problem. You
need only (for example):

 let var=u*v  ! on some grid where u,v are 4 dimensional: u(i,j,k,l)
 save/ilimits=1:10 var[i=1]
 repeat/i=2:10 (save/file=var.cdf/append var[i=`i`])   ! not /l=`l`

The command "save/ilimits=1:10 var[i=1]" inserts missing data flags into
I=2:10.

	- steve
		|  NOAA/PMEL               |  ph. (206) 526-6080  
Steve Hankin	|  7600 Sand Point Way NE  |  FAX (206) 526-6744
		|  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov

On Wed, 14 Jan 1998, nils rix wrote:

> Hello Ferreteers,
> I'm trying to do a rather memory intensive calculation and to be 
> able to do it at all I would like to save intermediate results slicewise 
> to a file.
> Unfortunately the nature of the problem is such that a slice must be defined 
> along one of the first two axes (i or j-index say!!!). Does anyone know if 
> it is possible to in principle do something like 
>  
> let var=u*v  ! on some grid where u,v are 4 dimensional: u(i,j,k,l)
> repeat/i=1:10 (save/file=var.cdf/append/i=`i` var[i=`i`])   ! not /l=`l`
> 
> I know it works for the time axis, but that's not what I need.
> Does netcdf allow to increase any dimension of a variable in an existing 
> file?
> 
> Cheers Nils 
> 
> address:
> ---------------------------------------------------------------------------
> Nils H. Rix
> Dept. Theor. Oceanogr.            phone: (nat.)     0-431-597-3986
> Inst. f. Meereskunde                   : (int.)  ++49-431-597-3986
> Duesternbrookerweg 20               fax:         ++49-431-565-876
> 24105 Kiel, FRG                   e-mail: nrix@ifm.uni-kiel.de 
> ---------------------------------------------------------------------------
> 
> 
> 



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement