NAME
FMWRITBOX - write a budget article or a rectangular
sub-article to a FM-file
SYNOPSIS
USE MODI_FMWRIT_ll
CALL FMWRITBOX( HFILEM, HRECFM, HFIPRI, HBUDGET, FIELD,
KGRID, HCOMMENT, KXOBOX, KXEBOX, KYOBOX, KYEBOX, KRESP)
ARGUMENTS
IN
CHARACTER* :: HFILEM
CHARACTER* :: HRECFM
CHARACTER* :: HFIPRI
CHARACTER* :: HBUDGET
REAL,DIMENSION(2D-6D) :: FIELD
INTEGER :: KGRID
CHARACTER* :: HCOMMENT
INTEGER :: KXOBOX,KXEBOX,KYOBOX,KYEBOX
OUT
INTEGER :: KRESP
DESCRIPTION
The FMWRITBOX routine writes a budget or a sub-field arti
cle with HRECFM name to the binary LFI part of a FM-File.
The FM-file whose basename is hold in HFILEM must have
been previously opened with the FMOPEN_ll routine. The
data associated with the article are the C-grid indicator
KGRID, the comment string HCOMMENT and the data array
FIELD. FMWRITBOX is a generic routine that can write dif
ferent kinds of real data array FIELD: 2D, 3D, 4D, 5D or
6D real arrays. Budget or sub-field array are defined as
a box where ( KXOBOX, KYOBOX) and ( KXEBOX, KYEBOX) are
the origin and ending points global coordinates of the box
in the (x,y) plane. HBUDGET may take two string values
according to the field type : if the field is a budget
then HBUDGET=´BUDGET´ otherwise HBUDGET=´OTHER´.
FMWRITBOX is intended to work in a parallel environment
where the box may (or may not) have an intersection with a
local sub-domain handled by a processor : all processes
must call the FMWRITBOX routines. Internally, the FMWRIT
BOX statement causes only one processor, the so-called I/O
processor, to write the whole data associated with the
HRECFM article box. The I/O processor can deduce from the
global box coordinates what are the relevant data to
receive (with MPI operations) and from which processor, in
order to build and write the complete box array. Note that
all the communication processes are transparent to the
user.
RETURN VALUES
Upon successful completion, the informations associated
with the HRECFM box article are written to the FM file and
KRESP is set to 0. Otherwise KRESP is set to a non zero
value and an error message is printed in the HFIPRI file.
NOTES
The FMWRITBOX operation handles only the binary LFI part
of an FM-file. The other part (the so-called ASCII
descriptive part) is written with the fortran WRITE state
ment.
SEE ALSO
FMOPEN_ll(3f), FMWRIT(3f), FMWRIT_LB(3f)
Man(1) output converted with
man2html