<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

ReadWrite/

write_oasis.pro

write an Oasis file (version < 2.5)

topwrite_oasis

write_oasis, filename, varname, z2d, I2=I2, I4=I4, I8=I8, R4=R4, APPEND=APPEND, RECSIZE=RECSIZE, TEMPORARY=TEMPORARY, HEADER=HEADER, ENDING=ENDING, POSITION=POSITION

Parameters

filename        in required

the filename

varname        in required

the name of the variable to be written

z2d        in required

the variable (2D array) to be written

Keywords

I2       

I4       

I8       

R4       

to change the default format (R8) of the data to be written.

APPEND       

to open the file with the file pointer at the end of the file, ready for data to be appended.

RECSIZE       

define the size of the full data array to be written. Usefull when you want to save memory and write the data in several write_oasis instructions. see example

TEMPORARY       

activate undefine z2d when yo write it (to save memory) -> z2d will be lost once write_oasis is returning.

HEADER       

activate to write the header ("character*8" contained in varname) before writting the data. Used when recsize is defined and /= 0, see example

ENDING       

activate when you write the last part of the data. Used when recsize is defined and /= 0, see example

POSITION       

specify the position (in byte) at which you want to write the data. Used when recsize is defined and /= 0, see example

Examples

write_oasis, fa2of, 'WEIGHTS5', weig or in several call so save memory ysz = 100L recsz8 = 16L * jpio * jpjo * 8L FOR i = 0L, jpjo-1L, ysz DO BEGIN ii = (i+ysz-1L) < (jpjo-1L) position = (4L + 8L + 4L + 4L)*(i NE 0) + 16L * jpio * i * 8L weig = .... write_oasis, fa2ou, 'WEIGHTS3', temporary(weig), /temporary, append = i NE 0, header = i EQ 0 $ , ending = ii EQ jpjo-1, recsize = recsz8, position = position ENDFOR

Version history

Version

$Id: write_oasis.pro 332 2008-02-11 16:48:24Z smasson $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) July 01, 2002

Known issues

Restrictions

varname is automatically written as a "character*8" by default z2d is written as an R8 array

Statistics

McCabe cyclic 17
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.