NCEPLIBS-bacio
2.6.0
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | bafrindex (LU, IB, LX, IX) |
This subprogram calls bafrindexl() to either read an unformatted fortran record and return its length and start byte of the next fortran record; or given the record length, without I/O it determines the start byte of the next fortran record. More... | |
subroutine | bafrindexl (LU, IB, LX, IX) |
This subprogram either reads an unformatted fortran record and return its length and start byte of the next fortran record; or given the record length, without i/o it determines the start byte of the next fortran record. More... | |
subroutine | bafrread (LU, IB, NB, KA, A) |
This subprogram calls bafread() to read an unformatted fortran record. More... | |
subroutine | bafrreadl (LU, IB, NB, KA, A) |
This subprogram reads an unformatted fortran record. More... | |
subroutine | bafrwrite (LU, IB, NB, KA, A) |
This subprogram calls bafrwrite() to write an unformatted fortran record. More... | |
subroutine | bafrwritel (LU, IB, NB, KA, A) |
This subprogram writes an unformatted fortran record. More... | |
This version of bafrio.f is revised to have byteswap in FORTRAN data file control words. It is designed to be run on on WCOSS(little endian machine) and to generate big endian files.
It does byteswap on fortran record control words (4 byte integer before and after data field), not on data field itself. Users need to byteswap their data after (for reading) or before (for writing) calling subroutines this file.
Definition in file bafrio.F90.
subroutine bafrindex | ( | integer, intent(in) | LU, |
integer, intent(in) | IB, | ||
integer, intent(inout) | LX, | ||
integer, intent(out) | IX | ||
) |
This subprogram calls bafrindexl() to either read an unformatted fortran record and return its length and start byte of the next fortran record; or given the record length, without I/O it determines the start byte of the next fortran record.
The difference between bafrindex() and bafrindexl() is the kind type of integers in the argument list.
[in] | lu | logical unit to read. if lu<=0, then determine ix from lx. |
[in] | ib | fortran record start byte. (for the first fortran record, ib should be 0). |
[in,out] | lx | record length in bytes if lu<=0. If lu>0, or lx=-1 for i/o error (probable end of file), or lx=-2 for i/o error (invalid fortran record). |
[out] | ix | start byte for the next fortran record. (computed only if lx>=0). |
Definition at line 33 of file bafrio.F90.
References bafrindexl().
subroutine bafrindexl | ( | integer, intent(in) | LU, |
integer(kind=8), intent(in) | IB, | ||
integer(kind=8), intent(inout) | LX, | ||
integer(kind=8), intent(out) | IX | ||
) |
This subprogram either reads an unformatted fortran record and return its length and start byte of the next fortran record; or given the record length, without i/o it determines the start byte of the next fortran record.
[in] | lu | logical unit to read. if lu<=0, then determine ix from lx. |
[in] | ib | fortran record start byte. (for the first fortran record, ib should be 0). |
[in,out] | lx | record length in bytes if lu<=0. If lu>0, or lx=-1 for i/o error (probable end of file), or lx=-2 for i/o error (invalid fortran record). |
[out] | ix | start byte for the next fortran record (computed only if lx>=0). |
Definition at line 65 of file bafrio.F90.
References bareadl(), and chk_endianc().
Referenced by bafrindex(), and bafrreadl().
subroutine bafrread | ( | integer, intent(in) | LU, |
integer, intent(in) | IB, | ||
integer, intent(in) | NB, | ||
integer, intent(out) | KA, | ||
character, dimension(nb), intent(out) | A | ||
) |
This subprogram calls bafread() to read an unformatted fortran record.
The difference between bafrread() and bafrreadl() is the kind type of integers in the argument list.
[in] | lu | logical unit to read. |
[in] | ib | fortran record start byte (for the first fortran record, ib should be 0). |
[in] | nb | number of bytes to read. |
[out] | ka | number of bytes in fortran record (in which case the next fortran record should have a start byte of ib+ka),
|
[out] | a | data read |
Definition at line 137 of file bafrio.F90.
References bafrreadl().
subroutine bafrreadl | ( | integer, intent(in) | LU, |
integer(kind=8), intent(in) | IB, | ||
integer(kind=8), intent(in) | NB, | ||
integer(kind=8), intent(out) | KA, | ||
character, dimension(nb), intent(out) | A | ||
) |
This subprogram reads an unformatted fortran record.
[in] | lu | logical unit to read. |
[in] | ib | fortran record start byte. (For the first fortran record, ib should be 0.) |
[in] | nb | number of bytes to read. |
[out] | ka | number of bytes in fortran record (in which case the next fortran record should have a start byte of ib+ka),
|
[out] | a | data read. |
Definition at line 170 of file bafrio.F90.
References bafrindexl(), and bareadl().
Referenced by bafrread().
subroutine bafrwrite | ( | integer, intent(in) | LU, |
integer, intent(in) | IB, | ||
integer, intent(in) | NB, | ||
integer, intent(out) | KA, | ||
character, dimension(nb), intent(in) | A | ||
) |
This subprogram calls bafrwrite() to write an unformatted fortran record.
The difference between bafrwrite() and bafrwritel() is the kind type of integers in the argument list.
[in] | lu | logical unit to write to. |
[in] | ib | fortran record start byte. (For the first fortran record, ib should be 0.) |
[in] | nb | number of bytes to write. |
[out] | ka | number of bytes in fortran record (in which case the next fortran record should have a start byte of ib+ka), or ka=-1 for i/o error. |
[in] | a | data to write. |
Definition at line 212 of file bafrio.F90.
References bafrwritel().
subroutine bafrwritel | ( | integer, intent(in) | LU, |
integer(kind=8), intent(in) | IB, | ||
integer(kind=8), intent(in) | NB, | ||
integer(kind=8), intent(out) | KA, | ||
character, dimension(nb), intent(in) | A | ||
) |
This subprogram writes an unformatted fortran record.
[in] | lu | logical unit to write to. |
[in] | ib | fortran record start byte. (For the first fortran record, ib should be 0.) |
[in] | nb | number of bytes to write. |
[out] | ka | integer number of bytes in fortran record (in which case the next fortran record should have a start byte of ib+ka), or ka=-1 for i/o error. |
[in] | a | data to write. |
Definition at line 244 of file bafrio.F90.
References bawritel(), and chk_endianc().
Referenced by bafrwrite().