RMNLIB

(FST_DATA_LENGTH)

FSTD



INTEGER FUNCTION FST_DATA_LENGTH( length_type )

DESCRIPTION

Gives information on data length of the elements passed to fstecr and fstlir (double, short, integer, byte ...).


Author: M. Lepine

ARGUMENTS

Input:
length_type data length kind
1: byte
2: short (16 bits)
4: regular (32 bits)
8: double (64 bits)
Output:
FST_DATA_LENGTH Always return zero


EXAMPLE (in Fortran) real*8 field(ni,nj) datyp = 1
ier = fstecr( field, work, npak, iun, dateo, deet, npas, ni,
nj,nk, ip1, ip2, ip3, typvar, nomvar, etiket, grtyp,
ig1, ig2, ig3, ig4, datyp+fst_data_length(8), rewrit)

integer *2 array_of_short(22,10)
ni = 22
nj = 10
nk = 1
datyp = 130
ier = fstecr( array_of_short, work, npak, iun, dateo, deet, npas, ni,
nj,nk, ip1, ip2, ip3, typvar, nomvar, etiket, grtyp,
ig1, ig2, ig3, ig4, datyp+fst_data_length(2), rewrit)


(in C)
double field[ ];
datyp = 1;
ier = c_fstecr( field, work, npak, iun, dateo, deet, npas, ni,
nj,nk, ip1, ip2, ip3, typvar, nomvar, etiket, grtyp,
ig1, ig2, ig3, ig4, datyp+fst_data_length(8), rewrit);

short array_of_short[25];
datyp = 130;
ni = 25; nj = 1; nk = 1;
ier = c_fstecr( array_of_short, work, npak, iun, dateo, deet, npas, ni,
nj,nk, ip1, ip2, ip3, typvar, nomvar, etiket, grtyp,
ig1, ig2, ig3, ig4, datyp+fst_data_length(2), rewrit);



Return to product index